Package com.adyen.model.checkout
Class BillingAddress
- java.lang.Object
-
- com.adyen.model.checkout.BillingAddress
-
public class BillingAddress extends Object
BillingAddress
-
-
Field Summary
Fields Modifier and Type Field Description static StringJSON_PROPERTY_CITYstatic StringJSON_PROPERTY_COUNTRYstatic StringJSON_PROPERTY_HOUSE_NUMBER_OR_NAMEstatic StringJSON_PROPERTY_POSTAL_CODEstatic StringJSON_PROPERTY_STATE_OR_PROVINCEstatic StringJSON_PROPERTY_STREET
-
Constructor Summary
Constructors Constructor Description BillingAddress()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description BillingAddresscity(String city)BillingAddresscountry(String country)booleanequals(Object o)Return true if this BillingAddress object is equal to o.static BillingAddressfromJson(String jsonString)Create an instance of BillingAddress given an JSON stringStringgetCity()The name of the city.StringgetCountry()The two-character ISO-3166-1 alpha-2 country code.StringgetHouseNumberOrName()The number or name of the house.StringgetPostalCode()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()BillingAddresshouseNumberOrName(String houseNumberOrName)BillingAddresspostalCode(String postalCode)voidsetCity(String city)The name of the city.voidsetCountry(String country)The two-character ISO-3166-1 alpha-2 country code.voidsetHouseNumberOrName(String houseNumberOrName)The number or name of the house.voidsetPostalCode(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.BillingAddressstateOrProvince(String stateOrProvince)BillingAddressstreet(String street)StringtoJson()Convert an instance of BillingAddress 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_HOUSE_NUMBER_OR_NAME
public static final String JSON_PROPERTY_HOUSE_NUMBER_OR_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 BillingAddress city(String city)
-
getCity
public String getCity()
The name of the city. Maximum length: 3000 characters.- Returns:
- city
-
setCity
public void setCity(String city)
The name of the city. Maximum length: 3000 characters.- Parameters:
city-
-
country
public BillingAddress country(String country)
-
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
-
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-
-
houseNumberOrName
public BillingAddress houseNumberOrName(String houseNumberOrName)
-
getHouseNumberOrName
public String getHouseNumberOrName()
The number or name of the house. Maximum length: 3000 characters.- Returns:
- houseNumberOrName
-
setHouseNumberOrName
public void setHouseNumberOrName(String houseNumberOrName)
The number or name of the house. Maximum length: 3000 characters.- Parameters:
houseNumberOrName-
-
postalCode
public BillingAddress postalCode(String postalCode)
-
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
-
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-
-
stateOrProvince
public BillingAddress stateOrProvince(String stateOrProvince)
-
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
-
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-
-
street
public BillingAddress street(String street)
-
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
-
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-
-
equals
public boolean equals(Object o)
Return true if this BillingAddress object is equal to o.
-
fromJson
public static BillingAddress fromJson(String jsonString) throws com.fasterxml.jackson.core.JsonProcessingException
Create an instance of BillingAddress given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of BillingAddress
- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the JSON string is invalid with respect to BillingAddress
-
toJson
public String toJson() throws com.fasterxml.jackson.core.JsonProcessingException
Convert an instance of BillingAddress to an JSON string- Returns:
- JSON string
- Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-