mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-02 12:06:56 +08:00
fix(router): metadata field update in merchant_account and merchant_connector_account (#359)
Co-authored-by: Abhishek Marrivagu <abhi.codes10@gmail.com>
This commit is contained in:
@ -21,6 +21,7 @@ pub struct MerchantAccount {
|
||||
pub publishable_key: Option<String>,
|
||||
pub storage_scheme: storage_enums::MerchantStorageScheme,
|
||||
pub locker_id: Option<String>,
|
||||
pub metadata: Option<serde_json::Value>,
|
||||
pub routing_algorithm: Option<serde_json::Value>,
|
||||
}
|
||||
|
||||
@ -40,6 +41,7 @@ pub struct MerchantAccountNew {
|
||||
pub redirect_to_merchant_with_http_post: Option<bool>,
|
||||
pub publishable_key: Option<String>,
|
||||
pub locker_id: Option<String>,
|
||||
pub metadata: Option<serde_json::Value>,
|
||||
pub routing_algorithm: Option<serde_json::Value>,
|
||||
}
|
||||
|
||||
@ -59,6 +61,7 @@ pub enum MerchantAccountUpdate {
|
||||
redirect_to_merchant_with_http_post: Option<bool>,
|
||||
publishable_key: Option<String>,
|
||||
locker_id: Option<String>,
|
||||
metadata: Option<serde_json::Value>,
|
||||
routing_algorithm: Option<serde_json::Value>,
|
||||
},
|
||||
}
|
||||
@ -79,6 +82,7 @@ pub struct MerchantAccountUpdateInternal {
|
||||
redirect_to_merchant_with_http_post: Option<bool>,
|
||||
publishable_key: Option<String>,
|
||||
locker_id: Option<String>,
|
||||
metadata: Option<serde_json::Value>,
|
||||
routing_algorithm: Option<serde_json::Value>,
|
||||
}
|
||||
|
||||
@ -100,6 +104,7 @@ impl From<MerchantAccountUpdate> for MerchantAccountUpdateInternal {
|
||||
redirect_to_merchant_with_http_post,
|
||||
publishable_key,
|
||||
locker_id,
|
||||
metadata,
|
||||
} => Self {
|
||||
merchant_id: Some(merchant_id),
|
||||
merchant_name,
|
||||
@ -115,6 +120,7 @@ impl From<MerchantAccountUpdate> for MerchantAccountUpdateInternal {
|
||||
redirect_to_merchant_with_http_post,
|
||||
publishable_key,
|
||||
locker_id,
|
||||
metadata,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@ -44,6 +44,7 @@ pub enum MerchantConnectorAccountUpdate {
|
||||
disabled: Option<bool>,
|
||||
merchant_connector_id: Option<i32>,
|
||||
payment_methods_enabled: Option<Vec<serde_json::Value>>,
|
||||
metadata: Option<serde_json::Value>,
|
||||
},
|
||||
}
|
||||
#[derive(Clone, Debug, Default, AsChangeset, router_derive::DebugAsDisplay)]
|
||||
@ -57,6 +58,7 @@ pub struct MerchantConnectorAccountUpdateInternal {
|
||||
disabled: Option<bool>,
|
||||
merchant_connector_id: Option<i32>,
|
||||
payment_methods_enabled: Option<Vec<serde_json::Value>>,
|
||||
metadata: Option<serde_json::Value>,
|
||||
}
|
||||
|
||||
impl From<MerchantConnectorAccountUpdate> for MerchantConnectorAccountUpdateInternal {
|
||||
@ -71,6 +73,7 @@ impl From<MerchantConnectorAccountUpdate> for MerchantConnectorAccountUpdateInte
|
||||
disabled,
|
||||
merchant_connector_id,
|
||||
payment_methods_enabled,
|
||||
metadata,
|
||||
} => Self {
|
||||
merchant_id,
|
||||
connector_type,
|
||||
@ -80,6 +83,7 @@ impl From<MerchantConnectorAccountUpdate> for MerchantConnectorAccountUpdateInte
|
||||
disabled,
|
||||
merchant_connector_id,
|
||||
payment_methods_enabled,
|
||||
metadata,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@ -158,6 +158,7 @@ diesel::table! {
|
||||
publishable_key -> Nullable<Varchar>,
|
||||
storage_scheme -> MerchantStorageScheme,
|
||||
locker_id -> Nullable<Varchar>,
|
||||
metadata -> Nullable<Jsonb>,
|
||||
routing_algorithm -> Nullable<Json>,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user