mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-03 21:37:41 +08:00
feat(router): add api_models and openapi changes for payments create intent api for v2 (#5971)
Co-authored-by: hrithikesh026 <hrithikesh.vm@juspay.in> Co-authored-by: Narayan Bhat <narayan.bhat@juspay.in> Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
371ed5de04
commit
dc6208c5e5
@ -1916,6 +1916,7 @@ pub enum CountryAlpha2 {
|
||||
serde::Serialize,
|
||||
strum::Display,
|
||||
strum::EnumString,
|
||||
ToSchema,
|
||||
)]
|
||||
#[router_derive::diesel_enum(storage_type = "db_enum")]
|
||||
#[serde(rename_all = "snake_case")]
|
||||
@ -3219,37 +3220,58 @@ pub enum DeleteStatus {
|
||||
}
|
||||
|
||||
/// Whether 3ds authentication is requested or not
|
||||
#[derive(Clone, Debug, PartialEq, serde::Serialize)]
|
||||
#[derive(Clone, Debug, PartialEq, serde::Serialize, serde::Deserialize, Default, ToSchema)]
|
||||
pub enum External3dsAuthenticationRequest {
|
||||
/// Request for 3ds authentication
|
||||
Enable,
|
||||
/// Skip 3ds authentication
|
||||
#[default]
|
||||
Skip,
|
||||
}
|
||||
|
||||
/// Whether payment link is requested to be enabled or not for this transaction
|
||||
#[derive(Clone, Debug, PartialEq, serde::Serialize)]
|
||||
#[derive(Clone, Debug, PartialEq, serde::Serialize, serde::Deserialize, Default, ToSchema)]
|
||||
pub enum EnablePaymentLinkRequest {
|
||||
/// Request for enabling payment link
|
||||
Enable,
|
||||
/// Skip enabling payment link
|
||||
#[default]
|
||||
Skip,
|
||||
}
|
||||
|
||||
/// Whether mit exemption is requested or not
|
||||
#[derive(Clone, Debug, PartialEq, serde::Serialize)]
|
||||
#[derive(Clone, Debug, PartialEq, serde::Serialize, serde::Deserialize, Default, ToSchema)]
|
||||
pub enum MitExemptionRequest {
|
||||
/// Request for applying MIT exemption
|
||||
Apply,
|
||||
/// Skip applying MIT exemption
|
||||
#[default]
|
||||
Skip,
|
||||
}
|
||||
|
||||
/// Whether customer is present / absent during the payment
|
||||
#[derive(Clone, Debug, PartialEq, serde::Serialize)]
|
||||
/// Set to true to indicate that the customer is in your checkout flow during this payment, and therefore is able to authenticate. This parameter should be false when merchant's doing merchant initiated payments and customer is not present while doing the payment.
|
||||
#[derive(Clone, Debug, PartialEq, serde::Serialize, serde::Deserialize, Default, ToSchema)]
|
||||
pub enum PresenceOfCustomerDuringPayment {
|
||||
/// Customer is present during the payment. This is the default value
|
||||
#[default]
|
||||
Present,
|
||||
/// Customer is absent during the payment
|
||||
Absent,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, serde::Serialize, serde::Deserialize, Default, ToSchema)]
|
||||
pub enum TaxCalculationOverride {
|
||||
/// Skip calling the external tax provider
|
||||
#[default]
|
||||
Skip,
|
||||
/// Calculate tax by calling the external tax provider
|
||||
Calculate,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq, serde::Serialize, serde::Deserialize, Default, ToSchema)]
|
||||
pub enum SurchargeCalculationOverride {
|
||||
/// Skip calculating surcharge
|
||||
#[default]
|
||||
Skip,
|
||||
/// Calculate surcharge
|
||||
Calculate,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user