diff --git a/api-reference-v2/openapi_spec.json b/api-reference-v2/openapi_spec.json index cf8200d67795..4727c205688d 100644 --- a/api-reference-v2/openapi_spec.json +++ b/api-reference-v2/openapi_spec.json @@ -1900,9 +1900,6 @@ "properties": { "przelewy24": { "type": "object", - "required": [ - "billing_details" - ], "properties": { "bank_name": { "allOf": [ @@ -1913,7 +1910,12 @@ "nullable": true }, "billing_details": { - "$ref": "#/components/schemas/BankRedirectBilling" + "allOf": [ + { + "$ref": "#/components/schemas/BankRedirectBilling" + } + ], + "nullable": true } } } diff --git a/api-reference/openapi_spec.json b/api-reference/openapi_spec.json index c479abc8d93c..a91f64daa8a6 100644 --- a/api-reference/openapi_spec.json +++ b/api-reference/openapi_spec.json @@ -6378,9 +6378,6 @@ "properties": { "przelewy24": { "type": "object", - "required": [ - "billing_details" - ], "properties": { "bank_name": { "allOf": [ @@ -6391,7 +6388,12 @@ "nullable": true }, "billing_details": { - "$ref": "#/components/schemas/BankRedirectBilling" + "allOf": [ + { + "$ref": "#/components/schemas/BankRedirectBilling" + } + ], + "nullable": true } } } diff --git a/crates/api_models/src/payments.rs b/crates/api_models/src/payments.rs index 88c915f0e73d..10db6a3c9d13 100644 --- a/crates/api_models/src/payments.rs +++ b/crates/api_models/src/payments.rs @@ -2128,7 +2128,7 @@ pub enum BankRedirectData { bank_name: Option, // The billing details for bank redirect - billing_details: BankRedirectBilling, + billing_details: Option, }, Sofort { /// The billing details for bank redirection @@ -2263,7 +2263,7 @@ impl GetAddressFromPaymentMethodData for BankRedirectData { } Self::Przelewy24 { billing_details, .. - } => get_billing_address_inner(Some(billing_details), None, None), + } => get_billing_address_inner(billing_details.as_ref(), None, None), Self::Trustly { country } => get_billing_address_inner(None, Some(country), None), Self::OnlineBankingFpx { .. } | Self::LocalBankRedirect {}