mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 00:49:42 +08:00
feat(payment_link): add multiple custom css support in business level (#5137)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -251,6 +251,28 @@ impl AmountConvertor for StringMinorUnitForConnector {
|
||||
}
|
||||
}
|
||||
|
||||
/// Core required conversion type
|
||||
#[derive(Default, Debug, serde::Deserialize, serde::Serialize, Clone, Copy, PartialEq)]
|
||||
pub struct StringMajorUnitForCore;
|
||||
impl AmountConvertor for StringMajorUnitForCore {
|
||||
type Output = StringMajorUnit;
|
||||
fn convert(
|
||||
&self,
|
||||
amount: MinorUnit,
|
||||
currency: enums::Currency,
|
||||
) -> Result<Self::Output, error_stack::Report<ParsingError>> {
|
||||
amount.to_major_unit_as_string(currency)
|
||||
}
|
||||
|
||||
fn convert_back(
|
||||
&self,
|
||||
amount: StringMajorUnit,
|
||||
currency: enums::Currency,
|
||||
) -> Result<MinorUnit, error_stack::Report<ParsingError>> {
|
||||
amount.to_minor_unit_as_i64(currency)
|
||||
}
|
||||
}
|
||||
|
||||
/// Connector required amount type
|
||||
#[derive(Default, Debug, serde::Deserialize, serde::Serialize, Clone, Copy, PartialEq)]
|
||||
pub struct StringMajorUnitForConnector;
|
||||
|
||||
Reference in New Issue
Block a user