Interface Company
- All Superinterfaces:
BaseResource
,BusinessUnit
,WithKey
- All Known Implementing Classes:
CompanyImpl
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)
.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 BusinessUnitAssociateMode
Is alwaysExplicit
since a Company cannot have a parent Business Unit that Associates can be inherited from.@NotNull BusinessUnitStoreMode
Is alwaysExplicit
since 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
setAssociateMode
(BusinessUnitAssociateMode associateMode) Is alwaysExplicit
since a Company cannot have a parent Business Unit that Associates can be inherited from.void
setStoreMode
(BusinessUnitStoreMode storeMode) Is alwaysExplicit
since 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
Is always
Explicit
since a Company cannot have a parent Business Unit that Stores can be inherited from.- Specified by:
getStoreMode
in interfaceBusinessUnit
- Returns:
- storeMode
-
getAssociateMode
Is always
Explicit
since a Company cannot have a parent Business Unit that Associates can be inherited from.- Specified by:
getAssociateMode
in interfaceBusinessUnit
- Returns:
- associateMode
-
setStoreMode
Is always
Explicit
since 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
Is always
Explicit
since 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
-
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
-