mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 09:07:09 +08:00
feat(payments): add support for aggregates in payments (#5654)
This commit is contained in:
@ -18,12 +18,13 @@ use crate::{
|
||||
payments::{
|
||||
ExtendedCardInfoResponse, PaymentIdType, PaymentListConstraints,
|
||||
PaymentListFilterConstraints, PaymentListFilters, PaymentListFiltersV2,
|
||||
PaymentListResponse, PaymentListResponseV2, PaymentsApproveRequest, PaymentsCancelRequest,
|
||||
PaymentsCaptureRequest, PaymentsCompleteAuthorizeRequest,
|
||||
PaymentsExternalAuthenticationRequest, PaymentsExternalAuthenticationResponse,
|
||||
PaymentsIncrementalAuthorizationRequest, PaymentsManualUpdateRequest,
|
||||
PaymentsRejectRequest, PaymentsRequest, PaymentsResponse, PaymentsRetrieveRequest,
|
||||
PaymentsSessionResponse, PaymentsStartRequest, RedirectionResponse,
|
||||
PaymentListResponse, PaymentListResponseV2, PaymentsAggregateResponse,
|
||||
PaymentsApproveRequest, PaymentsCancelRequest, PaymentsCaptureRequest,
|
||||
PaymentsCompleteAuthorizeRequest, PaymentsExternalAuthenticationRequest,
|
||||
PaymentsExternalAuthenticationResponse, PaymentsIncrementalAuthorizationRequest,
|
||||
PaymentsManualUpdateRequest, PaymentsRejectRequest, PaymentsRequest, PaymentsResponse,
|
||||
PaymentsRetrieveRequest, PaymentsSessionResponse, PaymentsStartRequest,
|
||||
RedirectionResponse,
|
||||
},
|
||||
};
|
||||
impl ApiEventMetric for PaymentsRetrieveRequest {
|
||||
@ -225,6 +226,11 @@ impl ApiEventMetric for PaymentListResponseV2 {
|
||||
Some(ApiEventsType::ResourceListAPI)
|
||||
}
|
||||
}
|
||||
impl ApiEventMetric for PaymentsAggregateResponse {
|
||||
fn get_api_event_type(&self) -> Option<ApiEventsType> {
|
||||
Some(ApiEventsType::ResourceListAPI)
|
||||
}
|
||||
}
|
||||
|
||||
impl ApiEventMetric for RedirectionResponse {}
|
||||
|
||||
|
||||
@ -4099,6 +4099,12 @@ pub struct PaymentListFiltersV2 {
|
||||
pub authentication_type: Vec<enums::AuthenticationType>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, serde::Serialize)]
|
||||
pub struct PaymentsAggregateResponse {
|
||||
/// The list of intent status with their count
|
||||
pub status_with_count: HashMap<enums::IntentStatus, i64>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Eq, PartialEq, serde::Deserialize, serde::Serialize, ToSchema)]
|
||||
pub struct AmountFilter {
|
||||
/// The start amount to filter list of transactions which are greater than or equal to the start amount
|
||||
|
||||
Reference in New Issue
Block a user