mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-12 03:14:12 +08:00
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:
@@ -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> {
|
||||
|
||||
Reference in New Issue
Block a user