feat(core): implement NameType for name validation (#6734)

This commit is contained in:
Sakil Mostak
2025-04-01 14:58:54 +05:30
committed by GitHub
parent 1a7804ea89
commit 1100dcc605
72 changed files with 734 additions and 364 deletions

View File

@ -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`.