Skip to content

Commit

Permalink
feat(connector): [CRYPTOPAY] Make payment_method_data.crypto.network …
Browse files Browse the repository at this point in the history
…as enum (#4853)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
  • Loading branch information
deepanshu-iiitu and hyperswitch-bot[bot] authored Jun 4, 2024
1 parent fcf5297 commit 1eaba9a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
2 changes: 2 additions & 0 deletions crates/api_models/src/enums.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion crates/router/src/configs/defaults.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
),
Expand Down
6 changes: 6 additions & 0 deletions openapi/openapi_spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -9296,6 +9296,12 @@
}
}
},
{
"type": "string",
"enum": [
"user_crypto_currency_network"
]
},
{
"type": "string",
"enum": [
Expand Down

0 comments on commit 1eaba9a

Please sign in to comment.