fix(router): add serde(transparent) annotation for PaymentMethodMetadata (#1899)

This commit is contained in:
Prajjwal Kumar
2023-08-08 16:44:40 +05:30
committed by GitHub
parent 222afee5d5
commit 2d839170fe
2 changed files with 2 additions and 1 deletions

View File

@ -1831,7 +1831,7 @@ pub async fn list_customer_payment_method(
.parse_value("PaymentMethodMetadata") .parse_value("PaymentMethodMetadata")
.change_context(errors::ApiErrorResponse::InternalServerError) .change_context(errors::ApiErrorResponse::InternalServerError)
.attach_printable( .attach_printable(
"Failed to deserialize metadata to PaymmentmethodMetadata struct", "Failed to deserialize metadata to PaymentmethodMetadata struct",
)?; )?;
for pm_metadata in pm_metadata_vec.payment_method_tokenization { for pm_metadata in pm_metadata_vec.payment_method_tokenization {

View File

@ -147,6 +147,7 @@ pub struct DeleteCardResponse {
} }
#[derive(Debug, Deserialize, Serialize)] #[derive(Debug, Deserialize, Serialize)]
#[serde(transparent)]
pub struct PaymentMethodMetadata { pub struct PaymentMethodMetadata {
pub payment_method_tokenization: std::collections::HashMap<String, String>, pub payment_method_tokenization: std::collections::HashMap<String, String>,
} }