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.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()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.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-- Returns:
- the current
Addressinstance, allowing for method chaining
-
getCity
public String getCity()
The name of the city.- Returns:
- city
-
setCity
public void setCity(String city)
The name of the city.- Parameters:
city-
-
companyName
public Address companyName(String companyName)
The name of the company.- Parameters:
companyName-- Returns:
- the current
Addressinstance, allowing for method chaining
-
getCompanyName
public String getCompanyName()
The name of the company.- Returns:
- companyName
-
setCompanyName
public void setCompanyName(String companyName)
The name of the company.- Parameters:
companyName-
-
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-- 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
-
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-
-
postalCode
public Address postalCode(String postalCode)
The postal code.- Parameters:
postalCode-- Returns:
- the current
Addressinstance, allowing for method chaining
-
getPostalCode
public String getPostalCode()
The postal code.- Returns:
- postalCode
-
setPostalCode
public void setPostalCode(String postalCode)
The postal code.- Parameters:
postalCode-
-
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-- 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
-
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-
-
streetAddress
public Address streetAddress(String streetAddress)
The name of the street, and the house or building number.- Parameters:
streetAddress-- 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
-
setStreetAddress
public void setStreetAddress(String streetAddress)
The name of the street, and the house or building number.- Parameters:
streetAddress-
-
streetAddress2
public Address streetAddress2(String streetAddress2)
Additional address details, if any.- Parameters:
streetAddress2-- Returns:
- the current
Addressinstance, allowing for method chaining
-
getStreetAddress2
public String getStreetAddress2()
Additional address details, if any.- Returns:
- streetAddress2
-
setStreetAddress2
public void setStreetAddress2(String streetAddress2)
Additional address details, if any.- Parameters:
streetAddress2-
-
equals
public boolean equals(Object o)
Return true if this Address object is equal to o.
-
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
-
-