mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-01 11:06:50 +08:00
feat(payments): add support for profile aggregates (#5845)
This commit is contained in:
@ -3234,11 +3234,12 @@ pub async fn get_payment_filters(
|
||||
pub async fn get_aggregates_for_payments(
|
||||
state: SessionState,
|
||||
merchant: domain::MerchantAccount,
|
||||
profile_id_list: Option<Vec<id_type::ProfileId>>,
|
||||
time_range: api::TimeRange,
|
||||
) -> RouterResponse<api::PaymentsAggregateResponse> {
|
||||
let db = state.store.as_ref();
|
||||
let intent_status_with_count = db
|
||||
.get_intent_status_with_count(merchant.get_id(), &time_range)
|
||||
.get_intent_status_with_count(merchant.get_id(), profile_id_list, &time_range)
|
||||
.await
|
||||
.to_not_found_response(errors::ApiErrorResponse::PaymentNotFound)?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user