refactor: use newtype pattern for email addresses (#819)

Co-authored-by: Sanchith Hegde <22217505+SanchithHegde@users.noreply.github.com>
This commit is contained in:
Nachiket Kanore
2023-05-04 19:28:20 +05:30
committed by GitHub
parent 92ae2d92f1
commit b8e2b1c5f4
30 changed files with 211 additions and 145 deletions

View File

@ -228,7 +228,7 @@ pub struct MerchantDetails {
/// The merchant's primary email address
#[schema(value_type = Option<String>, max_length = 255, example = "johndoe@test.com")]
pub primary_email: Option<Secret<String, pii::Email>>,
pub primary_email: Option<pii::Email>,
/// The merchant's secondary contact name
#[schema(value_type = Option<String>, max_length= 255, example = "John Doe2")]
@ -240,7 +240,7 @@ pub struct MerchantDetails {
/// The merchant's secondary email address
#[schema(value_type = Option<String>, max_length = 255, example = "johndoe2@test.com")]
pub secondary_email: Option<Secret<String, pii::Email>>,
pub secondary_email: Option<pii::Email>,
/// The business website of the merchant
#[schema(max_length = 255, example = "www.example.com")]