Interface BusinessUnitImport

All Known Subinterfaces:
CompanyBusinessUnitImport, DivisionBusinessUnitImport

public interface BusinessUnitImport

Represents the data used to import a BusinessUnit. Can be of type Company or Division.


Example to create a subtype instance using the builder pattern

     BusinessUnitImport businessUnitImport = BusinessUnitImport.companyBuilder()
             key("{key}")
             name("{name}")
             .build()
 
  • Method Details

    • getUnitType

      @NotNull @NotNull BusinessUnitType getUnitType()

      The type of Business Unit.

      Returns:
      unitType
    • getKey

      @NotNull @NotNull String getKey()

      User-defined unique identifier. If a BusinessUnit with this key exists, it is updated with the imported data.

      Returns:
      key
    • getName

      @NotNull @NotNull String getName()

      The name of the Business Unit.

      Returns:
      name
    • getStatus

      BusinessUnitStatus getStatus()

      The status of the Business Unit.

      Returns:
      status
    • getContactEmail

      String getContactEmail()

      The contact email address for the Business Unit.

      Returns:
      contactEmail
    • getAssociates

      @Valid @Valid List<AssociateDraft> getAssociates()

      List of Associates to be assigned to the Business Unit.

      Returns:
      associates
    • getAddresses

      @Valid @Valid List<Address> getAddresses()

      The addresses for the Business Unit.

      Returns:
      addresses
    • getShippingAddresses

      List<Integer> getShippingAddresses()

      The indices of the shipping addresses in the addresses array.

      Returns:
      shippingAddresses
    • getDefaultShippingAddress

      Integer getDefaultShippingAddress()

      The index of the default shipping address in the addresses array.

      Returns:
      defaultShippingAddress
    • getBillingAddresses

      List<Integer> getBillingAddresses()

      The indices of the billing addresses in the addresses array.

      Returns:
      billingAddresses
    • getDefaultBillingAddress

      Integer getDefaultBillingAddress()

      The index of the default billing address in the addresses array.

      Returns:
      defaultBillingAddress
    • getStores

      @Valid @Valid List<StoreKeyReference> getStores()

      The Stores of the Business Unit.

      Returns:
      stores
    • getCustom

      @Valid @Valid Custom getCustom()

      Custom fields for the Business Unit.

      Returns:
      custom
    • setKey

      void setKey(String key)

      User-defined unique identifier. If a BusinessUnit with this key exists, it is updated with the imported data.

      Parameters:
      key - value to be set
    • setName

      void setName(String name)

      The name of the Business Unit.

      Parameters:
      name - value to be set
    • setStatus

      void setStatus(BusinessUnitStatus status)

      The status of the Business Unit.

      Parameters:
      status - value to be set
    • setContactEmail

      void setContactEmail(String contactEmail)

      The contact email address for the Business Unit.

      Parameters:
      contactEmail - value to be set
    • setAssociates

      void setAssociates(AssociateDraft... associates)

      List of Associates to be assigned to the Business Unit.

      Parameters:
      associates - values to be set
    • setAssociates

      void setAssociates(List<AssociateDraft> associates)

      List of Associates to be assigned to the Business Unit.

      Parameters:
      associates - values to be set
    • setAddresses

      void setAddresses(Address... addresses)

      The addresses for the Business Unit.

      Parameters:
      addresses - values to be set
    • setAddresses

      void setAddresses(List<Address> addresses)

      The addresses for the Business Unit.

      Parameters:
      addresses - values to be set
    • setShippingAddresses

      void setShippingAddresses(Integer... shippingAddresses)

      The indices of the shipping addresses in the addresses array.

      Parameters:
      shippingAddresses - values to be set
    • setShippingAddresses

      void setShippingAddresses(List<Integer> shippingAddresses)

      The indices of the shipping addresses in the addresses array.

      Parameters:
      shippingAddresses - values to be set
    • setDefaultShippingAddress

      void setDefaultShippingAddress(Integer defaultShippingAddress)

      The index of the default shipping address in the addresses array.

      Parameters:
      defaultShippingAddress - value to be set
    • setBillingAddresses

      void setBillingAddresses(Integer... billingAddresses)

      The indices of the billing addresses in the addresses array.

      Parameters:
      billingAddresses - values to be set
    • setBillingAddresses

      void setBillingAddresses(List<Integer> billingAddresses)

      The indices of the billing addresses in the addresses array.

      Parameters:
      billingAddresses - values to be set
    • setDefaultBillingAddress

      void setDefaultBillingAddress(Integer defaultBillingAddress)

      The index of the default billing address in the addresses array.

      Parameters:
      defaultBillingAddress - value to be set
    • setStores

      void setStores(StoreKeyReference... stores)

      The Stores of the Business Unit.

      Parameters:
      stores - values to be set
    • setStores

      void setStores(List<StoreKeyReference> stores)

      The Stores of the Business Unit.

      Parameters:
      stores - values to be set
    • setCustom

      void setCustom(Custom custom)

      Custom fields for the Business Unit.

      Parameters:
      custom - value to be set
    • copyDeep

      BusinessUnitImport copyDeep()
    • deepCopy

      @Nullable static BusinessUnitImport deepCopy(@Nullable BusinessUnitImport template)
      factory method to create a deep copy of BusinessUnitImport
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • companyBuilder

      static CompanyBusinessUnitImportBuilder companyBuilder()
      builder for company subtype
      Returns:
      builder
    • divisionBuilder

      static DivisionBusinessUnitImportBuilder divisionBuilder()
      builder for division subtype
      Returns:
      builder
    • withBusinessUnitImport

      default <T> T withBusinessUnitImport(Function<BusinessUnitImport,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<BusinessUnitImport> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference