mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 17:47:54 +08:00
feat(router): Add support for network token migration (#6300)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -18,7 +18,7 @@ use crate::{
|
||||
ListCountriesCurrenciesResponse, PaymentMethodCollectLinkRenderRequest,
|
||||
PaymentMethodCollectLinkRequest, PaymentMethodCollectLinkResponse,
|
||||
PaymentMethodDeleteResponse, PaymentMethodListRequest, PaymentMethodListResponse,
|
||||
PaymentMethodResponse, PaymentMethodUpdate,
|
||||
PaymentMethodMigrateResponse, PaymentMethodResponse, PaymentMethodUpdate,
|
||||
},
|
||||
payments::{
|
||||
self, ExtendedCardInfoResponse, PaymentIdType, PaymentListConstraints,
|
||||
@ -218,6 +218,29 @@ impl ApiEventMetric for PaymentMethodResponse {
|
||||
}
|
||||
}
|
||||
|
||||
impl ApiEventMetric for PaymentMethodMigrateResponse {
|
||||
#[cfg(all(
|
||||
any(feature = "v1", feature = "v2"),
|
||||
not(feature = "payment_methods_v2")
|
||||
))]
|
||||
fn get_api_event_type(&self) -> Option<ApiEventsType> {
|
||||
Some(ApiEventsType::PaymentMethod {
|
||||
payment_method_id: self.payment_method_response.payment_method_id.clone(),
|
||||
payment_method: self.payment_method_response.payment_method,
|
||||
payment_method_type: self.payment_method_response.payment_method_type,
|
||||
})
|
||||
}
|
||||
|
||||
#[cfg(all(feature = "v2", feature = "payment_methods_v2"))]
|
||||
fn get_api_event_type(&self) -> Option<ApiEventsType> {
|
||||
Some(ApiEventsType::PaymentMethod {
|
||||
payment_method_id: self.payment_method_response.payment_method_id.clone(),
|
||||
payment_method: self.payment_method_response.payment_method_type,
|
||||
payment_method_type: self.payment_method_response.payment_method_subtype,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
impl ApiEventMetric for PaymentMethodUpdate {}
|
||||
|
||||
impl ApiEventMetric for DefaultPaymentMethod {
|
||||
|
||||
Reference in New Issue
Block a user