@@ -1252,6 +1252,18 @@ pub struct ResponsePaymentMethodTypes {
1252
1252
pub pm_auth_connector : Option < String > ,
1253
1253
}
1254
1254
1255
+ #[ cfg( all( feature = "v2" , feature = "payment_methods_v2" ) ) ]
1256
+ #[ derive( Debug , Clone , serde:: Serialize , ToSchema , PartialEq ) ]
1257
+ #[ serde( untagged) ] // Untagged used for serialization only
1258
+ pub enum PaymentMethodSubtypeSpecificData {
1259
+ Card {
1260
+ card_networks : Vec < CardNetworkTypes > ,
1261
+ } ,
1262
+ Bank {
1263
+ bank_names : Vec < BankCodeResponse > ,
1264
+ } ,
1265
+ }
1266
+
1255
1267
#[ cfg( all( feature = "v2" , feature = "payment_methods_v2" ) ) ]
1256
1268
#[ derive( Debug , Clone , serde:: Serialize , ToSchema , PartialEq ) ]
1257
1269
pub struct ResponsePaymentMethodTypes {
@@ -1263,11 +1275,8 @@ pub struct ResponsePaymentMethodTypes {
1263
1275
#[ schema( example = "klarna" , value_type = PaymentMethodType ) ]
1264
1276
pub payment_method_subtype : common_enums:: PaymentMethodType ,
1265
1277
1266
- /// The list of card networks enabled, if applicable for a payment method type
1267
- pub card_networks : Option < Vec < CardNetworkTypes > > ,
1268
-
1269
- /// The list of banks enabled, if applicable for a payment method type
1270
- pub bank_names : Option < Vec < BankCodeResponse > > ,
1278
+ /// payment method subtype specific information
1279
+ pub extra_information : Option < PaymentMethodSubtypeSpecificData > ,
1271
1280
1272
1281
/// Required fields for the payment_method_type.
1273
1282
/// This is the union of all the required fields for the payment method type enabled in all the connectors.
0 commit comments