Class MyCompanyDraftBuilder
- All Implemented Interfaces:
Builder<MyCompanyDraft>
Example to create an instance using the builder pattern
MyCompanyDraft myCompanyDraft = MyCompanyDraft.builder()
.key("{key}")
.name("{name}")
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddAddresses
(Function<BaseAddressBuilder, BaseAddress> builder) Addresses used by the Business Unit.addresses
(BaseAddress... addresses) Addresses used by the Business Unit.addresses
(List<BaseAddress> addresses) Addresses used by the Business Unit.billingAddresses
(Integer... billingAddresses) Indexes of entries inaddresses
to set as billing addresses.billingAddresses
(List<Integer> billingAddresses) Indexes of entries inaddresses
to set as billing addresses.build()
builds MyCompanyDraft with checking for non-null required valuesbuilds MyCompanyDraft without checking for non-null required valuescontactEmail
(String contactEmail) Email address of the Business Unit.custom
(CustomFieldsDraft custom) Custom Fields for the Business Unit.Custom Fields for the Business Unit.defaultBillingAddress
(Integer defaultBillingAddress) Index of the entry inaddresses
to set as the default billing address.defaultShippingAddress
(Integer defaultShippingAddress) Index of the entry inaddresses
to set as the default shipping address.Addresses used by the Business Unit.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 BusinessUnit.getName()
Name of the Business Unit.Indexes of entries inaddresses
to set as shipping addresses.User-defined unique identifier for the BusinessUnit.Name of the Business Unit.static MyCompanyDraftBuilder
of()
factory method for an instance of MyCompanyDraftBuilderstatic MyCompanyDraftBuilder
of
(MyCompanyDraft template) create builder for MyCompanyDraft instanceplusAddresses
(BaseAddress... addresses) Addresses used by the Business Unit.Addresses used by the Business Unit.plusBillingAddresses
(Integer... billingAddresses) Indexes of entries inaddresses
to set as billing addresses.plusShippingAddresses
(Integer... shippingAddresses) Indexes of entries inaddresses
to set as shipping addresses.setAddresses
(Function<BaseAddressBuilder, BaseAddress> builder) Addresses used by the Business Unit.shippingAddresses
(Integer... shippingAddresses) Indexes of entries inaddresses
to set as shipping addresses.shippingAddresses
(List<Integer> shippingAddresses) Indexes of entries inaddresses
to set as shipping addresses.Addresses used by the Business Unit.Custom Fields for the Business Unit.
-
Constructor Details
-
MyCompanyDraftBuilder
public MyCompanyDraftBuilder()
-
-
Method Details
-
key
User-defined unique identifier for the BusinessUnit.
- Parameters:
key
- value to be set- Returns:
- Builder
-
name
Name of the Business Unit.
- Parameters:
name
- value to be set- Returns:
- Builder
-
contactEmail
Email address of the Business Unit.
- Parameters:
contactEmail
- value to be set- Returns:
- Builder
-
custom
public MyCompanyDraftBuilder custom(Function<CustomFieldsDraftBuilder, CustomFieldsDraftBuilder> builder) Custom Fields for the Business Unit.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
public MyCompanyDraftBuilder withCustom(Function<CustomFieldsDraftBuilder, CustomFieldsDraft> builder) 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
Addresses used by the Business Unit.
- Parameters:
addresses
- value to be set- Returns:
- Builder
-
addresses
Addresses used by the Business Unit.
- Parameters:
addresses
- value to be set- Returns:
- Builder
-
plusAddresses
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
Indexes of entries in
addresses
to set as shipping addresses. TheshippingAddressIds
of the Customer will be replaced by these addresses.- Parameters:
shippingAddresses
- value to be set- Returns:
- Builder
-
shippingAddresses
Indexes of entries in
addresses
to set as shipping addresses. TheshippingAddressIds
of the Customer will be replaced by these addresses.- Parameters:
shippingAddresses
- value to be set- Returns:
- Builder
-
plusShippingAddresses
Indexes of entries in
addresses
to set as shipping addresses. TheshippingAddressIds
of the Customer will be replaced by these addresses.- Parameters:
shippingAddresses
- value to be set- Returns:
- Builder
-
defaultShippingAddress
Index of the entry in
addresses
to set as the default shipping address.- Parameters:
defaultShippingAddress
- value to be set- Returns:
- Builder
-
billingAddresses
Indexes of entries in
addresses
to set as billing addresses. ThebillingAddressIds
of the Customer will be replaced by these addresses.- Parameters:
billingAddresses
- value to be set- Returns:
- Builder
-
billingAddresses
Indexes of entries in
addresses
to set as billing addresses. ThebillingAddressIds
of the Customer will be replaced by these addresses.- Parameters:
billingAddresses
- value to be set- Returns:
- Builder
-
plusBillingAddresses
Indexes of entries in
addresses
to set as billing addresses. ThebillingAddressIds
of the Customer will be replaced by these addresses.- Parameters:
billingAddresses
- value to be set- Returns:
- Builder
-
defaultBillingAddress
Index of the entry in
addresses
to set as the default billing address.- Parameters:
defaultBillingAddress
- value to be set- Returns:
- Builder
-
getKey
User-defined unique identifier for the BusinessUnit.
- Returns:
- key
-
getName
Name of the Business Unit.
- Returns:
- name
-
getContactEmail
Email address of the Business Unit.
- Returns:
- contactEmail
-
getCustom
Custom Fields for the Business Unit.
- Returns:
- custom
-
getAddresses
Addresses used by the Business Unit.
- Returns:
- addresses
-
getShippingAddresses
Indexes of entries in
addresses
to set as shipping addresses. TheshippingAddressIds
of the Customer will be replaced by these addresses.- Returns:
- shippingAddresses
-
getDefaultShippingAddress
Index of the entry in
addresses
to set as the default shipping address.- Returns:
- defaultShippingAddress
-
getBillingAddresses
Indexes of entries in
addresses
to set as billing addresses. ThebillingAddressIds
of the Customer will be replaced by these addresses.- Returns:
- billingAddresses
-
getDefaultBillingAddress
Index of the entry in
addresses
to set as the default billing address.- Returns:
- defaultBillingAddress
-
build
builds MyCompanyDraft with checking for non-null required values- Specified by:
build
in interfaceBuilder<MyCompanyDraft>
- Returns:
- MyCompanyDraft
-
buildUnchecked
builds MyCompanyDraft without checking for non-null required values- Returns:
- MyCompanyDraft
-
of
factory method for an instance of MyCompanyDraftBuilder- Returns:
- builder
-
of
create builder for MyCompanyDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-