Class MyCompanyDraftBuilder

java.lang.Object
com.commercetools.api.models.me.MyCompanyDraftBuilder
All Implemented Interfaces:
Builder<MyCompanyDraft>

public class MyCompanyDraftBuilder extends Object implements Builder<MyCompanyDraft>
MyCompanyDraftBuilder
Example to create an instance using the builder pattern

     MyCompanyDraft myCompanyDraft = MyCompanyDraft.builder()
             .key("{key}")
             .name("{name}")
             .build()
 
  • Constructor Details

    • MyCompanyDraftBuilder

      public MyCompanyDraftBuilder()
  • Method Details

    • key

      public MyCompanyDraftBuilder key(String key)

      User-defined unique identifier for the BusinessUnit.

      Parameters:
      key - value to be set
      Returns:
      Builder
    • name

      public MyCompanyDraftBuilder name(String name)

      Name of the Business Unit.

      Parameters:
      name - value to be set
      Returns:
      Builder
    • contactEmail

      public MyCompanyDraftBuilder contactEmail(@Nullable String contactEmail)

      Email address of the Business Unit.

      Parameters:
      contactEmail - value to be set
      Returns:
      Builder
    • custom

      Custom Fields for the Business Unit.

      Parameters:
      builder - function to build the custom value
      Returns:
      Builder
    • withCustom

      Custom Fields for the Business Unit.

      Parameters:
      builder - function to build the custom value
      Returns:
      Builder
    • custom

      Custom Fields for the Business Unit.

      Parameters:
      custom - value to be set
      Returns:
      Builder
    • addresses

      public MyCompanyDraftBuilder addresses(@Nullable BaseAddress... addresses)

      Addresses used by the Business Unit.

      Parameters:
      addresses - value to be set
      Returns:
      Builder
    • addresses

      public MyCompanyDraftBuilder addresses(@Nullable List<BaseAddress> addresses)

      Addresses used by the Business Unit.

      Parameters:
      addresses - value to be set
      Returns:
      Builder
    • plusAddresses

      public MyCompanyDraftBuilder plusAddresses(@Nullable BaseAddress... addresses)

      Addresses used by the Business Unit.

      Parameters:
      addresses - value to be set
      Returns:
      Builder
    • plusAddresses

      Addresses used by the Business Unit.

      Parameters:
      builder - function to build the addresses value
      Returns:
      Builder
    • withAddresses

      Addresses used by the Business Unit.

      Parameters:
      builder - function to build the addresses value
      Returns:
      Builder
    • addAddresses

      Addresses used by the Business Unit.

      Parameters:
      builder - function to build the addresses value
      Returns:
      Builder
    • setAddresses

      Addresses used by the Business Unit.

      Parameters:
      builder - function to build the addresses value
      Returns:
      Builder
    • shippingAddresses

      public MyCompanyDraftBuilder shippingAddresses(@Nullable 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 - value to be set
      Returns:
      Builder
    • shippingAddresses

      public MyCompanyDraftBuilder shippingAddresses(@Nullable 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 - value to be set
      Returns:
      Builder
    • plusShippingAddresses

      public MyCompanyDraftBuilder plusShippingAddresses(@Nullable 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 - value to be set
      Returns:
      Builder
    • defaultShippingAddress

      public MyCompanyDraftBuilder defaultShippingAddress(@Nullable Integer defaultShippingAddress)

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

      Parameters:
      defaultShippingAddress - value to be set
      Returns:
      Builder
    • billingAddresses

      public MyCompanyDraftBuilder billingAddresses(@Nullable 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 - value to be set
      Returns:
      Builder
    • billingAddresses

      public MyCompanyDraftBuilder billingAddresses(@Nullable 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 - value to be set
      Returns:
      Builder
    • plusBillingAddresses

      public MyCompanyDraftBuilder plusBillingAddresses(@Nullable 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 - value to be set
      Returns:
      Builder
    • defaultBillingAddress

      public MyCompanyDraftBuilder defaultBillingAddress(@Nullable Integer defaultBillingAddress)

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

      Parameters:
      defaultBillingAddress - value to be set
      Returns:
      Builder
    • getKey

      public String getKey()

      User-defined unique identifier for the BusinessUnit.

      Returns:
      key
    • getName

      public String getName()

      Name of the Business Unit.

      Returns:
      name
    • getContactEmail

      @Nullable public String getContactEmail()

      Email address of the Business Unit.

      Returns:
      contactEmail
    • getCustom

      @Nullable public CustomFieldsDraft getCustom()

      Custom Fields for the Business Unit.

      Returns:
      custom
    • getAddresses

      @Nullable public List<BaseAddress> getAddresses()

      Addresses used by the Business Unit.

      Returns:
      addresses
    • getShippingAddresses

      @Nullable public 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

      @Nullable public Integer getDefaultShippingAddress()

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

      Returns:
      defaultShippingAddress
    • getBillingAddresses

      @Nullable public 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

      @Nullable public Integer getDefaultBillingAddress()

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

      Returns:
      defaultBillingAddress
    • build

      public MyCompanyDraft build()
      builds MyCompanyDraft with checking for non-null required values
      Specified by:
      build in interface Builder<MyCompanyDraft>
      Returns:
      MyCompanyDraft
    • buildUnchecked

      public MyCompanyDraft buildUnchecked()
      builds MyCompanyDraft without checking for non-null required values
      Returns:
      MyCompanyDraft
    • of

      public static MyCompanyDraftBuilder of()
      factory method for an instance of MyCompanyDraftBuilder
      Returns:
      builder
    • of

      public static MyCompanyDraftBuilder of(MyCompanyDraft template)
      create builder for MyCompanyDraft instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder