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:
Sahkal Poddar
2024-05-21 15:40:05 +05:30
committed by GitHub
parent 2cd360e6a9
commit 443b7e6ea2
61 changed files with 679 additions and 436 deletions

View File

@ -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)]