mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 09:38:33 +08:00
feat(payment_methods): pass required shipping details field for wallets session call based on business_profile config (#4616)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com>
This commit is contained in:
@ -4098,6 +4098,12 @@ pub struct GooglePayThirdPartySdk {
|
||||
pub struct GooglePaySessionResponse {
|
||||
/// The merchant info
|
||||
pub merchant_info: GpayMerchantInfo,
|
||||
/// Is shipping address required
|
||||
pub shipping_address_required: bool,
|
||||
/// Is email required
|
||||
pub email_required: bool,
|
||||
/// Shipping address parameters
|
||||
pub shipping_address_parameters: GpayShippingAddressParameters,
|
||||
/// List of the allowed payment meythods
|
||||
pub allowed_payment_methods: Vec<GpayAllowedPaymentMethods>,
|
||||
/// The transaction info Google Pay requires
|
||||
@ -4112,6 +4118,13 @@ pub struct GooglePaySessionResponse {
|
||||
pub secrets: Option<SecretInfoToInitiateSdk>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Eq, PartialEq, serde::Serialize, ToSchema)]
|
||||
#[serde(rename_all = "lowercase")]
|
||||
pub struct GpayShippingAddressParameters {
|
||||
/// Is shipping phone number required
|
||||
pub phone_number_required: bool,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Eq, PartialEq, serde::Serialize, ToSchema)]
|
||||
#[serde(rename_all = "lowercase")]
|
||||
pub struct KlarnaSessionTokenResponse {
|
||||
@ -4234,7 +4247,22 @@ pub struct ApplePayPaymentRequest {
|
||||
pub supported_networks: Option<Vec<String>>,
|
||||
pub merchant_identifier: Option<String>,
|
||||
/// The required billing contact fields for connector
|
||||
pub required_billing_contact_fields: Option<Vec<String>>,
|
||||
pub required_billing_contact_fields: Option<ApplePayBillingContactFields>,
|
||||
/// The required shipping contacht fields for connector
|
||||
pub required_shipping_contact_fields: Option<ApplePayShippingContactFields>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Eq, PartialEq, serde::Serialize, ToSchema, serde::Deserialize)]
|
||||
pub struct ApplePayBillingContactFields(pub Vec<ApplePayAddressParameters>);
|
||||
#[derive(Debug, Clone, Eq, PartialEq, serde::Serialize, ToSchema, serde::Deserialize)]
|
||||
pub struct ApplePayShippingContactFields(pub Vec<ApplePayAddressParameters>);
|
||||
|
||||
#[derive(Debug, Clone, Eq, PartialEq, serde::Serialize, ToSchema, serde::Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub enum ApplePayAddressParameters {
|
||||
PostalAddress,
|
||||
Phone,
|
||||
Email,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Eq, PartialEq, serde::Serialize, ToSchema, serde::Deserialize)]
|
||||
|
||||
Reference in New Issue
Block a user