Class Profile
The class represents a customer profile. It also provides access to the
customers address book and credentials.
Note: this class handles sensitive security-related data.
Pay special attention to PCI DSS v3. requirements 2, 4, and 12.
Property Summary
Constructor Summary
This class does not have a constructor, so you cannot create it directly.
Method Summary
Methods inherited from class ExtensibleObject
describe , getCustom
Methods inherited from class PersistentObject
getCreationDate , getLastModified , getUUID
Methods inherited from class Object
assign , create , create , defineProperties , defineProperty , entries , freeze , fromEntries , getOwnPropertyDescriptor , getOwnPropertyNames , getOwnPropertySymbols , getPrototypeOf , hasOwnProperty , is , isExtensible , isFrozen , isPrototypeOf , isSealed , keys , preventExtensions , propertyIsEnumerable , seal , setPrototypeOf , toLocaleString , toString , valueOf , values
Property Details
addressBook
addressBook: AddressBook (read-only)
Returns the customer's address book.
birthday
birthday: Date
Returns the customer's birthday as a date.
companyName
companyName: String
Returns the customer's company name.
credentials
credentials: Credentials (read-only)
Returns the customer's credentials.
customer
customer: Customer (read-only)
Returns the customer object related to this profile.
customerNo
customerNo: String (read-only)
Returns the customer's number, which is a number used to identify the Customer.
email
email: String
Returns the customer's email address.
fax
fax: String
Returns the fax number to use for the customer.
The length is restricted to 32 characters.
female
female: Boolean (read-only)
Indicates that the customer is female when set to true.
firstName
firstName: String
Returns the customer's first name.
gender
gender: EnumValue
Returns the customer's gender.
jobTitle
jobTitle: String
Returns the customer's job title.
lastLoginTime
lastLoginTime: Date (read-only)
Returns the last login time of the customer.
lastName
lastName: String
Returns the customer's last name.
lastVisitTime
lastVisitTime: Date (read-only)
Returns the last visit time of the customer.
male
male: Boolean (read-only)
Indicates that the customer is male when set to true.
nextBirthday
nextBirthday: Date (read-only)
Returns the upcoming customer's birthday as a date.
If the customer already had birthday this year the method returns the birthday of the next year.
Otherwise its birthday in this year.
If the customer has not set a birthday this method returns null.
phoneBusiness
phoneBusiness: String
Returns the business phone number to use for the customer.
phoneHome
phoneHome: String
Returns the phone number to use for the customer.
phoneMobile
phoneMobile: String
Returns the mobile phone number to use for the customer.
preferredLocale
preferredLocale: String
Returns the customer's preferred locale.
previousLoginTime
previousLoginTime: Date (read-only)
Returns the time the customer logged in prior to the current login.
previousVisitTime
previousVisitTime: Date (read-only)
Returns the time the customer visited the store prior to the current visit.
salutation
salutation: String
Returns the salutation to use for the customer.
secondName
secondName: String
Returns the customer's second name.
suffix
suffix: String
Returns the customer's suffix, such as "Jr." or "Sr.".
taxID
taxID: String
Returns the tax ID value. The value is returned either plain
text if the current context allows plain text access, or
if it's not allowed, the ID value will be returned masked.
The following criteria must be met in order to have plain text access:
the method call must happen in the context of a storefront request;
the current customer must be registered and authenticated;
it is the profile of the current customer;
and the current protocol is HTTPS.
taxIDMasked
taxIDMasked: String (read-only)
Returns the masked value of the tax ID.
taxIDType
taxIDType: EnumValue
Returns the tax ID type.
title
title: String
Returns the customer's title, such as "Mrs" or "Mr".
wallet
wallet: Wallet (read-only)
Returns the wallet of this customer.
Method Details
getAddressBook()
getAddressBook(): AddressBook
Returns the customer's address book.
Returns:
the customer's address book.
getBirthday()
getBirthday(): Date
Returns the customer's birthday as a date.
Returns:
the customer's birthday as a date.
getCompanyName()
getCompanyName(): String
Returns the customer's company name.
Returns:
the customer's company name.
getCredentials()
getCredentials(): Credentials
Returns the customer's credentials.
Returns:
the customer's credentials.
getCustomer()
getCustomer(): Customer
Returns the customer object related to this profile.
Returns:
customer object related to profile.
getCustomerNo()
getCustomerNo(): String
Returns the customer's number, which is a number used to identify the Customer.
Returns:
getEmail()
getEmail(): String
Returns the customer's email address.
Returns:
the customer's email address.
getFax()
getFax(): String
Returns the fax number to use for the customer.
The length is restricted to 32 characters.
Returns:
the fax mobile phone number to use for the customer.
getFirstName()
getFirstName(): String
Returns the customer's first name.
Returns:
the customer's first name.
getGender()
getGender(): EnumValue
Returns the customer's gender.
Returns:
getJobTitle()
getJobTitle(): String
Returns the customer's job title.
Returns:
the customer's job title.
getLastLoginTime()
getLastLoginTime(): Date
Returns the last login time of the customer.
Returns:
the time, when the customer was last logged in.
getLastName()
getLastName(): String
Returns the customer's last name.
Returns:
the customer's last name.
getLastVisitTime()
getLastVisitTime(): Date
Returns the last visit time of the customer.
Returns:
the time, when the customer has visited the storefront the
last time (with enabled remember me functionality).
getNextBirthday()
getNextBirthday(): Date
Returns the upcoming customer's birthday as a date.
If the customer already had birthday this year the method returns the birthday of the next year.
Otherwise its birthday in this year.
If the customer has not set a birthday this method returns null.
Returns:
the customer's next birthday as a date.
getPhoneBusiness()
getPhoneBusiness(): String
Returns the business phone number to use for the customer.
Returns:
the business phone number to use for the customer.
getPhoneHome()
getPhoneHome(): String
Returns the phone number to use for the customer.
Returns:
the phone number to use for the customer.
getPhoneMobile()
getPhoneMobile(): String
Returns the mobile phone number to use for the customer.
Returns:
the mobile phone number to use for the customer.
getPreferredLocale()
getPreferredLocale(): String
Returns the customer's preferred locale.
Returns:
the customer's preferred locale.
getPreviousLoginTime()
getPreviousLoginTime(): Date
Returns the time the customer logged in prior to the current login.
Returns:
the time the customer logged in prior to the current login.
getPreviousVisitTime()
getPreviousVisitTime(): Date
Returns the time the customer visited the store prior to the current visit.
Returns:
the time the customer visited the store prior to the current visit.
getSalutation()
getSalutation(): String
Returns the salutation to use for the customer.
Returns:
the salutation to use for the customer.
getSecondName()
getSecondName(): String
Returns the customer's second name.
Returns:
the customer's second name.
getSuffix()
getSuffix(): String
Returns the customer's suffix, such as "Jr." or "Sr.".
Returns:
getTaxID()
getTaxID(): String
Returns the tax ID value. The value is returned either plain
text if the current context allows plain text access, or
if it's not allowed, the ID value will be returned masked.
The following criteria must be met in order to have plain text access:
the method call must happen in the context of a storefront request;
the current customer must be registered and authenticated;
it is the profile of the current customer;
and the current protocol is HTTPS.
Returns:
getTaxIDMasked()
getTaxIDMasked(): String
Returns the masked value of the tax ID.
Returns:
the masked value of the tax ID
getTaxIDType()
getTaxIDType(): EnumValue
Returns the tax ID type.
Returns:
getTitle()
getTitle(): String
Returns the customer's title, such as "Mrs" or "Mr".
Returns:
getWallet()
getWallet(): Wallet
Returns the wallet of this customer.
Returns:
the wallet of this customer.
isFemale()
isFemale(): Boolean
Indicates that the customer is female when set to true.
Returns:
true if the customer is a female, false otherwise.
isMale()
isMale(): Boolean
Indicates that the customer is male when set to true.
Returns:
true if the customer is a male, false otherwise.
setBirthday(Date)
setBirthday(aValue: Date ): void
Sets the customer's birthday as a date.
Parameters:
aValue - the customer's birthday as a date.
setCompanyName(String)
setCompanyName(aValue: String ): void
Sets the customer's company name.
Parameters:
aValue - the customer's company name.
setEmail(String)
setEmail(aValue: String ): void
Sets the customer's email address.
Parameters:
aValue - the customer's email address.
setFax(String)
setFax(number: String ): void
Sets the fax number to use for the customer.
The length is restricted to 32 characters.
Parameters:
number - the fax number to use for the customer.
setFirstName(String)
setFirstName(aValue: String ): void
Sets the customer's first name.
Parameters:
aValue - the customer's first name.
setGender(Number)
setGender(aValue: Number ): void
Sets the customer's gender.
Parameters:
aValue - the customer's gender.
setJobTitle(String)
setJobTitle(aValue: String ): void
Sets the customer's job title.
Parameters:
aValue - the customer's job title.
setLastName(String)
setLastName(aValue: String ): void
Sets the customer's last name.
Parameters:
aValue - the customer's last name.
setPhoneBusiness(String)
setPhoneBusiness(number: String ): void
Sets the business phone number to use for the customer.
The length is restricted to 32 characters.
Parameters:
number - the business phone number to use for the customer.
setPhoneHome(String)
setPhoneHome(number: String ): void
Sets the phone number to use for the customer.
The length is restricted to 32 characters.
Parameters:
number - the phone number to use for the customer.
setPhoneMobile(String)
setPhoneMobile(number: String ): void
Sets the mobile phone number to use for the customer.
The length is restricted to 32 characters.
Parameters:
number - the mobile phone number to use for the customer.
setPreferredLocale(String)
setPreferredLocale(aValue: String ): void
Sets the customer's preferred locale.
Parameters:
aValue - the customer's preferred locale.
setSaluation(String)
setSaluation(salutation: String ): void
Sets the salutation to use for the customer.
Parameters:
salutation - the salutation to use for the customer.
Deprecated:
Use setSalutation(String)
setSalutation(String)
setSalutation(salutation: String ): void
Sets the salutation to use for the customer.
Parameters:
salutation - the salutation to use for the customer.
setSecondName(String)
setSecondName(aValue: String ): void
Sets the customer's second name.
Parameters:
aValue - the customer's second name.
setSuffix(String)
setSuffix(aValue: String ): void
Sets the the customer's suffix.
Parameters:
aValue - the customer's suffix.
setTaxID(String)
setTaxID(taxID: String ): void
Sets the tax ID value. The value can be set if the current context
allows write access.
The current context allows write access if the currently
logged in user owns this profile and the connection is secured.
Parameters:
taxID - the tax ID value to set
setTaxIDType(String)
setTaxIDType(taxIdType: String ): void
Sets the tax ID type.
Parameters:
taxIdType - the tax ID type to set
setTitle(String)
setTitle(aValue: String ): void
Sets the customer's title.
Parameters:
aValue - the customer's title.