Defines MerchantId type with helpers for merchant ID generation and key derivation.
// Source: https://github.com/juspay/hyperswitch | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
//! Contains the id type for merchant account
//!
//! Ids for merchant account are derived from the merchant name
//! If there are any special characters, they are removed
use crate::{
date_time,
errors::{CustomResult, ValidationError},
generate_id_with_default_len,
id_type::{AlphaNumericId, LengthId},
new_type::MerchantName,
types::keymanager,
};
crate::id_type!(
MerchantId,
"A type for merchant_id that can be used for merchant ids"
);
crate::impl_id_type_methods!(MerchantId, "merchant_id");
// This is to display the `MerchantId` as MerchantId(abcd)
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key