feat(core): add profile level config for debit routing feature (#7470)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
Co-authored-by: Sayak Bhattacharya <sayak.b@Sayak-Bhattacharya-G092THXJ34.local>
Co-authored-by: Sayak Bhattacharya <sayakofficial21@gmail.com>
This commit is contained in:
Prasunna Soppa
2025-03-26 19:16:49 +05:30
committed by GitHub
parent b19b195fbe
commit 8e854657c9
13 changed files with 235 additions and 18 deletions

View File

@ -1985,6 +1985,14 @@ pub struct ProfileCreate {
/// Indicates if 3ds challenge is forced
pub force_3ds_challenge: Option<bool>,
/// Indicates if debit routing is enabled or not
#[schema(value_type = Option<bool>)]
pub is_debit_routing_enabled: Option<bool>,
//Merchant country for the profile
#[schema(value_type = Option<CountryAlpha2>, example = "US")]
pub merchant_business_country: Option<api_enums::CountryAlpha2>,
}
#[nutype::nutype(
@ -2109,6 +2117,14 @@ pub struct ProfileCreate {
///Indicates if clear pan retries is enabled or not.
pub is_clear_pan_retries_enabled: Option<bool>,
/// Indicates if debit routing is enabled or not
#[schema(value_type = Option<bool>)]
pub is_debit_routing_enabled: Option<bool>,
//Merchant country for the profile
#[schema(value_type = Option<CountryAlpha2>, example = "US")]
pub merchant_business_country: Option<api_enums::CountryAlpha2>,
}
#[cfg(feature = "v1")]
@ -2259,6 +2275,14 @@ pub struct ProfileResponse {
/// Indicates if 3ds challenge is forced
pub force_3ds_challenge: bool,
/// Indicates if debit routing is enabled or not
#[schema(value_type = Option<bool>)]
pub is_debit_routing_enabled: Option<bool>,
//Merchant country for the profile
#[schema(value_type = Option<CountryAlpha2>, example = "US")]
pub merchant_business_country: Option<api_enums::CountryAlpha2>,
}
#[cfg(feature = "v2")]
@ -2389,6 +2413,14 @@ pub struct ProfileResponse {
///Indicates if clear pan retries is enabled or not.
pub is_clear_pan_retries_enabled: bool,
/// Indicates if debit routing is enabled or not
#[schema(value_type = Option<bool>)]
pub is_debit_routing_enabled: Option<bool>,
//Merchant country for the profile
#[schema(value_type = Option<CountryAlpha2>, example = "US")]
pub merchant_business_country: Option<api_enums::CountryAlpha2>,
}
#[cfg(feature = "v1")]
@ -2529,6 +2561,14 @@ pub struct ProfileUpdate {
/// Indicates if 3ds challenge is forced
pub force_3ds_challenge: Option<bool>,
/// Indicates if debit routing is enabled or not
#[schema(value_type = Option<bool>)]
pub is_debit_routing_enabled: Option<bool>,
//Merchant country for the profile
#[schema(value_type = Option<CountryAlpha2>, example = "US")]
pub merchant_business_country: Option<api_enums::CountryAlpha2>,
}
#[cfg(feature = "v2")]
@ -2647,6 +2687,14 @@ pub struct ProfileUpdate {
///Indicates if clear pan retries is enabled or not.
pub is_clear_pan_retries_enabled: Option<bool>,
/// Indicates if debit routing is enabled or not
#[schema(value_type = Option<bool>)]
pub is_debit_routing_enabled: Option<bool>,
//Merchant country for the profile
#[schema(value_type = Option<CountryAlpha2>, example = "US")]
pub merchant_business_country: Option<api_enums::CountryAlpha2>,
}
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize, ToSchema)]