mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 00:49:42 +08:00
feat(payments): add amount and connector id filter in list (#4354)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -3394,6 +3394,8 @@ pub struct PaymentListFilterConstraints {
|
||||
pub limit: u32,
|
||||
/// The starting point within a list of objects
|
||||
pub offset: Option<u32>,
|
||||
/// The amount to filter payments list
|
||||
pub amount_filter: Option<AmountFilter>,
|
||||
/// The time range for which objects are needed. TimeRange has two fields start_time and end_time from which objects can be filtered as per required scenarios (created_at, time less than, greater than etc).
|
||||
#[serde(flatten)]
|
||||
pub time_range: Option<TimeRange>,
|
||||
@ -3409,6 +3411,8 @@ pub struct PaymentListFilterConstraints {
|
||||
pub payment_method_type: Option<Vec<enums::PaymentMethodType>>,
|
||||
/// The list of authentication types to filter payments list
|
||||
pub authentication_type: Option<Vec<enums::AuthenticationType>>,
|
||||
/// The list of merchant connector ids to filter payments list for selected label
|
||||
pub merchant_connector_id: Option<Vec<String>>,
|
||||
}
|
||||
#[derive(Clone, Debug, serde::Serialize)]
|
||||
pub struct PaymentListFilters {
|
||||
@ -3440,6 +3444,12 @@ pub struct PaymentListFiltersV2 {
|
||||
pub authentication_type: Vec<enums::AuthenticationType>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, serde::Deserialize, serde::Serialize)]
|
||||
pub struct AmountFilter {
|
||||
pub start_amount: Option<i64>,
|
||||
pub end_amount: Option<i64>,
|
||||
}
|
||||
|
||||
#[derive(
|
||||
Debug, Clone, Copy, serde::Serialize, serde::Deserialize, PartialEq, Eq, Hash, ToSchema,
|
||||
)]
|
||||
|
||||
Reference in New Issue
Block a user