Skip to content

Commit

Permalink
remove fields from MerchantConnectorListResponse
Browse files Browse the repository at this point in the history
  • Loading branch information
AkshayaFoiger committed Nov 15, 2024
1 parent 0b63efb commit e04e0fc
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 74 deletions.
22 changes: 0 additions & 22 deletions crates/api_models/src/admin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1313,10 +1313,6 @@ pub struct MerchantConnectorListResponse {
]))]
pub payment_methods_enabled: Option<Vec<PaymentMethodsEnabled>>,

/// Metadata is useful for storing additional, unstructured information on an object.
#[schema(value_type = Option<Object>,max_length = 255,example = json!({ "city": "NY", "unit": "245" }))]
pub metadata: Option<pii::SecretSerdeValue>,

/// A boolean value to indicate if the connector is in Test mode. By default, its value is false.
#[schema(default = false, example = false)]
pub test_mode: Option<bool>,
Expand Down Expand Up @@ -1349,13 +1345,6 @@ pub struct MerchantConnectorListResponse {

#[schema(value_type = ConnectorStatus, example = "inactive")]
pub status: api_enums::ConnectorStatus,

#[schema(value_type = Option<AdditionalMerchantData>)]
pub additional_merchant_data: Option<AdditionalMerchantData>,

/// The connector_wallets_details is used to store wallet details such as certificates and wallet credentials
#[schema(value_type = Option<ConnectorWalletDetails>)]
pub connector_wallets_details: Option<ConnectorWalletDetails>,
}

#[cfg(feature = "v1")]
Expand Down Expand Up @@ -1423,10 +1412,6 @@ pub struct MerchantConnectorListResponse {
]))]
pub payment_methods_enabled: Option<Vec<PaymentMethodsEnabled>>,

/// Metadata is useful for storing additional, unstructured information on an object.
#[schema(value_type = Option<Object>,max_length = 255,example = json!({ "city": "NY", "unit": "245" }))]
pub metadata: Option<pii::SecretSerdeValue>,

/// A boolean value to indicate if the connector is disabled. By default, its value is false.
#[schema(default = false, example = false)]
pub disabled: Option<bool>,
Expand All @@ -1443,13 +1428,6 @@ pub struct MerchantConnectorListResponse {

#[schema(value_type = ConnectorStatus, example = "inactive")]
pub status: api_enums::ConnectorStatus,

#[schema(value_type = Option<AdditionalMerchantData>)]
pub additional_merchant_data: Option<AdditionalMerchantData>,

/// The connector_wallets_details is used to store wallet details such as certificates and wallet credentials
#[schema(value_type = Option<ConnectorWalletDetails>)]
pub connector_wallets_details: Option<ConnectorWalletDetails>,
}

#[cfg(feature = "v2")]
Expand Down
52 changes: 0 additions & 52 deletions crates/router/src/types/transformers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,6 @@ impl ForeignTryFrom<domain::MerchantConnectorAccount>
test_mode: item.test_mode,
disabled: item.disabled,
payment_methods_enabled,
metadata: item.metadata,
business_country: item.business_country,
business_label: item.business_label,
business_sub_label: item.business_sub_label,
Expand All @@ -1031,31 +1030,6 @@ impl ForeignTryFrom<domain::MerchantConnectorAccount>
applepay_verified_domains: item.applepay_verified_domains,
pm_auth_config: item.pm_auth_config,
status: item.status,
additional_merchant_data: item
.additional_merchant_data
.map(|data| {
let data = data.into_inner();
serde_json::Value::parse_value::<router_types::AdditionalMerchantData>(
data.expose(),
"AdditionalMerchantData",
)
.attach_printable("Unable to deserialize additional_merchant_data")
.change_context(errors::ApiErrorResponse::InternalServerError)
})
.transpose()?
.map(api_models::admin::AdditionalMerchantData::foreign_from),
connector_wallets_details: item
.connector_wallets_details
.map(|data| {
data.into_inner()
.expose()
.parse_value::<api_models::admin::ConnectorWalletDetails>(
"ConnectorWalletDetails",
)
.attach_printable("Unable to deserialize connector_wallets_details")
.change_context(errors::ApiErrorResponse::InternalServerError)
})
.transpose()?,
};
#[cfg(feature = "v2")]
let response = Self {
Expand All @@ -1065,37 +1039,11 @@ impl ForeignTryFrom<domain::MerchantConnectorAccount>
connector_label: item.connector_label,
disabled: item.disabled,
payment_methods_enabled,
metadata: item.metadata,
frm_configs,
profile_id: item.profile_id,
applepay_verified_domains: item.applepay_verified_domains,
pm_auth_config: item.pm_auth_config,
status: item.status,
additional_merchant_data: item
.additional_merchant_data
.map(|data| {
let data = data.into_inner();
serde_json::Value::parse_value::<router_types::AdditionalMerchantData>(
data.expose(),
"AdditionalMerchantData",
)
.attach_printable("Unable to deserialize additional_merchant_data")
.change_context(errors::ApiErrorResponse::InternalServerError)
})
.transpose()?
.map(api_models::admin::AdditionalMerchantData::foreign_from),
connector_wallets_details: item
.connector_wallets_details
.map(|data| {
data.into_inner()
.expose()
.parse_value::<api_models::admin::ConnectorWalletDetails>(
"ConnectorWalletDetails",
)
.attach_printable("Unable to deserialize connector_wallets_details")
.change_context(errors::ApiErrorResponse::InternalServerError)
})
.transpose()?,
};
Ok(response)
}
Expand Down

0 comments on commit e04e0fc

Please sign in to comment.