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()PhoneNumber(String phoneCountryCode)
-
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 stringMap<String,Object>getExplicitNulls()Returns a map of properties to be merged into the JSON payload as explicit null values.StringgetNumber()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()PhoneNumberincludeNullValues(boolean includeNullValues)Configures whether null values are explicitly serialized in the JSON payload.booleanisIncludeNullValues()Returns whether null values are explicitly serialized in the JSON payload.PhoneNumbernumber(String number)The full phone number, including the country code.voidsetIncludeNullValues(boolean includeNullValues)Sets whether null values should be explicitly serialized in the JSON payload.voidsetNumber(String number)The full phone number, including the country code.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
-
-
Constructor Detail
-
PhoneNumber
public PhoneNumber()
-
PhoneNumber
public PhoneNumber(String phoneCountryCode)
-
-
Method Detail
-
number
public PhoneNumber number(String number)
The full phone number, including the country code. For example, **+3112345678**.- Parameters:
number- The full phone number, including the country code. For example, **+3112345678**.- 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 The full phone number, including the country code. For example, **+3112345678**.
-
setNumber
public void setNumber(String number)
The full phone number, including the country code. For example, **+3112345678**.- Parameters:
number- The full phone number, including the country code. For example, **+3112345678**.
-
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 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`
-
type
public PhoneNumber type(String type)
The type of phone number. Possible values: **mobile**, **landline**, **sip**, **fax.**- Parameters:
type- The type of phone number. Possible values: **mobile**, **landline**, **sip**, **fax.**- 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 The type of phone number. Possible values: **mobile**, **landline**, **sip**, **fax.**
-
setType
public void setType(String type)
The type of phone number. Possible values: **mobile**, **landline**, **sip**, **fax.**- Parameters:
type- The type of phone number. Possible values: **mobile**, **landline**, **sip**, **fax.**
-
includeNullValues
public PhoneNumber includeNullValues(boolean includeNullValues)
Configures whether null values are explicitly serialized in the JSON payload. Default is false.
-
isIncludeNullValues
public boolean isIncludeNullValues()
Returns whether null values are explicitly serialized in the JSON payload.
-
setIncludeNullValues
public void setIncludeNullValues(boolean includeNullValues)
Sets whether null values should be explicitly serialized in the JSON payload. Default is false.
-
equals
public boolean equals(Object o)
Return true if this PhoneNumber object is equal to o.
-
getExplicitNulls
public Map<String,Object> getExplicitNulls()
Returns a map of properties to be merged into the JSON payload as explicit null values.
-
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
-
-