mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-01 19:42:27 +08:00
refactor: retrieve extended card info config during business profile get call (#4784)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -1010,6 +1010,9 @@ pub struct BusinessProfileResponse {
|
||||
|
||||
// Whether to use the billing details passed when creating the intent as payment method billing
|
||||
pub use_billing_as_payment_method_billing: Option<bool>,
|
||||
|
||||
/// Merchant's config to support extended card info feature
|
||||
pub extended_card_info_config: Option<ExtendedCardInfoConfig>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, ToSchema, Serialize)]
|
||||
|
||||
@ -8,7 +8,7 @@ pub use api_models::admin::{
|
||||
};
|
||||
use common_utils::ext_traits::{Encode, ValueExt};
|
||||
use error_stack::ResultExt;
|
||||
use masking::Secret;
|
||||
use masking::{ExposeInterface, Secret};
|
||||
|
||||
use crate::{
|
||||
core::errors,
|
||||
@ -81,6 +81,10 @@ impl ForeignTryFrom<storage::business_profile::BusinessProfile> for BusinessProf
|
||||
})
|
||||
.transpose()?,
|
||||
use_billing_as_payment_method_billing: item.use_billing_as_payment_method_billing,
|
||||
extended_card_info_config: item
|
||||
.extended_card_info_config
|
||||
.map(|config| config.expose().parse_value("ExtendedCardInfoConfig"))
|
||||
.transpose()?,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@ -6949,6 +6949,14 @@
|
||||
"use_billing_as_payment_method_billing": {
|
||||
"type": "boolean",
|
||||
"nullable": true
|
||||
},
|
||||
"extended_card_info_config": {
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/components/schemas/ExtendedCardInfoConfig"
|
||||
}
|
||||
],
|
||||
"nullable": true
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user