Interface DivisionDraft
- All Superinterfaces:
BusinessUnitDraft
,Draft<DivisionDraft>
,WithKey
Draft type to model divisions that are part of a Company or a higher-order Division. Contains the fields and values of the generic BusinessUnitDraft that are used specifically for creating a Division.
Example to create an instance using the builder pattern
DivisionDraft divisionDraft = DivisionDraft.builder()
.key("{key}")
.name("{name}")
.parentUnit(parentUnitBuilder -> parentUnitBuilder)
.build()
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic DivisionDraftBuilder
builder()
builder factory method for DivisionDraftstatic DivisionDraftBuilder
builder
(DivisionDraft template) create builder for DivisionDraft instancestatic DivisionDraft
deepCopy
(DivisionDraft template) factory method to create a deep copy of DivisionDraftDetermines whether the Division can inherit Approval Rules from a parent.Determines whether the Division can inherit Associates from a parent.@NotNull @Valid BusinessUnitResourceIdentifier
The parent unit of this Division.If not set, the Division inherits the Stores from a parent unit.static DivisionDraft
of()
factory methodstatic DivisionDraft
of
(DivisionDraft template) factory method to create a shallow copy DivisionDraftvoid
setApprovalRuleMode
(BusinessUnitApprovalRuleMode approvalRuleMode) Determines whether the Division can inherit Approval Rules from a parent.void
setAssociateMode
(BusinessUnitAssociateMode associateMode) Determines whether the Division can inherit Associates from a parent.void
setParentUnit
(BusinessUnitResourceIdentifier parentUnit) The parent unit of this Division.void
setStoreMode
(BusinessUnitStoreMode storeMode) If not set, the Division inherits the Stores from a parent unit.static com.fasterxml.jackson.core.type.TypeReference<DivisionDraft>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withDivisionDraft
(Function<DivisionDraft, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.business_unit.BusinessUnitDraft
getAddresses, getAssociates, getBillingAddresses, getContactEmail, getCustom, getDefaultBillingAddress, getDefaultShippingAddress, getKey, getName, getShippingAddresses, getStatus, getStores, getUnitType, setAddresses, setAddresses, setAssociates, setAssociates, setBillingAddresses, setBillingAddresses, setContactEmail, setCustom, setDefaultBillingAddress, setDefaultShippingAddress, setKey, setName, setShippingAddresses, setShippingAddresses, setStatus, setStores, setStores, withBusinessUnitDraft
-
Field Details
-
DIVISION
discriminator value for DivisionDraft- See Also:
-
-
Method Details
-
getParentUnit
The parent unit of this Division. Can be a Company or a Division.
- Returns:
- parentUnit
-
getStoreMode
BusinessUnitStoreMode getStoreMode()If not set, the Division inherits the Stores from a parent unit. Set this to
Explicit
if you want to set the Stores explicitly in thestores
field instead.- Specified by:
getStoreMode
in interfaceBusinessUnitDraft
- Returns:
- storeMode
-
getAssociateMode
BusinessUnitAssociateMode getAssociateMode()Determines whether the Division can inherit Associates from a parent.
- Specified by:
getAssociateMode
in interfaceBusinessUnitDraft
- Returns:
- associateMode
-
getApprovalRuleMode
BusinessUnitApprovalRuleMode getApprovalRuleMode()Determines whether the Division can inherit Approval Rules from a parent.
- Specified by:
getApprovalRuleMode
in interfaceBusinessUnitDraft
- Returns:
- approvalRuleMode
-
setParentUnit
The parent unit of this Division. Can be a Company or a Division.
- Parameters:
parentUnit
- value to be set
-
setStoreMode
If not set, the Division inherits the Stores from a parent unit. Set this to
Explicit
if you want to set the Stores explicitly in thestores
field instead.- Specified by:
setStoreMode
in interfaceBusinessUnitDraft
- Parameters:
storeMode
- value to be set
-
setAssociateMode
Determines whether the Division can inherit Associates from a parent.
- Specified by:
setAssociateMode
in interfaceBusinessUnitDraft
- Parameters:
associateMode
- value to be set
-
setApprovalRuleMode
Determines whether the Division can inherit Approval Rules from a parent.
- Specified by:
setApprovalRuleMode
in interfaceBusinessUnitDraft
- Parameters:
approvalRuleMode
- value to be set
-
of
factory method- Returns:
- instance of DivisionDraft
-
of
factory method to create a shallow copy DivisionDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of DivisionDraft- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for DivisionDraft- Returns:
- builder
-
builder
create builder for DivisionDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withDivisionDraft
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
-