Interface MyBusinessUnitDraft

All Superinterfaces:
Customizable<MyBusinessUnitDraft>, WithKey
All Known Subinterfaces:
MyCompanyDraft, MyDivisionDraft

public interface MyBusinessUnitDraft extends Customizable<MyBusinessUnitDraft>, WithKey
MyBusinessUnitDraft
Example to create a subtype instance using the builder pattern

     MyBusinessUnitDraft myBusinessUnitDraft = MyBusinessUnitDraft.companyBuilder()
             key("{key}")
             name("{name}")
             .build()
 
  • Method Details

    • getKey

      @NotNull @NotNull String getKey()

      User-defined unique identifier for the BusinessUnit.

      Specified by:
      getKey in interface WithKey
      Returns:
      key
    • getUnitType

      @NotNull @NotNull BusinessUnitType getUnitType()

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

      Returns:
      unitType
    • getName

      @NotNull @NotNull String getName()

      Name of the Business Unit.

      Returns:
      name
    • getContactEmail

      String getContactEmail()

      Email address of the Business Unit.

      Returns:
      contactEmail
    • getCustom

      @Valid @Valid CustomFields getCustom()

      Custom Fields for the Business Unit.

      Specified by:
      getCustom in interface Customizable<MyBusinessUnitDraft>
      Returns:
      custom
    • getAddresses

      @Valid @Valid List<BaseAddress> getAddresses()

      Addresses used by the Business Unit.

      Returns:
      addresses
    • getShippingAddresses

      List<Integer> getShippingAddresses()

      Indexes of entries in addresses to set as shipping addresses. The shippingAddressIds of the Customer will be replaced by these addresses.

      Returns:
      shippingAddresses
    • getDefaultShippingAddress

      Integer getDefaultShippingAddress()

      Index of the entry in addresses to set as the default shipping address.

      Returns:
      defaultShippingAddress
    • getBillingAddresses

      List<Integer> getBillingAddresses()

      Indexes of entries in addresses to set as billing addresses. The billingAddressIds of the Customer will be replaced by these addresses.

      Returns:
      billingAddresses
    • getDefaultBillingAddress

      Integer getDefaultBillingAddress()

      Index of the entry in addresses to set as the default billing address.

      Returns:
      defaultBillingAddress
    • setKey

      void setKey(String key)

      User-defined unique identifier for the BusinessUnit.

      Parameters:
      key - value to be set
    • setName

      void setName(String name)

      Name of the Business Unit.

      Parameters:
      name - value to be set
    • setContactEmail

      void setContactEmail(String contactEmail)

      Email address of the Business Unit.

      Parameters:
      contactEmail - value to be set
    • setCustom

      void setCustom(CustomFields custom)

      Custom Fields for the Business Unit.

      Specified by:
      setCustom in interface Customizable<MyBusinessUnitDraft>
      Parameters:
      custom - value to be set
    • setAddresses

      void setAddresses(BaseAddress... addresses)

      Addresses used by the Business Unit.

      Parameters:
      addresses - values to be set
    • setAddresses

      void setAddresses(List<BaseAddress> addresses)

      Addresses used by the Business Unit.

      Parameters:
      addresses - values to be set
    • setShippingAddresses

      void setShippingAddresses(Integer... shippingAddresses)

      Indexes of entries in addresses to set as shipping addresses. The shippingAddressIds of the Customer will be replaced by these addresses.

      Parameters:
      shippingAddresses - values to be set
    • setShippingAddresses

      void setShippingAddresses(List<Integer> shippingAddresses)

      Indexes of entries in addresses to set as shipping addresses. The shippingAddressIds of the Customer will be replaced by these addresses.

      Parameters:
      shippingAddresses - values to be set
    • setDefaultShippingAddress

      void setDefaultShippingAddress(Integer defaultShippingAddress)

      Index of the entry in addresses to set as the default shipping address.

      Parameters:
      defaultShippingAddress - value to be set
    • setBillingAddresses

      void setBillingAddresses(Integer... billingAddresses)

      Indexes of entries in addresses to set as billing addresses. The billingAddressIds of the Customer will be replaced by these addresses.

      Parameters:
      billingAddresses - values to be set
    • setBillingAddresses

      void setBillingAddresses(List<Integer> billingAddresses)

      Indexes of entries in addresses to set as billing addresses. The billingAddressIds of the Customer will be replaced by these addresses.

      Parameters:
      billingAddresses - values to be set
    • setDefaultBillingAddress

      void setDefaultBillingAddress(Integer defaultBillingAddress)

      Index of the entry in addresses to set as the default billing address.

      Parameters:
      defaultBillingAddress - value to be set
    • deepCopy

      factory method to create a deep copy of MyBusinessUnitDraft
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • companyBuilder

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

      static MyDivisionDraftBuilder divisionBuilder()
      builder for division subtype
      Returns:
      builder
    • withMyBusinessUnitDraft

      default <T> T withMyBusinessUnitDraft(Function<MyBusinessUnitDraft,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<MyBusinessUnitDraft> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference