diff --git a/api-reference/v1/openapi_spec_v1.json b/api-reference/v1/openapi_spec_v1.json index 6c2fedbf68..b1004f4c93 100644 --- a/api-reference/v1/openapi_spec_v1.json +++ b/api-reference/v1/openapi_spec_v1.json @@ -32828,28 +32828,7 @@ "oneOf": [ { "type": "object", - "required": [ - "ali_pay_qr" - ], - "properties": { - "ali_pay_qr": { - "$ref": "#/components/schemas/AliPayQr" - } - } - }, - { - "type": "object", - "required": [ - "ali_pay_redirect" - ], - "properties": { - "ali_pay_redirect": { - "$ref": "#/components/schemas/AliPayRedirection" - } - } - }, - { - "type": "object", + "title": "AliPayHkRedirect", "required": [ "ali_pay_hk_redirect" ], @@ -32861,6 +32840,31 @@ }, { "type": "object", + "title": "AliPayQr", + "required": [ + "ali_pay_qr" + ], + "properties": { + "ali_pay_qr": { + "$ref": "#/components/schemas/AliPayQr" + } + } + }, + { + "type": "object", + "title": "AliPayRedirect", + "required": [ + "ali_pay_redirect" + ], + "properties": { + "ali_pay_redirect": { + "$ref": "#/components/schemas/AliPayRedirection" + } + } + }, + { + "type": "object", + "title": "AmazonPay", "required": [ "amazon_pay" ], @@ -32872,6 +32876,7 @@ }, { "type": "object", + "title": "AmazonPayRedirect", "required": [ "amazon_pay_redirect" ], @@ -32883,6 +32888,43 @@ }, { "type": "object", + "title": "ApplePay", + "required": [ + "apple_pay" + ], + "properties": { + "apple_pay": { + "$ref": "#/components/schemas/ApplePayWalletData" + } + } + }, + { + "type": "object", + "title": "ApplePayRedirect", + "required": [ + "apple_pay_redirect" + ], + "properties": { + "apple_pay_redirect": { + "$ref": "#/components/schemas/ApplePayRedirectData" + } + } + }, + { + "type": "object", + "title": "ApplePayThirdPartySdk", + "required": [ + "apple_pay_third_party_sdk" + ], + "properties": { + "apple_pay_third_party_sdk": { + "$ref": "#/components/schemas/ApplePayThirdPartySdkData" + } + } + }, + { + "type": "object", + "title": "BluecodeRedirect", "required": [ "bluecode_redirect" ], @@ -32895,105 +32937,19 @@ }, { "type": "object", + "title": "CashappQr", "required": [ - "skrill" + "cashapp_qr" ], "properties": { - "skrill": { - "$ref": "#/components/schemas/SkrillData" - } - } - }, - { - "type": "object", - "required": [ - "paysera" - ], - "properties": { - "paysera": { - "$ref": "#/components/schemas/PayseraData" - } - } - }, - { - "type": "object", - "required": [ - "momo_redirect" - ], - "properties": { - "momo_redirect": { - "$ref": "#/components/schemas/MomoRedirection" - } - } - }, - { - "type": "object", - "required": [ - "kakao_pay_redirect" - ], - "properties": { - "kakao_pay_redirect": { - "$ref": "#/components/schemas/KakaoPayRedirection" - } - } - }, - { - "type": "object", - "required": [ - "go_pay_redirect" - ], - "properties": { - "go_pay_redirect": { - "$ref": "#/components/schemas/GoPayRedirection" - } - } - }, - { - "type": "object", - "required": [ - "gcash_redirect" - ], - "properties": { - "gcash_redirect": { - "$ref": "#/components/schemas/GcashRedirection" - } - } - }, - { - "type": "object", - "required": [ - "apple_pay" - ], - "properties": { - "apple_pay": { - "$ref": "#/components/schemas/ApplePayWalletData" - } - } - }, - { - "type": "object", - "required": [ - "apple_pay_redirect" - ], - "properties": { - "apple_pay_redirect": { - "$ref": "#/components/schemas/ApplePayRedirectData" - } - } - }, - { - "type": "object", - "required": [ - "apple_pay_third_party_sdk" - ], - "properties": { - "apple_pay_third_party_sdk": { - "$ref": "#/components/schemas/ApplePayThirdPartySdkData" + "cashapp_qr": { + "$ref": "#/components/schemas/CashappQr" } } }, { "type": "object", + "title": "DanaRedirect", "required": [ "dana_redirect" ], @@ -33006,6 +32962,31 @@ }, { "type": "object", + "title": "GcashRedirect", + "required": [ + "gcash_redirect" + ], + "properties": { + "gcash_redirect": { + "$ref": "#/components/schemas/GcashRedirection" + } + } + }, + { + "type": "object", + "title": "GoPayRedirect", + "required": [ + "go_pay_redirect" + ], + "properties": { + "go_pay_redirect": { + "$ref": "#/components/schemas/GoPayRedirection" + } + } + }, + { + "type": "object", + "title": "GooglePay", "required": [ "google_pay" ], @@ -33017,6 +32998,7 @@ }, { "type": "object", + "title": "GooglePayRedirect", "required": [ "google_pay_redirect" ], @@ -33028,6 +33010,7 @@ }, { "type": "object", + "title": "GooglePayThirdPartySdk", "required": [ "google_pay_third_party_sdk" ], @@ -33039,6 +33022,19 @@ }, { "type": "object", + "title": "KakaoPayRedirect", + "required": [ + "kakao_pay_redirect" + ], + "properties": { + "kakao_pay_redirect": { + "$ref": "#/components/schemas/KakaoPayRedirection" + } + } + }, + { + "type": "object", + "title": "MbWayRedirect", "required": [ "mb_way_redirect" ], @@ -33050,6 +33046,19 @@ }, { "type": "object", + "title": "Mifinity", + "required": [ + "mifinity" + ], + "properties": { + "mifinity": { + "$ref": "#/components/schemas/MifinityData" + } + } + }, + { + "type": "object", + "title": "MobilePayRedirect", "required": [ "mobile_pay_redirect" ], @@ -33061,6 +33070,19 @@ }, { "type": "object", + "title": "MomoRedirect", + "required": [ + "momo_redirect" + ], + "properties": { + "momo_redirect": { + "$ref": "#/components/schemas/MomoRedirection" + } + } + }, + { + "type": "object", + "title": "PaypalRedirect", "required": [ "paypal_redirect" ], @@ -33072,6 +33094,7 @@ }, { "type": "object", + "title": "PaypalSdk", "required": [ "paypal_sdk" ], @@ -33083,6 +33106,19 @@ }, { "type": "object", + "title": "Paysera", + "required": [ + "paysera" + ], + "properties": { + "paysera": { + "$ref": "#/components/schemas/PayseraData" + } + } + }, + { + "type": "object", + "title": "Paze", "required": [ "paze" ], @@ -33094,6 +33130,19 @@ }, { "type": "object", + "title": "RevolutPay", + "required": [ + "revolut_pay" + ], + "properties": { + "revolut_pay": { + "$ref": "#/components/schemas/RevolutPayData" + } + } + }, + { + "type": "object", + "title": "SamsungPay", "required": [ "samsung_pay" ], @@ -33105,6 +33154,43 @@ }, { "type": "object", + "title": "Skrill", + "required": [ + "skrill" + ], + "properties": { + "skrill": { + "$ref": "#/components/schemas/SkrillData" + } + } + }, + { + "type": "object", + "title": "SwishQr", + "required": [ + "swish_qr" + ], + "properties": { + "swish_qr": { + "$ref": "#/components/schemas/SwishQrData" + } + } + }, + { + "type": "object", + "title": "TouchNGoRedirect", + "required": [ + "touch_n_go_redirect" + ], + "properties": { + "touch_n_go_redirect": { + "$ref": "#/components/schemas/TouchNGoRedirection" + } + } + }, + { + "type": "object", + "title": "TwintRedirect", "required": [ "twint_redirect" ], @@ -33117,6 +33203,7 @@ }, { "type": "object", + "title": "VippsRedirect", "required": [ "vipps_redirect" ], @@ -33129,28 +33216,7 @@ }, { "type": "object", - "required": [ - "touch_n_go_redirect" - ], - "properties": { - "touch_n_go_redirect": { - "$ref": "#/components/schemas/TouchNGoRedirection" - } - } - }, - { - "type": "object", - "required": [ - "we_chat_pay_redirect" - ], - "properties": { - "we_chat_pay_redirect": { - "$ref": "#/components/schemas/WeChatPayRedirection" - } - } - }, - { - "type": "object", + "title": "WeChatPayQr", "required": [ "we_chat_pay_qr" ], @@ -33162,45 +33228,13 @@ }, { "type": "object", + "title": "WeChatPayRedirect", "required": [ - "cashapp_qr" + "we_chat_pay_redirect" ], "properties": { - "cashapp_qr": { - "$ref": "#/components/schemas/CashappQr" - } - } - }, - { - "type": "object", - "required": [ - "swish_qr" - ], - "properties": { - "swish_qr": { - "$ref": "#/components/schemas/SwishQrData" - } - } - }, - { - "type": "object", - "required": [ - "mifinity" - ], - "properties": { - "mifinity": { - "$ref": "#/components/schemas/MifinityData" - } - } - }, - { - "type": "object", - "required": [ - "revolut_pay" - ], - "properties": { - "revolut_pay": { - "$ref": "#/components/schemas/RevolutPayData" + "we_chat_pay_redirect": { + "$ref": "#/components/schemas/WeChatPayRedirection" } } } diff --git a/api-reference/v2/openapi_spec_v2.json b/api-reference/v2/openapi_spec_v2.json index 8a103d92a8..e324240a1a 100644 --- a/api-reference/v2/openapi_spec_v2.json +++ b/api-reference/v2/openapi_spec_v2.json @@ -26404,28 +26404,7 @@ "oneOf": [ { "type": "object", - "required": [ - "ali_pay_qr" - ], - "properties": { - "ali_pay_qr": { - "$ref": "#/components/schemas/AliPayQr" - } - } - }, - { - "type": "object", - "required": [ - "ali_pay_redirect" - ], - "properties": { - "ali_pay_redirect": { - "$ref": "#/components/schemas/AliPayRedirection" - } - } - }, - { - "type": "object", + "title": "AliPayHkRedirect", "required": [ "ali_pay_hk_redirect" ], @@ -26437,6 +26416,31 @@ }, { "type": "object", + "title": "AliPayQr", + "required": [ + "ali_pay_qr" + ], + "properties": { + "ali_pay_qr": { + "$ref": "#/components/schemas/AliPayQr" + } + } + }, + { + "type": "object", + "title": "AliPayRedirect", + "required": [ + "ali_pay_redirect" + ], + "properties": { + "ali_pay_redirect": { + "$ref": "#/components/schemas/AliPayRedirection" + } + } + }, + { + "type": "object", + "title": "AmazonPay", "required": [ "amazon_pay" ], @@ -26448,6 +26452,7 @@ }, { "type": "object", + "title": "AmazonPayRedirect", "required": [ "amazon_pay_redirect" ], @@ -26459,6 +26464,43 @@ }, { "type": "object", + "title": "ApplePay", + "required": [ + "apple_pay" + ], + "properties": { + "apple_pay": { + "$ref": "#/components/schemas/ApplePayWalletData" + } + } + }, + { + "type": "object", + "title": "ApplePayRedirect", + "required": [ + "apple_pay_redirect" + ], + "properties": { + "apple_pay_redirect": { + "$ref": "#/components/schemas/ApplePayRedirectData" + } + } + }, + { + "type": "object", + "title": "ApplePayThirdPartySdk", + "required": [ + "apple_pay_third_party_sdk" + ], + "properties": { + "apple_pay_third_party_sdk": { + "$ref": "#/components/schemas/ApplePayThirdPartySdkData" + } + } + }, + { + "type": "object", + "title": "BluecodeRedirect", "required": [ "bluecode_redirect" ], @@ -26471,105 +26513,19 @@ }, { "type": "object", + "title": "CashappQr", "required": [ - "skrill" + "cashapp_qr" ], "properties": { - "skrill": { - "$ref": "#/components/schemas/SkrillData" - } - } - }, - { - "type": "object", - "required": [ - "paysera" - ], - "properties": { - "paysera": { - "$ref": "#/components/schemas/PayseraData" - } - } - }, - { - "type": "object", - "required": [ - "momo_redirect" - ], - "properties": { - "momo_redirect": { - "$ref": "#/components/schemas/MomoRedirection" - } - } - }, - { - "type": "object", - "required": [ - "kakao_pay_redirect" - ], - "properties": { - "kakao_pay_redirect": { - "$ref": "#/components/schemas/KakaoPayRedirection" - } - } - }, - { - "type": "object", - "required": [ - "go_pay_redirect" - ], - "properties": { - "go_pay_redirect": { - "$ref": "#/components/schemas/GoPayRedirection" - } - } - }, - { - "type": "object", - "required": [ - "gcash_redirect" - ], - "properties": { - "gcash_redirect": { - "$ref": "#/components/schemas/GcashRedirection" - } - } - }, - { - "type": "object", - "required": [ - "apple_pay" - ], - "properties": { - "apple_pay": { - "$ref": "#/components/schemas/ApplePayWalletData" - } - } - }, - { - "type": "object", - "required": [ - "apple_pay_redirect" - ], - "properties": { - "apple_pay_redirect": { - "$ref": "#/components/schemas/ApplePayRedirectData" - } - } - }, - { - "type": "object", - "required": [ - "apple_pay_third_party_sdk" - ], - "properties": { - "apple_pay_third_party_sdk": { - "$ref": "#/components/schemas/ApplePayThirdPartySdkData" + "cashapp_qr": { + "$ref": "#/components/schemas/CashappQr" } } }, { "type": "object", + "title": "DanaRedirect", "required": [ "dana_redirect" ], @@ -26582,6 +26538,31 @@ }, { "type": "object", + "title": "GcashRedirect", + "required": [ + "gcash_redirect" + ], + "properties": { + "gcash_redirect": { + "$ref": "#/components/schemas/GcashRedirection" + } + } + }, + { + "type": "object", + "title": "GoPayRedirect", + "required": [ + "go_pay_redirect" + ], + "properties": { + "go_pay_redirect": { + "$ref": "#/components/schemas/GoPayRedirection" + } + } + }, + { + "type": "object", + "title": "GooglePay", "required": [ "google_pay" ], @@ -26593,6 +26574,7 @@ }, { "type": "object", + "title": "GooglePayRedirect", "required": [ "google_pay_redirect" ], @@ -26604,6 +26586,7 @@ }, { "type": "object", + "title": "GooglePayThirdPartySdk", "required": [ "google_pay_third_party_sdk" ], @@ -26615,6 +26598,19 @@ }, { "type": "object", + "title": "KakaoPayRedirect", + "required": [ + "kakao_pay_redirect" + ], + "properties": { + "kakao_pay_redirect": { + "$ref": "#/components/schemas/KakaoPayRedirection" + } + } + }, + { + "type": "object", + "title": "MbWayRedirect", "required": [ "mb_way_redirect" ], @@ -26626,6 +26622,19 @@ }, { "type": "object", + "title": "Mifinity", + "required": [ + "mifinity" + ], + "properties": { + "mifinity": { + "$ref": "#/components/schemas/MifinityData" + } + } + }, + { + "type": "object", + "title": "MobilePayRedirect", "required": [ "mobile_pay_redirect" ], @@ -26637,6 +26646,19 @@ }, { "type": "object", + "title": "MomoRedirect", + "required": [ + "momo_redirect" + ], + "properties": { + "momo_redirect": { + "$ref": "#/components/schemas/MomoRedirection" + } + } + }, + { + "type": "object", + "title": "PaypalRedirect", "required": [ "paypal_redirect" ], @@ -26648,6 +26670,7 @@ }, { "type": "object", + "title": "PaypalSdk", "required": [ "paypal_sdk" ], @@ -26659,6 +26682,19 @@ }, { "type": "object", + "title": "Paysera", + "required": [ + "paysera" + ], + "properties": { + "paysera": { + "$ref": "#/components/schemas/PayseraData" + } + } + }, + { + "type": "object", + "title": "Paze", "required": [ "paze" ], @@ -26670,6 +26706,19 @@ }, { "type": "object", + "title": "RevolutPay", + "required": [ + "revolut_pay" + ], + "properties": { + "revolut_pay": { + "$ref": "#/components/schemas/RevolutPayData" + } + } + }, + { + "type": "object", + "title": "SamsungPay", "required": [ "samsung_pay" ], @@ -26681,6 +26730,43 @@ }, { "type": "object", + "title": "Skrill", + "required": [ + "skrill" + ], + "properties": { + "skrill": { + "$ref": "#/components/schemas/SkrillData" + } + } + }, + { + "type": "object", + "title": "SwishQr", + "required": [ + "swish_qr" + ], + "properties": { + "swish_qr": { + "$ref": "#/components/schemas/SwishQrData" + } + } + }, + { + "type": "object", + "title": "TouchNGoRedirect", + "required": [ + "touch_n_go_redirect" + ], + "properties": { + "touch_n_go_redirect": { + "$ref": "#/components/schemas/TouchNGoRedirection" + } + } + }, + { + "type": "object", + "title": "TwintRedirect", "required": [ "twint_redirect" ], @@ -26693,6 +26779,7 @@ }, { "type": "object", + "title": "VippsRedirect", "required": [ "vipps_redirect" ], @@ -26705,28 +26792,7 @@ }, { "type": "object", - "required": [ - "touch_n_go_redirect" - ], - "properties": { - "touch_n_go_redirect": { - "$ref": "#/components/schemas/TouchNGoRedirection" - } - } - }, - { - "type": "object", - "required": [ - "we_chat_pay_redirect" - ], - "properties": { - "we_chat_pay_redirect": { - "$ref": "#/components/schemas/WeChatPayRedirection" - } - } - }, - { - "type": "object", + "title": "WeChatPayQr", "required": [ "we_chat_pay_qr" ], @@ -26738,45 +26804,13 @@ }, { "type": "object", + "title": "WeChatPayRedirect", "required": [ - "cashapp_qr" + "we_chat_pay_redirect" ], "properties": { - "cashapp_qr": { - "$ref": "#/components/schemas/CashappQr" - } - } - }, - { - "type": "object", - "required": [ - "swish_qr" - ], - "properties": { - "swish_qr": { - "$ref": "#/components/schemas/SwishQrData" - } - } - }, - { - "type": "object", - "required": [ - "mifinity" - ], - "properties": { - "mifinity": { - "$ref": "#/components/schemas/MifinityData" - } - } - }, - { - "type": "object", - "required": [ - "revolut_pay" - ], - "properties": { - "revolut_pay": { - "$ref": "#/components/schemas/RevolutPayData" + "we_chat_pay_redirect": { + "$ref": "#/components/schemas/WeChatPayRedirection" } } } diff --git a/crates/api_models/src/payments.rs b/crates/api_models/src/payments.rs index 34a8beee16..7f0c797a15 100644 --- a/crates/api_models/src/payments.rs +++ b/crates/api_models/src/payments.rs @@ -3816,73 +3816,108 @@ impl GetAddressFromPaymentMethodData for BankDebitBilling { #[derive(Eq, PartialEq, Clone, Debug, serde::Deserialize, serde::Serialize, ToSchema)] #[serde(rename_all = "snake_case")] pub enum WalletData { + /// The wallet data for Ali Pay HK redirect + #[schema(title = "AliPayHkRedirect")] + AliPayHkRedirect(AliPayHkRedirection), /// The wallet data for Ali Pay QrCode + #[schema(title = "AliPayQr")] AliPayQr(Box), /// The wallet data for Ali Pay redirect + #[schema(title = "AliPayRedirect")] AliPayRedirect(AliPayRedirection), - /// The wallet data for Ali Pay HK redirect - AliPayHkRedirect(AliPayHkRedirection), /// The wallet data for Amazon Pay + #[schema(title = "AmazonPay")] AmazonPay(AmazonPayWalletData), /// The wallet data for Amazon Pay redirect + #[schema(title = "AmazonPayRedirect")] AmazonPayRedirect(AmazonPayRedirectData), - /// The wallet data for Bluecode QR Code Redirect - BluecodeRedirect {}, - /// The wallet data for Skrill - Skrill(SkrillData), - /// The wallet data for Paysera - Paysera(PayseraData), - /// The wallet data for Momo redirect - MomoRedirect(MomoRedirection), - /// The wallet data for KakaoPay redirect - KakaoPayRedirect(KakaoPayRedirection), - /// The wallet data for GoPay redirect - GoPayRedirect(GoPayRedirection), - /// The wallet data for Gcash redirect - GcashRedirect(GcashRedirection), /// The wallet data for Apple pay + #[schema(title = "ApplePay")] ApplePay(ApplePayWalletData), /// Wallet data for apple pay redirect flow + #[schema(title = "ApplePayRedirect")] ApplePayRedirect(Box), /// Wallet data for apple pay third party sdk flow + #[schema(title = "ApplePayThirdPartySdk")] ApplePayThirdPartySdk(Box), + /// The wallet data for Bluecode QR Code Redirect + #[schema(title = "BluecodeRedirect")] + BluecodeRedirect {}, + /// The wallet data for Cashapp Qr + #[schema(title = "CashappQr")] + CashappQr(Box), /// Wallet data for DANA redirect flow + #[schema(title = "DanaRedirect")] DanaRedirect {}, + /// The wallet data for Gcash redirect + #[schema(title = "GcashRedirect")] + GcashRedirect(GcashRedirection), + /// The wallet data for GoPay redirect + #[schema(title = "GoPayRedirect")] + GoPayRedirect(GoPayRedirection), /// The wallet data for Google pay + #[schema(title = "GooglePay")] GooglePay(GooglePayWalletData), /// Wallet data for google pay redirect flow + #[schema(title = "GooglePayRedirect")] GooglePayRedirect(Box), /// Wallet data for Google pay third party sdk flow + #[schema(title = "GooglePayThirdPartySdk")] GooglePayThirdPartySdk(Box), + /// The wallet data for KakaoPay redirect + #[schema(title = "KakaoPayRedirect")] + KakaoPayRedirect(KakaoPayRedirection), + /// Wallet data for MbWay redirect flow + #[schema(title = "MbWayRedirect")] MbWayRedirect(Box), + // The wallet data for Mifinity Ewallet + #[schema(title = "Mifinity")] + Mifinity(MifinityData), /// The wallet data for MobilePay redirect + #[schema(title = "MobilePayRedirect")] MobilePayRedirect(Box), + /// The wallet data for Momo redirect + #[schema(title = "MomoRedirect")] + MomoRedirect(MomoRedirection), /// This is for paypal redirection + #[schema(title = "PaypalRedirect")] PaypalRedirect(PaypalRedirection), /// The wallet data for Paypal + #[schema(title = "PaypalSdk")] PaypalSdk(PayPalWalletData), + /// The wallet data for Paysera + #[schema(title = "Paysera")] + Paysera(PayseraData), /// The wallet data for Paze + #[schema(title = "Paze")] Paze(PazeWalletData), + // The wallet data for RevolutPay + #[schema(title = "RevolutPay")] + RevolutPay(RevolutPayData), /// The wallet data for Samsung Pay + #[schema(title = "SamsungPay")] SamsungPay(Box), + /// The wallet data for Skrill + #[schema(title = "Skrill")] + Skrill(SkrillData), + // The wallet data for Swish + #[schema(title = "SwishQr")] + SwishQr(SwishQrData), + /// The wallet data for Touch n Go Redirection + #[schema(title = "TouchNGoRedirect")] + TouchNGoRedirect(Box), /// Wallet data for Twint Redirection + #[schema(title = "TwintRedirect")] TwintRedirect {}, /// Wallet data for Vipps Redirection + #[schema(title = "VippsRedirect")] VippsRedirect {}, - /// The wallet data for Touch n Go Redirection - TouchNGoRedirect(Box), - /// The wallet data for WeChat Pay Redirection - WeChatPayRedirect(Box), /// The wallet data for WeChat Pay Display QrCode + #[schema(title = "WeChatPayQr")] WeChatPayQr(Box), - /// The wallet data for Cashapp Qr - CashappQr(Box), - // The wallet data for Swish - SwishQr(SwishQrData), - // The wallet data for Mifinity Ewallet - Mifinity(MifinityData), - // The wallet data for RevolutPay - RevolutPay(RevolutPayData), + /// The wallet data for WeChat Pay Redirection + #[schema(title = "WeChatPayRedirect")] + WeChatPayRedirect(Box), } impl GetAddressFromPaymentMethodData for WalletData {