Interface CustomerImport
- All Superinterfaces:
ImportResource
The data representation for a Customer to be imported that is persisted as a Customer in the Project.
Example to create an instance using the builder pattern
CustomerImport customerImport = CustomerImport.builder()
.key("{key}")
.email("{email}")
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic CustomerImportBuilder
builder()
builder factory method for CustomerImportstatic CustomerImportBuilder
builder
(CustomerImport template) create builder for CustomerImport instancestatic CustomerImport
deepCopy
(CustomerImport template) factory method to create a deep copy of CustomerImport@Valid List<CustomerAddress>
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
.@Valid Custom
The Custom Fields for this Customer.@Valid CustomerGroupKeyReference
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.@NotNull String
getEmail()
Maps toCustomer.email
.Maps toCustomer.externalId
.Maps toCustomer.firstName
.Maps toCustomer.isEmailVerified
.@NotNull String
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.@Valid List<StoreKeyReference>
The References to the Stores with which the Customer is associated.getTitle()
Maps toCustomer.title
.getVatId()
Maps toCustomer.vatId
.static CustomerImport
of()
factory methodstatic CustomerImport
of
(CustomerImport template) factory method to create a shallow copy CustomerImportvoid
setAddresses
(CustomerAddress... addresses) Maps toCustomer.addresses
.void
setAddresses
(List<CustomerAddress> addresses) Maps toCustomer.addresses
.void
setAuthenticationMode
(AuthenticationMode authenticationMode) Set toPassword
to make thepassword
field required for the Customer. Set toExternalAuth
when the password is not required for the Customer.void
setBillingAddresses
(Integer... billingAddresses) The indices of the billing addresses in the addresses array.void
setBillingAddresses
(List<Integer> billingAddresses) The indices of the billing addresses in the addresses array.void
setCompanyName
(String companyName) Maps toCustomer.companyName
.void
The Custom Fields for this Customer.void
setCustomerGroup
(CustomerGroupKeyReference customerGroup) The Reference to the CustomerGroup with which the Customer is associated.void
setCustomerNumber
(String customerNumber) Maps toCustomer.customerNumber
.void
setDateOfBirth
(LocalDate dateOfBirth) Maps toCustomer.dateOfBirth
.void
setDefaultBillingAddress
(Integer defaultBillingAddress) The index of the address in the addresses array.void
setDefaultShippingAddress
(Integer defaultShippingAddress) The index of the address in the addresses array.void
Maps toCustomer.email
.void
setExternalId
(String externalId) Maps toCustomer.externalId
.void
setFirstName
(String firstName) Maps toCustomer.firstName
.void
setIsEmailVerified
(Boolean isEmailVerified) Maps toCustomer.isEmailVerified
.void
User-defined unique identifier.void
setLastName
(String lastName) Maps toCustomer.lastName
.void
Maps toCustomer.locale
.void
setMiddleName
(String middleName) Maps toCustomer.middleName
.void
setPassword
(String password) Required whenauthenticationMode
is set toPassword
.void
setSalutation
(String salutation) Maps toCustomer.salutation
.void
setShippingAddresses
(Integer... shippingAddresses) The indices of the shipping addresses in the addresses array.void
setShippingAddresses
(List<Integer> shippingAddresses) The indices of the shipping addresses in the addresses array.void
setStores
(StoreKeyReference... stores) The References to the Stores with which the Customer is associated.void
setStores
(List<StoreKeyReference> stores) The References to the Stores with which the Customer is associated.void
Maps toCustomer.title
.void
Maps toCustomer.vatId
.static com.fasterxml.jackson.core.type.TypeReference<CustomerImport>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withCustomerImport
(Function<CustomerImport, T> helper) accessor map functionMethods inherited from interface com.commercetools.importapi.models.common.ImportResource
withImportResource
-
Method Details
-
getKey
User-defined unique identifier. If a Customer with this
key
exists, it will be updated with the imported data.- Specified by:
getKey
in interfaceImportResource
- Returns:
- key
-
getCustomerNumber
String getCustomerNumber()Maps to
Customer.customerNumber
.- Returns:
- customerNumber
-
getEmail
Maps to
Customer.email
.- Returns:
-
getPassword
String 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
String getFirstName()Maps to
Customer.firstName
.- Returns:
- firstName
-
getLastName
String getLastName()Maps to
Customer.lastName
.- Returns:
- lastName
-
getMiddleName
String getMiddleName()Maps to
Customer.middleName
.- Returns:
- middleName
-
getTitle
String getTitle()Maps to
Customer.title
.- Returns:
- title
-
getSalutation
String getSalutation()Maps to
Customer.salutation
.- Returns:
- salutation
-
getExternalId
String getExternalId()Maps to
Customer.externalId
.- Returns:
- externalId
-
getDateOfBirth
LocalDate getDateOfBirth()Maps to
Customer.dateOfBirth
.- Returns:
- dateOfBirth
-
getCompanyName
String getCompanyName()Maps to
Customer.companyName
.- Returns:
- companyName
-
getVatId
String getVatId()Maps to
Customer.vatId
.- Returns:
- vatId
-
getIsEmailVerified
Boolean 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
Integer 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
Integer 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
String getLocale()Maps to
Customer.locale
.- Returns:
- locale
-
getCustom
The Custom Fields for this Customer.
- Returns:
- custom
-
getAuthenticationMode
AuthenticationMode 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
-
setKey
User-defined unique identifier. If a Customer with this
key
exists, it will be updated with the imported data.- Specified by:
setKey
in interfaceImportResource
- Parameters:
key
- value to be set
-
setCustomerNumber
Maps to
Customer.customerNumber
.- Parameters:
customerNumber
- value to be set
-
setEmail
Maps to
Customer.email
.- Parameters:
email
- value to be set
-
setPassword
Required when
authenticationMode
is set toPassword
. Maps toCustomer.password
.- Parameters:
password
- value to be set
-
setStores
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
- values to be set
-
setStores
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
- values to be set
-
setFirstName
Maps to
Customer.firstName
.- Parameters:
firstName
- value to be set
-
setLastName
Maps to
Customer.lastName
.- Parameters:
lastName
- value to be set
-
setMiddleName
Maps to
Customer.middleName
.- Parameters:
middleName
- value to be set
-
setTitle
Maps to
Customer.title
.- Parameters:
title
- value to be set
-
setSalutation
Maps to
Customer.salutation
.- Parameters:
salutation
- value to be set
-
setExternalId
Maps to
Customer.externalId
.- Parameters:
externalId
- value to be set
-
setDateOfBirth
Maps to
Customer.dateOfBirth
.- Parameters:
dateOfBirth
- value to be set
-
setCompanyName
Maps to
Customer.companyName
.- Parameters:
companyName
- value to be set
-
setVatId
Maps to
Customer.vatId
.- Parameters:
vatId
- value to be set
-
setIsEmailVerified
Maps to
Customer.isEmailVerified
.- Parameters:
isEmailVerified
- value to be set
-
setCustomerGroup
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
-
setAddresses
Maps to
Customer.addresses
.- Parameters:
addresses
- values to be set
-
setAddresses
Maps to
Customer.addresses
.- Parameters:
addresses
- values to be set
-
setDefaultBillingAddress
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
-
setBillingAddresses
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
- values to be set
-
setBillingAddresses
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
- values to be set
-
setDefaultShippingAddress
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
-
setShippingAddresses
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
- values to be set
-
setShippingAddresses
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
- values to be set
-
setLocale
Maps to
Customer.locale
.- Parameters:
locale
- value to be set
-
setCustom
The Custom Fields for this Customer.
- Parameters:
custom
- value to be set
-
setAuthenticationMode
- 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
- Set to
-
of
factory method- Returns:
- instance of CustomerImport
-
of
factory method to create a shallow copy CustomerImport- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of CustomerImport- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CustomerImport- Returns:
- builder
-
builder
create builder for CustomerImport instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withCustomerImport
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-