Interface CustomerImport
- All Superinterfaces:
ImportResource
Represents the data used to import a Customer. Once imported, this data 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 instancecopyDeep()
static 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.Indices of the billing addresses in theaddresses
array.Maps toCustomer.companyName
.@Valid Custom
Maps toCustomer.custom
.@Valid CustomerGroupKeyReference
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.@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
.Maps toCustomer.password
.Maps toCustomer.salutation
.Indices of the shipping addresses in theaddresses
array.@Valid List<StoreKeyReference>
Maps toCustomer.stores
.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) Indices of the billing addresses in theaddresses
array.void
setBillingAddresses
(List<Integer> billingAddresses) Indices of the billing addresses in theaddresses
array.void
setCompanyName
(String companyName) Maps toCustomer.companyName
.void
Maps toCustomer.custom
.void
setCustomerGroup
(CustomerGroupKeyReference customerGroup) Maps toCustomer.customerGroup
.void
setCustomerNumber
(String customerNumber) Maps toCustomer.customerNumber
.void
setDateOfBirth
(LocalDate dateOfBirth) Maps toCustomer.dateOfBirth
.void
setDefaultBillingAddress
(Integer defaultBillingAddress) Index of the address in theaddresses
array to use as the default billing address.void
setDefaultShippingAddress
(Integer defaultShippingAddress) The index of the address in theaddresses
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) Maps toCustomer.password
.void
setSalutation
(String salutation) Maps toCustomer.salutation
.void
setShippingAddresses
(Integer... shippingAddresses) Indices of the shipping addresses in theaddresses
array.void
setShippingAddresses
(List<Integer> shippingAddresses) Indices of the shipping addresses in theaddresses
array.void
setStores
(StoreKeyReference... stores) Maps toCustomer.stores
.void
setStores
(List<StoreKeyReference> stores) Maps toCustomer.stores
.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 is 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()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
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
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
Integer 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
Integer 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
String getLocale()Maps to
Customer.locale
.- Returns:
- locale
-
getCustom
Maps to
Customer.custom
.- 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 is 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
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
-
setStores
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
- values to be set
-
setStores
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
- 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
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
-
setAddresses
Maps to
Customer.addresses
.- Parameters:
addresses
- values to be set
-
setAddresses
Maps to
Customer.addresses
.- Parameters:
addresses
- values to be set
-
setDefaultBillingAddress
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
-
setBillingAddresses
Indices of the billing addresses in the
addresses
array. ThebillingAddressIds
of the Customer will be set to theid
of these addresses.- Parameters:
billingAddresses
- values to be set
-
setBillingAddresses
Indices of the billing addresses in the
addresses
array. ThebillingAddressIds
of the Customer will be set to theid
of these addresses.- Parameters:
billingAddresses
- values to be set
-
setDefaultShippingAddress
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
-
setShippingAddresses
Indices of the shipping addresses in the
addresses
array. TheshippingAddressIds
of the Customer will be set to theid
of these addresses.- Parameters:
shippingAddresses
- values to be set
-
setShippingAddresses
Indices of the shipping addresses in the
addresses
array. TheshippingAddressIds
of the Customer will be set to theid
of these addresses.- Parameters:
shippingAddresses
- values to be set
-
setLocale
Maps to
Customer.locale
.- Parameters:
locale
- value to be set
-
setCustom
Maps to
Customer.custom
.- 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
-
copyDeep
CustomerImport copyDeep()- Specified by:
copyDeep
in interfaceImportResource
-
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
-