fix(core): fixed type metadata to accept other udf fields as well (#321)

This commit is contained in:
Abhishek
2023-01-09 16:10:10 +05:30
committed by GitHub
parent 3fe60b5a48
commit 8cffdc96ca
8 changed files with 48 additions and 29 deletions

View File

@@ -132,7 +132,7 @@ pub struct StripePaymentIntentRequest {
pub billing_details: Option<StripeBillingDetails>,
pub statement_descriptor: Option<String>,
pub statement_descriptor_suffix: Option<String>,
pub metadata: Option<Value>,
pub metadata: Option<api_models::payments::Metadata>,
pub client_secret: Option<pii::Secret<String>>,
pub payment_method_options: Option<StripePaymentMethodOptions>,
}
@@ -277,6 +277,7 @@ pub struct StripePaymentIntentResponse {
pub customer: Option<String>,
pub refunds: Option<Vec<refunds::RefundResponse>>,
pub mandate_id: Option<String>,
pub metadata: Option<Value>,
}
impl From<payments::PaymentsResponse> for StripePaymentIntentResponse {
@@ -294,6 +295,7 @@ impl From<payments::PaymentsResponse> for StripePaymentIntentResponse {
id: resp.payment_id,
refunds: resp.refunds,
mandate_id: resp.mandate_id,
metadata: resp.metadata,
}
}
}

View File

@@ -122,7 +122,7 @@ pub struct StripeSetupIntentRequest {
pub billing_details: Option<StripeBillingDetails>,
pub statement_descriptor: Option<String>,
pub statement_descriptor_suffix: Option<String>,
pub metadata: Option<Value>,
pub metadata: Option<api_models::payments::Metadata>,
pub client_secret: Option<pii::Secret<String>>,
}