Class CustomerImpl

java.lang.Object
com.commercetools.api.models.customer.CustomerImpl
All Implemented Interfaces:
BaseResource, Customer, CustomerMixin, Customizable<Customer>, DomainResource<Customer>, Identifiable<Customer>, Referencable<Customer>, ResourceIdentifiable<Customer>, Versioned<Customer>, WithKey, io.vrap.rmf.base.client.ModelBase

public class CustomerImpl extends Object implements Customer, io.vrap.rmf.base.client.ModelBase

If stores is not empty, the Customer is specific to those Stores.

  • Constructor Details

    • CustomerImpl

      public CustomerImpl()
      create empty instance
  • Method Details

    • getId

      public String getId()

      Unique identifier of the Customer.

      Specified by:
      getId in interface BaseResource
      Specified by:
      getId in interface Customer
      Specified by:
      getId in interface DomainResource<Customer>
      Specified by:
      getId in interface Identifiable<Customer>
      Specified by:
      getId in interface Versioned<Customer>
      Returns:
      id
    • getVersion

      public Long getVersion()

      Current version of the Customer.

      Specified by:
      getVersion in interface BaseResource
      Specified by:
      getVersion in interface Customer
      Specified by:
      getVersion in interface DomainResource<Customer>
      Specified by:
      getVersion in interface Versioned<Customer>
      Returns:
      version
    • getCreatedAt

      public ZonedDateTime getCreatedAt()

      Date and time (UTC) the Customer was initially created.

      Specified by:
      getCreatedAt in interface BaseResource
      Specified by:
      getCreatedAt in interface Customer
      Returns:
      createdAt
    • getLastModifiedAt

      public ZonedDateTime getLastModifiedAt()

      Date and time (UTC) the Customer was last updated.

      Specified by:
      getLastModifiedAt in interface BaseResource
      Specified by:
      getLastModifiedAt in interface Customer
      Returns:
      lastModifiedAt
    • getKey

      public String getKey()

      User-defined unique identifier of the Customer.

      Specified by:
      getKey in interface Customer
      Specified by:
      getKey in interface WithKey
      Returns:
      key
    • getCustomerNumber

      public String getCustomerNumber()

      User-defined unique identifier of the Customer.

      Can be used to refer to a Customer in a human-readable way (in emails, invoices, and other correspondence).

      Specified by:
      getCustomerNumber in interface Customer
      Returns:
      customerNumber
    • getExternalId

      public String getExternalId()

      Optional identifier for use in external systems like Customer Relationship Management (CRM) or Enterprise Resource Planning (ERP).

      Specified by:
      getExternalId in interface Customer
      Returns:
      externalId
    • getLastModifiedBy

      public LastModifiedBy getLastModifiedBy()

      Present on resources created after 1 February 2019 except for events not tracked.

      Specified by:
      getLastModifiedBy in interface Customer
      Returns:
      lastModifiedBy
    • getCreatedBy

      public CreatedBy getCreatedBy()

      Present on resources created after 1 February 2019 except for events not tracked.

      Specified by:
      getCreatedBy in interface Customer
      Returns:
      createdBy
    • getEmail

      public String getEmail()

      Email address of the Customer that is unique for an entire Project or to a Store the Customer is assigned to. It is the mandatory unique identifier of a Customer.

      Specified by:
      getEmail in interface Customer
      Returns:
      email
    • getPassword

      public String getPassword()

      Present only when authenticationMode is set to Password.

      Specified by:
      getPassword in interface Customer
      Returns:
      password
    • getFirstName

      public String getFirstName()

      Given name (first name) of the Customer.

      Specified by:
      getFirstName in interface Customer
      Returns:
      firstName
    • getLastName

      public String getLastName()

      Family name (last name) of the Customer.

      Specified by:
      getLastName in interface Customer
      Returns:
      lastName
    • getMiddleName

      public String getMiddleName()

      Middle name of the Customer.

      Specified by:
      getMiddleName in interface Customer
      Returns:
      middleName
    • getTitle

      public String getTitle()

      Title of the Customer, for example, 'Dr.'.

      Specified by:
      getTitle in interface Customer
      Returns:
      title
    • getDateOfBirth

      public LocalDate getDateOfBirth()

      Date of birth of the Customer.

      Specified by:
      getDateOfBirth in interface Customer
      Returns:
      dateOfBirth
    • getCompanyName

      public String getCompanyName()

      Company name of the Customer.

      Specified by:
      getCompanyName in interface Customer
      Returns:
      companyName
    • getVatId

      public String getVatId()

      Individual VAT ID of the Customer.

      Specified by:
      getVatId in interface Customer
      Returns:
      vatId
    • getAddresses

      public List<Address> getAddresses()

      Addresses used by the Customer.

      Specified by:
      getAddresses in interface Customer
      Specified by:
      getAddresses in interface CustomerMixin
      Returns:
      addresses
    • getDefaultShippingAddressId

      public String getDefaultShippingAddressId()

      ID of the address in addresses used as the default shipping address.

      Specified by:
      getDefaultShippingAddressId in interface Customer
      Specified by:
      getDefaultShippingAddressId in interface CustomerMixin
      Returns:
      defaultShippingAddressId
    • getShippingAddressIds

      public List<String> getShippingAddressIds()

      IDs of addresses in addresses used as shipping addresses.

      Specified by:
      getShippingAddressIds in interface Customer
      Specified by:
      getShippingAddressIds in interface CustomerMixin
      Returns:
      shippingAddressIds
    • getDefaultBillingAddressId

      public String getDefaultBillingAddressId()

      ID of the address in addresses used as the default billing address.

      Specified by:
      getDefaultBillingAddressId in interface Customer
      Specified by:
      getDefaultBillingAddressId in interface CustomerMixin
      Returns:
      defaultBillingAddressId
      See Also:
    • getBillingAddressIds

      public List<String> getBillingAddressIds()

      IDs of addresses in addresses used as billing addresses.

      Specified by:
      getBillingAddressIds in interface Customer
      Specified by:
      getBillingAddressIds in interface CustomerMixin
      Returns:
      billingAddressIds
    • getIsEmailVerified

      public Boolean getIsEmailVerified()

      Indicates whether the email address of the Customer is verified.

      Specified by:
      getIsEmailVerified in interface Customer
      Returns:
      isEmailVerified
    • getCustomerGroup

      public CustomerGroupReference getCustomerGroup()

      CustomerGroup to which the Customer belongs.

      Specified by:
      getCustomerGroup in interface Customer
      Returns:
      customerGroup
    • getCustom

      public CustomFields getCustom()

      Custom Fields for the Customer.

      Specified by:
      getCustom in interface Customer
      Specified by:
      getCustom in interface Customizable<Customer>
      Returns:
      custom
    • getLocale

      public String getLocale()

      Preferred language of the Customer.

      Specified by:
      getLocale in interface Customer
      Returns:
      locale
    • getSalutation

      public String getSalutation()

      Salutation of the Customer, for example, 'Mr.' or 'Mrs.'.

      Specified by:
      getSalutation in interface Customer
      Returns:
      salutation
    • getStores

      public List<StoreKeyReference> getStores()

      Stores to which the Customer is assigned to.

      • If no Stores are specified, the Customer is a global customer, and can log in using the Password Flow for global Customers.
      • If any Stores are specified, the Customer can only log in using the Password Flow for Customers in a Store for those specific Stores.
      Specified by:
      getStores in interface Customer
      Returns:
      stores
    • getAuthenticationMode

      public AuthenticationMode getAuthenticationMode()

      Indicates whether the password is required for the Customer.

      Specified by:
      getAuthenticationMode in interface Customer
      Returns:
      authenticationMode
    • setId

      public void setId(String id)
      Description copied from interface: Customer

      Unique identifier of the Customer.

      Specified by:
      setId in interface BaseResource
      Specified by:
      setId in interface Customer
      Parameters:
      id - value to be set
    • setVersion

      public void setVersion(Long version)
      Description copied from interface: Customer

      Current version of the Customer.

      Specified by:
      setVersion in interface BaseResource
      Specified by:
      setVersion in interface Customer
      Parameters:
      version - value to be set
    • setCreatedAt

      public void setCreatedAt(ZonedDateTime createdAt)
      Description copied from interface: Customer

      Date and time (UTC) the Customer was initially created.

      Specified by:
      setCreatedAt in interface BaseResource
      Specified by:
      setCreatedAt in interface Customer
      Parameters:
      createdAt - value to be set
    • setLastModifiedAt

      public void setLastModifiedAt(ZonedDateTime lastModifiedAt)
      Description copied from interface: Customer

      Date and time (UTC) the Customer was last updated.

      Specified by:
      setLastModifiedAt in interface BaseResource
      Specified by:
      setLastModifiedAt in interface Customer
      Parameters:
      lastModifiedAt - value to be set
    • setKey

      public void setKey(String key)
      Description copied from interface: Customer

      User-defined unique identifier of the Customer.

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

      public void setCustomerNumber(String customerNumber)
      Description copied from interface: Customer

      User-defined unique identifier of the Customer.

      Can be used to refer to a Customer in a human-readable way (in emails, invoices, and other correspondence).

      Specified by:
      setCustomerNumber in interface Customer
      Parameters:
      customerNumber - value to be set
    • setExternalId

      public void setExternalId(String externalId)
      Description copied from interface: Customer

      Optional identifier for use in external systems like Customer Relationship Management (CRM) or Enterprise Resource Planning (ERP).

      Specified by:
      setExternalId in interface Customer
      Parameters:
      externalId - value to be set
    • setLastModifiedBy

      public void setLastModifiedBy(LastModifiedBy lastModifiedBy)
      Description copied from interface: Customer

      Present on resources created after 1 February 2019 except for events not tracked.

      Specified by:
      setLastModifiedBy in interface Customer
      Parameters:
      lastModifiedBy - value to be set
    • setCreatedBy

      public void setCreatedBy(CreatedBy createdBy)
      Description copied from interface: Customer

      Present on resources created after 1 February 2019 except for events not tracked.

      Specified by:
      setCreatedBy in interface Customer
      Parameters:
      createdBy - value to be set
    • setEmail

      public void setEmail(String email)
      Description copied from interface: Customer

      Email address of the Customer that is unique for an entire Project or to a Store the Customer is assigned to. It is the mandatory unique identifier of a Customer.

      Specified by:
      setEmail in interface Customer
      Parameters:
      email - value to be set
    • setPassword

      public void setPassword(String password)
      Description copied from interface: Customer

      Present only when authenticationMode is set to Password.

      Specified by:
      setPassword in interface Customer
      Parameters:
      password - value to be set
    • setFirstName

      public void setFirstName(String firstName)
      Description copied from interface: Customer

      Given name (first name) of the Customer.

      Specified by:
      setFirstName in interface Customer
      Parameters:
      firstName - value to be set
    • setLastName

      public void setLastName(String lastName)
      Description copied from interface: Customer

      Family name (last name) of the Customer.

      Specified by:
      setLastName in interface Customer
      Parameters:
      lastName - value to be set
    • setMiddleName

      public void setMiddleName(String middleName)
      Description copied from interface: Customer

      Middle name of the Customer.

      Specified by:
      setMiddleName in interface Customer
      Parameters:
      middleName - value to be set
    • setTitle

      public void setTitle(String title)
      Description copied from interface: Customer

      Title of the Customer, for example, 'Dr.'.

      Specified by:
      setTitle in interface Customer
      Parameters:
      title - value to be set
    • setDateOfBirth

      public void setDateOfBirth(LocalDate dateOfBirth)
      Description copied from interface: Customer

      Date of birth of the Customer.

      Specified by:
      setDateOfBirth in interface Customer
      Parameters:
      dateOfBirth - value to be set
    • setCompanyName

      public void setCompanyName(String companyName)
      Description copied from interface: Customer

      Company name of the Customer.

      Specified by:
      setCompanyName in interface Customer
      Parameters:
      companyName - value to be set
    • setVatId

      public void setVatId(String vatId)
      Description copied from interface: Customer

      Individual VAT ID of the Customer.

      Specified by:
      setVatId in interface Customer
      Parameters:
      vatId - value to be set
    • setAddresses

      public void setAddresses(Address... addresses)
      Description copied from interface: Customer

      Addresses used by the Customer.

      Specified by:
      setAddresses in interface Customer
      Parameters:
      addresses - values to be set
    • setAddresses

      public void setAddresses(List<Address> addresses)
      Description copied from interface: Customer

      Addresses used by the Customer.

      Specified by:
      setAddresses in interface Customer
      Parameters:
      addresses - values to be set
    • setDefaultShippingAddressId

      public void setDefaultShippingAddressId(String defaultShippingAddressId)
      Description copied from interface: Customer

      ID of the address in addresses used as the default shipping address.

      Specified by:
      setDefaultShippingAddressId in interface Customer
      Parameters:
      defaultShippingAddressId - value to be set
    • setShippingAddressIds

      public void setShippingAddressIds(String... shippingAddressIds)
      Description copied from interface: Customer

      IDs of addresses in addresses used as shipping addresses.

      Specified by:
      setShippingAddressIds in interface Customer
      Parameters:
      shippingAddressIds - values to be set
    • setShippingAddressIds

      public void setShippingAddressIds(List<String> shippingAddressIds)
      Description copied from interface: Customer

      IDs of addresses in addresses used as shipping addresses.

      Specified by:
      setShippingAddressIds in interface Customer
      Parameters:
      shippingAddressIds - values to be set
    • setDefaultBillingAddressId

      public void setDefaultBillingAddressId(String defaultBillingAddressId)
      Description copied from interface: Customer

      ID of the address in addresses used as the default billing address.

      Specified by:
      setDefaultBillingAddressId in interface Customer
      Parameters:
      defaultBillingAddressId - value to be set
    • setBillingAddressIds

      public void setBillingAddressIds(String... billingAddressIds)
      Description copied from interface: Customer

      IDs of addresses in addresses used as billing addresses.

      Specified by:
      setBillingAddressIds in interface Customer
      Parameters:
      billingAddressIds - values to be set
    • setBillingAddressIds

      public void setBillingAddressIds(List<String> billingAddressIds)
      Description copied from interface: Customer

      IDs of addresses in addresses used as billing addresses.

      Specified by:
      setBillingAddressIds in interface Customer
      Parameters:
      billingAddressIds - values to be set
    • setIsEmailVerified

      public void setIsEmailVerified(Boolean isEmailVerified)
      Description copied from interface: Customer

      Indicates whether the email address of the Customer is verified.

      Specified by:
      setIsEmailVerified in interface Customer
      Parameters:
      isEmailVerified - value to be set
    • setCustomerGroup

      public void setCustomerGroup(CustomerGroupReference customerGroup)
      Description copied from interface: Customer

      CustomerGroup to which the Customer belongs.

      Specified by:
      setCustomerGroup in interface Customer
      Parameters:
      customerGroup - value to be set
    • setCustom

      public void setCustom(CustomFields custom)
      Description copied from interface: Customer

      Custom Fields for the Customer.

      Specified by:
      setCustom in interface Customer
      Specified by:
      setCustom in interface Customizable<Customer>
      Parameters:
      custom - value to be set
    • setLocale

      public void setLocale(String locale)
      Description copied from interface: Customer

      Preferred language of the Customer.

      Specified by:
      setLocale in interface Customer
      Parameters:
      locale - value to be set
    • setSalutation

      public void setSalutation(String salutation)
      Description copied from interface: Customer

      Salutation of the Customer, for example, 'Mr.' or 'Mrs.'.

      Specified by:
      setSalutation in interface Customer
      Parameters:
      salutation - value to be set
    • setStores

      public void setStores(StoreKeyReference... stores)
      Description copied from interface: Customer

      Stores to which the Customer is assigned to.

      • If no Stores are specified, the Customer is a global customer, and can log in using the Password Flow for global Customers.
      • If any Stores are specified, the Customer can only log in using the Password Flow for Customers in a Store for those specific Stores.
      Specified by:
      setStores in interface Customer
      Parameters:
      stores - values to be set
    • setStores

      public void setStores(List<StoreKeyReference> stores)
      Description copied from interface: Customer

      Stores to which the Customer is assigned to.

      • If no Stores are specified, the Customer is a global customer, and can log in using the Password Flow for global Customers.
      • If any Stores are specified, the Customer can only log in using the Password Flow for Customers in a Store for those specific Stores.
      Specified by:
      setStores in interface Customer
      Parameters:
      stores - values to be set
    • setAuthenticationMode

      public void setAuthenticationMode(AuthenticationMode authenticationMode)
      Description copied from interface: Customer

      Indicates whether the password is required for the Customer.

      Specified by:
      setAuthenticationMode in interface Customer
      Parameters:
      authenticationMode - value to be set
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object