feat(payment_methods_v2): add payment methods list endpoint (#6938)

Co-authored-by: Sanchith Hegde <sanchith.hegde@juspay.in>
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
Narayan Bhat
2025-01-13 15:07:19 +05:30
committed by GitHub
parent 1d993055d2
commit 6a1f5a8875
47 changed files with 1228 additions and 864 deletions

View File

@ -1,4 +1,3 @@
use common_enums::{PaymentMethod, PaymentMethodType};
use serde::Serialize;
use crate::{id_type, types::TimeRange};
@ -33,10 +32,17 @@ pub enum ApiEventsType {
payment_id: id_type::GlobalPaymentId,
refund_id: id_type::GlobalRefundId,
},
#[cfg(feature = "v1")]
PaymentMethod {
payment_method_id: String,
payment_method: Option<PaymentMethod>,
payment_method_type: Option<PaymentMethodType>,
payment_method: Option<common_enums::PaymentMethod>,
payment_method_type: Option<common_enums::PaymentMethodType>,
},
#[cfg(feature = "v2")]
PaymentMethod {
payment_method_id: id_type::GlobalPaymentMethodId,
payment_method_type: Option<common_enums::PaymentMethod>,
payment_method_subtype: Option<common_enums::PaymentMethodType>,
},
#[cfg(all(feature = "v2", feature = "payment_methods_v2"))]
PaymentMethodCreate,
@ -60,6 +66,10 @@ pub enum ApiEventsType {
PaymentMethodList {
payment_id: Option<String>,
},
#[cfg(feature = "v2")]
PaymentMethodListForPaymentMethods {
payment_method_id: id_type::GlobalPaymentMethodId,
},
#[cfg(feature = "v1")]
Webhooks {
connector: String,