mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 00:49:42 +08:00
feat(router): add total count for payments list (#1912)
This commit is contained in:
@ -1976,13 +1976,24 @@ pub struct PaymentListResponse {
|
||||
// The list of payments response objects
|
||||
pub data: Vec<PaymentsResponse>,
|
||||
}
|
||||
#[derive(Clone, Debug, serde::Serialize)]
|
||||
pub struct PaymentListResponseV2 {
|
||||
/// The number of payments included in the list for given constraints
|
||||
pub count: usize,
|
||||
/// The total number of available payments for given constraints
|
||||
pub total_count: i64,
|
||||
/// The list of payments response objects
|
||||
pub data: Vec<PaymentsResponse>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, serde::Deserialize)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct PaymentListFilterConstraints {
|
||||
/// The identifier for payment
|
||||
pub payment_id: Option<String>,
|
||||
/// The starting point within a list of objects, limit on number of object will be some constant for join query
|
||||
/// The limit on the number of objects. The max limit is 20
|
||||
pub limit: Option<u32>,
|
||||
/// The starting point within a list of objects
|
||||
pub offset: Option<u32>,
|
||||
/// 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)]
|
||||
|
||||
Reference in New Issue
Block a user