fix(core): add ephemeral key to payment_create response when customer_id is mentioned (#1133)

This commit is contained in:
Hrithikesh
2023-05-19 12:11:45 +05:30
committed by GitHub
parent 93dcd98640
commit f394c4abc0
20 changed files with 85 additions and 9 deletions

View File

@ -7,7 +7,9 @@ use router_derive::Setter;
use time::PrimitiveDateTime;
use utoipa::ToSchema;
use crate::{admin, disputes, enums as api_enums, refunds};
use crate::{
admin, disputes, enums as api_enums, ephemeral_key::EphemeralKeyCreateResponse, refunds,
};
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
pub enum PaymentOp {
@ -1190,6 +1192,9 @@ pub struct PaymentsResponse {
/// Allowed Payment Method Types for a given PaymentIntent
#[schema(value_type = Option<Vec<PaymentMethodType>>)]
pub allowed_payment_method_types: Option<Vec<api_enums::PaymentMethodType>>,
/// ephemeral_key for the customer_id mentioned
pub ephemeral_key: Option<EphemeralKeyCreateResponse>,
}
#[derive(Clone, Debug, serde::Deserialize, ToSchema)]