From 0935fac11a5b2db56ad20b47ed293a0b4bd09443 Mon Sep 17 00:00:00 2001 From: Swangi Kumari <85639103+swangi-kumari@users.noreply.github.com> Date: Tue, 10 Dec 2024 16:09:46 +0530 Subject: [PATCH] refactor(payment_methods): Add new field_type UserBsbNumber, UserBankSortCode and UserBankRoutingNumber for payment_connector_required_fields (#6758) Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> --- api-reference-v2/openapi_spec.json | 18 ++++++++++++++++++ api-reference/openapi_spec.json | 18 ++++++++++++++++++ crates/api_models/src/enums.rs | 3 +++ .../payment_connector_required_fields.rs | 12 ++++++------ 4 files changed, 45 insertions(+), 6 deletions(-) diff --git a/api-reference-v2/openapi_spec.json b/api-reference-v2/openapi_spec.json index c788c21b2947..aaa4acb653a8 100644 --- a/api-reference-v2/openapi_spec.json +++ b/api-reference-v2/openapi_spec.json @@ -8583,6 +8583,24 @@ "user_iban" ] }, + { + "type": "string", + "enum": [ + "user_bsb_number" + ] + }, + { + "type": "string", + "enum": [ + "user_bank_sort_code" + ] + }, + { + "type": "string", + "enum": [ + "user_bank_routing_number" + ] + }, { "type": "string", "enum": [ diff --git a/api-reference/openapi_spec.json b/api-reference/openapi_spec.json index 4ec23f12139f..3211011bfb02 100644 --- a/api-reference/openapi_spec.json +++ b/api-reference/openapi_spec.json @@ -10925,6 +10925,24 @@ "user_iban" ] }, + { + "type": "string", + "enum": [ + "user_bsb_number" + ] + }, + { + "type": "string", + "enum": [ + "user_bank_sort_code" + ] + }, + { + "type": "string", + "enum": [ + "user_bank_routing_number" + ] + }, { "type": "string", "enum": [ diff --git a/crates/api_models/src/enums.rs b/crates/api_models/src/enums.rs index 4af3f855d77b..4275b10fd814 100644 --- a/crates/api_models/src/enums.rs +++ b/crates/api_models/src/enums.rs @@ -223,6 +223,9 @@ pub enum FieldType { UserCpf, UserCnpj, UserIban, + UserBsbNumber, + UserBankSortCode, + UserBankRoutingNumber, UserMsisdn, UserClientIdentifier, OrderDetailsProductName, diff --git a/crates/router/src/configs/defaults/payment_connector_required_fields.rs b/crates/router/src/configs/defaults/payment_connector_required_fields.rs index c759b724414a..0954ac51c7df 100644 --- a/crates/router/src/configs/defaults/payment_connector_required_fields.rs +++ b/crates/router/src/configs/defaults/payment_connector_required_fields.rs @@ -11634,7 +11634,7 @@ impl Default for settings::RequiredFields { RequiredFieldInfo { required_field: "payment_method_data.bank_debit.ach_bank_debit.routing_number".to_string(), display_name: "bank_routing_number".to_string(), - field_type: enums::FieldType::Text, + field_type: enums::FieldType::UserBankRoutingNumber, value: None, } ) @@ -11676,7 +11676,7 @@ impl Default for settings::RequiredFields { RequiredFieldInfo { required_field: "payment_method_data.bank_debit.ach_bank_debit.routing_number".to_string(), display_name: "bank_routing_number".to_string(), - field_type: enums::FieldType::Text, + field_type: enums::FieldType::UserBankRoutingNumber, value: None, } ) @@ -11845,7 +11845,7 @@ impl Default for settings::RequiredFields { RequiredFieldInfo { required_field: "payment_method_data.bank_debit.bacs_bank_debit.sort_code".to_string(), display_name: "bank_sort_code".to_string(), - field_type: enums::FieldType::Text, + field_type: enums::FieldType::UserBankSortCode, value: None, } ), @@ -11917,7 +11917,7 @@ impl Default for settings::RequiredFields { RequiredFieldInfo { required_field: "payment_method_data.bank_debit.bacs_bank_debit.sort_code".to_string(), display_name: "bank_sort_code".to_string(), - field_type: enums::FieldType::Text, + field_type: enums::FieldType::UserBankSortCode, value: None, } ) @@ -11967,7 +11967,7 @@ impl Default for settings::RequiredFields { RequiredFieldInfo { required_field: "payment_method_data.bank_debit.becs_bank_debit.bsb_number".to_string(), display_name: "bsb_number".to_string(), - field_type: enums::FieldType::Text, + field_type: enums::FieldType::UserBsbNumber, value: None, } ), @@ -12019,7 +12019,7 @@ impl Default for settings::RequiredFields { RequiredFieldInfo { required_field: "payment_method_data.bank_debit.becs_bank_debit.sort_code".to_string(), display_name: "bank_sort_code".to_string(), - field_type: enums::FieldType::Text, + field_type: enums::FieldType::UserBankSortCode, value: None, } )