Package com.adyen.model.checkout
Class DeliveryAddress
- java.lang.Object
-
- com.adyen.model.checkout.DeliveryAddress
-
public class DeliveryAddress extends Object
DeliveryAddress
-
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_CITYstatic StringJSON_PROPERTY_COUNTRYstatic StringJSON_PROPERTY_FIRST_NAMEstatic StringJSON_PROPERTY_HOUSE_NUMBER_OR_NAMEstatic StringJSON_PROPERTY_LAST_NAMEstatic StringJSON_PROPERTY_POSTAL_CODEstatic StringJSON_PROPERTY_STATE_OR_PROVINCEstatic StringJSON_PROPERTY_STREET
-
Constructor Summary
Constructors Constructor Description DeliveryAddress()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description DeliveryAddresscity(String city)The name of the city.DeliveryAddresscountry(String country)The two-character ISO-3166-1 alpha-2 country code.booleanequals(Object o)Return true if this DeliveryAddress object is equal to o.DeliveryAddressfirstName(String firstName)firstNamestatic DeliveryAddressfromJson(String jsonString)Create an instance of DeliveryAddress given an JSON stringStringgetCity()The name of the city.StringgetCountry()The two-character ISO-3166-1 alpha-2 country code.Map<String,Object>getExplicitNulls()Returns a map of properties to be merged into the JSON payload as explicit null values.StringgetFirstName()Get firstNameStringgetHouseNumberOrName()The number or name of the house.StringgetLastName()Get lastNameStringgetPostalCode()A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries.StringgetStateOrProvince()The two-character ISO 3166-2 state or province code.StringgetStreet()The name of the street.inthashCode()DeliveryAddresshouseNumberOrName(String houseNumberOrName)The number or name of the house.DeliveryAddressincludeNullValues(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.DeliveryAddresslastName(String lastName)lastNameDeliveryAddresspostalCode(String postalCode)A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries.voidsetCity(String city)The name of the city.voidsetCountry(String country)The two-character ISO-3166-1 alpha-2 country code.voidsetFirstName(String firstName)firstNamevoidsetHouseNumberOrName(String houseNumberOrName)The number or name of the house.voidsetIncludeNullValues(boolean includeNullValues)Sets whether null values should be explicitly serialized in the JSON payload.voidsetLastName(String lastName)lastNamevoidsetPostalCode(String postalCode)A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries.voidsetStateOrProvince(String stateOrProvince)The two-character ISO 3166-2 state or province code.voidsetStreet(String street)The name of the street.DeliveryAddressstateOrProvince(String stateOrProvince)The two-character ISO 3166-2 state or province code.DeliveryAddressstreet(String street)The name of the street.StringtoJson()Convert an instance of DeliveryAddress to an JSON stringStringtoString()
-
-
-
Field Detail
-
JSON_PROPERTY_CITY
public static final String JSON_PROPERTY_CITY
- See Also:
- Constant Field Values
-
JSON_PROPERTY_COUNTRY
public static final String JSON_PROPERTY_COUNTRY
- See Also:
- Constant Field Values
-
JSON_PROPERTY_FIRST_NAME
public static final String JSON_PROPERTY_FIRST_NAME
- See Also:
- Constant Field Values
-
JSON_PROPERTY_HOUSE_NUMBER_OR_NAME
public static final String JSON_PROPERTY_HOUSE_NUMBER_OR_NAME
- See Also:
- Constant Field Values
-
JSON_PROPERTY_LAST_NAME
public static final String JSON_PROPERTY_LAST_NAME
- 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
-
JSON_PROPERTY_STREET
public static final String JSON_PROPERTY_STREET
- See Also:
- Constant Field Values
-
-
Method Detail
-
city
public DeliveryAddress city(String city)
The name of the city. Maximum length: 3000 characters.- Parameters:
city- The name of the city. Maximum length: 3000 characters.- Returns:
- the current
DeliveryAddressinstance, allowing for method chaining
-
getCity
public String getCity()
The name of the city. Maximum length: 3000 characters.- Returns:
- city The name of the city. Maximum length: 3000 characters.
-
setCity
public void setCity(String city)
The name of the city. Maximum length: 3000 characters.- Parameters:
city- The name of the city. Maximum length: 3000 characters.
-
country
public DeliveryAddress country(String country)
The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`.- Parameters:
country- The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`.- Returns:
- the current
DeliveryAddressinstance, allowing for method chaining
-
getCountry
public String getCountry()
The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`.- Returns:
- country The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`.
-
setCountry
public void setCountry(String country)
The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`.- Parameters:
country- The two-character ISO-3166-1 alpha-2 country code. For example, **US**. > If you don't know the country or are not collecting the country from the shopper, provide `country` as `ZZ`.
-
firstName
public DeliveryAddress firstName(String firstName)
firstName- Parameters:
firstName-- Returns:
- the current
DeliveryAddressinstance, allowing for method chaining
-
getFirstName
public String getFirstName()
Get firstName- Returns:
- firstName
-
setFirstName
public void setFirstName(String firstName)
firstName- Parameters:
firstName-
-
houseNumberOrName
public DeliveryAddress houseNumberOrName(String houseNumberOrName)
The number or name of the house. Maximum length: 3000 characters.- Parameters:
houseNumberOrName- The number or name of the house. Maximum length: 3000 characters.- Returns:
- the current
DeliveryAddressinstance, allowing for method chaining
-
getHouseNumberOrName
public String getHouseNumberOrName()
The number or name of the house. Maximum length: 3000 characters.- Returns:
- houseNumberOrName The number or name of the house. Maximum length: 3000 characters.
-
setHouseNumberOrName
public void setHouseNumberOrName(String houseNumberOrName)
The number or name of the house. Maximum length: 3000 characters.- Parameters:
houseNumberOrName- The number or name of the house. Maximum length: 3000 characters.
-
lastName
public DeliveryAddress lastName(String lastName)
lastName- Parameters:
lastName-- Returns:
- the current
DeliveryAddressinstance, allowing for method chaining
-
getLastName
public String getLastName()
Get lastName- Returns:
- lastName
-
setLastName
public void setLastName(String lastName)
lastName- Parameters:
lastName-
-
postalCode
public DeliveryAddress postalCode(String postalCode)
A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries.- Parameters:
postalCode- A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries.- Returns:
- the current
DeliveryAddressinstance, allowing for method chaining
-
getPostalCode
public String getPostalCode()
A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries.- Returns:
- postalCode A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries.
-
setPostalCode
public void setPostalCode(String postalCode)
A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries.- Parameters:
postalCode- A maximum of five digits for an address in the US, or a maximum of ten characters for an address in all other countries.
-
stateOrProvince
public DeliveryAddress stateOrProvince(String stateOrProvince)
The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada.- Parameters:
stateOrProvince- The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada.- Returns:
- the current
DeliveryAddressinstance, allowing for method chaining
-
getStateOrProvince
public String getStateOrProvince()
The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada.- Returns:
- stateOrProvince The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada.
-
setStateOrProvince
public void setStateOrProvince(String stateOrProvince)
The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada.- Parameters:
stateOrProvince- The two-character ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada.
-
street
public DeliveryAddress street(String street)
The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`.- Parameters:
street- The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`.- Returns:
- the current
DeliveryAddressinstance, allowing for method chaining
-
getStreet
public String getStreet()
The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`.- Returns:
- street The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`.
-
setStreet
public void setStreet(String street)
The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`.- Parameters:
street- The name of the street. Maximum length: 3000 characters. > The house number should not be included in this field; it should be separately provided via `houseNumberOrName`.
-
includeNullValues
public DeliveryAddress 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 DeliveryAddress 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 DeliveryAddress fromJson(String jsonString) throws com.fasterxml.jackson.core.JsonProcessingException
Create an instance of DeliveryAddress given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of DeliveryAddress
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the JSON string is invalid with respect to DeliveryAddress
-
toJson
public String toJson() throws com.fasterxml.jackson.core.JsonProcessingException
Convert an instance of DeliveryAddress to an JSON string- Returns:
- JSON string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-