Class MyDivisionDraftBuilder
- All Implemented Interfaces:
Builder<MyDivisionDraft>
Example to create an instance using the builder pattern
MyDivisionDraft myDivisionDraft = MyDivisionDraft.builder()
.key("{key}")
.name("{name}")
.parentUnit(parentUnitBuilder -> parentUnitBuilder)
.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 MyDivisionDraft with checking for non-null required valuesbuilds MyDivisionDraft 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.The parent unit of this Division.Indexes of entries inaddresses
to set as shipping addresses.User-defined unique identifier for the BusinessUnit.Name of the Business Unit.static MyDivisionDraftBuilder
of()
factory method for an instance of MyDivisionDraftBuilderstatic MyDivisionDraftBuilder
of
(MyDivisionDraft template) create builder for MyDivisionDraft instanceparentUnit
(BusinessUnitResourceIdentifier parentUnit) The parent unit of this Division.parentUnit
(Function<BusinessUnitResourceIdentifierBuilder, BusinessUnitResourceIdentifierBuilder> builder) The parent unit of this Division.plusAddresses
(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.withParentUnit
(Function<BusinessUnitResourceIdentifierBuilder, BusinessUnitResourceIdentifier> builder) The parent unit of this Division.
-
Constructor Details
-
MyDivisionDraftBuilder
public MyDivisionDraftBuilder()
-
-
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 MyDivisionDraftBuilder custom(Function<CustomFieldsDraftBuilder, CustomFieldsDraftBuilder> builder) Custom Fields for the Business Unit.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
public MyDivisionDraftBuilder 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
public MyDivisionDraftBuilder plusAddresses(Function<BaseAddressBuilder, BaseAddressBuilder> builder) Addresses used by the Business Unit.
- Parameters:
builder
- function to build the addresses value- Returns:
- Builder
-
withAddresses
public MyDivisionDraftBuilder withAddresses(Function<BaseAddressBuilder, BaseAddressBuilder> builder) 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
-
parentUnit
public MyDivisionDraftBuilder parentUnit(Function<BusinessUnitResourceIdentifierBuilder, BusinessUnitResourceIdentifierBuilder> builder) The parent unit of this Division. Can be a Company or a Division.
- Parameters:
builder
- function to build the parentUnit value- Returns:
- Builder
-
withParentUnit
public MyDivisionDraftBuilder withParentUnit(Function<BusinessUnitResourceIdentifierBuilder, BusinessUnitResourceIdentifier> builder) The parent unit of this Division. Can be a Company or a Division.
- Parameters:
builder
- function to build the parentUnit value- Returns:
- Builder
-
parentUnit
The parent unit of this Division. Can be a Company or a Division.
- Parameters:
parentUnit
- 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
-
getParentUnit
The parent unit of this Division. Can be a Company or a Division.
- Returns:
- parentUnit
-
build
builds MyDivisionDraft with checking for non-null required values- Specified by:
build
in interfaceBuilder<MyDivisionDraft>
- Returns:
- MyDivisionDraft
-
buildUnchecked
builds MyDivisionDraft without checking for non-null required values- Returns:
- MyDivisionDraft
-
of
factory method for an instance of MyDivisionDraftBuilder- Returns:
- builder
-
of
create builder for MyDivisionDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-