Class DivisionImpl

java.lang.Object
com.commercetools.api.models.business_unit.DivisionImpl
All Implemented Interfaces:
BusinessUnit, Division, BaseResource, WithKey, io.vrap.rmf.base.client.ModelBase

public class DivisionImpl extends Object implements Division, io.vrap.rmf.base.client.ModelBase

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.

  • Constructor Details

    • DivisionImpl

      public DivisionImpl()
      create empty instance
  • Method Details

    • getId

      public String getId()

      Unique identifier of the Business Unit.

      Specified by:
      getId in interface BaseResource
      Specified by:
      getId in interface BusinessUnit
      Returns:
      id
    • getVersion

      public Long getVersion()

      Current version of the Business Unit.

      Specified by:
      getVersion in interface BaseResource
      Specified by:
      getVersion in interface BusinessUnit
      Returns:
      version
    • getCreatedAt

      public ZonedDateTime getCreatedAt()

      Date and time (UTC) the Business Unit was initially created.

      Specified by:
      getCreatedAt in interface BaseResource
      Specified by:
      getCreatedAt in interface BusinessUnit
      Returns:
      createdAt
    • getLastModifiedAt

      public ZonedDateTime getLastModifiedAt()

      Date and time (UTC) the Business Unit was last updated.

      Specified by:
      getLastModifiedAt in interface BaseResource
      Specified by:
      getLastModifiedAt in interface BusinessUnit
      Returns:
      lastModifiedAt
    • getLastModifiedBy

      public LastModifiedBy getLastModifiedBy()

      Present on resources updated after 1 February 2019 except for events not tracked.

      Specified by:
      getLastModifiedBy in interface BusinessUnit
      Returns:
      lastModifiedBy
    • getCreatedBy

      public CreatedBy getCreatedBy()

      Present on resources created after 1 February 2019 except for events not tracked.

      Specified by:
      getCreatedBy in interface BusinessUnit
      Returns:
      createdBy
    • getKey

      public String getKey()

      User-defined unique identifier of the Business Unit.

      Specified by:
      getKey in interface BusinessUnit
      Specified by:
      getKey in interface WithKey
      Returns:
      key
    • getStatus

      public BusinessUnitStatus getStatus()

      Indicates whether the Business Unit can be edited and used in Orders.

      Specified by:
      getStatus in interface BusinessUnit
      Returns:
      status
    • getStores

      public List<StoreKeyReference> getStores()

      References to Stores the Business Unit is associated with. Only present when storeMode is Explicit.

      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 interface BusinessUnit
      Returns:
      stores
    • getStoreMode

      public BusinessUnitStoreMode getStoreMode()

      Defines whether the Stores of the Division are set explicitly or inherited from a parent Business Unit.

      Specified by:
      getStoreMode in interface BusinessUnit
      Specified by:
      getStoreMode in interface Division
      Returns:
      storeMode
    • getUnitType

      public BusinessUnitType getUnitType()

      Type of the Business Unit indicating its position in a hierarchy.

      Specified by:
      getUnitType in interface BusinessUnit
      Returns:
      unitType
    • getName

      public String getName()

      Name of the Business Unit.

      Specified by:
      getName in interface BusinessUnit
      Returns:
      name
    • getContactEmail

      public String getContactEmail()

      Email address of the Business Unit.

      Specified by:
      getContactEmail in interface BusinessUnit
      Returns:
      contactEmail
    • getCustom

      public CustomFields getCustom()

      Custom Fields for the Business Unit.

      Specified by:
      getCustom in interface BusinessUnit
      Returns:
      custom
    • getAddresses

      public List<Address> getAddresses()

      Addresses used by the Business Unit.

      Specified by:
      getAddresses in interface BusinessUnit
      Returns:
      addresses
    • getShippingAddressIds

      public List<String> getShippingAddressIds()

      Unique identifiers of addresses used as shipping addresses.

      Specified by:
      getShippingAddressIds in interface BusinessUnit
      Returns:
      shippingAddressIds
    • getDefaultShippingAddressId

      public String getDefaultShippingAddressId()

      Unique identifier of the address used as the default shipping address.

      Specified by:
      getDefaultShippingAddressId in interface BusinessUnit
      Returns:
      defaultShippingAddressId
    • getBillingAddressIds

      public List<String> getBillingAddressIds()

      Unique identifiers of addresses used as billing addresses.

      Specified by:
      getBillingAddressIds in interface BusinessUnit
      Returns:
      billingAddressIds
    • getDefaultBillingAddressId

      public String getDefaultBillingAddressId()

      Unique identifier of the address used as the default billing address.

      Specified by:
      getDefaultBillingAddressId in interface BusinessUnit
      Returns:
      defaultBillingAddressId
    • getAssociateMode

      public BusinessUnitAssociateMode getAssociateMode()

      Determines whether the Division can inherit Associates from a parent.

      Specified by:
      getAssociateMode in interface BusinessUnit
      Specified by:
      getAssociateMode in interface Division
      Returns:
      associateMode
    • getAssociates

      public List<Associate> getAssociates()

      Associates that are part of the Business Unit in specific roles.

      Specified by:
      getAssociates in interface BusinessUnit
      Returns:
      associates
    • getInheritedAssociates

      public List<InheritedAssociate> getInheritedAssociates()

      Associates that are inherited from a parent Business Unit. This value of this field is eventually consistent and is only present when the associateMode is set to ExplicitAndFromParent.

      Specified by:
      getInheritedAssociates in interface BusinessUnit
      Returns:
      inheritedAssociates
    • getParentUnit

      public BusinessUnitKeyReference getParentUnit()

      Parent unit of the Division.

      Specified by:
      getParentUnit in interface BusinessUnit
      Specified by:
      getParentUnit in interface Division
      Returns:
      parentUnit
    • getTopLevelUnit

      public BusinessUnitKeyReference getTopLevelUnit()

      Top-level unit of the Business Unit. The top-level unit is of unitType Company.

      Specified by:
      getTopLevelUnit in interface BusinessUnit
      Returns:
      topLevelUnit
    • setId

      public void setId(String id)
      Description copied from interface: BusinessUnit

      Unique identifier of the Business Unit.

      Specified by:
      setId in interface BaseResource
      Specified by:
      setId in interface BusinessUnit
      Parameters:
      id - value to be set
    • setVersion

      public void setVersion(Long version)
      Description copied from interface: BusinessUnit

      Current version of the Business Unit.

      Specified by:
      setVersion in interface BaseResource
      Specified by:
      setVersion in interface BusinessUnit
      Parameters:
      version - value to be set
    • setCreatedAt

      public void setCreatedAt(ZonedDateTime createdAt)
      Description copied from interface: BusinessUnit

      Date and time (UTC) the Business Unit was initially created.

      Specified by:
      setCreatedAt in interface BaseResource
      Specified by:
      setCreatedAt in interface BusinessUnit
      Parameters:
      createdAt - value to be set
    • setLastModifiedAt

      public void setLastModifiedAt(ZonedDateTime lastModifiedAt)
      Description copied from interface: BusinessUnit

      Date and time (UTC) the Business Unit was last updated.

      Specified by:
      setLastModifiedAt in interface BaseResource
      Specified by:
      setLastModifiedAt in interface BusinessUnit
      Parameters:
      lastModifiedAt - value to be set
    • setLastModifiedBy

      public void setLastModifiedBy(LastModifiedBy lastModifiedBy)
      Description copied from interface: BusinessUnit

      Present on resources updated after 1 February 2019 except for events not tracked.

      Specified by:
      setLastModifiedBy in interface BusinessUnit
      Parameters:
      lastModifiedBy - value to be set
    • setCreatedBy

      public void setCreatedBy(CreatedBy createdBy)
      Description copied from interface: BusinessUnit

      Present on resources created after 1 February 2019 except for events not tracked.

      Specified by:
      setCreatedBy in interface BusinessUnit
      Parameters:
      createdBy - value to be set
    • setKey

      public void setKey(String key)
      Description copied from interface: BusinessUnit

      User-defined unique identifier of the Business Unit.

      Specified by:
      setKey in interface BusinessUnit
      Parameters:
      key - value to be set
    • setStatus

      public void setStatus(BusinessUnitStatus status)
      Description copied from interface: BusinessUnit

      Indicates whether the Business Unit can be edited and used in Orders.

      Specified by:
      setStatus in interface BusinessUnit
      Parameters:
      status - value to be set
    • setStores

      public void setStores(StoreKeyReference... stores)
      Description copied from interface: BusinessUnit

      References to Stores the Business Unit is associated with. Only present when storeMode is Explicit.

      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 interface BusinessUnit
      Parameters:
      stores - values to be set
    • setStores

      public void setStores(List<StoreKeyReference> stores)
      Description copied from interface: BusinessUnit

      References to Stores the Business Unit is associated with. Only present when storeMode is Explicit.

      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 interface BusinessUnit
      Parameters:
      stores - values to be set
    • setStoreMode

      public void setStoreMode(BusinessUnitStoreMode storeMode)
      Description copied from interface: Division

      Defines whether the Stores of the Division are set explicitly or inherited from a parent Business Unit.

      Specified by:
      setStoreMode in interface BusinessUnit
      Specified by:
      setStoreMode in interface Division
      Parameters:
      storeMode - value to be set
    • setName

      public void setName(String name)
      Description copied from interface: BusinessUnit

      Name of the Business Unit.

      Specified by:
      setName in interface BusinessUnit
      Parameters:
      name - value to be set
    • setContactEmail

      public void setContactEmail(String contactEmail)
      Description copied from interface: BusinessUnit

      Email address of the Business Unit.

      Specified by:
      setContactEmail in interface BusinessUnit
      Parameters:
      contactEmail - value to be set
    • setCustom

      public void setCustom(CustomFields custom)
      Description copied from interface: BusinessUnit

      Custom Fields for the Business Unit.

      Specified by:
      setCustom in interface BusinessUnit
      Parameters:
      custom - value to be set
    • setAddresses

      public void setAddresses(Address... addresses)
      Description copied from interface: BusinessUnit

      Addresses used by the Business Unit.

      Specified by:
      setAddresses in interface BusinessUnit
      Parameters:
      addresses - values to be set
    • setAddresses

      public void setAddresses(List<Address> addresses)
      Description copied from interface: BusinessUnit

      Addresses used by the Business Unit.

      Specified by:
      setAddresses in interface BusinessUnit
      Parameters:
      addresses - values to be set
    • setShippingAddressIds

      public void setShippingAddressIds(String... shippingAddressIds)
      Description copied from interface: BusinessUnit

      Unique identifiers of addresses used as shipping addresses.

      Specified by:
      setShippingAddressIds in interface BusinessUnit
      Parameters:
      shippingAddressIds - values to be set
    • setShippingAddressIds

      public void setShippingAddressIds(List<String> shippingAddressIds)
      Description copied from interface: BusinessUnit

      Unique identifiers of addresses used as shipping addresses.

      Specified by:
      setShippingAddressIds in interface BusinessUnit
      Parameters:
      shippingAddressIds - values to be set
    • setDefaultShippingAddressId

      public void setDefaultShippingAddressId(String defaultShippingAddressId)
      Description copied from interface: BusinessUnit

      Unique identifier of the address used as the default shipping address.

      Specified by:
      setDefaultShippingAddressId in interface BusinessUnit
      Parameters:
      defaultShippingAddressId - value to be set
    • setBillingAddressIds

      public void setBillingAddressIds(String... billingAddressIds)
      Description copied from interface: BusinessUnit

      Unique identifiers of addresses used as billing addresses.

      Specified by:
      setBillingAddressIds in interface BusinessUnit
      Parameters:
      billingAddressIds - values to be set
    • setBillingAddressIds

      public void setBillingAddressIds(List<String> billingAddressIds)
      Description copied from interface: BusinessUnit

      Unique identifiers of addresses used as billing addresses.

      Specified by:
      setBillingAddressIds in interface BusinessUnit
      Parameters:
      billingAddressIds - values to be set
    • setDefaultBillingAddressId

      public void setDefaultBillingAddressId(String defaultBillingAddressId)
      Description copied from interface: BusinessUnit

      Unique identifier of the address used as the default billing address.

      Specified by:
      setDefaultBillingAddressId in interface BusinessUnit
      Parameters:
      defaultBillingAddressId - value to be set
    • setAssociateMode

      public void setAssociateMode(BusinessUnitAssociateMode associateMode)
      Description copied from interface: Division

      Determines whether the Division can inherit Associates from a parent.

      Specified by:
      setAssociateMode in interface BusinessUnit
      Specified by:
      setAssociateMode in interface Division
      Parameters:
      associateMode - value to be set
    • setAssociates

      public void setAssociates(Associate... associates)
      Description copied from interface: BusinessUnit

      Associates that are part of the Business Unit in specific roles.

      Specified by:
      setAssociates in interface BusinessUnit
      Parameters:
      associates - values to be set
    • setAssociates

      public void setAssociates(List<Associate> associates)
      Description copied from interface: BusinessUnit

      Associates that are part of the Business Unit in specific roles.

      Specified by:
      setAssociates in interface BusinessUnit
      Parameters:
      associates - values to be set
    • setInheritedAssociates

      public void setInheritedAssociates(InheritedAssociate... inheritedAssociates)
      Description copied from interface: BusinessUnit

      Associates that are inherited from a parent Business Unit. This value of this field is eventually consistent and is only present when the associateMode is set to ExplicitAndFromParent.

      Specified by:
      setInheritedAssociates in interface BusinessUnit
      Parameters:
      inheritedAssociates - values to be set
    • setInheritedAssociates

      public void setInheritedAssociates(List<InheritedAssociate> inheritedAssociates)
      Description copied from interface: BusinessUnit

      Associates that are inherited from a parent Business Unit. This value of this field is eventually consistent and is only present when the associateMode is set to ExplicitAndFromParent.

      Specified by:
      setInheritedAssociates in interface BusinessUnit
      Parameters:
      inheritedAssociates - values to be set
    • setParentUnit

      public void setParentUnit(BusinessUnitKeyReference parentUnit)
      Description copied from interface: Division

      Parent unit of the Division.

      Specified by:
      setParentUnit in interface BusinessUnit
      Specified by:
      setParentUnit in interface Division
      Parameters:
      parentUnit - value to be set
    • setTopLevelUnit

      public void setTopLevelUnit(BusinessUnitKeyReference topLevelUnit)
      Description copied from interface: BusinessUnit

      Top-level unit of the Business Unit. The top-level unit is of unitType Company.

      Specified by:
      setTopLevelUnit in interface BusinessUnit
      Parameters:
      topLevelUnit - value to be set
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object