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
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic CompanyBuilderbuilder()builder factory method for Companystatic CompanyBuildercreate builder for Company instancecopyDeep()static Companyfactory method to create a deep copy of Company@NotNull BusinessUnitApprovalRuleModeThe value of this field is alwaysExplicitbecause a Company cannot have a parent Business Unit that Approval Rules can be inherited from.@NotNull BusinessUnitAssociateModeThe value of this field is alwaysExplicitbecause a Company cannot have a parent Business Unit that Associates can be inherited from.@NotNull BusinessUnitStoreModeThe value of this field is alwaysExplicitbecause a Company cannot have a parent Business Unit that Stores can be inherited from.static Companyof()factory methodstatic Companyfactory method to create a shallow copy CompanyvoidsetApprovalRuleMode(BusinessUnitApprovalRuleMode approvalRuleMode) The value of this field is alwaysExplicitbecause a Company cannot have a parent Business Unit that Approval Rules can be inherited from.voidsetAssociateMode(BusinessUnitAssociateMode associateMode) The value of this field is alwaysExplicitbecause a Company cannot have a parent Business Unit that Associates can be inherited from.voidsetStoreMode(BusinessUnitStoreMode storeMode) The value of this field is alwaysExplicitbecause 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> TwithCompany(Function<Company, 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, getParentUnit, 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, 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
Explicitbecause a Company cannot have a parent Business Unit that Stores can be inherited from.- Specified by:
getStoreModein interfaceBusinessUnit- Returns:
- storeMode
-
getAssociateMode
The value of this field is always
Explicitbecause a Company cannot have a parent Business Unit that Associates can be inherited from.- Specified by:
getAssociateModein interfaceBusinessUnit- Returns:
- associateMode
-
getApprovalRuleMode
The value of this field is always
Explicitbecause a Company cannot have a parent Business Unit that Approval Rules can be inherited from.- Specified by:
getApprovalRuleModein interfaceBusinessUnit- Returns:
- approvalRuleMode
-
setStoreMode
The value of this field is always
Explicitbecause a Company cannot have a parent Business Unit that Stores can be inherited from.- Specified by:
setStoreModein interfaceBusinessUnit- Parameters:
storeMode- value to be set
-
setAssociateMode
The value of this field is always
Explicitbecause a Company cannot have a parent Business Unit that Associates can be inherited from.- Specified by:
setAssociateModein interfaceBusinessUnit- Parameters:
associateMode- value to be set
-
setApprovalRuleMode
The value of this field is always
Explicitbecause a Company cannot have a parent Business Unit that Approval Rules can be inherited from.- Specified by:
setApprovalRuleModein 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
-
copyDeep
Company copyDeep()- Specified by:
copyDeepin interfaceBaseResource- Specified by:
copyDeepin interfaceBusinessUnit
-
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
-