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
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic DivisionDraftBuilderbuilder()builder factory method for DivisionDraftstatic DivisionDraftBuilderbuilder(DivisionDraft template) create builder for DivisionDraft instancecopyDeep()static DivisionDraftdeepCopy(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 BusinessUnitResourceIdentifierThe parent unit of this Division.If not set, the Division inherits the Stores from a parent unit.static DivisionDraftof()factory methodstatic DivisionDraftof(DivisionDraft template) factory method to create a shallow copy DivisionDraftvoidsetApprovalRuleMode(BusinessUnitApprovalRuleMode approvalRuleMode) Determines whether the Division can inherit Approval Rules from a parent.voidsetAssociateMode(BusinessUnitAssociateMode associateMode) Determines whether the Division can inherit Associates from a parent.voidsetParentUnit(BusinessUnitResourceIdentifier parentUnit) The parent unit of this Division.voidsetStoreMode(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> TwithDivisionDraft(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
Explicitif you want to set the Stores explicitly in thestoresfield instead.- Specified by:
getStoreModein interfaceBusinessUnitDraft- Returns:
- storeMode
-
getAssociateMode
BusinessUnitAssociateMode getAssociateMode()Determines whether the Division can inherit Associates from a parent.
- Specified by:
getAssociateModein interfaceBusinessUnitDraft- Returns:
- associateMode
-
getApprovalRuleMode
BusinessUnitApprovalRuleMode getApprovalRuleMode()Determines whether the Division can inherit Approval Rules from a parent.
- Specified by:
getApprovalRuleModein 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
Explicitif you want to set the Stores explicitly in thestoresfield instead.- Specified by:
setStoreModein interfaceBusinessUnitDraft- Parameters:
storeMode- value to be set
-
setAssociateMode
Determines whether the Division can inherit Associates from a parent.
- Specified by:
setAssociateModein interfaceBusinessUnitDraft- Parameters:
associateMode- value to be set
-
setApprovalRuleMode
Determines whether the Division can inherit Approval Rules from a parent.
- Specified by:
setApprovalRuleModein 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
-
copyDeep
DivisionDraft copyDeep()- Specified by:
copyDeepin interfaceBusinessUnitDraft
-
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
-