Revert "added field frm_configs to MerchantConnectorAccount" (#848)

This commit is contained in:
Arun Raj M
2023-04-10 18:51:17 +05:30
committed by GitHub
parent 4524d4f5b4
commit 41664e6690
10 changed files with 2 additions and 84 deletions

View File

@ -345,20 +345,8 @@ pub struct MerchantConnector {
/// You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object.
#[schema(value_type = Option<Object>,max_length = 255,example = json!({ "city": "NY", "unit": "245" }))]
pub metadata: Option<pii::SecretSerdeValue>,
pub frm_configs: Option<FrmConfigs>,
//contains the frm configs for the merchant... it should be of this format:: "\"frm_configs\" : { \"frm_enabled_pms\" : [\"card\"], \"frm_enabled_pm_types\" : [\"credit\"], \"frm_enabled_gateways\" : [\"stripe\"], \"frm_action\": \"cancel_txn\", \"frm_preferred_flow_type\" : \"pre\" }"
}
//Details of FrmConfigs are mentioned here... it should be passed in payment connector create api call, and stored in merchant_connector_table
#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
#[serde(deny_unknown_fields)]
pub struct FrmConfigs {
pub frm_enabled_pms: Option<Vec<String>>,
pub frm_enabled_pm_types: Option<Vec<String>>,
pub frm_enabled_gateways: Option<Vec<String>>,
pub frm_action: api_enums::FrmAction, //What should be the action if FRM declines the txn (autorefund/cancel txn/manual review)
pub frm_preferred_flow_type: api_enums::FrmPreferredFlowTypes,
}
/// Details of all the payment methods enabled for the connector for the given merchant account
#[derive(Debug, Clone, Serialize, Deserialize, ToSchema)]
#[serde(deny_unknown_fields)]

View File

@ -826,38 +826,3 @@ pub enum DisputeStatus {
// dispute has been unsuccessfully challenged
DisputeLost,
}
#[derive(
Clone,
Debug,
serde::Deserialize,
serde::Serialize,
strum::Display,
strum::EnumString,
frunk::LabelledGeneric,
ToSchema,
)]
#[strum(serialize_all = "snake_case")]
#[serde(rename_all = "snake_case")]
pub enum FrmAction {
CancelTxn,
AutoRefund,
ManualReview,
}
#[derive(
Clone,
Debug,
serde::Deserialize,
serde::Serialize,
strum::Display,
strum::EnumString,
frunk::LabelledGeneric,
ToSchema,
)]
#[strum(serialize_all = "snake_case")]
#[serde(rename_all = "snake_case")]
pub enum FrmPreferredFlowTypes {
Pre,
Post,
}