mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 09:38:33 +08:00
refactor: use CountryAlpha2 instead of CountryCode for country codes (#904)
This commit is contained in:
@ -254,7 +254,7 @@ pub enum RoutingAlgorithm {
|
||||
#[derive(Clone, Debug, Deserialize, ToSchema, Serialize)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct PrimaryBusinessDetails {
|
||||
pub country: api_enums::CountryCode,
|
||||
pub country: api_enums::CountryAlpha2,
|
||||
pub business: String,
|
||||
}
|
||||
|
||||
@ -385,11 +385,11 @@ pub struct MerchantConnectorCreate {
|
||||
pub frm_configs: Option<FrmConfigs>,
|
||||
|
||||
/// Business Country of the connector
|
||||
#[schema(example = "US")]
|
||||
#[schema(value_type = CountryAlpha2, example = "US")]
|
||||
#[cfg(feature = "multiple_mca")]
|
||||
pub business_country: api_enums::CountryCode,
|
||||
pub business_country: api_enums::CountryAlpha2,
|
||||
#[cfg(not(feature = "multiple_mca"))]
|
||||
pub business_country: Option<api_enums::CountryCode>,
|
||||
pub business_country: Option<api_enums::CountryAlpha2>,
|
||||
|
||||
///Business Type of the merchant
|
||||
#[schema(example = "travel")]
|
||||
@ -466,8 +466,8 @@ pub struct MerchantConnectorResponse {
|
||||
pub metadata: Option<pii::SecretSerdeValue>,
|
||||
|
||||
/// Business Country of the connector
|
||||
#[schema(example = "US")]
|
||||
pub business_country: api_enums::CountryCode,
|
||||
#[schema(value_type = CountryAlpha2, example = "US")]
|
||||
pub business_country: api_enums::CountryAlpha2,
|
||||
|
||||
///Business Type of the merchant
|
||||
#[schema(example = "travel")]
|
||||
@ -603,8 +603,8 @@ pub enum AcceptedCurrencies {
|
||||
rename_all = "snake_case"
|
||||
)]
|
||||
pub enum AcceptedCountries {
|
||||
EnableOnly(Vec<api_enums::CountryCode>),
|
||||
DisableOnly(Vec<api_enums::CountryCode>),
|
||||
EnableOnly(Vec<api_enums::CountryAlpha2>),
|
||||
DisableOnly(Vec<api_enums::CountryAlpha2>),
|
||||
AllAccepted,
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user