mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-01 19:42:27 +08:00
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:
@ -10,6 +10,7 @@ use super::{
|
||||
active_payments::metrics::ActivePaymentsMetricRow,
|
||||
auth_events::metrics::AuthEventMetricRow,
|
||||
health_check::HealthCheck,
|
||||
payment_intents::{filters::PaymentIntentFilterRow, metrics::PaymentIntentMetricRow},
|
||||
payments::{
|
||||
distribution::PaymentDistributionRow, filters::FilterRow, metrics::PaymentMetricRow,
|
||||
},
|
||||
@ -157,6 +158,8 @@ where
|
||||
impl super::payments::filters::PaymentFilterAnalytics for ClickhouseClient {}
|
||||
impl super::payments::metrics::PaymentMetricAnalytics for ClickhouseClient {}
|
||||
impl super::payments::distribution::PaymentDistributionAnalytics for ClickhouseClient {}
|
||||
impl super::payment_intents::filters::PaymentIntentFilterAnalytics for ClickhouseClient {}
|
||||
impl super::payment_intents::metrics::PaymentIntentMetricAnalytics for ClickhouseClient {}
|
||||
impl super::refunds::metrics::RefundMetricAnalytics for ClickhouseClient {}
|
||||
impl super::refunds::filters::RefundFilterAnalytics for ClickhouseClient {}
|
||||
impl super::sdk_events::filters::SdkEventFilterAnalytics for ClickhouseClient {}
|
||||
@ -247,6 +250,26 @@ impl TryInto<FilterRow> for serde_json::Value {
|
||||
}
|
||||
}
|
||||
|
||||
impl TryInto<PaymentIntentMetricRow> for serde_json::Value {
|
||||
type Error = Report<ParsingError>;
|
||||
|
||||
fn try_into(self) -> Result<PaymentIntentMetricRow, Self::Error> {
|
||||
serde_json::from_value(self).change_context(ParsingError::StructParseFailure(
|
||||
"Failed to parse PaymentIntentMetricRow in clickhouse results",
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
impl TryInto<PaymentIntentFilterRow> for serde_json::Value {
|
||||
type Error = Report<ParsingError>;
|
||||
|
||||
fn try_into(self) -> Result<PaymentIntentFilterRow, Self::Error> {
|
||||
serde_json::from_value(self).change_context(ParsingError::StructParseFailure(
|
||||
"Failed to parse PaymentIntentFilterRow in clickhouse results",
|
||||
))
|
||||
}
|
||||
}
|
||||
|
||||
impl TryInto<RefundMetricRow> for serde_json::Value {
|
||||
type Error = Report<ParsingError>;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user