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:
Narayan Bhat
2024-07-24 19:18:25 +05:30
committed by GitHub
parent e18ea7a7ba
commit 7068fbfbe2
406 changed files with 3168 additions and 2633 deletions

View File

@ -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")
}