refactor(core): use profile id to find connector (#2020)

This commit is contained in:
Narayan Bhat
2023-09-11 12:55:22 +05:30
committed by GitHub
parent 60c5fdb89a
commit 5b29c25210
37 changed files with 776 additions and 363 deletions

View File

@ -488,7 +488,7 @@ impl From<StraightThroughAlgorithm> for StraightThroughAlgorithmSerde {
}
}
#[derive(Clone, Debug, Deserialize, ToSchema, Serialize)]
#[derive(Clone, Debug, Deserialize, ToSchema, Serialize, PartialEq)]
#[serde(deny_unknown_fields)]
pub struct PrimaryBusinessDetails {
#[schema(value_type = CountryAlpha2)]
@ -615,10 +615,10 @@ pub struct MerchantConnectorCreate {
#[schema(example = json!(common_utils::consts::FRM_CONFIGS_EG))]
pub frm_configs: Option<Vec<FrmConfigs>>,
#[schema(value_type = CountryAlpha2, example = "US")]
pub business_country: api_enums::CountryAlpha2,
#[schema(value_type = Option<CountryAlpha2>, example = "US")]
pub business_country: Option<api_enums::CountryAlpha2>,
pub business_label: String,
pub business_label: Option<String>,
/// Business Sub label of the merchant
#[schema(example = "chase")]
@ -658,7 +658,7 @@ pub struct MerchantConnectorResponse {
// /// Connector label for specific country and Business
#[serde(skip_deserializing)]
#[schema(example = "stripe_US_travel")]
pub connector_label: String,
pub connector_label: Option<String>,
/// Unique ID of the connector
#[schema(example = "mca_5apGeP94tMts6rg3U3kR")]
@ -708,12 +708,12 @@ pub struct MerchantConnectorResponse {
pub metadata: Option<pii::SecretSerdeValue>,
/// Business Country of the connector
#[schema(value_type = CountryAlpha2, example = "US")]
pub business_country: api_enums::CountryAlpha2,
#[schema(value_type = Option<CountryAlpha2>, example = "US")]
pub business_country: Option<api_enums::CountryAlpha2>,
///Business Type of the merchant
#[schema(example = "travel")]
pub business_label: String,
pub business_label: Option<String>,
/// Business Sub label of the merchant
#[schema(example = "chase")]