feat(connector): [CRYPTOPAY] Make payment_method_data.crypto.network as enum (#4853)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
DEEPANSHU BANSAL
2024-06-04 20:29:11 +05:30
committed by GitHub
parent fcf52973f4
commit 1eaba9a10b
3 changed files with 9 additions and 1 deletions

View File

@ -430,6 +430,7 @@ pub enum FieldType {
UserCountryCode, //phone number's country code
UserCountry { options: Vec<String> }, //for country inside payment method data ex- bank redirect
UserCurrency { options: Vec<String> },
UserCryptoCurrencyNetwork, //for crypto network associated with the cryptopcurrency
UserBillingName,
UserAddressLine1,
UserAddressLine2,
@ -504,6 +505,7 @@ impl PartialEq for FieldType {
options: options_other,
},
) => options_self.eq(options_other),
(Self::UserCryptoCurrencyNetwork, Self::UserCryptoCurrencyNetwork) => true,
(Self::UserBillingName, Self::UserBillingName) => true,
(Self::UserAddressLine1, Self::UserAddressLine1) => true,
(Self::UserAddressLine2, Self::UserAddressLine2) => true,

View File

@ -8303,7 +8303,7 @@ impl Default for super::settings::RequiredFields {
RequiredFieldInfo {
required_field: "payment_method_data.crypto.network".to_string(),
display_name: "network".to_string(),
field_type: enums::FieldType::Text,
field_type: enums::FieldType::UserCryptoCurrencyNetwork,
value: None,
}
),

View File

@ -9296,6 +9296,12 @@
}
}
},
{
"type": "string",
"enum": [
"user_crypto_currency_network"
]
},
{
"type": "string",
"enum": [