feat(router): Add payments get-intent API for v2 (#6396)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Anurag Thakur
2024-10-30 21:26:23 +05:30
committed by GitHub
parent 33bc83fce4
commit c514608594
18 changed files with 571 additions and 196 deletions

View File

@ -2,7 +2,8 @@ use common_utils::events::{ApiEventMetric, ApiEventsType};
#[cfg(feature = "v2")]
use super::{
PaymentsConfirmIntentResponse, PaymentsCreateIntentRequest, PaymentsCreateIntentResponse,
PaymentsConfirmIntentResponse, PaymentsCreateIntentRequest, PaymentsGetIntentRequest,
PaymentsIntentResponse,
};
#[cfg(all(
any(feature = "v2", feature = "v1"),
@ -150,7 +151,16 @@ impl ApiEventMetric for PaymentsCreateIntentRequest {
}
#[cfg(feature = "v2")]
impl ApiEventMetric for PaymentsCreateIntentResponse {
impl ApiEventMetric for PaymentsGetIntentRequest {
fn get_api_event_type(&self) -> Option<ApiEventsType> {
Some(ApiEventsType::Payment {
payment_id: self.id.clone(),
})
}
}
#[cfg(feature = "v2")]
impl ApiEventMetric for PaymentsIntentResponse {
fn get_api_event_type(&self) -> Option<ApiEventsType> {
Some(ApiEventsType::Payment {
payment_id: self.id.clone(),