mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-31 01:57:45 +08:00
revert: serialize with camelCase for gpay token (#328)
This commit is contained in:
@ -772,21 +772,18 @@ pub struct PaymentsSessionRequest {
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
|
||||
#[serde(rename_all(serialize = "camelCase"))]
|
||||
pub struct GpayAllowedMethodsParameters {
|
||||
pub allowed_auth_methods: Vec<String>,
|
||||
pub allowed_card_networks: Vec<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
|
||||
#[serde(rename_all(serialize = "camelCase"))]
|
||||
pub struct GpayTokenParameters {
|
||||
pub gateway: String,
|
||||
pub gateway_merchant_id: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
|
||||
#[serde(rename_all(serialize = "camelCase"))]
|
||||
pub struct GpayTokenizationSpecification {
|
||||
#[serde(rename = "type")]
|
||||
pub token_specification_type: String,
|
||||
@ -794,7 +791,6 @@ pub struct GpayTokenizationSpecification {
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
|
||||
#[serde(rename_all(serialize = "camelCase"))]
|
||||
pub struct GpayAllowedPaymentMethods {
|
||||
#[serde(rename = "type")]
|
||||
pub payment_method_type: String,
|
||||
@ -803,7 +799,6 @@ pub struct GpayAllowedPaymentMethods {
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
|
||||
#[serde(rename_all(serialize = "camelCase"))]
|
||||
pub struct GpayTransactionInfo {
|
||||
pub country_code: String,
|
||||
pub currency_code: String,
|
||||
@ -812,13 +807,11 @@ pub struct GpayTransactionInfo {
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
|
||||
#[serde(rename_all(serialize = "camelCase"))]
|
||||
pub struct GpayMerchantInfo {
|
||||
pub merchant_name: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
|
||||
#[serde(rename_all(serialize = "camelCase"))]
|
||||
pub struct GpayMetadata {
|
||||
pub merchant_info: GpayMerchantInfo,
|
||||
pub allowed_payment_methods: Vec<GpayAllowedPaymentMethods>,
|
||||
@ -834,9 +827,7 @@ pub struct GpaySessionTokenData {
|
||||
#[serde(rename_all = "lowercase")]
|
||||
pub enum SessionToken {
|
||||
Gpay {
|
||||
#[serde(flatten)]
|
||||
gpay_token: GpayMetadata,
|
||||
#[serde(rename(serialize = "transactionInfo"))]
|
||||
allowed_payment_methods: Vec<GpayAllowedPaymentMethods>,
|
||||
transaction_info: GpayTransactionInfo,
|
||||
},
|
||||
Klarna {
|
||||
|
||||
Reference in New Issue
Block a user