mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-29 17:19:15 +08:00
refactor(merchant_id): create domain type for merchant_id (#5408)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Co-authored-by: Sanchith Hegde <22217505+SanchithHegde@users.noreply.github.com>
This commit is contained in:
@ -21,8 +21,8 @@ pub struct CustomerRequest {
|
||||
pub customer_id: Option<id_type::CustomerId>,
|
||||
/// The identifier for the Merchant Account
|
||||
#[schema(max_length = 255, example = "y3oqhf46pyzuxjbcn2giaqnb44")]
|
||||
#[serde(default = "unknown_merchant", skip)]
|
||||
pub merchant_id: String,
|
||||
#[serde(skip)]
|
||||
pub merchant_id: id_type::MerchantId,
|
||||
/// The customer's name
|
||||
#[schema(max_length = 255, value_type = Option<String>, example = "Jon Test")]
|
||||
pub name: Option<Secret<String>>,
|
||||
@ -342,8 +342,3 @@ pub struct CustomerDeleteResponse {
|
||||
#[schema(example = false)]
|
||||
pub payment_methods_deleted: bool,
|
||||
}
|
||||
|
||||
#[cfg(all(any(feature = "v1", feature = "v2"), not(feature = "customer_v2")))]
|
||||
fn unknown_merchant() -> String {
|
||||
String::from("merchant_unknown")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user