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 AddressBuilderbuilder()builder factory method for Addressstatic AddressBuildercreate builder for Address instancecopyDeep()static Addressfactory method to create a deep copy of Address@Valid CustomFieldsCustom Fields defined for the Address.getId()Unique identifier of the Address.static Addressof()factory methodstatic Addressfactory method to create a shallow copy AddressvoidsetCustom(CustomFields custom) Custom Fields defined for the Address.voidset idstatic com.fasterxml.jackson.core.type.TypeReference<Address>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithAddress(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, withBaseAddressMethods inherited from interface com.commercetools.api.models.common.BaseAddressMixin
equalsIgnoreId, toDraft, toDraftBuilderMethods inherited from interface com.commercetools.api.models.Customizable
unwrapCustomizable
-
Method Details
-
getCustom
Custom Fields defined for the Address.
- Specified by:
getCustomin interfaceCustomizable<Address>- Returns:
- custom
-
getId
String getId()Description copied from interface:BaseAddressUnique 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
keyinstead and omit this field from the request to let the API generate the ID for the Address.- Specified by:
getIdin interfaceBaseAddress- Returns:
- id
-
setCustom
Custom Fields defined for the Address.
- Specified by:
setCustomin interfaceCustomizable<Address>- Parameters:
custom- value to be set
-
setId
set id- Specified by:
setIdin 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
-
copyDeep
Address copyDeep()- Specified by:
copyDeepin interfaceBaseAddress
-
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
-