Class CustomerImportBuilder
- All Implemented Interfaces:
Builder<CustomerImport>
Example to create an instance using the builder pattern
CustomerImport customerImport = CustomerImport.builder()
.key("{key}")
.email("{email}")
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionMaps toCustomer.addresses
.addresses
(CustomerAddress... addresses) Maps toCustomer.addresses
.addresses
(List<CustomerAddress> addresses) Maps toCustomer.addresses
.The References to the Stores with which the Customer is associated.authenticationMode
(AuthenticationMode authenticationMode) Set toPassword
to make thepassword
field required for the Customer. Set toExternalAuth
when the password is not required for the Customer.billingAddresses
(Integer... billingAddresses) The indices of the billing addresses in the addresses array.billingAddresses
(List<Integer> billingAddresses) The indices of the billing addresses in the addresses array.build()
builds CustomerImport with checking for non-null required valuesbuilds CustomerImport without checking for non-null required valuescompanyName
(String companyName) Maps toCustomer.companyName
.The Custom Fields for this Customer.custom
(Function<CustomBuilder, CustomBuilder> builder) The Custom Fields for this Customer.customerGroup
(CustomerGroupKeyReference customerGroup) The Reference to the CustomerGroup with which the Customer is associated.The Reference to the CustomerGroup with which the Customer is associated.customerNumber
(String customerNumber) Maps toCustomer.customerNumber
.dateOfBirth
(LocalDate dateOfBirth) Maps toCustomer.dateOfBirth
.defaultBillingAddress
(Integer defaultBillingAddress) The index of the address in the addresses array.defaultShippingAddress
(Integer defaultShippingAddress) The index of the address in the addresses array.Maps toCustomer.email
.externalId
(String externalId) Maps toCustomer.externalId
.Maps toCustomer.firstName
.Maps toCustomer.addresses
.Set toPassword
to make thepassword
field required for the Customer. Set toExternalAuth
when the password is not required for the Customer.The indices of the billing addresses in the addresses array.Maps toCustomer.companyName
.The Custom Fields for this Customer.The Reference to the CustomerGroup with which the Customer is associated.Maps toCustomer.customerNumber
.Maps toCustomer.dateOfBirth
.The index of the address in the addresses array.The index of the address in the addresses array.getEmail()
Maps toCustomer.email
.Maps toCustomer.externalId
.Maps toCustomer.firstName
.Maps toCustomer.isEmailVerified
.getKey()
User-defined unique identifier.Maps toCustomer.lastName
.Maps toCustomer.locale
.Maps toCustomer.middleName
.Required whenauthenticationMode
is set toPassword
.Maps toCustomer.salutation
.The indices of the shipping addresses in the addresses array.The References to the Stores with which the Customer is associated.getTitle()
Maps toCustomer.title
.getVatId()
Maps toCustomer.vatId
.isEmailVerified
(Boolean isEmailVerified) Maps toCustomer.isEmailVerified
.User-defined unique identifier.Maps toCustomer.lastName
.Maps toCustomer.locale
.middleName
(String middleName) Maps toCustomer.middleName
.static CustomerImportBuilder
of()
factory method for an instance of CustomerImportBuilderstatic CustomerImportBuilder
of
(CustomerImport template) create builder for CustomerImport instanceRequired whenauthenticationMode
is set toPassword
.plusAddresses
(CustomerAddress... addresses) Maps toCustomer.addresses
.Maps toCustomer.addresses
.plusBillingAddresses
(Integer... billingAddresses) The indices of the billing addresses in the addresses array.plusShippingAddresses
(Integer... shippingAddresses) The indices of the shipping addresses in the addresses array.plusStores
(StoreKeyReference... stores) The References to the Stores with which the Customer is associated.The References to the Stores with which the Customer is associated.salutation
(String salutation) Maps toCustomer.salutation
.Maps toCustomer.addresses
.The References to the Stores with which the Customer is associated.shippingAddresses
(Integer... shippingAddresses) The indices of the shipping addresses in the addresses array.shippingAddresses
(List<Integer> shippingAddresses) The indices of the shipping addresses in the addresses array.stores
(StoreKeyReference... stores) The References to the Stores with which the Customer is associated.stores
(List<StoreKeyReference> stores) The References to the Stores with which the Customer is associated.Maps toCustomer.title
.Maps toCustomer.vatId
.Maps toCustomer.addresses
.withCustom
(Function<CustomBuilder, Custom> builder) The Custom Fields for this Customer.The Reference to the CustomerGroup with which the Customer is associated.The References to the Stores with which the Customer is associated.
-
Constructor Details
-
CustomerImportBuilder
public CustomerImportBuilder()
-
-
Method Details
-
key
User-defined unique identifier. If a Customer with this
key
exists, it will be updated with the imported data.- Parameters:
key
- value to be set- Returns:
- Builder
-
customerNumber
Maps to
Customer.customerNumber
.- Parameters:
customerNumber
- value to be set- Returns:
- Builder
-
email
Maps to
Customer.email
.- Parameters:
email
- value to be set- Returns:
- Builder
-
password
Required when
authenticationMode
is set toPassword
. Maps toCustomer.password
.- Parameters:
password
- value to be set- Returns:
- Builder
-
stores
The References to the Stores with which the Customer is associated. If referenced Stores do not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary Stores are created.- Parameters:
stores
- value to be set- Returns:
- Builder
-
stores
The References to the Stores with which the Customer is associated. If referenced Stores do not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary Stores are created.- Parameters:
stores
- value to be set- Returns:
- Builder
-
plusStores
The References to the Stores with which the Customer is associated. If referenced Stores do not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary Stores are created.- Parameters:
stores
- value to be set- Returns:
- Builder
-
plusStores
public CustomerImportBuilder plusStores(Function<StoreKeyReferenceBuilder, StoreKeyReferenceBuilder> builder) The References to the Stores with which the Customer is associated. If referenced Stores do not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary Stores are created.- Parameters:
builder
- function to build the stores value- Returns:
- Builder
-
withStores
public CustomerImportBuilder withStores(Function<StoreKeyReferenceBuilder, StoreKeyReferenceBuilder> builder) The References to the Stores with which the Customer is associated. If referenced Stores do not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary Stores are created.- Parameters:
builder
- function to build the stores value- Returns:
- Builder
-
addStores
public CustomerImportBuilder addStores(Function<StoreKeyReferenceBuilder, StoreKeyReference> builder) The References to the Stores with which the Customer is associated. If referenced Stores do not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary Stores are created.- Parameters:
builder
- function to build the stores value- Returns:
- Builder
-
setStores
public CustomerImportBuilder setStores(Function<StoreKeyReferenceBuilder, StoreKeyReference> builder) The References to the Stores with which the Customer is associated. If referenced Stores do not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary Stores are created.- Parameters:
builder
- function to build the stores value- Returns:
- Builder
-
firstName
Maps to
Customer.firstName
.- Parameters:
firstName
- value to be set- Returns:
- Builder
-
lastName
Maps to
Customer.lastName
.- Parameters:
lastName
- value to be set- Returns:
- Builder
-
middleName
Maps to
Customer.middleName
.- Parameters:
middleName
- value to be set- Returns:
- Builder
-
title
Maps to
Customer.title
.- Parameters:
title
- value to be set- Returns:
- Builder
-
salutation
Maps to
Customer.salutation
.- Parameters:
salutation
- value to be set- Returns:
- Builder
-
externalId
Maps to
Customer.externalId
.- Parameters:
externalId
- value to be set- Returns:
- Builder
-
dateOfBirth
Maps to
Customer.dateOfBirth
.- Parameters:
dateOfBirth
- value to be set- Returns:
- Builder
-
companyName
Maps to
Customer.companyName
.- Parameters:
companyName
- value to be set- Returns:
- Builder
-
vatId
Maps to
Customer.vatId
.- Parameters:
vatId
- value to be set- Returns:
- Builder
-
isEmailVerified
Maps to
Customer.isEmailVerified
.- Parameters:
isEmailVerified
- value to be set- Returns:
- Builder
-
customerGroup
public CustomerImportBuilder customerGroup(Function<CustomerGroupKeyReferenceBuilder, CustomerGroupKeyReferenceBuilder> builder) The Reference to the CustomerGroup with which the Customer is associated. If referenced CustomerGroup does not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary CustomerGroup is created.- Parameters:
builder
- function to build the customerGroup value- Returns:
- Builder
-
withCustomerGroup
public CustomerImportBuilder withCustomerGroup(Function<CustomerGroupKeyReferenceBuilder, CustomerGroupKeyReference> builder) The Reference to the CustomerGroup with which the Customer is associated. If referenced CustomerGroup does not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary CustomerGroup is created.- Parameters:
builder
- function to build the customerGroup value- Returns:
- Builder
-
customerGroup
The Reference to the CustomerGroup with which the Customer is associated. If referenced CustomerGroup does not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary CustomerGroup is created.- Parameters:
customerGroup
- value to be set- Returns:
- Builder
-
addresses
Maps to
Customer.addresses
.- Parameters:
addresses
- value to be set- Returns:
- Builder
-
addresses
Maps to
Customer.addresses
.- Parameters:
addresses
- value to be set- Returns:
- Builder
-
plusAddresses
Maps to
Customer.addresses
.- Parameters:
addresses
- value to be set- Returns:
- Builder
-
plusAddresses
public CustomerImportBuilder plusAddresses(Function<CustomerAddressBuilder, CustomerAddressBuilder> builder) Maps to
Customer.addresses
.- Parameters:
builder
- function to build the addresses value- Returns:
- Builder
-
withAddresses
public CustomerImportBuilder withAddresses(Function<CustomerAddressBuilder, CustomerAddressBuilder> builder) Maps to
Customer.addresses
.- Parameters:
builder
- function to build the addresses value- Returns:
- Builder
-
addAddresses
Maps to
Customer.addresses
.- Parameters:
builder
- function to build the addresses value- Returns:
- Builder
-
setAddresses
Maps to
Customer.addresses
.- Parameters:
builder
- function to build the addresses value- Returns:
- Builder
-
defaultBillingAddress
The index of the address in the addresses array. The
defaultBillingAddressId
of the customer will be set to the ID of that address.- Parameters:
defaultBillingAddress
- value to be set- Returns:
- Builder
-
billingAddresses
The indices of the billing addresses in the addresses array. The
billingAddressIds
of the customer will be set to the IDs of that addresses.- Parameters:
billingAddresses
- value to be set- Returns:
- Builder
-
billingAddresses
The indices of the billing addresses in the addresses array. The
billingAddressIds
of the customer will be set to the IDs of that addresses.- Parameters:
billingAddresses
- value to be set- Returns:
- Builder
-
plusBillingAddresses
The indices of the billing addresses in the addresses array. The
billingAddressIds
of the customer will be set to the IDs of that addresses.- Parameters:
billingAddresses
- value to be set- Returns:
- Builder
-
defaultShippingAddress
The index of the address in the addresses array. The
defaultShippingAddressId
of the customer will be set to the ID of that address.- Parameters:
defaultShippingAddress
- value to be set- Returns:
- Builder
-
shippingAddresses
The indices of the shipping addresses in the addresses array. The
shippingAddressIds
of the customer will be set to the IDs of that addresses.- Parameters:
shippingAddresses
- value to be set- Returns:
- Builder
-
shippingAddresses
The indices of the shipping addresses in the addresses array. The
shippingAddressIds
of the customer will be set to the IDs of that addresses.- Parameters:
shippingAddresses
- value to be set- Returns:
- Builder
-
plusShippingAddresses
The indices of the shipping addresses in the addresses array. The
shippingAddressIds
of the customer will be set to the IDs of that addresses.- Parameters:
shippingAddresses
- value to be set- Returns:
- Builder
-
locale
Maps to
Customer.locale
.- Parameters:
locale
- value to be set- Returns:
- Builder
-
custom
The Custom Fields for this Customer.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
The Custom Fields for this Customer.
- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
The Custom Fields for this Customer.
- Parameters:
custom
- value to be set- Returns:
- Builder
-
authenticationMode
- Set to
Password
to make thepassword
field required for the Customer. - Set to
ExternalAuth
when the password is not required for the Customer.
- Parameters:
authenticationMode
- value to be set- Returns:
- Builder
- Set to
-
getKey
User-defined unique identifier. If a Customer with this
key
exists, it will be updated with the imported data.- Returns:
- key
-
getCustomerNumber
Maps to
Customer.customerNumber
.- Returns:
- customerNumber
-
getEmail
Maps to
Customer.email
.- Returns:
-
getPassword
Required when
authenticationMode
is set toPassword
. Maps toCustomer.password
.- Returns:
- password
-
getStores
The References to the Stores with which the Customer is associated. If referenced Stores do not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary Stores are created.- Returns:
- stores
-
getFirstName
Maps to
Customer.firstName
.- Returns:
- firstName
-
getLastName
Maps to
Customer.lastName
.- Returns:
- lastName
-
getMiddleName
Maps to
Customer.middleName
.- Returns:
- middleName
-
getTitle
Maps to
Customer.title
.- Returns:
- title
-
getSalutation
Maps to
Customer.salutation
.- Returns:
- salutation
-
getExternalId
Maps to
Customer.externalId
.- Returns:
- externalId
-
getDateOfBirth
Maps to
Customer.dateOfBirth
.- Returns:
- dateOfBirth
-
getCompanyName
Maps to
Customer.companyName
.- Returns:
- companyName
-
getVatId
Maps to
Customer.vatId
.- Returns:
- vatId
-
getIsEmailVerified
Maps to
Customer.isEmailVerified
.- Returns:
- isEmailVerified
-
getCustomerGroup
The Reference to the CustomerGroup with which the Customer is associated. If referenced CustomerGroup does not exist, the
state
of the ImportOperation will be set tounresolved
until the necessary CustomerGroup is created.- Returns:
- customerGroup
-
getAddresses
Maps to
Customer.addresses
.- Returns:
- addresses
-
getDefaultBillingAddress
The index of the address in the addresses array. The
defaultBillingAddressId
of the customer will be set to the ID of that address.- Returns:
- defaultBillingAddress
-
getBillingAddresses
The indices of the billing addresses in the addresses array. The
billingAddressIds
of the customer will be set to the IDs of that addresses.- Returns:
- billingAddresses
-
getDefaultShippingAddress
The index of the address in the addresses array. The
defaultShippingAddressId
of the customer will be set to the ID of that address.- Returns:
- defaultShippingAddress
-
getShippingAddresses
The indices of the shipping addresses in the addresses array. The
shippingAddressIds
of the customer will be set to the IDs of that addresses.- Returns:
- shippingAddresses
-
getLocale
Maps to
Customer.locale
.- Returns:
- locale
-
getCustom
The Custom Fields for this Customer.
- Returns:
- custom
-
getAuthenticationMode
- Set to
Password
to make thepassword
field required for the Customer. - Set to
ExternalAuth
when the password is not required for the Customer.
- Returns:
- authenticationMode
- Set to
-
build
builds CustomerImport with checking for non-null required values- Specified by:
build
in interfaceBuilder<CustomerImport>
- Returns:
- CustomerImport
-
buildUnchecked
builds CustomerImport without checking for non-null required values- Returns:
- CustomerImport
-
of
factory method for an instance of CustomerImportBuilder- Returns:
- builder
-
of
create builder for CustomerImport instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-