feat(payments_v2): implement payments capture v2 (#6722)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Narayan Bhat
2024-12-20 20:54:57 +05:30
committed by GitHub
parent 22de8ad132
commit 977cb704e7
22 changed files with 1929 additions and 291 deletions

View File

@ -11,7 +11,7 @@ use super::{
))]
use crate::payment_methods::CustomerPaymentMethodsListResponse;
#[cfg(all(feature = "v2", feature = "payment_methods_v2"))]
use crate::payment_methods::CustomerPaymentMethodsListResponse;
use crate::{events, payment_methods::CustomerPaymentMethodsListResponse};
use crate::{
payment_methods::{
CustomerDefaultPaymentMethodResponse, DefaultPaymentMethod, ListCountriesCurrenciesRequest,
@ -418,3 +418,12 @@ impl ApiEventMetric for PaymentStartRedirectionRequest {
})
}
}
#[cfg(feature = "v2")]
impl ApiEventMetric for events::PaymentsCaptureResponse {
fn get_api_event_type(&self) -> Option<ApiEventsType> {
Some(ApiEventsType::Payment {
payment_id: self.id.clone(),
})
}
}