Package com.adyen.model.management
Class Address
- java.lang.Object
-
- com.adyen.model.management.Address
-
public class Address extends Object
Address
-
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_CITYstatic StringJSON_PROPERTY_COMPANY_NAMEstatic StringJSON_PROPERTY_COUNTRYstatic StringJSON_PROPERTY_POSTAL_CODEstatic StringJSON_PROPERTY_STATE_OR_PROVINCEstatic StringJSON_PROPERTY_STREET_ADDRESSstatic StringJSON_PROPERTY_STREET_ADDRESS2
-
Constructor Summary
Constructors Constructor Description Address()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Addresscity(String city)The name of the city.AddresscompanyName(String companyName)The name of the company.Addresscountry(String country)The two-letter country code, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.booleanequals(Object o)Return true if this Address object is equal to o.static AddressfromJson(String jsonString)Create an instance of Address given an JSON stringStringgetCity()The name of the city.StringgetCompanyName()The name of the company.StringgetCountry()The two-letter country code, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.Map<String,Object>getExplicitNulls()Returns a map of properties to be merged into the JSON payload as explicit null values.StringgetPostalCode()The postal code.StringgetStateOrProvince()The state or province as defined in [ISO 3166-2](https://www.iso.org/standard/72483.html).StringgetStreetAddress()The name of the street, and the house or building number.StringgetStreetAddress2()Additional address details, if any.inthashCode()AddressincludeNullValues(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.AddresspostalCode(String postalCode)The postal code.voidsetCity(String city)The name of the city.voidsetCompanyName(String companyName)The name of the company.voidsetCountry(String country)The two-letter country code, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.voidsetIncludeNullValues(boolean includeNullValues)Sets whether null values should be explicitly serialized in the JSON payload.voidsetPostalCode(String postalCode)The postal code.voidsetStateOrProvince(String stateOrProvince)The state or province as defined in [ISO 3166-2](https://www.iso.org/standard/72483.html).voidsetStreetAddress(String streetAddress)The name of the street, and the house or building number.voidsetStreetAddress2(String streetAddress2)Additional address details, if any.AddressstateOrProvince(String stateOrProvince)The state or province as defined in [ISO 3166-2](https://www.iso.org/standard/72483.html).AddressstreetAddress(String streetAddress)The name of the street, and the house or building number.AddressstreetAddress2(String streetAddress2)Additional address details, if any.StringtoJson()Convert an instance of Address to an JSON stringStringtoString()
-
-
-
Field Detail
-
JSON_PROPERTY_CITY
public static final String JSON_PROPERTY_CITY
- See Also:
- Constant Field Values
-
JSON_PROPERTY_COMPANY_NAME
public static final String JSON_PROPERTY_COMPANY_NAME
- See Also:
- Constant Field Values
-
JSON_PROPERTY_COUNTRY
public static final String JSON_PROPERTY_COUNTRY
- 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_ADDRESS
public static final String JSON_PROPERTY_STREET_ADDRESS
- See Also:
- Constant Field Values
-
JSON_PROPERTY_STREET_ADDRESS2
public static final String JSON_PROPERTY_STREET_ADDRESS2
- See Also:
- Constant Field Values
-
-
Method Detail
-
city
public Address city(String city)
The name of the city.- Parameters:
city- The name of the city.- Returns:
- the current
Addressinstance, allowing for method chaining
-
getCity
public String getCity()
The name of the city.- Returns:
- city The name of the city.
-
setCity
public void setCity(String city)
The name of the city.- Parameters:
city- The name of the city.
-
companyName
public Address companyName(String companyName)
The name of the company.- Parameters:
companyName- The name of the company.- Returns:
- the current
Addressinstance, allowing for method chaining
-
getCompanyName
public String getCompanyName()
The name of the company.- Returns:
- companyName The name of the company.
-
setCompanyName
public void setCompanyName(String companyName)
The name of the company.- Parameters:
companyName- The name of the company.
-
country
public Address country(String country)
The two-letter country code, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.- Parameters:
country- The two-letter country code, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.- Returns:
- the current
Addressinstance, allowing for method chaining
-
getCountry
public String getCountry()
The two-letter country code, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.- Returns:
- country The two-letter country code, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
-
setCountry
public void setCountry(String country)
The two-letter country code, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.- Parameters:
country- The two-letter country code, in [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format.
-
postalCode
public Address postalCode(String postalCode)
The postal code.- Parameters:
postalCode- The postal code.- Returns:
- the current
Addressinstance, allowing for method chaining
-
getPostalCode
public String getPostalCode()
The postal code.- Returns:
- postalCode The postal code.
-
setPostalCode
public void setPostalCode(String postalCode)
The postal code.- Parameters:
postalCode- The postal code.
-
stateOrProvince
public Address stateOrProvince(String stateOrProvince)
The state or province as defined in [ISO 3166-2](https://www.iso.org/standard/72483.html). For example, **ON** for Ontario, Canada. Applicable for the following countries: - Australia - Brazil - Canada - India - Mexico - New Zealand - United States- Parameters:
stateOrProvince- The state or province as defined in [ISO 3166-2](https://www.iso.org/standard/72483.html). For example, **ON** for Ontario, Canada. Applicable for the following countries: - Australia - Brazil - Canada - India - Mexico - New Zealand - United States- Returns:
- the current
Addressinstance, allowing for method chaining
-
getStateOrProvince
public String getStateOrProvince()
The state or province as defined in [ISO 3166-2](https://www.iso.org/standard/72483.html). For example, **ON** for Ontario, Canada. Applicable for the following countries: - Australia - Brazil - Canada - India - Mexico - New Zealand - United States- Returns:
- stateOrProvince The state or province as defined in [ISO 3166-2](https://www.iso.org/standard/72483.html). For example, **ON** for Ontario, Canada. Applicable for the following countries: - Australia - Brazil - Canada - India - Mexico - New Zealand - United States
-
setStateOrProvince
public void setStateOrProvince(String stateOrProvince)
The state or province as defined in [ISO 3166-2](https://www.iso.org/standard/72483.html). For example, **ON** for Ontario, Canada. Applicable for the following countries: - Australia - Brazil - Canada - India - Mexico - New Zealand - United States- Parameters:
stateOrProvince- The state or province as defined in [ISO 3166-2](https://www.iso.org/standard/72483.html). For example, **ON** for Ontario, Canada. Applicable for the following countries: - Australia - Brazil - Canada - India - Mexico - New Zealand - United States
-
streetAddress
public Address streetAddress(String streetAddress)
The name of the street, and the house or building number.- Parameters:
streetAddress- The name of the street, and the house or building number.- Returns:
- the current
Addressinstance, allowing for method chaining
-
getStreetAddress
public String getStreetAddress()
The name of the street, and the house or building number.- Returns:
- streetAddress The name of the street, and the house or building number.
-
setStreetAddress
public void setStreetAddress(String streetAddress)
The name of the street, and the house or building number.- Parameters:
streetAddress- The name of the street, and the house or building number.
-
streetAddress2
public Address streetAddress2(String streetAddress2)
Additional address details, if any.- Parameters:
streetAddress2- Additional address details, if any.- Returns:
- the current
Addressinstance, allowing for method chaining
-
getStreetAddress2
public String getStreetAddress2()
Additional address details, if any.- Returns:
- streetAddress2 Additional address details, if any.
-
setStreetAddress2
public void setStreetAddress2(String streetAddress2)
Additional address details, if any.- Parameters:
streetAddress2- Additional address details, if any.
-
includeNullValues
public Address 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 Address 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 Address fromJson(String jsonString) throws com.fasterxml.jackson.core.JsonProcessingException
Create an instance of Address given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of Address
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the JSON string is invalid with respect to Address
-
toJson
public String toJson() throws com.fasterxml.jackson.core.JsonProcessingException
Convert an instance of Address to an JSON string- Returns:
- JSON string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-