Package com.adyen.model.checkout
Class Destination
- java.lang.Object
-
- com.adyen.model.checkout.Destination
-
public class Destination extends Object
Destination
-
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_COUNTRY_CODEstatic StringJSON_PROPERTY_POSTAL_CODEstatic StringJSON_PROPERTY_STATE_OR_PROVINCE
-
Constructor Summary
Constructors Constructor Description Destination()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DestinationcountryCode(String countryCode)The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) or three-letter [ISO 3166-1 alpha-3 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) for the destination address. * Encoding: ASCII * Min length: 2 characters * Max length: 3 charactersbooleanequals(Object o)Return true if this Destination object is equal to o.static DestinationfromJson(String jsonString)Create an instance of Destination given an JSON stringStringgetCountryCode()The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) or three-letter [ISO 3166-1 alpha-3 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) for the destination address. * Encoding: ASCII * Min length: 2 characters * Max length: 3 charactersMap<String,Object>getExplicitNulls()Returns a map of properties to be merged into the JSON payload as explicit null values.StringgetPostalCode()The postal code of the destination address. * Encoding: ASCII * Max length: 10 characters * Must not start with a space. * For the US, it must be in five or nine digits format.StringgetStateOrProvince()The state or province code of the destination address. * Encoding: ASCII * Max length: 3 characters * Must not start with a space.inthashCode()DestinationincludeNullValues(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.DestinationpostalCode(String postalCode)The postal code of the destination address. * Encoding: ASCII * Max length: 10 characters * Must not start with a space. * For the US, it must be in five or nine digits format.voidsetCountryCode(String countryCode)The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) or three-letter [ISO 3166-1 alpha-3 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) for the destination address. * Encoding: ASCII * Min length: 2 characters * Max length: 3 charactersvoidsetIncludeNullValues(boolean includeNullValues)Sets whether null values should be explicitly serialized in the JSON payload.voidsetPostalCode(String postalCode)The postal code of the destination address. * Encoding: ASCII * Max length: 10 characters * Must not start with a space. * For the US, it must be in five or nine digits format.voidsetStateOrProvince(String stateOrProvince)The state or province code of the destination address. * Encoding: ASCII * Max length: 3 characters * Must not start with a space.DestinationstateOrProvince(String stateOrProvince)The state or province code of the destination address. * Encoding: ASCII * Max length: 3 characters * Must not start with a space.StringtoJson()Convert an instance of Destination to an JSON stringStringtoString()
-
-
-
Field Detail
-
JSON_PROPERTY_COUNTRY_CODE
public static final String JSON_PROPERTY_COUNTRY_CODE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_POSTAL_CODE
public static final String JSON_PROPERTY_POSTAL_CODE
- See Also:
- Constant Field Values
-
JSON_PROPERTY_STATE_OR_PROVINCE
public static final String JSON_PROPERTY_STATE_OR_PROVINCE
- See Also:
- Constant Field Values
-
-
Method Detail
-
countryCode
public Destination countryCode(String countryCode)
The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) or three-letter [ISO 3166-1 alpha-3 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) for the destination address. * Encoding: ASCII * Min length: 2 characters * Max length: 3 characters- Parameters:
countryCode- The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) or three-letter [ISO 3166-1 alpha-3 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) for the destination address. * Encoding: ASCII * Min length: 2 characters * Max length: 3 characters- Returns:
- the current
Destinationinstance, allowing for method chaining
-
getCountryCode
public String getCountryCode()
The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) or three-letter [ISO 3166-1 alpha-3 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) for the destination address. * Encoding: ASCII * Min length: 2 characters * Max length: 3 characters- Returns:
- countryCode The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) or three-letter [ISO 3166-1 alpha-3 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) for the destination address. * Encoding: ASCII * Min length: 2 characters * Max length: 3 characters
-
setCountryCode
public void setCountryCode(String countryCode)
The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) or three-letter [ISO 3166-1 alpha-3 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) for the destination address. * Encoding: ASCII * Min length: 2 characters * Max length: 3 characters- Parameters:
countryCode- The two-letter [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) or three-letter [ISO 3166-1 alpha-3 country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) for the destination address. * Encoding: ASCII * Min length: 2 characters * Max length: 3 characters
-
postalCode
public Destination postalCode(String postalCode)
The postal code of the destination address. * Encoding: ASCII * Max length: 10 characters * Must not start with a space. * For the US, it must be in five or nine digits format. For example, 10001 or 10001-0000. * For Canada, it must be in 6 digits format. For example, M4B 1G5.- Parameters:
postalCode- The postal code of the destination address. * Encoding: ASCII * Max length: 10 characters * Must not start with a space. * For the US, it must be in five or nine digits format. For example, 10001 or 10001-0000. * For Canada, it must be in 6 digits format. For example, M4B 1G5.- Returns:
- the current
Destinationinstance, allowing for method chaining
-
getPostalCode
public String getPostalCode()
The postal code of the destination address. * Encoding: ASCII * Max length: 10 characters * Must not start with a space. * For the US, it must be in five or nine digits format. For example, 10001 or 10001-0000. * For Canada, it must be in 6 digits format. For example, M4B 1G5.- Returns:
- postalCode The postal code of the destination address. * Encoding: ASCII * Max length: 10 characters * Must not start with a space. * For the US, it must be in five or nine digits format. For example, 10001 or 10001-0000. * For Canada, it must be in 6 digits format. For example, M4B 1G5.
-
setPostalCode
public void setPostalCode(String postalCode)
The postal code of the destination address. * Encoding: ASCII * Max length: 10 characters * Must not start with a space. * For the US, it must be in five or nine digits format. For example, 10001 or 10001-0000. * For Canada, it must be in 6 digits format. For example, M4B 1G5.- Parameters:
postalCode- The postal code of the destination address. * Encoding: ASCII * Max length: 10 characters * Must not start with a space. * For the US, it must be in five or nine digits format. For example, 10001 or 10001-0000. * For Canada, it must be in 6 digits format. For example, M4B 1G5.
-
stateOrProvince
public Destination stateOrProvince(String stateOrProvince)
The state or province code of the destination address. * Encoding: ASCII * Max length: 3 characters * Must not start with a space.- Parameters:
stateOrProvince- The state or province code of the destination address. * Encoding: ASCII * Max length: 3 characters * Must not start with a space.- Returns:
- the current
Destinationinstance, allowing for method chaining
-
getStateOrProvince
public String getStateOrProvince()
The state or province code of the destination address. * Encoding: ASCII * Max length: 3 characters * Must not start with a space.- Returns:
- stateOrProvince The state or province code of the destination address. * Encoding: ASCII * Max length: 3 characters * Must not start with a space.
-
setStateOrProvince
public void setStateOrProvince(String stateOrProvince)
The state or province code of the destination address. * Encoding: ASCII * Max length: 3 characters * Must not start with a space.- Parameters:
stateOrProvince- The state or province code of the destination address. * Encoding: ASCII * Max length: 3 characters * Must not start with a space.
-
includeNullValues
public Destination 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 Destination 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 Destination fromJson(String jsonString) throws com.fasterxml.jackson.core.JsonProcessingException
Create an instance of Destination given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of Destination
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the JSON string is invalid with respect to Destination
-
toJson
public String toJson() throws com.fasterxml.jackson.core.JsonProcessingException
Convert an instance of Destination to an JSON string- Returns:
- JSON string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-