Package com.commercetools.api.models.me
Interface MyDivisionDraft
- All Superinterfaces:
CustomizableDraft<MyBusinessUnitDraft>
,Draft<MyDivisionDraft>
,MyBusinessUnitDraft
,WithKey
Draft type to model divisions that are part of the Company or a higher-order Division. Contains the fields and values of the generic MyBusinessUnitDraft that are used specifically for creating a Division.
Example to create an instance using the builder pattern
MyDivisionDraft myDivisionDraft = MyDivisionDraft.builder()
.key("{key}")
.name("{name}")
.parentUnit(parentUnitBuilder -> parentUnitBuilder)
.build()
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic MyDivisionDraftBuilder
builder()
builder factory method for MyDivisionDraftstatic MyDivisionDraftBuilder
builder
(MyDivisionDraft template) create builder for MyDivisionDraft instancestatic MyDivisionDraft
deepCopy
(MyDivisionDraft template) factory method to create a deep copy of MyDivisionDraft@NotNull @Valid BusinessUnitResourceIdentifier
The parent unit of this Division.static MyDivisionDraft
of()
factory methodstatic MyDivisionDraft
of
(MyDivisionDraft template) factory method to create a shallow copy MyDivisionDraftvoid
setParentUnit
(BusinessUnitResourceIdentifier parentUnit) The parent unit of this Division.static com.fasterxml.jackson.core.type.TypeReference<MyDivisionDraft>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withMyDivisionDraft
(Function<MyDivisionDraft, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.CustomizableDraft
unwrapCustomizableDraft
Methods inherited from interface com.commercetools.api.models.me.MyBusinessUnitDraft
getAddresses, getBillingAddresses, getContactEmail, getCustom, getDefaultBillingAddress, getDefaultShippingAddress, getKey, getName, getShippingAddresses, getUnitType, setAddresses, setAddresses, setBillingAddresses, setBillingAddresses, setContactEmail, setCustom, setDefaultBillingAddress, setDefaultShippingAddress, setKey, setName, setShippingAddresses, setShippingAddresses, withMyBusinessUnitDraft
-
Field Details
-
DIVISION
discriminator value for MyDivisionDraft- See Also:
-
-
Method Details
-
getParentUnit
The parent unit of this Division. Can be a Company or a Division.
- Returns:
- parentUnit
-
setParentUnit
The parent unit of this Division. Can be a Company or a Division.
- Parameters:
parentUnit
- value to be set
-
of
factory method- Returns:
- instance of MyDivisionDraft
-
of
factory method to create a shallow copy MyDivisionDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of MyDivisionDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for MyDivisionDraft- Returns:
- builder
-
builder
create builder for MyDivisionDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withMyDivisionDraft
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
-