enhance(core): replace string with enum for country (#735)

This commit is contained in:
Narayan Bhat
2023-03-30 21:45:38 +05:30
committed by GitHub
parent 442bed0f6b
commit e18bfb2ae1
45 changed files with 734 additions and 649 deletions

View File

@ -39,7 +39,7 @@ impl AdyenTest {
address: Some(PaymentAddress {
billing: Some(Address {
address: Some(AddressDetails {
country: Some("US".to_string()),
country: Some(api_models::enums::CountryCode::US),
..Default::default()
}),
phone: None,

View File

@ -42,7 +42,7 @@ fn get_default_payment_info() -> Option<utils::PaymentInfo> {
line2: Some(Secret::new("line2".to_string())),
city: Some("city".to_string()),
zip: Some(Secret::new("zip".to_string())),
country: Some("IN".to_string()),
country: Some(api_models::enums::CountryCode::IN),
..Default::default()
}),
phone: Some(api::PhoneDetails {

View File

@ -443,7 +443,7 @@ pub fn get_payment_info() -> PaymentInfo {
phone: None,
address: Some(api::AddressDetails {
city: None,
country: Some("PA".to_string()),
country: Some(api_models::enums::CountryCode::PA),
line1: None,
line2: None,
line3: None,

View File

@ -41,7 +41,7 @@ fn get_default_payment_info() -> Option<PaymentInfo> {
address: Some(types::PaymentAddress {
billing: Some(api::Address {
address: Some(api::AddressDetails {
country: Some("US".to_string()),
country: Some(api_models::enums::CountryCode::US),
..Default::default()
}),
phone: None,

View File

@ -71,7 +71,7 @@ fn get_default_payment_info() -> Option<utils::PaymentInfo> {
line2: Some(Secret::new("line2".to_string())),
city: Some("city".to_string()),
zip: Some(Secret::new("zip".to_string())),
country: Some("IN".to_string()),
country: Some(api_models::enums::CountryCode::IN),
..Default::default()
}),
phone: None,

View File

@ -42,7 +42,7 @@ impl WorldlineTest {
address: Some(PaymentAddress {
billing: Some(Address {
address: Some(AddressDetails {
country: Some("US".to_string()),
country: Some(api_models::enums::CountryCode::US),
..Default::default()
}),
phone: None,