feat(analytics): Add metrics, filters and APIs for Analytics v2 Dashboard - Payments Page (#5870)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
Co-authored-by: Sampras Lopes <Sampras.lopes@juspay.in>
Co-authored-by: Sampras Lopes <lsampras@pm.me>
This commit is contained in:
Sandeep Kumar
2024-10-14 18:43:34 +05:30
committed by GitHub
parent f6b0b98e0a
commit f123df9aa3
55 changed files with 4353 additions and 75 deletions

View File

@@ -12,11 +12,39 @@ use api_models::analytics::{
use strum::IntoEnumIterator;
pub fn get_payment_dimensions() -> Vec<NameDescription> {
PaymentDimensions::iter().map(Into::into).collect()
vec![
PaymentDimensions::Connector,
PaymentDimensions::PaymentMethod,
PaymentDimensions::PaymentMethodType,
PaymentDimensions::Currency,
PaymentDimensions::AuthType,
PaymentDimensions::PaymentStatus,
PaymentDimensions::ClientSource,
PaymentDimensions::ClientVersion,
PaymentDimensions::ProfileId,
PaymentDimensions::CardNetwork,
PaymentDimensions::MerchantId,
]
.into_iter()
.map(Into::into)
.collect()
}
pub fn get_payment_intent_dimensions() -> Vec<NameDescription> {
PaymentIntentDimensions::iter().map(Into::into).collect()
vec![
PaymentIntentDimensions::PaymentIntentStatus,
PaymentIntentDimensions::Currency,
PaymentIntentDimensions::ProfileId,
PaymentIntentDimensions::Connector,
PaymentIntentDimensions::AuthType,
PaymentIntentDimensions::PaymentMethod,
PaymentIntentDimensions::PaymentMethodType,
PaymentIntentDimensions::CardNetwork,
PaymentIntentDimensions::MerchantId,
]
.into_iter()
.map(Into::into)
.collect()
}
pub fn get_refund_dimensions() -> Vec<NameDescription> {