feat(router): Deduplicate PML response and populate bank details (V2) (#8583)

This commit is contained in:
Anurag Thakur
2025-07-14 17:40:28 +05:30
committed by GitHub
parent 44f8964a05
commit 7d54ce87f0
6 changed files with 226 additions and 63 deletions

View File

@ -16,12 +16,11 @@ use masking::PeekInterface;
use serde::de;
use utoipa::{schema, ToSchema};
#[cfg(feature = "v1")]
use crate::payments::BankCodeResponse;
#[cfg(feature = "payouts")]
use crate::payouts;
use crate::{
admin, enums as api_enums, open_router,
payments::{self, BankCodeResponse},
};
use crate::{admin, enums as api_enums, open_router, payments};
#[cfg(feature = "v1")]
#[derive(Debug, serde::Deserialize, serde::Serialize, Clone, ToSchema)]
@ -1471,7 +1470,10 @@ pub enum PaymentMethodSubtypeSpecificData {
card_networks: Vec<CardNetworkTypes>,
},
#[schema(title = "bank")]
Bank { bank_names: Vec<BankCodeResponse> },
Bank {
#[schema(value_type = BankNames)]
bank_names: Vec<common_enums::BankNames>,
},
}
#[cfg(feature = "v2")]

View File

@ -7727,8 +7727,8 @@ pub struct ResponsePaymentMethodTypesForPayments {
pub payment_method_subtype: common_enums::PaymentMethodType,
/// The payment experience for the payment method
#[schema(value_type = Option<PaymentExperience>)]
pub payment_experience: Option<common_enums::PaymentExperience>,
#[schema(value_type = Option<Vec<PaymentExperience>>)]
pub payment_experience: Option<Vec<common_enums::PaymentExperience>>,
/// payment method subtype specific information
#[serde(flatten)]