feat(analytics): add sessionized_metrics and currency_conversion for refunds analytics (#6419)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Uzair Khan
2024-11-14 14:09:30 +05:30
committed by GitHub
parent f56d76ffec
commit afd7f7d209
17 changed files with 634 additions and 34 deletions

View File

@ -659,7 +659,8 @@ pub mod routes {
org_id: org_id.clone(),
merchant_ids: vec![merchant_id.clone()],
};
analytics::refunds::get_metrics(&state.pool, &auth, req)
let ex_rates = get_forex_exchange_rates(state.clone()).await?;
analytics::refunds::get_metrics(&state.pool, &ex_rates, &auth, req)
.await
.map(ApplicationResponse::Json)
},
@ -697,7 +698,8 @@ pub mod routes {
let auth: AuthInfo = AuthInfo::OrgLevel {
org_id: org_id.clone(),
};
analytics::refunds::get_metrics(&state.pool, &auth, req)
let ex_rates = get_forex_exchange_rates(state.clone()).await?;
analytics::refunds::get_metrics(&state.pool, &ex_rates, &auth, req)
.await
.map(ApplicationResponse::Json)
},
@ -743,7 +745,8 @@ pub mod routes {
merchant_id: merchant_id.clone(),
profile_ids: vec![profile_id.clone()],
};
analytics::refunds::get_metrics(&state.pool, &auth, req)
let ex_rates = get_forex_exchange_rates(state.clone()).await?;
analytics::refunds::get_metrics(&state.pool, &ex_rates, &auth, req)
.await
.map(ApplicationResponse::Json)
},