mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 17:47:54 +08:00
refactor(customers_v2): address panics and some bugs in customers v2 endpoints (#6836)
This commit is contained in:
@ -2,6 +2,25 @@ use common_utils::id_type;
|
||||
use serde;
|
||||
use utoipa::ToSchema;
|
||||
|
||||
/// Information required to create an ephemeral key.
|
||||
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, ToSchema)]
|
||||
pub struct EphemeralKeyCreateRequest {
|
||||
/// Customer ID for which an ephemeral key must be created
|
||||
#[schema(
|
||||
min_length = 1,
|
||||
max_length = 64,
|
||||
value_type = String,
|
||||
example = "cus_y3oqhf46pyzuxjbcn2giaqnb44"
|
||||
)]
|
||||
pub customer_id: id_type::CustomerId,
|
||||
}
|
||||
|
||||
impl common_utils::events::ApiEventMetric for EphemeralKeyCreateRequest {
|
||||
fn get_api_event_type(&self) -> Option<common_utils::events::ApiEventsType> {
|
||||
Some(common_utils::events::ApiEventsType::Miscellaneous)
|
||||
}
|
||||
}
|
||||
|
||||
/// ephemeral_key for the customer_id mentioned
|
||||
#[derive(Debug, serde::Serialize, serde::Deserialize, Clone, Eq, PartialEq, ToSchema)]
|
||||
pub struct EphemeralKeyCreateResponse {
|
||||
|
||||
Reference in New Issue
Block a user