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
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic DivisionBuilderbuilder()builder factory method for Divisionstatic DivisionBuildercreate builder for Division instancecopyDeep()static Divisionfactory method to create a deep copy of Division@NotNull BusinessUnitApprovalRuleModeDetermines whether a Business Unit can inherit Approval Rules from a parent.@NotNull BusinessUnitAssociateModeDetermines whether the Division can inherit Associates from a parent.@NotNull @Valid BusinessUnitKeyReferenceParent unit of the Division.@NotNull BusinessUnitStoreModeDefines whether the Stores of the Division are set explicitly or inherited from a parent Business Unit.static Divisionof()factory methodstatic Divisionfactory method to create a shallow copy DivisionvoidsetApprovalRuleMode(BusinessUnitApprovalRuleMode approvalRuleMode) Determines whether a Business Unit can inherit Approval Rules from a parent.voidsetAssociateMode(BusinessUnitAssociateMode associateMode) Determines whether the Division can inherit Associates from a parent.voidsetParentUnit(BusinessUnitKeyReference parentUnit) Parent unit of the Division.voidsetStoreMode(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> TwithDivision(Function<Division, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.common.BaseResource
withBaseResourceMethods inherited from interface com.commercetools.api.models.business_unit.BusinessUnit
getAddresses, getAssociates, getBillingAddressIds, getContactEmail, getCreatedAt, getCreatedBy, getCustom, getDefaultBillingAddressId, getDefaultShippingAddressId, getId, getInheritedAssociates, getInheritedStores, 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, setInheritedStores, setInheritedStores, 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:
getParentUnitin interfaceBusinessUnit- Returns:
- parentUnit
-
getStoreMode
Defines whether the Stores of the Division are set explicitly or inherited from a parent Business Unit.
- Specified by:
getStoreModein interfaceBusinessUnit- Returns:
- storeMode
-
getAssociateMode
Determines whether the Division can inherit Associates from a parent.
- Specified by:
getAssociateModein interfaceBusinessUnit- Returns:
- associateMode
-
getApprovalRuleMode
Determines whether a Business Unit can inherit Approval Rules from a parent.
- Specified by:
getApprovalRuleModein interfaceBusinessUnit- Returns:
- approvalRuleMode
-
setParentUnit
Parent unit of the Division.
- Specified by:
setParentUnitin 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:
setStoreModein interfaceBusinessUnit- Parameters:
storeMode- value to be set
-
setAssociateMode
Determines whether the Division can inherit Associates from a parent.
- Specified by:
setAssociateModein interfaceBusinessUnit- Parameters:
associateMode- value to be set
-
setApprovalRuleMode
Determines whether a Business Unit can inherit Approval Rules from a parent.
- Specified by:
setApprovalRuleModein 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
-
copyDeep
Division copyDeep()- Specified by:
copyDeepin interfaceBaseResource- Specified by:
copyDeepin interfaceBusinessUnit
-
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
-