Interface Company
- All Superinterfaces:
BaseResource
,BusinessUnit
,WithKey
Business Unit type to represent the top level of a business. Contains specific fields and values that differentiate a Company from the generic BusinessUnit.
Example to create an instance using the builder pattern
Company company = Company.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)
.topLevelUnit(topLevelUnitBuilder -> topLevelUnitBuilder)
.approvalRuleMode(BusinessUnitApprovalRuleMode.EXPLICIT)
.build()
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic CompanyBuilder
builder()
builder factory method for Companystatic CompanyBuilder
create builder for Company instancestatic Company
factory method to create a deep copy of Company@NotNull BusinessUnitApprovalRuleMode
The value of this field is alwaysExplicit
because a Company cannot have a parent Business Unit that Approval Rules can be inherited from.@NotNull BusinessUnitAssociateMode
The value of this field is alwaysExplicit
because a Company cannot have a parent Business Unit that Associates can be inherited from.@NotNull BusinessUnitStoreMode
The value of this field is alwaysExplicit
because a Company cannot have a parent Business Unit that Stores can be inherited from.static Company
of()
factory methodstatic Company
factory method to create a shallow copy Companyvoid
setApprovalRuleMode
(BusinessUnitApprovalRuleMode approvalRuleMode) The value of this field is alwaysExplicit
because a Company cannot have a parent Business Unit that Approval Rules can be inherited from.void
setAssociateMode
(BusinessUnitAssociateMode associateMode) The value of this field is alwaysExplicit
because a Company cannot have a parent Business Unit that Associates can be inherited from.void
setStoreMode
(BusinessUnitStoreMode storeMode) The value of this field is alwaysExplicit
because a Company cannot have a parent Business Unit that Stores can be inherited from.static com.fasterxml.jackson.core.type.TypeReference<Company>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withCompany
(Function<Company, 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, getParentUnit, 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, setParentUnit, setShippingAddressIds, setShippingAddressIds, setStatus, setStores, setStores, setTopLevelUnit, setVersion, withBusinessUnit
-
Field Details
-
COMPANY
discriminator value for Company- See Also:
-
-
Method Details
-
getStoreMode
The value of this field is always
Explicit
because a Company cannot have a parent Business Unit that Stores can be inherited from.- Specified by:
getStoreMode
in interfaceBusinessUnit
- Returns:
- storeMode
-
getAssociateMode
The value of this field is always
Explicit
because a Company cannot have a parent Business Unit that Associates can be inherited from.- Specified by:
getAssociateMode
in interfaceBusinessUnit
- Returns:
- associateMode
-
getApprovalRuleMode
The value of this field is always
Explicit
because a Company cannot have a parent Business Unit that Approval Rules can be inherited from.- Specified by:
getApprovalRuleMode
in interfaceBusinessUnit
- Returns:
- approvalRuleMode
-
setStoreMode
The value of this field is always
Explicit
because a Company cannot have a parent Business Unit that Stores can be inherited from.- Specified by:
setStoreMode
in interfaceBusinessUnit
- Parameters:
storeMode
- value to be set
-
setAssociateMode
The value of this field is always
Explicit
because a Company cannot have a parent Business Unit that Associates can be inherited from.- Specified by:
setAssociateMode
in interfaceBusinessUnit
- Parameters:
associateMode
- value to be set
-
setApprovalRuleMode
The value of this field is always
Explicit
because a Company cannot have a parent Business Unit that Approval Rules can be inherited from.- Specified by:
setApprovalRuleMode
in interfaceBusinessUnit
- Parameters:
approvalRuleMode
- value to be set
-
of
factory method- Returns:
- instance of Company
-
of
factory method to create a shallow copy Company- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of Company- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for Company- Returns:
- builder
-
builder
create builder for Company instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withCompany
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
-