feat(connector): [Stripe] implement Multibanco Bank Transfer for stripe (#1420)

Co-authored-by: Jagan <jaganelavarasan@gmail.com>
Co-authored-by: Arjun Karthik <m.arjunkarthik@gmail.com>
This commit is contained in:
AkshayaFoiger
2023-07-06 13:22:48 +05:30
committed by GitHub
parent e913bfc495
commit ca4e242d20
12 changed files with 214 additions and 37 deletions

View File

@ -436,6 +436,7 @@ pub enum PaymentMethodType {
Klarna,
MbWay,
MobilePay,
Multibanco,
OnlineBankingCzechRepublic,
OnlineBankingFinland,
OnlineBankingPoland,

View File

@ -807,6 +807,12 @@ pub struct AchBillingDetails {
pub email: Email,
}
#[derive(Debug, Clone, Eq, PartialEq, serde::Deserialize, serde::Serialize, ToSchema)]
pub struct MultibancoBillingDetails {
#[schema(value_type = String, example = "example@me.com")]
pub email: Email,
}
#[derive(Debug, Clone, Eq, PartialEq, serde::Deserialize, serde::Serialize, ToSchema)]
pub struct SepaAndBacsBillingDetails {
/// The Email ID for SEPA and BACS billing
@ -866,6 +872,10 @@ pub enum BankTransferData {
/// The billing details for SEPA
billing_details: SepaAndBacsBillingDetails,
},
MultibancoBankTransfer {
/// The billing details for Multibanco
billing_details: MultibancoBillingDetails,
},
}
#[derive(serde::Deserialize, serde::Serialize, Debug, Clone, ToSchema, Eq, PartialEq)]
@ -1241,6 +1251,8 @@ pub enum BankTransferInstructions {
SepaBankInstructions(Box<SepaBankTransferInstructions>),
/// The instructions for BACS bank transactions
BacsBankInstructions(Box<BacsBankTransferInstructions>),
/// The instructions for Multibanco bank transactions
Multibanco(Box<MultibancoTransferInstructions>),
}
#[derive(Clone, Debug, Eq, PartialEq, serde::Deserialize, serde::Serialize, ToSchema)]
@ -1264,6 +1276,14 @@ pub struct BacsBankTransferInstructions {
pub sort_code: Secret<String>,
}
#[derive(Clone, Debug, Eq, PartialEq, serde::Serialize, serde::Deserialize, ToSchema)]
pub struct MultibancoTransferInstructions {
#[schema(value_type = String, example = "122385736258")]
pub reference: Secret<String>,
#[schema(value_type = String, example = "12345")]
pub entity: String,
}
#[derive(Clone, Debug, Eq, PartialEq, serde::Serialize, serde::Deserialize, ToSchema)]
pub struct AchTransfer {
#[schema(value_type = String, example = "122385736258")]