fix(payment): fix max limit on payment intents list (#2014)

Co-authored-by: Apoorv Dixit <apoorv.dixit@juspay.in>
This commit is contained in:
Sampras Lopes
2023-08-25 14:44:17 +05:30
committed by GitHub
parent ac63794162
commit a888953004
6 changed files with 29 additions and 26 deletions

View File

@ -586,7 +586,7 @@ pub struct StripePaymentListConstraints {
pub starting_after: Option<String>,
pub ending_before: Option<String>,
#[serde(default = "default_limit")]
pub limit: i64,
pub limit: u32,
pub created: Option<i64>,
#[serde(rename = "created[lt]")]
pub created_lt: Option<i64>,
@ -598,7 +598,7 @@ pub struct StripePaymentListConstraints {
pub created_gte: Option<i64>,
}
fn default_limit() -> i64 {
fn default_limit() -> u32 {
10
}

View File

@ -511,7 +511,7 @@ pub struct StripePaymentListConstraints {
pub starting_after: Option<String>,
pub ending_before: Option<String>,
#[serde(default = "default_limit")]
pub limit: i64,
pub limit: u32,
pub created: Option<i64>,
#[serde(rename = "created[lt]")]
pub created_lt: Option<i64>,
@ -523,7 +523,7 @@ pub struct StripePaymentListConstraints {
pub created_gte: Option<i64>,
}
fn default_limit() -> i64 {
fn default_limit() -> u32 {
10
}