mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-10-30 01:27:31 +08:00
refactor(id_type): use macros for defining ID types and implementing common traits (#5471)
This commit is contained in:
@ -217,12 +217,12 @@ fn generate_ref_id_with_default_length<const MAX_LENGTH: u8, const MIN_LENGTH: u
|
||||
|
||||
/// Generate a customer id with default length, with prefix as `cus`
|
||||
pub fn generate_customer_id_of_default_length() -> id_type::CustomerId {
|
||||
id_type::CustomerId::new(generate_ref_id_with_default_length("cus"))
|
||||
id_type::CustomerId::default()
|
||||
}
|
||||
|
||||
/// Generate a organization id with default length, with prefix as `org`
|
||||
pub fn generate_organization_id_of_default_length() -> id_type::OrganizationId {
|
||||
id_type::OrganizationId::new(generate_ref_id_with_default_length("org"))
|
||||
id_type::OrganizationId::default()
|
||||
}
|
||||
|
||||
/// Generate a nanoid with the given prefix and a default length
|
||||
|
||||
Reference in New Issue
Block a user