mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-28 12:15:40 +08:00
refactor(router): added a new type minor unit to amount (#4629)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Co-authored-by: Hrithikesh <61539176+hrithikesh026@users.noreply.github.com>
This commit is contained in:
@ -5,7 +5,7 @@ use common_utils::{
|
||||
consts::SURCHARGE_PERCENTAGE_PRECISION_LENGTH,
|
||||
crypto::OptionalEncryptableName,
|
||||
pii,
|
||||
types::{Percentage, Surcharge},
|
||||
types::{MinorUnit, Percentage, Surcharge},
|
||||
};
|
||||
use serde::de;
|
||||
use utoipa::{schema, ToSchema};
|
||||
@ -492,7 +492,7 @@ pub struct SurchargeDetailsResponse {
|
||||
#[serde(rename_all = "snake_case", tag = "type", content = "value")]
|
||||
pub enum SurchargeResponse {
|
||||
/// Fixed Surcharge value
|
||||
Fixed(i64),
|
||||
Fixed(MinorUnit),
|
||||
/// Surcharge percentage
|
||||
Rate(SurchargePercentage),
|
||||
}
|
||||
@ -638,7 +638,7 @@ pub struct PaymentMethodListRequest {
|
||||
|
||||
/// Filter by amount
|
||||
#[schema(example = 60)]
|
||||
pub amount: Option<i64>,
|
||||
pub amount: Option<MinorUnit>,
|
||||
|
||||
/// Indicates whether the payment method is eligible for recurring payments
|
||||
#[schema(example = true)]
|
||||
|
||||
Reference in New Issue
Block a user