feat(core): Add a new endpoint for Complete Authorize flow (#4686)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Swangi Kumari
2024-05-20 21:32:36 +05:30
committed by GitHub
parent 36409bdc91
commit 226c337399
14 changed files with 267 additions and 21 deletions

View File

@ -11,10 +11,10 @@ use crate::{
ExtendedCardInfoResponse, PaymentIdType, PaymentListConstraints,
PaymentListFilterConstraints, PaymentListFilters, PaymentListFiltersV2,
PaymentListResponse, PaymentListResponseV2, PaymentsApproveRequest, PaymentsCancelRequest,
PaymentsCaptureRequest, PaymentsExternalAuthenticationRequest,
PaymentsExternalAuthenticationResponse, PaymentsIncrementalAuthorizationRequest,
PaymentsRejectRequest, PaymentsRequest, PaymentsResponse, PaymentsRetrieveRequest,
PaymentsStartRequest, RedirectionResponse,
PaymentsCaptureRequest, PaymentsCompleteAuthorizeRequest,
PaymentsExternalAuthenticationRequest, PaymentsExternalAuthenticationResponse,
PaymentsIncrementalAuthorizationRequest, PaymentsRejectRequest, PaymentsRequest,
PaymentsResponse, PaymentsRetrieveRequest, PaymentsStartRequest, RedirectionResponse,
},
};
impl ApiEventMetric for PaymentsRetrieveRequest {
@ -44,6 +44,14 @@ impl ApiEventMetric for PaymentsCaptureRequest {
}
}
impl ApiEventMetric for PaymentsCompleteAuthorizeRequest {
fn get_api_event_type(&self) -> Option<ApiEventsType> {
Some(ApiEventsType::Payment {
payment_id: self.payment_id.clone(),
})
}
}
impl ApiEventMetric for PaymentsCancelRequest {
fn get_api_event_type(&self) -> Option<ApiEventsType> {
Some(ApiEventsType::Payment {