Class MyCustomerDraftBuilder
- All Implemented Interfaces:
Builder<MyCustomerDraft>
Example to create an instance using the builder pattern
MyCustomerDraft myCustomerDraft = MyCustomerDraft.builder()
.email("{email}")
.password("{password}")
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddAddresses
(Function<BaseAddressBuilder, BaseAddress> builder) Addresses of the Customer.addresses
(BaseAddress... addresses) Addresses of the Customer.addresses
(List<BaseAddress> addresses) Addresses of the Customer.Sets the Stores for the Customer.build()
builds MyCustomerDraft with checking for non-null required valuesbuilds MyCustomerDraft without checking for non-null required valuescompanyName
(String companyName) Company name of the Customer.custom
(CustomFieldsDraft custom) Custom Fields for the Customer.Custom Fields for the Customer.dateOfBirth
(LocalDate dateOfBirth) Date of birth of the Customer.defaultBillingAddress
(Long defaultBillingAddress) Index of the address in theaddresses
array to use as the default billing address.defaultShippingAddress
(Long defaultShippingAddress) Index of the address in theaddresses
array to use as the default shipping address.Email address of the Customer that is unique for an entire Project or Store the Customer is assigned to.Given name (first name) of the Customer.Addresses of the Customer.Company name of the Customer.Custom Fields for the Customer.Date of birth of the Customer.Index of the address in theaddresses
array to use as the default billing address.Index of the address in theaddresses
array to use as the default shipping address.getEmail()
Email address of the Customer that is unique for an entire Project or Store the Customer is assigned to.Given name (first name) of the Customer.Family name (last name) of the Customer.Preferred language of the Customer.Middle name of the Customer.Password of the Customer.Salutation of the Customer, for example, 'Mr.' or 'Mrs.'.Sets the Stores for the Customer.getTitle()
Title of the Customer, for example, 'Dr.'.getVatId()
Individual VAT ID of the Customer.Family name (last name) of the Customer.Preferred language of the Customer.middleName
(String middleName) Middle name of the Customer.static MyCustomerDraftBuilder
of()
factory method for an instance of MyCustomerDraftBuilderstatic MyCustomerDraftBuilder
of
(MyCustomerDraft template) create builder for MyCustomerDraft instancePassword of the Customer.plusAddresses
(BaseAddress... addresses) Addresses of the Customer.Addresses of the Customer.plusStores
(StoreResourceIdentifier... stores) Sets the Stores for the Customer.Sets the Stores for the Customer.salutation
(String salutation) Salutation of the Customer, for example, 'Mr.' or 'Mrs.'.setAddresses
(Function<BaseAddressBuilder, BaseAddress> builder) Addresses of the Customer.Sets the Stores for the Customer.stores
(StoreResourceIdentifier... stores) Sets the Stores for the Customer.stores
(List<StoreResourceIdentifier> stores) Sets the Stores for the Customer.Title of the Customer, for example, 'Dr.'.Individual VAT ID of the Customer.Addresses of the Customer.Custom Fields for the Customer.Sets the Stores for the Customer.
-
Constructor Details
-
MyCustomerDraftBuilder
public MyCustomerDraftBuilder()
-
-
Method Details
-
email
Email address of the Customer that is unique for an entire Project or Store the Customer is assigned to. It is the mandatory unique identifier of a Customer.
- Parameters:
email
- value to be set- Returns:
- Builder
-
password
Password of the Customer.
- Parameters:
password
- value to be set- Returns:
- Builder
-
firstName
Given name (first name) of the Customer.
- Parameters:
firstName
- value to be set- Returns:
- Builder
-
lastName
Family name (last name) of the Customer.
- Parameters:
lastName
- value to be set- Returns:
- Builder
-
middleName
Middle name of the Customer.
- Parameters:
middleName
- value to be set- Returns:
- Builder
-
title
Title of the Customer, for example, 'Dr.'.
- Parameters:
title
- value to be set- Returns:
- Builder
-
salutation
Salutation of the Customer, for example, 'Mr.' or 'Mrs.'.
- Parameters:
salutation
- value to be set- Returns:
- Builder
-
dateOfBirth
Date of birth of the Customer.
- Parameters:
dateOfBirth
- value to be set- Returns:
- Builder
-
companyName
Company name of the Customer.
- Parameters:
companyName
- value to be set- Returns:
- Builder
-
vatId
Individual VAT ID of the Customer.
- Parameters:
vatId
- value to be set- Returns:
- Builder
-
addresses
Addresses of the Customer.
- Parameters:
addresses
- value to be set- Returns:
- Builder
-
addresses
Addresses of the Customer.
- Parameters:
addresses
- value to be set- Returns:
- Builder
-
plusAddresses
Addresses of the Customer.
- Parameters:
addresses
- value to be set- Returns:
- Builder
-
plusAddresses
public MyCustomerDraftBuilder plusAddresses(Function<BaseAddressBuilder, BaseAddressBuilder> builder) Addresses of the Customer.
- Parameters:
builder
- function to build the addresses value- Returns:
- Builder
-
withAddresses
public MyCustomerDraftBuilder withAddresses(Function<BaseAddressBuilder, BaseAddressBuilder> builder) Addresses of the Customer.
- Parameters:
builder
- function to build the addresses value- Returns:
- Builder
-
addAddresses
Addresses of the Customer.
- Parameters:
builder
- function to build the addresses value- Returns:
- Builder
-
setAddresses
Addresses of the Customer.
- Parameters:
builder
- function to build the addresses value- Returns:
- Builder
-
defaultShippingAddress
Index of the address in the
addresses
array to use as the default shipping address. ThedefaultShippingAddressId
of the Customer will be set to theid
of that address.- Parameters:
defaultShippingAddress
- value to be set- Returns:
- Builder
-
defaultBillingAddress
Index of the address in the
addresses
array to use as the default billing address. ThedefaultBillingAddressId
of the Customer will be set to theid
of that address.- Parameters:
defaultBillingAddress
- value to be set- Returns:
- Builder
-
custom
public MyCustomerDraftBuilder custom(Function<CustomFieldsDraftBuilder, CustomFieldsDraftBuilder> builder) Custom Fields for the Customer.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
public MyCustomerDraftBuilder withCustom(Function<CustomFieldsDraftBuilder, CustomFieldsDraft> builder) Custom Fields for the Customer.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Custom Fields for the Customer.
- Parameters:
custom
- value to be set- Returns:
- Builder
-
locale
Preferred language of the Customer. Must be one of the languages supported by the Project.
- Parameters:
locale
- value to be set- Returns:
- Builder
-
stores
Sets the Stores for the Customer.
- Parameters:
stores
- value to be set- Returns:
- Builder
-
stores
Sets the Stores for the Customer.
- Parameters:
stores
- value to be set- Returns:
- Builder
-
plusStores
Sets the Stores for the Customer.
- Parameters:
stores
- value to be set- Returns:
- Builder
-
plusStores
public MyCustomerDraftBuilder plusStores(Function<StoreResourceIdentifierBuilder, StoreResourceIdentifierBuilder> builder) Sets the Stores for the Customer.
- Parameters:
builder
- function to build the stores value- Returns:
- Builder
-
withStores
public MyCustomerDraftBuilder withStores(Function<StoreResourceIdentifierBuilder, StoreResourceIdentifierBuilder> builder) Sets the Stores for the Customer.
- Parameters:
builder
- function to build the stores value- Returns:
- Builder
-
addStores
public MyCustomerDraftBuilder addStores(Function<StoreResourceIdentifierBuilder, StoreResourceIdentifier> builder) Sets the Stores for the Customer.
- Parameters:
builder
- function to build the stores value- Returns:
- Builder
-
setStores
public MyCustomerDraftBuilder setStores(Function<StoreResourceIdentifierBuilder, StoreResourceIdentifier> builder) Sets the Stores for the Customer.
- Parameters:
builder
- function to build the stores value- Returns:
- Builder
-
getEmail
Email address of the Customer that is unique for an entire Project or Store the Customer is assigned to. It is the mandatory unique identifier of a Customer.
- Returns:
-
getPassword
Password of the Customer.
- Returns:
- password
-
getFirstName
Given name (first name) of the Customer.
- Returns:
- firstName
-
getLastName
Family name (last name) of the Customer.
- Returns:
- lastName
-
getMiddleName
Middle name of the Customer.
- Returns:
- middleName
-
getTitle
Title of the Customer, for example, 'Dr.'.
- Returns:
- title
-
getSalutation
Salutation of the Customer, for example, 'Mr.' or 'Mrs.'.
- Returns:
- salutation
-
getDateOfBirth
Date of birth of the Customer.
- Returns:
- dateOfBirth
-
getCompanyName
Company name of the Customer.
- Returns:
- companyName
-
getVatId
Individual VAT ID of the Customer.
- Returns:
- vatId
-
getAddresses
Addresses of the Customer.
- Returns:
- addresses
-
getDefaultShippingAddress
Index of the address in the
addresses
array to use as the default shipping address. ThedefaultShippingAddressId
of the Customer will be set to theid
of that address.- Returns:
- defaultShippingAddress
-
getDefaultBillingAddress
Index of the address in the
addresses
array to use as the default billing address. ThedefaultBillingAddressId
of the Customer will be set to theid
of that address.- Returns:
- defaultBillingAddress
-
getCustom
Custom Fields for the Customer.
- Returns:
- custom
-
getLocale
Preferred language of the Customer. Must be one of the languages supported by the Project.
- Returns:
- locale
-
getStores
Sets the Stores for the Customer.
- Returns:
- stores
-
build
builds MyCustomerDraft with checking for non-null required values- Specified by:
build
in interfaceBuilder<MyCustomerDraft>
- Returns:
- MyCustomerDraft
-
buildUnchecked
builds MyCustomerDraft without checking for non-null required values- Returns:
- MyCustomerDraft
-
of
factory method for an instance of MyCustomerDraftBuilder- Returns:
- builder
-
of
create builder for MyCustomerDraft instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-