mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 18:17:13 +08:00 
			
		
		
		
	refactor: use CountryAlpha2 instead of CountryCode for country codes (#904)
				
					
				
			This commit is contained in:
		| @ -49,7 +49,7 @@ impl AccessTokenRequestInfo for types::RefreshTokenRouterData { | ||||
|  | ||||
| pub trait RouterData { | ||||
|     fn get_billing(&self) -> Result<&api::Address, Error>; | ||||
|     fn get_billing_country(&self) -> Result<api_models::enums::CountryCode, Error>; | ||||
|     fn get_billing_country(&self) -> Result<api_models::enums::CountryAlpha2, Error>; | ||||
|     fn get_billing_phone(&self) -> Result<&api::PhoneDetails, Error>; | ||||
|     fn get_description(&self) -> Result<String, Error>; | ||||
|     fn get_return_url(&self) -> Result<String, Error>; | ||||
| @ -72,7 +72,7 @@ impl<Flow, Request, Response> RouterData for types::RouterData<Flow, Request, Re | ||||
|             .ok_or_else(missing_field_err("billing")) | ||||
|     } | ||||
|  | ||||
|     fn get_billing_country(&self) -> Result<api_models::enums::CountryCode, Error> { | ||||
|     fn get_billing_country(&self) -> Result<api_models::enums::CountryAlpha2, Error> { | ||||
|         self.address | ||||
|             .billing | ||||
|             .as_ref() | ||||
| @ -440,7 +440,7 @@ pub trait AddressDetailsData { | ||||
|     fn get_city(&self) -> Result<&String, Error>; | ||||
|     fn get_line2(&self) -> Result<&Secret<String>, Error>; | ||||
|     fn get_zip(&self) -> Result<&Secret<String>, Error>; | ||||
|     fn get_country(&self) -> Result<&api_models::enums::CountryCode, Error>; | ||||
|     fn get_country(&self) -> Result<&api_models::enums::CountryAlpha2, Error>; | ||||
|     fn get_combined_address_line(&self) -> Result<Secret<String>, Error>; | ||||
| } | ||||
|  | ||||
| @ -481,7 +481,7 @@ impl AddressDetailsData for api::AddressDetails { | ||||
|             .ok_or_else(missing_field_err("address.zip")) | ||||
|     } | ||||
|  | ||||
|     fn get_country(&self) -> Result<&api_models::enums::CountryCode, Error> { | ||||
|     fn get_country(&self) -> Result<&api_models::enums::CountryAlpha2, Error> { | ||||
|         self.country | ||||
|             .as_ref() | ||||
|             .ok_or_else(missing_field_err("address.country")) | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Pa1NarK
					Pa1NarK