mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-27 19:46:48 +08:00
feat(router): Make payment_method_subtype optional in payment_attempt [V2] (#7568)
This commit is contained in:
@ -116,8 +116,8 @@ pub struct PaymentMethodCreate {
|
||||
pub payment_method_type: api_enums::PaymentMethod,
|
||||
|
||||
/// This is a sub-category of payment method.
|
||||
#[schema(value_type = PaymentMethodType,example = "credit")]
|
||||
pub payment_method_subtype: api_enums::PaymentMethodType,
|
||||
#[schema(value_type = Option<PaymentMethodType>,example = "credit")]
|
||||
pub payment_method_subtype: Option<api_enums::PaymentMethodType>,
|
||||
|
||||
/// You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long. Metadata is useful for storing additional, structured information on an object.
|
||||
#[schema(value_type = Option<Object>,example = json!({ "city": "NY", "unit": "245" }))]
|
||||
@ -2790,7 +2790,7 @@ pub struct PaymentMethodSessionConfirmRequest {
|
||||
|
||||
/// The payment method subtype
|
||||
#[schema(value_type = PaymentMethodType, example = "credit")]
|
||||
pub payment_method_subtype: common_enums::PaymentMethodType,
|
||||
pub payment_method_subtype: Option<common_enums::PaymentMethodType>,
|
||||
|
||||
/// The payment instrument data to be used for the payment
|
||||
#[schema(value_type = PaymentMethodDataRequest)]
|
||||
|
||||
@ -5232,8 +5232,8 @@ pub struct PaymentsConfirmIntentRequest {
|
||||
pub payment_method_type: api_enums::PaymentMethod,
|
||||
|
||||
/// The payment method subtype to be used for the payment. This should match with the `payment_method_data` provided
|
||||
#[schema(value_type = PaymentMethodType, example = "apple_pay")]
|
||||
pub payment_method_subtype: api_enums::PaymentMethodType,
|
||||
#[schema(value_type = Option<PaymentMethodType>, example = "apple_pay")]
|
||||
pub payment_method_subtype: Option<api_enums::PaymentMethodType>,
|
||||
|
||||
/// The shipping address for the payment. This will override the shipping address provided in the create-intent request
|
||||
pub shipping: Option<Address>,
|
||||
@ -5401,8 +5401,8 @@ pub struct PaymentsRequest {
|
||||
pub payment_method_type: api_enums::PaymentMethod,
|
||||
|
||||
/// The payment method subtype to be used for the payment. This should match with the `payment_method_data` provided
|
||||
#[schema(value_type = PaymentMethodType, example = "apple_pay")]
|
||||
pub payment_method_subtype: api_enums::PaymentMethodType,
|
||||
#[schema(value_type = Option<PaymentMethodType>, example = "apple_pay")]
|
||||
pub payment_method_subtype: Option<api_enums::PaymentMethodType>,
|
||||
|
||||
/// This "CustomerAcceptance" object is passed during Payments-Confirm request, it enlists the type, time, and mode of acceptance properties related to an acceptance done by the customer. The customer_acceptance sub object is usually passed by the SDK or client.
|
||||
#[schema(value_type = Option<CustomerAcceptance>)]
|
||||
@ -8477,7 +8477,7 @@ pub struct PaymentRevenueRecoveryMetadata {
|
||||
pub payment_method_type: common_enums::PaymentMethod,
|
||||
/// PaymentMethod Subtype
|
||||
#[schema(example = "klarna", value_type = PaymentMethodType)]
|
||||
pub payment_method_subtype: common_enums::PaymentMethodType,
|
||||
pub payment_method_subtype: Option<common_enums::PaymentMethodType>,
|
||||
/// The name of the payment connector through which the payment attempt was made.
|
||||
#[schema(value_type = Connector, example = "stripe")]
|
||||
pub connector: common_enums::connector_enums::Connector,
|
||||
@ -8558,7 +8558,7 @@ pub struct PaymentsAttemptRecordRequest {
|
||||
|
||||
/// The payment method subtype to be used for the payment. This should match with the `payment_method_data` provided
|
||||
#[schema(value_type = PaymentMethodType, example = "apple_pay")]
|
||||
pub payment_method_subtype: api_enums::PaymentMethodType,
|
||||
pub payment_method_subtype: Option<api_enums::PaymentMethodType>,
|
||||
|
||||
/// The payment instrument data to be used for the payment attempt.
|
||||
pub payment_method_data: Option<PaymentMethodDataRequest>,
|
||||
|
||||
Reference in New Issue
Block a user