Interface AddressDraft
- All Superinterfaces:
BaseAddress
,BaseAddressMixin
,CustomizableDraft<AddressDraft>
,Draft<AddressDraft>
,WithKey
public interface AddressDraft
extends BaseAddress, CustomizableDraft<AddressDraft>, Draft<AddressDraft>
Address type to be used on write methods. Optionally, use the custom
field in addition to the fields of a BaseAddress.
Example to create an instance using the builder pattern
AddressDraft addressDraft = AddressDraft.builder()
.country("{country}")
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic AddressDraftBuilder
builder()
builder factory method for AddressDraftstatic AddressDraftBuilder
builder
(AddressDraft template) create builder for AddressDraft instancestatic AddressDraft
deepCopy
(AddressDraft template) factory method to create a deep copy of AddressDraft@Valid CustomFieldsDraft
Custom Fields defined for the Address.static AddressDraft
of()
factory methodstatic AddressDraft
of
(AddressDraft template) factory method to create a shallow copy AddressDraftvoid
setCustom
(CustomFieldsDraft custom) Custom Fields defined for the Address.static com.fasterxml.jackson.core.type.TypeReference<AddressDraft>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withAddressDraft
(Function<AddressDraft, 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, getId, getKey, getLastName, getMobile, getPhone, getPOBox, getPostalCode, getRegion, getSalutation, getState, getStreetName, getStreetNumber, getTitle, setAdditionalAddressInfo, setAdditionalStreetInfo, setApartment, setBuilding, setCity, setCompany, setCountry, setDepartment, setEmail, setExternalId, setFax, setFirstName, setId, 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.CustomizableDraft
unwrapCustomizableDraft
-
Method Details
-
getCustom
Custom Fields defined for the Address.
- Specified by:
getCustom
in interfaceCustomizableDraft<AddressDraft>
- Returns:
- custom
-
setCustom
Custom Fields defined for the Address.
- Specified by:
setCustom
in interfaceCustomizableDraft<AddressDraft>
- Parameters:
custom
- value to be set
-
of
factory method- Returns:
- instance of AddressDraft
-
of
factory method to create a shallow copy AddressDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of AddressDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for AddressDraft- Returns:
- builder
-
builder
create builder for AddressDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withAddressDraft
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
-