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 CustomerImportBuilderbuilder()builder factory method for CustomerImportstatic CustomerImportBuilderbuilder(CustomerImport template) create builder for CustomerImport instancecopyDeep()static CustomerImportdeepCopy(CustomerImport template) factory method to create a deep copy of CustomerImport@Valid List<CustomerAddress>Maps toCustomer.addresses.Set toPasswordto make thepasswordfield required for the Customer. Set toExternalAuthwhen the password is not required for the Customer.Indices of the billing addresses in theaddressesarray.Maps toCustomer.companyName.@Valid CustomMaps toCustomer.custom.@Valid CustomerGroupKeyReferenceMaps toCustomer.customerGroup.Maps toCustomer.customerNumber.Maps toCustomer.dateOfBirth.Index of the address in theaddressesarray to use as the default billing address.The index of the address in theaddressesarray.@NotNull StringgetEmail()Maps toCustomer.email.Maps toCustomer.externalId.Maps toCustomer.firstName.Maps toCustomer.isEmailVerified.@NotNull StringgetKey()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 theaddressesarray.@Valid List<StoreKeyReference>Maps toCustomer.stores.getTitle()Maps toCustomer.title.getVatId()Maps toCustomer.vatId.static CustomerImportof()factory methodstatic CustomerImportof(CustomerImport template) factory method to create a shallow copy CustomerImportvoidsetAddresses(CustomerAddress... addresses) Maps toCustomer.addresses.voidsetAddresses(List<CustomerAddress> addresses) Maps toCustomer.addresses.voidsetAuthenticationMode(AuthenticationMode authenticationMode) Set toPasswordto make thepasswordfield required for the Customer. Set toExternalAuthwhen the password is not required for the Customer.voidsetBillingAddresses(Integer... billingAddresses) Indices of the billing addresses in theaddressesarray.voidsetBillingAddresses(List<Integer> billingAddresses) Indices of the billing addresses in theaddressesarray.voidsetCompanyName(String companyName) Maps toCustomer.companyName.voidMaps toCustomer.custom.voidsetCustomerGroup(CustomerGroupKeyReference customerGroup) Maps toCustomer.customerGroup.voidsetCustomerNumber(String customerNumber) Maps toCustomer.customerNumber.voidsetDateOfBirth(LocalDate dateOfBirth) Maps toCustomer.dateOfBirth.voidsetDefaultBillingAddress(Integer defaultBillingAddress) Index of the address in theaddressesarray to use as the default billing address.voidsetDefaultShippingAddress(Integer defaultShippingAddress) The index of the address in theaddressesarray.voidMaps toCustomer.email.voidsetExternalId(String externalId) Maps toCustomer.externalId.voidsetFirstName(String firstName) Maps toCustomer.firstName.voidsetIsEmailVerified(Boolean isEmailVerified) Maps toCustomer.isEmailVerified.voidUser-defined unique identifier.voidsetLastName(String lastName) Maps toCustomer.lastName.voidMaps toCustomer.locale.voidsetMiddleName(String middleName) Maps toCustomer.middleName.voidsetPassword(String password) Maps toCustomer.password.voidsetSalutation(String salutation) Maps toCustomer.salutation.voidsetShippingAddresses(Integer... shippingAddresses) Indices of the shipping addresses in theaddressesarray.voidsetShippingAddresses(List<Integer> shippingAddresses) Indices of the shipping addresses in theaddressesarray.voidsetStores(StoreKeyReference... stores) Maps toCustomer.stores.voidsetStores(List<StoreKeyReference> stores) Maps toCustomer.stores.voidMaps toCustomer.title.voidMaps toCustomer.vatId.static com.fasterxml.jackson.core.type.TypeReference<CustomerImport>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithCustomerImport(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
keyexists, it is updated with the imported data.- Specified by:
getKeyin 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 whenauthenticationModeis 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, thestateof the ImportOperation will be set tounresolveduntil 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, thestateof the ImportOperation will be set tounresolveduntil the referenced CustomerGroup is created.- Returns:
- customerGroup
-
getAddresses
Maps to
Customer.addresses.- Returns:
- addresses
-
getDefaultBillingAddress
Integer getDefaultBillingAddress()Index of the address in the
addressesarray to use as the default billing address. ThedefaultBillingAddressIdof the Customer will be set to theidof that address.- Returns:
- defaultBillingAddress
-
getBillingAddresses
Indices of the billing addresses in the
addressesarray. ThebillingAddressIdsof the Customer will be set to theidof these addresses.- Returns:
- billingAddresses
-
getDefaultShippingAddress
Integer getDefaultShippingAddress()The index of the address in the
addressesarray. ThedefaultShippingAddressIdof the Customer will be set to theidof that address.- Returns:
- defaultShippingAddress
-
getShippingAddresses
Indices of the shipping addresses in the
addressesarray. TheshippingAddressIdsof the Customer will be set to theidof 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
Passwordto make thepasswordfield required for the Customer. - Set to
ExternalAuthwhen the password is not required for the Customer.
- Returns:
- authenticationMode
- Set to
-
setKey
User-defined unique identifier. If a Customer with this
keyexists, it is updated with the imported data.- Specified by:
setKeyin 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 whenauthenticationModeis 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, thestateof the ImportOperation will be set tounresolveduntil the referenced Stores are created.- Parameters:
stores- values to be set
-
setStores
Maps to
Customer.stores. If the referenced Stores do not exist, thestateof the ImportOperation will be set tounresolveduntil 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, thestateof the ImportOperation will be set tounresolveduntil 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
addressesarray to use as the default billing address. ThedefaultBillingAddressIdof the Customer will be set to theidof that address.- Parameters:
defaultBillingAddress- value to be set
-
setBillingAddresses
Indices of the billing addresses in the
addressesarray. ThebillingAddressIdsof the Customer will be set to theidof these addresses.- Parameters:
billingAddresses- values to be set
-
setBillingAddresses
Indices of the billing addresses in the
addressesarray. ThebillingAddressIdsof the Customer will be set to theidof these addresses.- Parameters:
billingAddresses- values to be set
-
setDefaultShippingAddress
The index of the address in the
addressesarray. ThedefaultShippingAddressIdof the Customer will be set to theidof that address.- Parameters:
defaultShippingAddress- value to be set
-
setShippingAddresses
Indices of the shipping addresses in the
addressesarray. TheshippingAddressIdsof the Customer will be set to theidof these addresses.- Parameters:
shippingAddresses- values to be set
-
setShippingAddresses
Indices of the shipping addresses in the
addressesarray. TheshippingAddressIdsof the Customer will be set to theidof 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
Passwordto make thepasswordfield required for the Customer. - Set to
ExternalAuthwhen 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:
copyDeepin 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
-