feat(router): add support for filtering PaymentMethodTypes at a session (#883)

Co-authored-by: Kashif <mohammed.kashif@juspay.in>
This commit is contained in:
Kashif
2023-04-21 02:52:04 +05:30
committed by GitHub
parent 93b69e74b4
commit 465933ba72
5 changed files with 70 additions and 2 deletions

View File

@ -212,6 +212,10 @@ pub struct PaymentsRequest {
/// Merchant connector details used to make payments.
pub merchant_connector_details: Option<admin::MerchantConnectorDetailsWrap>,
/// Allowed Payment Method Types for a given PaymentIntent
#[schema(value_type = Option<Vec<PaymentMethodType>>)]
pub allowed_payment_method_types: Option<Vec<api_enums::PaymentMethodType>>,
/// Business sub label for the payment
pub business_sub_label: Option<String>,
}
@ -1058,6 +1062,10 @@ pub struct PaymentsResponse {
/// The business_sub_label for this payment
pub business_sub_label: Option<String>,
/// Allowed Payment Method Types for a given PaymentIntent
#[schema(value_type = Option<Vec<PaymentMethodType>>)]
pub allowed_payment_method_types: Option<Vec<api_enums::PaymentMethodType>>,
}
#[derive(Clone, Debug, serde::Deserialize, ToSchema)]
@ -1318,6 +1326,10 @@ pub struct Metadata {
pub data: pii::SecretSerdeValue,
/// Payload coming in request as a metadata field
pub payload: Option<pii::SecretSerdeValue>,
/// Allowed payment method types for a payment intent
#[schema(value_type = Option<Vec<PaymentMethodType>>)]
pub allowed_payment_method_types: Option<Vec<api_enums::PaymentMethodType>>,
}
#[derive(Debug, serde::Deserialize, serde::Serialize, Clone, ToSchema)]