feat(analytics): Add v2 payment analytics (payment-intents analytics) (#5150)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Sandeep Kumar
2024-07-01 17:45:46 +05:30
committed by GitHub
parent 4314fcd173
commit 9fc525d498
23 changed files with 1641 additions and 89 deletions

View File

@@ -2,6 +2,7 @@ use api_models::analytics::{
api_event::{ApiEventDimensions, ApiEventMetrics},
auth_events::AuthEventMetrics,
disputes::{DisputeDimensions, DisputeMetrics},
payment_intents::{PaymentIntentDimensions, PaymentIntentMetrics},
payments::{PaymentDimensions, PaymentMetrics},
refunds::{RefundDimensions, RefundMetrics},
sdk_events::{SdkEventDimensions, SdkEventMetrics},
@@ -13,6 +14,10 @@ pub fn get_payment_dimensions() -> Vec<NameDescription> {
PaymentDimensions::iter().map(Into::into).collect()
}
pub fn get_payment_intent_dimensions() -> Vec<NameDescription> {
PaymentIntentDimensions::iter().map(Into::into).collect()
}
pub fn get_refund_dimensions() -> Vec<NameDescription> {
RefundDimensions::iter().map(Into::into).collect()
}
@@ -29,6 +34,10 @@ pub fn get_payment_metrics_info() -> Vec<NameDescription> {
PaymentMetrics::iter().map(Into::into).collect()
}
pub fn get_payment_intent_metrics_info() -> Vec<NameDescription> {
PaymentIntentMetrics::iter().map(Into::into).collect()
}
pub fn get_refund_metrics_info() -> Vec<NameDescription> {
RefundMetrics::iter().map(Into::into).collect()
}