Interface CustomerImport

All Superinterfaces:
ImportResource

public interface CustomerImport extends 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 Details

    • getKey

      @NotNull @NotNull String getKey()

      User-defined unique identifier. If a Customer with this key exists, it will be updated with the imported data.

      Specified by:
      getKey in interface ImportResource
      Returns:
      key
    • getCustomerNumber

      String getCustomerNumber()

      Maps to Customer.customerNumber.

      Returns:
      customerNumber
    • getEmail

      @NotNull @NotNull String getEmail()

      Maps to Customer.email.

      Returns:
      email
    • getPassword

      String getPassword()

      Required when authenticationMode is set to Password. Maps to Customer.password.

      Returns:
      password
    • getStores

      @Valid @Valid List<StoreKeyReference> 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 to unresolved 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

      @Valid @Valid CustomerGroupKeyReference 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 to unresolved until the necessary CustomerGroup is created.

      Returns:
      customerGroup
    • getAddresses

      @Valid @Valid List<CustomerAddress> 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

      List<Integer> 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

      List<Integer> 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

      @Valid @Valid Custom getCustom()

      The Custom Fields for this Customer.

      Returns:
      custom
    • getAuthenticationMode

      AuthenticationMode getAuthenticationMode()
      • Set to Password to make the password field required for the Customer.
      • Set to ExternalAuth when the password is not required for the Customer.
      Returns:
      authenticationMode
    • setKey

      void setKey(String key)

      User-defined unique identifier. If a Customer with this key exists, it will be updated with the imported data.

      Specified by:
      setKey in interface ImportResource
      Parameters:
      key - value to be set
    • setCustomerNumber

      void setCustomerNumber(String customerNumber)

      Maps to Customer.customerNumber.

      Parameters:
      customerNumber - value to be set
    • setEmail

      void setEmail(String email)

      Maps to Customer.email.

      Parameters:
      email - value to be set
    • setPassword

      void setPassword(String password)

      Required when authenticationMode is set to Password. Maps to Customer.password.

      Parameters:
      password - value to be set
    • setStores

      void setStores(StoreKeyReference... 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 to unresolved until the necessary Stores are created.

      Parameters:
      stores - values to be set
    • setStores

      void setStores(List<StoreKeyReference> 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 to unresolved until the necessary Stores are created.

      Parameters:
      stores - values to be set
    • setFirstName

      void setFirstName(String firstName)

      Maps to Customer.firstName.

      Parameters:
      firstName - value to be set
    • setLastName

      void setLastName(String lastName)

      Maps to Customer.lastName.

      Parameters:
      lastName - value to be set
    • setMiddleName

      void setMiddleName(String middleName)

      Maps to Customer.middleName.

      Parameters:
      middleName - value to be set
    • setTitle

      void setTitle(String title)

      Maps to Customer.title.

      Parameters:
      title - value to be set
    • setSalutation

      void setSalutation(String salutation)

      Maps to Customer.salutation.

      Parameters:
      salutation - value to be set
    • setExternalId

      void setExternalId(String externalId)

      Maps to Customer.externalId.

      Parameters:
      externalId - value to be set
    • setDateOfBirth

      void setDateOfBirth(LocalDate dateOfBirth)

      Maps to Customer.dateOfBirth.

      Parameters:
      dateOfBirth - value to be set
    • setCompanyName

      void setCompanyName(String companyName)

      Maps to Customer.companyName.

      Parameters:
      companyName - value to be set
    • setVatId

      void setVatId(String vatId)

      Maps to Customer.vatId.

      Parameters:
      vatId - value to be set
    • setIsEmailVerified

      void setIsEmailVerified(Boolean isEmailVerified)

      Maps to Customer.isEmailVerified.

      Parameters:
      isEmailVerified - value to be set
    • setCustomerGroup

      void setCustomerGroup(CustomerGroupKeyReference 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 to unresolved until the necessary CustomerGroup is created.

      Parameters:
      customerGroup - value to be set
    • setAddresses

      void setAddresses(CustomerAddress... addresses)

      Maps to Customer.addresses.

      Parameters:
      addresses - values to be set
    • setAddresses

      void setAddresses(List<CustomerAddress> addresses)

      Maps to Customer.addresses.

      Parameters:
      addresses - values to be set
    • setDefaultBillingAddress

      void setDefaultBillingAddress(Integer 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
    • setBillingAddresses

      void setBillingAddresses(Integer... 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 - values to be set
    • setBillingAddresses

      void setBillingAddresses(List<Integer> 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 - values to be set
    • setDefaultShippingAddress

      void setDefaultShippingAddress(Integer 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
    • setShippingAddresses

      void setShippingAddresses(Integer... 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 - values to be set
    • setShippingAddresses

      void setShippingAddresses(List<Integer> 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 - values to be set
    • setLocale

      void setLocale(String locale)

      Maps to Customer.locale.

      Parameters:
      locale - value to be set
    • setCustom

      void setCustom(Custom custom)

      The Custom Fields for this Customer.

      Parameters:
      custom - value to be set
    • setAuthenticationMode

      void setAuthenticationMode(AuthenticationMode authenticationMode)
      • Set to Password to make the password field required for the Customer.
      • Set to ExternalAuth when the password is not required for the Customer.
      Parameters:
      authenticationMode - value to be set
    • of

      static CustomerImport of()
      factory method
      Returns:
      instance of CustomerImport
    • of

      static CustomerImport of(CustomerImport template)
      factory method to create a shallow copy CustomerImport
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      @Nullable static CustomerImport deepCopy(@Nullable CustomerImport template)
      factory method to create a deep copy of CustomerImport
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      static CustomerImportBuilder builder()
      builder factory method for CustomerImport
      Returns:
      builder
    • builder

      static CustomerImportBuilder builder(CustomerImport template)
      create builder for CustomerImport instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withCustomerImport

      default <T> T withCustomerImport(Function<CustomerImport,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<CustomerImport> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference