Interface Division
- All Superinterfaces:
BaseResource
,BusinessUnit
,WithKey
Business Unit type to model divisions that are part of the Company or a higher-order Division. Contains specific fields and values that differentiate a Division from the generic BusinessUnit.
Example to create an instance using the builder pattern
Division division = Division.builder()
.id("{id}")
.version(0.3)
.createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
.key("{key}")
.status(BusinessUnitStatus.ACTIVE)
.storeMode(BusinessUnitStoreMode.EXPLICIT)
.name("{name}")
.plusAddresses(addressesBuilder -> addressesBuilder)
.associateMode(BusinessUnitAssociateMode.EXPLICIT)
.plusAssociates(associatesBuilder -> associatesBuilder)
.parentUnit(parentUnitBuilder -> parentUnitBuilder)
.topLevelUnit(topLevelUnitBuilder -> topLevelUnitBuilder)
.approvalRuleMode(BusinessUnitApprovalRuleMode.EXPLICIT)
.build()
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic DivisionBuilder
builder()
builder factory method for Divisionstatic DivisionBuilder
create builder for Division instancestatic Division
factory method to create a deep copy of Division@NotNull BusinessUnitApprovalRuleMode
Determines whether a Business Unit can inherit Approval Rules from a parent.@NotNull BusinessUnitAssociateMode
Determines whether the Division can inherit Associates from a parent.@NotNull @Valid BusinessUnitKeyReference
Parent unit of the Division.@NotNull BusinessUnitStoreMode
Defines whether the Stores of the Division are set explicitly or inherited from a parent Business Unit.static Division
of()
factory methodstatic Division
factory method to create a shallow copy Divisionvoid
setApprovalRuleMode
(BusinessUnitApprovalRuleMode approvalRuleMode) Determines whether a Business Unit can inherit Approval Rules from a parent.void
setAssociateMode
(BusinessUnitAssociateMode associateMode) Determines whether the Division can inherit Associates from a parent.void
setParentUnit
(BusinessUnitKeyReference parentUnit) Parent unit of the Division.void
setStoreMode
(BusinessUnitStoreMode storeMode) Defines whether the Stores of the Division are set explicitly or inherited from a parent Business Unit.static com.fasterxml.jackson.core.type.TypeReference<Division>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withDivision
(Function<Division, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.common.BaseResource
withBaseResource
Methods inherited from interface com.commercetools.api.models.business_unit.BusinessUnit
getAddresses, getAssociates, getBillingAddressIds, getContactEmail, getCreatedAt, getCreatedBy, getCustom, getDefaultBillingAddressId, getDefaultShippingAddressId, getId, getInheritedAssociates, getKey, getLastModifiedAt, getLastModifiedBy, getName, getShippingAddressIds, getStatus, getStores, getTopLevelUnit, getUnitType, getVersion, setAddresses, setAddresses, setAssociates, setAssociates, setBillingAddressIds, setBillingAddressIds, setContactEmail, setCreatedAt, setCreatedBy, setCustom, setDefaultBillingAddressId, setDefaultShippingAddressId, setId, setInheritedAssociates, setInheritedAssociates, setKey, setLastModifiedAt, setLastModifiedBy, setName, setShippingAddressIds, setShippingAddressIds, setStatus, setStores, setStores, setTopLevelUnit, setVersion, withBusinessUnit
-
Field Details
-
DIVISION
discriminator value for Division- See Also:
-
-
Method Details
-
getParentUnit
Parent unit of the Division.
- Specified by:
getParentUnit
in interfaceBusinessUnit
- Returns:
- parentUnit
-
getStoreMode
Defines whether the Stores of the Division are set explicitly or inherited from a parent Business Unit.
- Specified by:
getStoreMode
in interfaceBusinessUnit
- Returns:
- storeMode
-
getAssociateMode
Determines whether the Division can inherit Associates from a parent.
- Specified by:
getAssociateMode
in interfaceBusinessUnit
- Returns:
- associateMode
-
getApprovalRuleMode
Determines whether a Business Unit can inherit Approval Rules from a parent.
- Specified by:
getApprovalRuleMode
in interfaceBusinessUnit
- Returns:
- approvalRuleMode
-
setParentUnit
Parent unit of the Division.
- Specified by:
setParentUnit
in interfaceBusinessUnit
- Parameters:
parentUnit
- value to be set
-
setStoreMode
Defines whether the Stores of the Division are set explicitly or inherited from a parent Business Unit.
- Specified by:
setStoreMode
in interfaceBusinessUnit
- Parameters:
storeMode
- value to be set
-
setAssociateMode
Determines whether the Division can inherit Associates from a parent.
- Specified by:
setAssociateMode
in interfaceBusinessUnit
- Parameters:
associateMode
- value to be set
-
setApprovalRuleMode
Determines whether a Business Unit can inherit Approval Rules from a parent.
- Specified by:
setApprovalRuleMode
in interfaceBusinessUnit
- Parameters:
approvalRuleMode
- value to be set
-
of
factory method- Returns:
- instance of Division
-
of
factory method to create a shallow copy Division- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of Division- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for Division- Returns:
- builder
-
builder
create builder for Division instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withDivision
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
-