Class CompanyDraftImpl
- All Implemented Interfaces:
BusinessUnitDraft
,CompanyDraft
,WithKey
,io.vrap.rmf.base.client.Draft<CompanyDraft>
,io.vrap.rmf.base.client.ModelBase
Draft type to represent the top level of a business. Contains the fields and values of the generic BusinessUnitDraft that are used specifically for creating a Company.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.vrap.rmf.base.client.ModelBase
io.vrap.rmf.base.client.ModelBase.FilteredRecursiveToStringStyle
-
Field Summary
Fields inherited from interface com.commercetools.api.models.business_unit.CompanyDraft
COMPANY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Addresses used by the Business Unit.Determines whether the Business Unit can inherit Associates from a parent.List of members that are part of the Business Unit in specific roles.Indexes of entries inaddresses
to set as billing addresses.Email address of the Business Unit.Custom Fields for the Business Unit.Index of the entry inaddresses
to set as the default billing address.Index of the entry inaddresses
to set as the default shipping address.getKey()
User-defined unique identifier for the Business Unit.getName()
Name of the Business Unit.Indexes of entries inaddresses
to set as shipping addresses.Indicates whether the Business Unit can be edited and used in Orders.Defines whether the Stores of the Business Unit are set directly on the Business Unit or are inherited from a parent.Sets the Stores the Business Unit is associated with.Type of the Business Unit indicating its position in a hierarchy.int
hashCode()
void
setAddresses
(BaseAddress... addresses) Addresses used by the Business Unit.void
setAddresses
(List<BaseAddress> addresses) Addresses used by the Business Unit.void
setAssociateMode
(BusinessUnitAssociateMode associateMode) Determines whether the Business Unit can inherit Associates from a parent.void
setAssociates
(AssociateDraft... associates) List of members that are part of the Business Unit in specific roles.void
setAssociates
(List<AssociateDraft> associates) List of members that are part of the Business Unit in specific roles.void
setBillingAddresses
(Integer... billingAddresses) Indexes of entries inaddresses
to set as billing addresses.void
setBillingAddresses
(List<Integer> billingAddresses) Indexes of entries inaddresses
to set as billing addresses.void
setContactEmail
(String contactEmail) Email address of the Business Unit.void
setCustom
(CustomFieldsDraft custom) Custom Fields for the Business Unit.void
setDefaultBillingAddress
(Integer defaultBillingAddress) Index of the entry inaddresses
to set as the default billing address.void
setDefaultShippingAddress
(Integer defaultShippingAddress) Index of the entry inaddresses
to set as the default shipping address.void
User-defined unique identifier for the Business Unit.void
Name of the Business Unit.void
setShippingAddresses
(Integer... shippingAddresses) Indexes of entries inaddresses
to set as shipping addresses.void
setShippingAddresses
(List<Integer> shippingAddresses) Indexes of entries inaddresses
to set as shipping addresses.void
setStatus
(BusinessUnitStatus status) Indicates whether the Business Unit can be edited and used in Orders.void
setStoreMode
(BusinessUnitStoreMode storeMode) Defines whether the Stores of the Business Unit are set directly on the Business Unit or are inherited from a parent.void
setStores
(StoreResourceIdentifier... stores) Sets the Stores the Business Unit is associated with.void
setStores
(List<StoreResourceIdentifier> stores) Sets the Stores the Business Unit is associated with.Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.commercetools.api.models.business_unit.BusinessUnitDraft
withBusinessUnitDraft
Methods inherited from interface com.commercetools.api.models.business_unit.CompanyDraft
withCompanyDraft
Methods inherited from interface io.vrap.rmf.base.client.ModelBase
reflectionString, reflectionString
-
Constructor Details
-
CompanyDraftImpl
public CompanyDraftImpl()create empty instance
-
-
Method Details
-
getKey
User-defined unique identifier for the Business Unit.
- Specified by:
getKey
in interfaceBusinessUnitDraft
- Specified by:
getKey
in interfaceWithKey
- Returns:
- key
-
getStatus
Indicates whether the Business Unit can be edited and used in Orders.
- Specified by:
getStatus
in interfaceBusinessUnitDraft
- Returns:
- status
-
getStores
Sets the Stores the Business Unit is associated with. Can only be set when
storeMode
isExplicit
. Defaults to empty for Companies and not set for Divisions.If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, or Quote Requests must belong to one of the Business Unit's Stores.
If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, or Quote Requests must not belong to any Store.
- Specified by:
getStores
in interfaceBusinessUnitDraft
- Returns:
- stores
-
getStoreMode
Defines whether the Stores of the Business Unit are set directly on the Business Unit or are inherited from a parent.
storeMode
is alwaysExplicit
for Companies and defaults toFromParent
for Divisions.- Specified by:
getStoreMode
in interfaceBusinessUnitDraft
- Returns:
- storeMode
-
getUnitType
Type of the Business Unit indicating its position in a hierarchy.
- Specified by:
getUnitType
in interfaceBusinessUnitDraft
- Returns:
- unitType
-
getName
Name of the Business Unit.
- Specified by:
getName
in interfaceBusinessUnitDraft
- Returns:
- name
-
getContactEmail
Email address of the Business Unit.
- Specified by:
getContactEmail
in interfaceBusinessUnitDraft
- Returns:
- contactEmail
-
getAssociateMode
Determines whether the Business Unit can inherit Associates from a parent. Always
Explicit
for Companies and defaults toExplicitAndFromParent
for Divisions.- Specified by:
getAssociateMode
in interfaceBusinessUnitDraft
- Returns:
- associateMode
-
getAssociates
List of members that are part of the Business Unit in specific roles.
- Specified by:
getAssociates
in interfaceBusinessUnitDraft
- Returns:
- associates
-
getAddresses
Addresses used by the Business Unit.
- Specified by:
getAddresses
in interfaceBusinessUnitDraft
- Returns:
- addresses
-
getShippingAddresses
Indexes of entries in
addresses
to set as shipping addresses. TheshippingAddressIds
of the Customer will be replaced by these addresses.- Specified by:
getShippingAddresses
in interfaceBusinessUnitDraft
- Returns:
- shippingAddresses
-
getDefaultShippingAddress
Index of the entry in
addresses
to set as the default shipping address.- Specified by:
getDefaultShippingAddress
in interfaceBusinessUnitDraft
- Returns:
- defaultShippingAddress
-
getBillingAddresses
Indexes of entries in
addresses
to set as billing addresses. ThebillingAddressIds
of the Customer will be replaced by these addresses.- Specified by:
getBillingAddresses
in interfaceBusinessUnitDraft
- Returns:
- billingAddresses
-
getDefaultBillingAddress
Index of the entry in
addresses
to set as the default billing address.- Specified by:
getDefaultBillingAddress
in interfaceBusinessUnitDraft
- Returns:
- defaultBillingAddress
-
getCustom
Custom Fields for the Business Unit.
- Specified by:
getCustom
in interfaceBusinessUnitDraft
- Returns:
- custom
-
setKey
Description copied from interface:BusinessUnitDraft
User-defined unique identifier for the Business Unit.
- Specified by:
setKey
in interfaceBusinessUnitDraft
- Parameters:
key
- value to be set
-
setStatus
Description copied from interface:BusinessUnitDraft
Indicates whether the Business Unit can be edited and used in Orders.
- Specified by:
setStatus
in interfaceBusinessUnitDraft
- Parameters:
status
- value to be set
-
setStores
Description copied from interface:BusinessUnitDraft
Sets the Stores the Business Unit is associated with. Can only be set when
storeMode
isExplicit
. Defaults to empty for Companies and not set for Divisions.If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, or Quote Requests must belong to one of the Business Unit's Stores.
If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, or Quote Requests must not belong to any Store.
- Specified by:
setStores
in interfaceBusinessUnitDraft
- Parameters:
stores
- values to be set
-
setStores
Description copied from interface:BusinessUnitDraft
Sets the Stores the Business Unit is associated with. Can only be set when
storeMode
isExplicit
. Defaults to empty for Companies and not set for Divisions.If the Business Unit has Stores defined, then all of its Carts, Orders, Quotes, or Quote Requests must belong to one of the Business Unit's Stores.
If the Business Unit has no Stores, then all of its Carts, Orders, Quotes, or Quote Requests must not belong to any Store.
- Specified by:
setStores
in interfaceBusinessUnitDraft
- Parameters:
stores
- values to be set
-
setStoreMode
Description copied from interface:BusinessUnitDraft
Defines whether the Stores of the Business Unit are set directly on the Business Unit or are inherited from a parent.
storeMode
is alwaysExplicit
for Companies and defaults toFromParent
for Divisions.- Specified by:
setStoreMode
in interfaceBusinessUnitDraft
- Parameters:
storeMode
- value to be set
-
setName
Description copied from interface:BusinessUnitDraft
Name of the Business Unit.
- Specified by:
setName
in interfaceBusinessUnitDraft
- Parameters:
name
- value to be set
-
setContactEmail
Description copied from interface:BusinessUnitDraft
Email address of the Business Unit.
- Specified by:
setContactEmail
in interfaceBusinessUnitDraft
- Parameters:
contactEmail
- value to be set
-
setAssociateMode
Description copied from interface:BusinessUnitDraft
Determines whether the Business Unit can inherit Associates from a parent. Always
Explicit
for Companies and defaults toExplicitAndFromParent
for Divisions.- Specified by:
setAssociateMode
in interfaceBusinessUnitDraft
- Parameters:
associateMode
- value to be set
-
setAssociates
Description copied from interface:BusinessUnitDraft
List of members that are part of the Business Unit in specific roles.
- Specified by:
setAssociates
in interfaceBusinessUnitDraft
- Parameters:
associates
- values to be set
-
setAssociates
Description copied from interface:BusinessUnitDraft
List of members that are part of the Business Unit in specific roles.
- Specified by:
setAssociates
in interfaceBusinessUnitDraft
- Parameters:
associates
- values to be set
-
setAddresses
Description copied from interface:BusinessUnitDraft
Addresses used by the Business Unit.
- Specified by:
setAddresses
in interfaceBusinessUnitDraft
- Parameters:
addresses
- values to be set
-
setAddresses
Description copied from interface:BusinessUnitDraft
Addresses used by the Business Unit.
- Specified by:
setAddresses
in interfaceBusinessUnitDraft
- Parameters:
addresses
- values to be set
-
setShippingAddresses
Description copied from interface:BusinessUnitDraft
Indexes of entries in
addresses
to set as shipping addresses. TheshippingAddressIds
of the Customer will be replaced by these addresses.- Specified by:
setShippingAddresses
in interfaceBusinessUnitDraft
- Parameters:
shippingAddresses
- values to be set
-
setShippingAddresses
Description copied from interface:BusinessUnitDraft
Indexes of entries in
addresses
to set as shipping addresses. TheshippingAddressIds
of the Customer will be replaced by these addresses.- Specified by:
setShippingAddresses
in interfaceBusinessUnitDraft
- Parameters:
shippingAddresses
- values to be set
-
setDefaultShippingAddress
Description copied from interface:BusinessUnitDraft
Index of the entry in
addresses
to set as the default shipping address.- Specified by:
setDefaultShippingAddress
in interfaceBusinessUnitDraft
- Parameters:
defaultShippingAddress
- value to be set
-
setBillingAddresses
Description copied from interface:BusinessUnitDraft
Indexes of entries in
addresses
to set as billing addresses. ThebillingAddressIds
of the Customer will be replaced by these addresses.- Specified by:
setBillingAddresses
in interfaceBusinessUnitDraft
- Parameters:
billingAddresses
- values to be set
-
setBillingAddresses
Description copied from interface:BusinessUnitDraft
Indexes of entries in
addresses
to set as billing addresses. ThebillingAddressIds
of the Customer will be replaced by these addresses.- Specified by:
setBillingAddresses
in interfaceBusinessUnitDraft
- Parameters:
billingAddresses
- values to be set
-
setDefaultBillingAddress
Description copied from interface:BusinessUnitDraft
Index of the entry in
addresses
to set as the default billing address.- Specified by:
setDefaultBillingAddress
in interfaceBusinessUnitDraft
- Parameters:
defaultBillingAddress
- value to be set
-
setCustom
Description copied from interface:BusinessUnitDraft
Custom Fields for the Business Unit.
- Specified by:
setCustom
in interfaceBusinessUnitDraft
- Parameters:
custom
- value to be set
-
equals
-
hashCode
public int hashCode()
-