Class PhoneNumber
- java.lang.Object
-
- com.adyen.model.legalentitymanagement.PhoneNumber
-
public class PhoneNumber extends Object
PhoneNumber
-
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_NUMBERstatic StringJSON_PROPERTY_PHONE_COUNTRY_CODEstatic StringJSON_PROPERTY_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)Return true if this PhoneNumber object is equal to o.static PhoneNumberfromJson(String jsonString)Create an instance of PhoneNumber given an JSON stringStringgetNumber()The full phone number, including the country code.StringgetPhoneCountryCode()The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code prefix of the phone number.StringgetType()The type of phone number.inthashCode()PhoneNumbernumber(String number)The full phone number, including the country code.PhoneNumberphoneCountryCode(String phoneCountryCode)The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code prefix of the phone number.voidsetNumber(String number)The full phone number, including the country code.voidsetPhoneCountryCode(String phoneCountryCode)The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code prefix of the phone number.voidsetType(String type)The type of phone number.StringtoJson()Convert an instance of PhoneNumber to an JSON stringStringtoString()PhoneNumbertype(String type)The type of phone number.
-
-
-
Field Detail
-
JSON_PROPERTY_NUMBER
public static final String JSON_PROPERTY_NUMBER
- See Also:
- Constant Field Values
-
JSON_PROPERTY_PHONE_COUNTRY_CODE
public static final String JSON_PROPERTY_PHONE_COUNTRY_CODE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_TYPE
public static final String JSON_PROPERTY_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
number
public PhoneNumber number(String number)
The full phone number, including the country code. For example, **+3112345678**.- Parameters:
number-- Returns:
- the current
PhoneNumberinstance, allowing for method chaining
-
getNumber
public String getNumber()
The full phone number, including the country code. For example, **+3112345678**.- Returns:
- number
-
setNumber
public void setNumber(String number)
The full phone number, including the country code. For example, **+3112345678**.- Parameters:
number-
-
phoneCountryCode
public PhoneNumber phoneCountryCode(String phoneCountryCode)
The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code prefix of the phone number. For example, **US** or **NL**. The value of the `phoneCountryCode` is determined by the country code digit(s) of `phone.number`- Parameters:
phoneCountryCode-- Returns:
- the current
PhoneNumberinstance, allowing for method chaining
-
getPhoneCountryCode
public String getPhoneCountryCode()
The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code prefix of the phone number. For example, **US** or **NL**. The value of the `phoneCountryCode` is determined by the country code digit(s) of `phone.number`- Returns:
- phoneCountryCode
-
setPhoneCountryCode
public void setPhoneCountryCode(String phoneCountryCode)
The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) country code prefix of the phone number. For example, **US** or **NL**. The value of the `phoneCountryCode` is determined by the country code digit(s) of `phone.number`- Parameters:
phoneCountryCode-
-
type
public PhoneNumber type(String type)
The type of phone number. Possible values: **mobile**, **landline**, **sip**, **fax.**- Parameters:
type-- Returns:
- the current
PhoneNumberinstance, allowing for method chaining
-
getType
public String getType()
The type of phone number. Possible values: **mobile**, **landline**, **sip**, **fax.**- Returns:
- type
-
setType
public void setType(String type)
The type of phone number. Possible values: **mobile**, **landline**, **sip**, **fax.**- Parameters:
type-
-
equals
public boolean equals(Object o)
Return true if this PhoneNumber object is equal to o.
-
fromJson
public static PhoneNumber fromJson(String jsonString) throws com.fasterxml.jackson.core.JsonProcessingException
Create an instance of PhoneNumber given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of PhoneNumber
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the JSON string is invalid with respect to PhoneNumber
-
toJson
public String toJson() throws com.fasterxml.jackson.core.JsonProcessingException
Convert an instance of PhoneNumber to an JSON string- Returns:
- JSON string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-