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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionMaps toCustomer.addresses
.addresses
(CustomerAddress... addresses) Maps toCustomer.addresses
.addresses
(List<CustomerAddress> addresses) Maps toCustomer.addresses
.Maps toCustomer.stores
.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) Indices of the billing addresses in theaddresses
array.billingAddresses
(List<Integer> billingAddresses) Indices of the billing addresses in theaddresses
array.build()
builds CustomerImport with checking for non-null required valuesbuilds CustomerImport without checking for non-null required valuescompanyName
(String companyName) Maps toCustomer.companyName
.Maps toCustomer.custom
.custom
(Function<CustomBuilder, CustomBuilder> builder) Maps toCustomer.custom
.customerGroup
(CustomerGroupKeyReference customerGroup) Maps toCustomer.customerGroup
.Maps toCustomer.customerGroup
.customerNumber
(String customerNumber) Maps toCustomer.customerNumber
.dateOfBirth
(LocalDate dateOfBirth) Maps toCustomer.dateOfBirth
.defaultBillingAddress
(Integer defaultBillingAddress) Index of the address in theaddresses
array to use as the default billing address.defaultShippingAddress
(Integer defaultShippingAddress) The index of the address in theaddresses
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.Indices of the billing addresses in theaddresses
array.Maps toCustomer.companyName
.Maps toCustomer.custom
.Maps toCustomer.customerGroup
.Maps toCustomer.customerNumber
.Maps toCustomer.dateOfBirth
.Index of the address in theaddresses
array to use as the default billing address.The index of the address in theaddresses
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
.Maps toCustomer.password
.Maps toCustomer.salutation
.Indices of the shipping addresses in theaddresses
array.Maps toCustomer.stores
.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 instanceMaps toCustomer.password
.plusAddresses
(CustomerAddress... addresses) Maps toCustomer.addresses
.Maps toCustomer.addresses
.plusBillingAddresses
(Integer... billingAddresses) Indices of the billing addresses in theaddresses
array.plusShippingAddresses
(Integer... shippingAddresses) Indices of the shipping addresses in theaddresses
array.plusStores
(StoreKeyReference... stores) Maps toCustomer.stores
.Maps toCustomer.stores
.salutation
(String salutation) Maps toCustomer.salutation
.Maps toCustomer.addresses
.Maps toCustomer.stores
.shippingAddresses
(Integer... shippingAddresses) Indices of the shipping addresses in theaddresses
array.shippingAddresses
(List<Integer> shippingAddresses) Indices of the shipping addresses in theaddresses
array.stores
(StoreKeyReference... stores) Maps toCustomer.stores
.stores
(List<StoreKeyReference> stores) Maps toCustomer.stores
.Maps toCustomer.title
.Maps toCustomer.vatId
.Maps toCustomer.addresses
.withCustom
(Function<CustomBuilder, Custom> builder) Maps toCustomer.custom
.Maps toCustomer.customerGroup
.Maps toCustomer.stores
.
-
Constructor Details
-
CustomerImportBuilder
public CustomerImportBuilder()
-
-
Method Details
-
key
User-defined unique identifier. If a Customer with this
key
exists, it is 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
Maps to
Customer.password
. Required whenauthenticationMode
is set toPassword
. This field is only used when creating new Customers, and is ignored when updating Customers. However, due to the Import API's upsert behavior, a non-empty value must still be provided when updating Customers.- Parameters:
password
- value to be set- Returns:
- Builder
-
stores
Maps to
Customer.stores
. If the referenced Stores do not exist, thestate
of the ImportOperation will be set tounresolved
until the referenced Stores are created.- Parameters:
stores
- value to be set- Returns:
- Builder
-
stores
Maps to
Customer.stores
. If the referenced Stores do not exist, thestate
of the ImportOperation will be set tounresolved
until the referenced Stores are created.- Parameters:
stores
- value to be set- Returns:
- Builder
-
plusStores
Maps to
Customer.stores
. If the referenced Stores do not exist, thestate
of the ImportOperation will be set tounresolved
until the referenced Stores are created.- Parameters:
stores
- value to be set- Returns:
- Builder
-
plusStores
public CustomerImportBuilder plusStores(Function<StoreKeyReferenceBuilder, StoreKeyReferenceBuilder> builder) Maps to
Customer.stores
. If the referenced Stores do not exist, thestate
of the ImportOperation will be set tounresolved
until the referenced Stores are created.- Parameters:
builder
- function to build the stores value- Returns:
- Builder
-
withStores
public CustomerImportBuilder withStores(Function<StoreKeyReferenceBuilder, StoreKeyReferenceBuilder> builder) Maps to
Customer.stores
. If the referenced Stores do not exist, thestate
of the ImportOperation will be set tounresolved
until the referenced Stores are created.- Parameters:
builder
- function to build the stores value- Returns:
- Builder
-
addStores
public CustomerImportBuilder addStores(Function<StoreKeyReferenceBuilder, StoreKeyReference> builder) Maps to
Customer.stores
. If the referenced Stores do not exist, thestate
of the ImportOperation will be set tounresolved
until the referenced Stores are created.- Parameters:
builder
- function to build the stores value- Returns:
- Builder
-
setStores
public CustomerImportBuilder setStores(Function<StoreKeyReferenceBuilder, StoreKeyReference> builder) Maps to
Customer.stores
. If the referenced Stores do not exist, thestate
of the ImportOperation will be set tounresolved
until the referenced 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) Maps to
Customer.customerGroup
. If the referenced CustomerGroup does not exist, thestate
of the ImportOperation will be set tounresolved
until the referenced CustomerGroup is created.- Parameters:
builder
- function to build the customerGroup value- Returns:
- Builder
-
withCustomerGroup
public CustomerImportBuilder withCustomerGroup(Function<CustomerGroupKeyReferenceBuilder, CustomerGroupKeyReference> builder) Maps to
Customer.customerGroup
. If the referenced CustomerGroup does not exist, thestate
of the ImportOperation will be set tounresolved
until the referenced CustomerGroup is created.- Parameters:
builder
- function to build the customerGroup value- Returns:
- Builder
-
customerGroup
Maps to
Customer.customerGroup
. If the referenced CustomerGroup does not exist, thestate
of the ImportOperation will be set tounresolved
until the referenced 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
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
-
billingAddresses
Indices of the billing addresses in the
addresses
array. ThebillingAddressIds
of the Customer will be set to theid
of these addresses.- Parameters:
billingAddresses
- value to be set- Returns:
- Builder
-
billingAddresses
Indices of the billing addresses in the
addresses
array. ThebillingAddressIds
of the Customer will be set to theid
of these addresses.- Parameters:
billingAddresses
- value to be set- Returns:
- Builder
-
plusBillingAddresses
Indices of the billing addresses in the
addresses
array. ThebillingAddressIds
of the Customer will be set to theid
of these addresses.- Parameters:
billingAddresses
- value to be set- Returns:
- Builder
-
defaultShippingAddress
The index of the address in the
addresses
array. ThedefaultShippingAddressId
of the Customer will be set to theid
of that address.- Parameters:
defaultShippingAddress
- value to be set- Returns:
- Builder
-
shippingAddresses
Indices of the shipping addresses in the
addresses
array. TheshippingAddressIds
of the Customer will be set to theid
of these addresses.- Parameters:
shippingAddresses
- value to be set- Returns:
- Builder
-
shippingAddresses
Indices of the shipping addresses in the
addresses
array. TheshippingAddressIds
of the Customer will be set to theid
of these addresses.- Parameters:
shippingAddresses
- value to be set- Returns:
- Builder
-
plusShippingAddresses
Indices of the shipping addresses in the
addresses
array. TheshippingAddressIds
of the Customer will be set to theid
of these addresses.- Parameters:
shippingAddresses
- value to be set- Returns:
- Builder
-
locale
Maps to
Customer.locale
.- Parameters:
locale
- value to be set- Returns:
- Builder
-
custom
Maps to
Customer.custom
.- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
withCustom
Maps to
Customer.custom
.- Parameters:
builder
- function to build the custom value- Returns:
- Builder
-
custom
Maps to
Customer.custom
.- 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 is updated with the imported data.- Returns:
- key
-
getCustomerNumber
Maps to
Customer.customerNumber
.- Returns:
- customerNumber
-
getEmail
Maps to
Customer.email
.- Returns:
-
getPassword
Maps to
Customer.password
. Required whenauthenticationMode
is set toPassword
. This field is only used when creating new Customers, and is ignored when updating Customers. However, due to the Import API's upsert behavior, a non-empty value must still be provided when updating Customers.- Returns:
- password
-
getStores
Maps to
Customer.stores
. If the referenced Stores do not exist, thestate
of the ImportOperation will be set tounresolved
until the referenced 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
Maps to
Customer.customerGroup
. If the referenced CustomerGroup does not exist, thestate
of the ImportOperation will be set tounresolved
until the referenced CustomerGroup is created.- Returns:
- customerGroup
-
getAddresses
Maps to
Customer.addresses
.- Returns:
- addresses
-
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
-
getBillingAddresses
Indices of the billing addresses in the
addresses
array. ThebillingAddressIds
of the Customer will be set to theid
of these addresses.- Returns:
- billingAddresses
-
getDefaultShippingAddress
The index of the address in the
addresses
array. ThedefaultShippingAddressId
of the Customer will be set to theid
of that address.- Returns:
- defaultShippingAddress
-
getShippingAddresses
Indices of the shipping addresses in the
addresses
array. TheshippingAddressIds
of the Customer will be set to theid
of these addresses.- Returns:
- shippingAddresses
-
getLocale
Maps to
Customer.locale
.- Returns:
- locale
-
getCustom
Maps to
Customer.custom
.- 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
-