Package com.adyen.model.transfers
Class Address
- java.lang.Object
-
- com.adyen.model.transfers.Address
-
public class Address extends Object
Address
-
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_CITYstatic StringJSON_PROPERTY_COUNTRYstatic StringJSON_PROPERTY_LINE1static StringJSON_PROPERTY_LINE2static StringJSON_PROPERTY_POSTAL_CODEstatic StringJSON_PROPERTY_STATE_OR_PROVINCE
-
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.Addresscountry(String country)The two-character ISO 3166-1 alpha-2 country code.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.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.StringgetLine1()The first line of the street address.StringgetLine2()The second line of the street address.StringgetPostalCode()The postal code.StringgetStateOrProvince()The two-letter ISO 3166-2 state or province code.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.Addressline1(String line1)The first line of the street address.Addressline2(String line2)The second line of the street address.AddresspostalCode(String postalCode)The postal code.voidsetCity(String city)The name of the city.voidsetCountry(String country)The two-character ISO 3166-1 alpha-2 country code.voidsetIncludeNullValues(boolean includeNullValues)Sets whether null values should be explicitly serialized in the JSON payload.voidsetLine1(String line1)The first line of the street address.voidsetLine2(String line2)The second line of the street address.voidsetPostalCode(String postalCode)The postal code.voidsetStateOrProvince(String stateOrProvince)The two-letter ISO 3166-2 state or province code.AddressstateOrProvince(String stateOrProvince)The two-letter ISO 3166-2 state or province code.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_COUNTRY
public static final String JSON_PROPERTY_COUNTRY
- See Also:
- Constant Field Values
-
JSON_PROPERTY_LINE1
public static final String JSON_PROPERTY_LINE1
- See Also:
- Constant Field Values
-
JSON_PROPERTY_LINE2
public static final String JSON_PROPERTY_LINE2
- 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
-
city
public Address city(String city)
The name of the city. Supported characters: **[a-z] [A-Z] [0-9] . - — / # , ’ ° ( ) : ; [ ] & \\ |** and Space. > Required when the `category` is **card**.- Parameters:
city- The name of the city. Supported characters: **[a-z] [A-Z] [0-9] . - — / # , ’ ° ( ) : ; [ ] & \\ |** and Space. > Required when the `category` is **card**.- Returns:
- the current
Addressinstance, allowing for method chaining
-
getCity
public String getCity()
The name of the city. Supported characters: **[a-z] [A-Z] [0-9] . - — / # , ’ ° ( ) : ; [ ] & \\ |** and Space. > Required when the `category` is **card**.- Returns:
- city The name of the city. Supported characters: **[a-z] [A-Z] [0-9] . - — / # , ’ ° ( ) : ; [ ] & \\ |** and Space. > Required when the `category` is **card**.
-
setCity
public void setCity(String city)
The name of the city. Supported characters: **[a-z] [A-Z] [0-9] . - — / # , ’ ° ( ) : ; [ ] & \\ |** and Space. > Required when the `category` is **card**.- Parameters:
city- The name of the city. Supported characters: **[a-z] [A-Z] [0-9] . - — / # , ’ ° ( ) : ; [ ] & \\ |** and Space. > Required when the `category` is **card**.
-
country
public Address country(String country)
The two-character ISO 3166-1 alpha-2 country code. For example, **US**, **NL**, or **GB**.- Parameters:
country- The two-character ISO 3166-1 alpha-2 country code. For example, **US**, **NL**, or **GB**.- Returns:
- the current
Addressinstance, allowing for method chaining
-
getCountry
public String getCountry()
The two-character ISO 3166-1 alpha-2 country code. For example, **US**, **NL**, or **GB**.- Returns:
- country The two-character ISO 3166-1 alpha-2 country code. For example, **US**, **NL**, or **GB**.
-
setCountry
public void setCountry(String country)
The two-character ISO 3166-1 alpha-2 country code. For example, **US**, **NL**, or **GB**.- Parameters:
country- The two-character ISO 3166-1 alpha-2 country code. For example, **US**, **NL**, or **GB**.
-
line1
public Address line1(String line1)
The first line of the street address. Supported characters: **[a-z] [A-Z] [0-9] . - — / # , ’ ° ( ) : ; [ ] & \\ |** and Space. > Required when the `category` is **card**.- Parameters:
line1- The first line of the street address. Supported characters: **[a-z] [A-Z] [0-9] . - — / # , ’ ° ( ) : ; [ ] & \\ |** and Space. > Required when the `category` is **card**.- Returns:
- the current
Addressinstance, allowing for method chaining
-
getLine1
public String getLine1()
The first line of the street address. Supported characters: **[a-z] [A-Z] [0-9] . - — / # , ’ ° ( ) : ; [ ] & \\ |** and Space. > Required when the `category` is **card**.- Returns:
- line1 The first line of the street address. Supported characters: **[a-z] [A-Z] [0-9] . - — / # , ’ ° ( ) : ; [ ] & \\ |** and Space. > Required when the `category` is **card**.
-
setLine1
public void setLine1(String line1)
The first line of the street address. Supported characters: **[a-z] [A-Z] [0-9] . - — / # , ’ ° ( ) : ; [ ] & \\ |** and Space. > Required when the `category` is **card**.- Parameters:
line1- The first line of the street address. Supported characters: **[a-z] [A-Z] [0-9] . - — / # , ’ ° ( ) : ; [ ] & \\ |** and Space. > Required when the `category` is **card**.
-
line2
public Address line2(String line2)
The second line of the street address. Supported characters: **[a-z] [A-Z] [0-9] . - — / # , ’ ° ( ) : ; [ ] & \\ |** and Space. > Required when the `category` is **card**.- Parameters:
line2- The second line of the street address. Supported characters: **[a-z] [A-Z] [0-9] . - — / # , ’ ° ( ) : ; [ ] & \\ |** and Space. > Required when the `category` is **card**.- Returns:
- the current
Addressinstance, allowing for method chaining
-
getLine2
public String getLine2()
The second line of the street address. Supported characters: **[a-z] [A-Z] [0-9] . - — / # , ’ ° ( ) : ; [ ] & \\ |** and Space. > Required when the `category` is **card**.- Returns:
- line2 The second line of the street address. Supported characters: **[a-z] [A-Z] [0-9] . - — / # , ’ ° ( ) : ; [ ] & \\ |** and Space. > Required when the `category` is **card**.
-
setLine2
public void setLine2(String line2)
The second line of the street address. Supported characters: **[a-z] [A-Z] [0-9] . - — / # , ’ ° ( ) : ; [ ] & \\ |** and Space. > Required when the `category` is **card**.- Parameters:
line2- The second line of the street address. Supported characters: **[a-z] [A-Z] [0-9] . - — / # , ’ ° ( ) : ; [ ] & \\ |** and Space. > Required when the `category` is **card**.
-
postalCode
public Address postalCode(String postalCode)
The postal code. Maximum length: * 5 digits for an address in the US. * 10 characters for an address in all other countries. Supported characters: **[a-z] [A-Z] [0-9]** and Space. > Required for addresses in the US.- Parameters:
postalCode- The postal code. Maximum length: * 5 digits for an address in the US. * 10 characters for an address in all other countries. Supported characters: **[a-z] [A-Z] [0-9]** and Space. > Required for addresses in the US.- Returns:
- the current
Addressinstance, allowing for method chaining
-
getPostalCode
public String getPostalCode()
The postal code. Maximum length: * 5 digits for an address in the US. * 10 characters for an address in all other countries. Supported characters: **[a-z] [A-Z] [0-9]** and Space. > Required for addresses in the US.- Returns:
- postalCode The postal code. Maximum length: * 5 digits for an address in the US. * 10 characters for an address in all other countries. Supported characters: **[a-z] [A-Z] [0-9]** and Space. > Required for addresses in the US.
-
setPostalCode
public void setPostalCode(String postalCode)
The postal code. Maximum length: * 5 digits for an address in the US. * 10 characters for an address in all other countries. Supported characters: **[a-z] [A-Z] [0-9]** and Space. > Required for addresses in the US.- Parameters:
postalCode- The postal code. Maximum length: * 5 digits for an address in the US. * 10 characters for an address in all other countries. Supported characters: **[a-z] [A-Z] [0-9]** and Space. > Required for addresses in the US.
-
stateOrProvince
public Address stateOrProvince(String stateOrProvince)
The two-letter 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-letter 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
Addressinstance, allowing for method chaining
-
getStateOrProvince
public String getStateOrProvince()
The two-letter 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-letter 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-letter 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-letter ISO 3166-2 state or province code. For example, **CA** in the US or **ON** in Canada. > Required for the US and Canada.
-
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
-
-