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:
Kashif
2024-03-21 14:25:06 +05:30
committed by GitHub
parent 4fb7c6ef05
commit fb5f0e6c7e
26 changed files with 1615 additions and 25 deletions

View File

@ -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,