From ac8d81b32b3d91b875113d32782a8c62e39ba2a8 Mon Sep 17 00:00:00 2001 From: Sampras Lopes Date: Wed, 17 Jan 2024 16:31:22 +0530 Subject: [PATCH] fix(events): fix event generation for paymentmethods list (#3337) --- .github/CODEOWNERS | 11 +++++++++++ crates/api_models/src/events.rs | 1 - crates/api_models/src/events/payment.rs | 4 +++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index a911d26d8650..0eb3d95bfc69 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -23,6 +23,17 @@ postman/ @juspay/hyperswitch-framework Cargo.toml @juspay/hyperswitch-framework Cargo.lock @juspay/hyperswitch-framework +crates/api_models/src/events/ @juspay/hyperswitch-analytics +crates/api_models/src/events.rs @juspay/hyperswitch-analytics +crates/api_models/src/analytics/ @juspay/hyperswitch-analytics +crates/api_models/src/analytics.rs @juspay/hyperswitch-analytics +crates/router/src/analytics.rs @juspay/hyperswitch-analytics +crates/router/src/events/ @juspay/hyperswitch-analytics +crates/router/src/events.rs @juspay/hyperswitch-analytics +crates/common_utils/src/events/ @juspay/hyperswitch-analytics +crates/common_utils/src/events.rs @juspay/hyperswitch-analytics +crates/analytics/ @juspay/hyperswitch-analytics + connector-template/ @juspay/hyperswitch-connector crates/router/src/connector/ @juspay/hyperswitch-connector crates/router/tests/connectors/ @juspay/hyperswitch-connector diff --git a/crates/api_models/src/events.rs b/crates/api_models/src/events.rs index 43a72b7e3922..a8185d2d241c 100644 --- a/crates/api_models/src/events.rs +++ b/crates/api_models/src/events.rs @@ -39,7 +39,6 @@ impl ApiEventMetric for TimeRange {} impl_misc_api_event_type!( PaymentMethodId, PaymentsSessionResponse, - PaymentMethodListResponse, PaymentMethodCreate, PaymentLinkInitiateRequest, RetrievePaymentLinkResponse, diff --git a/crates/api_models/src/events/payment.rs b/crates/api_models/src/events/payment.rs index f718dc1ca4dd..32d3dc30bd8d 100644 --- a/crates/api_models/src/events/payment.rs +++ b/crates/api_models/src/events/payment.rs @@ -3,7 +3,7 @@ use common_utils::events::{ApiEventMetric, ApiEventsType}; use crate::{ payment_methods::{ CustomerPaymentMethodsListResponse, PaymentMethodDeleteResponse, PaymentMethodListRequest, - PaymentMethodResponse, PaymentMethodUpdate, + PaymentMethodListResponse, PaymentMethodResponse, PaymentMethodUpdate, }, payments::{ PaymentIdType, PaymentListConstraints, PaymentListFilterConstraints, PaymentListFilters, @@ -119,6 +119,8 @@ impl ApiEventMetric for PaymentMethodListRequest { } } +impl ApiEventMetric for PaymentMethodListResponse {} + impl ApiEventMetric for PaymentListFilterConstraints { fn get_api_event_type(&self) -> Option { Some(ApiEventsType::ResourceListAPI)