Interface Address
- All Superinterfaces:
BaseAddress
,BaseAddressMixin
,Customizable<Address>
,WithKey
Address type returned by read methods. Optionally, the custom
field can be present in addition to the fields of a BaseAddress.
Example to create an instance using the builder pattern
Address address = Address.builder()
.country("{country}")
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic AddressBuilder
builder()
builder factory method for Addressstatic AddressBuilder
create builder for Address instancestatic Address
factory method to create a deep copy of Address@Valid CustomFields
Custom Fields defined for the Address.getId()
Unique identifier of the Address.static Address
of()
factory methodstatic Address
factory method to create a shallow copy Addressvoid
setCustom
(CustomFields custom) Custom Fields defined for the Address.void
set idstatic com.fasterxml.jackson.core.type.TypeReference<Address>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withAddress
(Function<Address, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.common.BaseAddress
getAdditionalAddressInfo, getAdditionalStreetInfo, getApartment, getBuilding, getCity, getCompany, getCountry, getDepartment, getEmail, getExternalId, getFax, getFirstName, getKey, getLastName, getMobile, getPhone, getPOBox, getPostalCode, getRegion, getSalutation, getState, getStreetName, getStreetNumber, getTitle, setAdditionalAddressInfo, setAdditionalStreetInfo, setApartment, setBuilding, setCity, setCompany, setCountry, setDepartment, setEmail, setExternalId, setFax, setFirstName, setKey, setLastName, setMobile, setPhone, setPOBox, setPostalCode, setRegion, setSalutation, setState, setStreetName, setStreetNumber, setTitle, withBaseAddress
Methods inherited from interface com.commercetools.api.models.common.BaseAddressMixin
equalsIgnoreId, toDraft, toDraftBuilder
Methods inherited from interface com.commercetools.api.models.Customizable
unwrapCustomizable
-
Method Details
-
getCustom
Custom Fields defined for the Address.
- Specified by:
getCustom
in interfaceCustomizable<Address>
- Returns:
- custom
-
getId
String getId()Description copied from interface:BaseAddress
Unique identifier of the Address.
It is not recommended to set it manually since the API overwrites this ID when creating an Address for a Customer. Use
key
instead and omit this field from the request to let the API generate the ID for the Address.- Specified by:
getId
in interfaceBaseAddress
- Returns:
- id
-
setCustom
Custom Fields defined for the Address.
- Specified by:
setCustom
in interfaceCustomizable<Address>
- Parameters:
custom
- value to be set
-
setId
set id- Specified by:
setId
in interfaceBaseAddress
- Parameters:
id
- value to be set
-
of
factory method- Returns:
- instance of Address
-
of
factory method to create a shallow copy Address- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of Address- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for Address- Returns:
- builder
-
builder
create builder for Address instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withAddress
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-