mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-01 02:57:02 +08:00
feat(core): implement NameType for name validation (#6734)
This commit is contained in:
@ -57,7 +57,7 @@ pub struct MandateCardDetails {
|
||||
pub card_exp_year: Option<Secret<String>>,
|
||||
/// The card holder name
|
||||
#[schema(value_type = Option<String>)]
|
||||
pub card_holder_name: Option<Secret<String>>,
|
||||
pub card_holder_name: Option<common_utils::types::NameType>,
|
||||
/// The token from card locker
|
||||
#[schema(value_type = Option<String>)]
|
||||
pub card_token: Option<Secret<String>>,
|
||||
@ -79,7 +79,7 @@ pub struct MandateCardDetails {
|
||||
pub card_type: Option<String>,
|
||||
/// The nick_name of the card holder
|
||||
#[schema(value_type = Option<String>)]
|
||||
pub nick_name: Option<Secret<String>>,
|
||||
pub nick_name: Option<common_utils::types::NameType>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, ToSchema, Serialize)]
|
||||
@ -151,7 +151,7 @@ pub struct NetworkTransactionIdAndCardDetails {
|
||||
|
||||
/// The card holder's name
|
||||
#[schema(value_type = String, example = "John Test")]
|
||||
pub card_holder_name: Option<Secret<String>>,
|
||||
pub card_holder_name: Option<common_utils::types::NameType>,
|
||||
|
||||
/// The name of the issuer of card
|
||||
#[schema(example = "chase")]
|
||||
@ -172,7 +172,7 @@ pub struct NetworkTransactionIdAndCardDetails {
|
||||
|
||||
/// The card holder's nick name
|
||||
#[schema(value_type = Option<String>, example = "John Test")]
|
||||
pub nick_name: Option<Secret<String>>,
|
||||
pub nick_name: Option<common_utils::types::NameType>,
|
||||
|
||||
/// The network transaction ID provided by the card network during a CIT (Customer Initiated Transaction),
|
||||
/// where `setup_future_usage` is set to `off_session`.
|
||||
|
||||
Reference in New Issue
Block a user