feat(payment_methods_v2): add total-payment-method-count api (#7479)

Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Prasunna Soppa
2025-03-13 00:41:12 +05:30
committed by GitHub
parent d1f53036c7
commit 4f6174d1bf
11 changed files with 188 additions and 21 deletions

View File

@ -1884,6 +1884,16 @@ pub struct CustomerPaymentMethodsListResponse {
pub customer_payment_methods: Vec<CustomerPaymentMethod>,
}
#[cfg(all(feature = "v2", feature = "payment_methods_v2"))]
#[derive(Debug, serde::Serialize, ToSchema)]
pub struct TotalPaymentMethodCountResponse {
/// total count of payment methods under the merchant
pub total_count: i64,
}
#[cfg(all(feature = "v2", feature = "payment_methods_v2"))]
impl common_utils::events::ApiEventMetric for TotalPaymentMethodCountResponse {}
#[cfg(all(
any(feature = "v2", feature = "v1"),
not(feature = "payment_methods_v2")