refactor(multiple_mca): make primary_business_detail optional and remove default values (#1677)

Co-authored-by: Arun Raj M <jarnura47@gmail.com>
This commit is contained in:
Narayan Bhat
2023-08-01 12:45:44 +05:30
committed by GitHub
parent 8a638e4a08
commit 9c7ac6246d
8 changed files with 85 additions and 127 deletions

View File

@ -10,7 +10,6 @@ license.workspace = true
[features]
default = ["payouts"]
errors = ["dep:actix-web", "dep:reqwest"]
multiple_mca = []
dummy_connector = ["common_enums/dummy_connector"]
detailed_errors = []
payouts = []

View File

@ -79,11 +79,6 @@ pub struct MerchantAccountCreate {
pub locker_id: Option<String>,
///Default business details for connector routing
#[cfg(feature = "multiple_mca")]
#[schema(value_type = PrimaryBusinessDetails)]
pub primary_business_details: Vec<PrimaryBusinessDetails>,
#[cfg(not(feature = "multiple_mca"))]
#[schema(value_type = Option<PrimaryBusinessDetails>)]
pub primary_business_details: Option<Vec<PrimaryBusinessDetails>>,
@ -598,21 +593,10 @@ pub struct MerchantConnectorCreate {
#[schema(example = json!(common_utils::consts::FRM_CONFIGS_EG))]
pub frm_configs: Option<Vec<FrmConfigs>>,
/// Business Country of the connector
#[cfg(feature = "multiple_mca")]
#[schema(value_type = CountryAlpha2, example = "US")]
pub business_country: api_enums::CountryAlpha2,
#[cfg(not(feature = "multiple_mca"))]
#[schema(value_type = Option<CountryAlpha2>, example = "US")]
pub business_country: Option<api_enums::CountryAlpha2>,
///Business Type of the merchant
#[schema(example = "travel")]
#[cfg(feature = "multiple_mca")]
pub business_label: String,
#[cfg(not(feature = "multiple_mca"))]
pub business_label: Option<String>,
/// Business Sub label of the merchant
#[schema(example = "chase")]