mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-27 19:46:48 +08:00
chore: make v1 merchant account forward compatible (#7426)
This commit is contained in:
@ -111,6 +111,10 @@ pub struct MerchantAccountCreate {
|
||||
/// Default payment method collect link config
|
||||
#[schema(value_type = Option<BusinessCollectLinkConfig>)]
|
||||
pub pm_collect_link_config: Option<BusinessCollectLinkConfig>,
|
||||
|
||||
/// Product Type of this merchant account
|
||||
#[schema(value_type = Option<api_enums::MerchantProductType>)]
|
||||
pub product_type: Option<api_enums::MerchantProductType>,
|
||||
}
|
||||
|
||||
#[cfg(feature = "v1")]
|
||||
@ -193,6 +197,8 @@ pub struct MerchantAccountCreateWithoutOrgId {
|
||||
/// Metadata is useful for storing additional, unstructured information about the merchant account.
|
||||
#[schema(value_type = Option<Object>, example = r#"{ "city": "NY", "unit": "245" }"#)]
|
||||
pub metadata: Option<pii::SecretSerdeValue>,
|
||||
|
||||
pub product_type: Option<api_enums::MerchantProductType>,
|
||||
}
|
||||
|
||||
// In v2 the struct used in the API is MerchantAccountCreateWithoutOrgId
|
||||
@ -205,6 +211,8 @@ pub struct MerchantAccountCreate {
|
||||
pub merchant_details: Option<MerchantDetails>,
|
||||
pub metadata: Option<pii::SecretSerdeValue>,
|
||||
pub organization_id: id_type::OrganizationId,
|
||||
/// Product Type of this merchant account
|
||||
pub product_type: Option<api_enums::MerchantProductType>,
|
||||
}
|
||||
|
||||
#[cfg(feature = "v2")]
|
||||
@ -550,6 +558,10 @@ pub struct MerchantAccountResponse {
|
||||
/// Default payment method collect link config
|
||||
#[schema(value_type = Option<BusinessCollectLinkConfig>)]
|
||||
pub pm_collect_link_config: Option<BusinessCollectLinkConfig>,
|
||||
|
||||
/// Product Type of this merchant account
|
||||
#[schema(value_type = Option<api_enums::MerchantProductType>)]
|
||||
pub product_type: Option<api_enums::MerchantProductType>,
|
||||
}
|
||||
|
||||
#[cfg(feature = "v2")]
|
||||
@ -582,6 +594,10 @@ pub struct MerchantAccountResponse {
|
||||
/// Used to indicate the status of the recon module for a merchant account
|
||||
#[schema(value_type = ReconStatus, example = "not_requested")]
|
||||
pub recon_status: api_enums::ReconStatus,
|
||||
|
||||
/// Product Type of this merchant account
|
||||
#[schema(value_type = Option<api_enums::MerchantProductType>)]
|
||||
pub product_type: Option<api_enums::MerchantProductType>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, ToSchema, Serialize)]
|
||||
|
||||
Reference in New Issue
Block a user