mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-02 04:04:43 +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
|
// Whether to use the billing details passed when creating the intent as payment method billing
|
||||||
pub use_billing_as_payment_method_billing: Option<bool>,
|
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)]
|
#[derive(Clone, Debug, Deserialize, ToSchema, Serialize)]
|
||||||
|
|||||||
@ -8,7 +8,7 @@ pub use api_models::admin::{
|
|||||||
};
|
};
|
||||||
use common_utils::ext_traits::{Encode, ValueExt};
|
use common_utils::ext_traits::{Encode, ValueExt};
|
||||||
use error_stack::ResultExt;
|
use error_stack::ResultExt;
|
||||||
use masking::Secret;
|
use masking::{ExposeInterface, Secret};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
core::errors,
|
core::errors,
|
||||||
@ -81,6 +81,10 @@ impl ForeignTryFrom<storage::business_profile::BusinessProfile> for BusinessProf
|
|||||||
})
|
})
|
||||||
.transpose()?,
|
.transpose()?,
|
||||||
use_billing_as_payment_method_billing: item.use_billing_as_payment_method_billing,
|
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": {
|
"use_billing_as_payment_method_billing": {
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"nullable": true
|
"nullable": true
|
||||||
|
},
|
||||||
|
"extended_card_info_config": {
|
||||||
|
"allOf": [
|
||||||
|
{
|
||||||
|
"$ref": "#/components/schemas/ExtendedCardInfoConfig"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"nullable": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user