mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 09:38:33 +08:00
feat(payouts): implement list and filter APIs (#3651)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Co-authored-by: Kashif <mohammed.kashif@juspay.in>
This commit is contained in:
@ -2,6 +2,7 @@ use std::{collections::HashMap, fmt, num::NonZeroI64};
|
||||
|
||||
use cards::CardNumber;
|
||||
use common_utils::{
|
||||
consts::default_payments_list_limit,
|
||||
crypto,
|
||||
ext_traits::Encode,
|
||||
pii::{self, Email},
|
||||
@ -3197,7 +3198,7 @@ pub struct PaymentListConstraints {
|
||||
|
||||
/// limit on the number of objects to return
|
||||
#[schema(default = 10, maximum = 100)]
|
||||
#[serde(default = "default_limit")]
|
||||
#[serde(default = "default_payments_list_limit")]
|
||||
pub limit: u32,
|
||||
|
||||
/// The time at which payment is created
|
||||
@ -3283,7 +3284,7 @@ pub struct PaymentListFilterConstraints {
|
||||
/// The identifier for customer
|
||||
pub customer_id: Option<String>,
|
||||
/// The limit on the number of objects. The default limit is 10 and max limit is 20
|
||||
#[serde(default = "default_limit")]
|
||||
#[serde(default = "default_payments_list_limit")]
|
||||
pub limit: u32,
|
||||
/// The starting point within a list of objects
|
||||
pub offset: Option<u32>,
|
||||
@ -3353,10 +3354,6 @@ pub struct VerifyResponse {
|
||||
pub error_message: Option<String>,
|
||||
}
|
||||
|
||||
fn default_limit() -> u32 {
|
||||
10
|
||||
}
|
||||
|
||||
#[derive(Default, Debug, serde::Deserialize, serde::Serialize)]
|
||||
pub struct PaymentsRedirectionResponse {
|
||||
pub redirect_url: String,
|
||||
|
||||
Reference in New Issue
Block a user