Package com.adyen.model.balanceplatform
Class PhoneNumber
- java.lang.Object
-
- com.adyen.model.balanceplatform.PhoneNumber
-
public class PhoneNumber extends Object
PhoneNumber
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPhoneNumber.CustomTypeAdapterFactorystatic classPhoneNumber.PhoneTypeEnumThe type of the phone number.
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_PHONE_COUNTRY_CODEstatic StringSERIALIZED_NAME_PHONE_NUMBERstatic StringSERIALIZED_NAME_PHONE_TYPE
-
Constructor Summary
Constructors Constructor Description PhoneNumber()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)static PhoneNumberfromJson(String jsonString)Create an instance of PhoneNumber given an JSON stringStringgetPhoneCountryCode()The two-character ISO-3166-1 alpha-2 country code of the phone number.StringgetPhoneNumber()The phone number.PhoneNumber.PhoneTypeEnumgetPhoneType()The type of the phone number.inthashCode()PhoneNumberphoneCountryCode(String phoneCountryCode)PhoneNumberphoneNumber(String phoneNumber)PhoneNumberphoneType(PhoneNumber.PhoneTypeEnum phoneType)voidsetPhoneCountryCode(String phoneCountryCode)voidsetPhoneNumber(String phoneNumber)voidsetPhoneType(PhoneNumber.PhoneTypeEnum phoneType)StringtoJson()Convert an instance of PhoneNumber to an JSON stringStringtoString()static voidvalidateJsonObject(com.google.gson.JsonObject jsonObj)Validates the JSON Object and throws an exception if issues found
-
-
-
Field Detail
-
SERIALIZED_NAME_PHONE_COUNTRY_CODE
public static final String SERIALIZED_NAME_PHONE_COUNTRY_CODE
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_PHONE_NUMBER
public static final String SERIALIZED_NAME_PHONE_NUMBER
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_PHONE_TYPE
public static final String SERIALIZED_NAME_PHONE_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
phoneCountryCode
public PhoneNumber phoneCountryCode(String phoneCountryCode)
-
getPhoneCountryCode
public String getPhoneCountryCode()
The two-character ISO-3166-1 alpha-2 country code of the phone number. For example, **US** or **NL**.- Returns:
- phoneCountryCode
-
setPhoneCountryCode
public void setPhoneCountryCode(String phoneCountryCode)
-
phoneNumber
public PhoneNumber phoneNumber(String phoneNumber)
-
getPhoneNumber
public String getPhoneNumber()
The phone number. The inclusion of the phone number country code is not necessary.- Returns:
- phoneNumber
-
setPhoneNumber
public void setPhoneNumber(String phoneNumber)
-
phoneType
public PhoneNumber phoneType(PhoneNumber.PhoneTypeEnum phoneType)
-
getPhoneType
public PhoneNumber.PhoneTypeEnum getPhoneType()
The type of the phone number. Possible values: **Landline**, **Mobile**, **SIP**, **Fax**.- Returns:
- phoneType
-
setPhoneType
public void setPhoneType(PhoneNumber.PhoneTypeEnum phoneType)
-
validateJsonObject
public static void validateJsonObject(com.google.gson.JsonObject jsonObj) throws IOExceptionValidates the JSON Object and throws an exception if issues found- Parameters:
jsonObj- JSON Object- Throws:
IOException- if the JSON Object is invalid with respect to PhoneNumber
-
fromJson
public static PhoneNumber fromJson(String jsonString) throws IOException
Create an instance of PhoneNumber given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of PhoneNumber
- Throws:
IOException- if the JSON string is invalid with respect to PhoneNumber
-
toJson
public String toJson()
Convert an instance of PhoneNumber to an JSON string- Returns:
- JSON string
-
-