Class CustomerAddress

The Address class represents a customer's address.

Note: this class allows access to sensitive personal and private information. Pay attention to appropriate legal and regulatory requirements.

PropertyDescription
ID: StringReturns the name of the address.
address1: StringReturns the customer's first address.
address2: StringReturns the customer's second address value.
city: StringReturns the customer's city.
companyName: StringReturns the customer's company name.
countryCode: EnumValueReturns the customer's country code.
firstName: StringReturns the customer's first name.
fullName: String (read-only)Returns a concatenation of the customer's first, middle, and last names and its suffix.
jobTitle: StringReturns the customer's job title.
lastName: StringReturns the customer's last name.
phone: StringReturns the customer's phone number.
postBox: StringReturns the customer's post box.
postalCode: StringReturns the customer's postal code.
salutation: StringReturns the customer's salutation.
secondName: StringReturns the customer's second name.
stateCode: StringReturns the customer's state.
suffix: StringReturns the customer's suffix.
suite: StringReturns the customer's suite.
title: StringReturns the customer's title.

This class does not have a constructor, so you cannot create it directly.

MethodDescription
getAddress1()Returns the customer's first address.
getAddress2()Returns the customer's second address value.
getCity()Returns the customer's city.
getCompanyName()Returns the customer's company name.
getCountryCode()Returns the customer's country code.
getFirstName()Returns the customer's first name.
getFullName()Returns a concatenation of the customer's first, middle, and last names and its suffix.
getID()Returns the name of the address.
getJobTitle()Returns the customer's job title.
getLastName()Returns the customer's last name.
getPhone()Returns the customer's phone number.
getPostBox()Returns the customer's post box.
getPostalCode()Returns the customer's postal code.
getSalutation()Returns the customer's salutation.
getSecondName()Returns the customer's second name.
getStateCode()Returns the customer's state.
getSuffix()Returns the customer's suffix.
getSuite()Returns the customer's suite.
getTitle()Returns the customer's title.
isEquivalentAddress(Object)Returns true if the specified address is equivalent to this address.
setAddress1(String)Sets the value of the customer's first address.
setAddress2(String)Sets the customer's second address value.
setCity(String)Sets the customer's city.
setCompanyName(String)Sets the customer's company name.
setCountryCode(String)Sets the customer's country code.
setFirstName(String)Sets the customer's first name.
setID(String)Sets the address name.
setJobTitle(String)Sets the customer's job title.
setLastName(String)Sets the customer's last name.
setPhone(String)Sets the customer's phone number.
setPostBox(String)Sets the customer's post box.
setPostalCode(String)Sets the customer's postal code.
setSaluation(String)Sets the customer's salutation.
setSalutation(String)Sets the customer's salutation.
setSecondName(String)Sets the customer's second name.
setStateCode(String)Sets the customer's state.
setSuffix(String)Sets the customer's suffix.
setSuite(String)Sets the customer's suite.
setTitle(String)Sets the customer's title.

describe, getCustom

getCreationDate, getLastModified, getUUID

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

ID: String

Returns the name of the address.


address1: String

Returns the customer's first address.


address2: String

Returns the customer's second address value.


city: String

Returns the customer's city.


companyName: String

Returns the customer's company name.


countryCode: EnumValue

Returns the customer's country code. Commerce Cloud Digital supports two-character country codes per ISO 3166-1 alpha-2. See http://www.iso.org/iso/country_codes/iso_3166-faqs/iso_3166_faqs_general.htm for additional information.


firstName: String

Returns the customer's first name.


fullName: String (read-only)

Returns a concatenation of the customer's first, middle, and last names and its suffix.


jobTitle: String

Returns the customer's job title.


lastName: String

Returns the customer's last name.


phone: String

Returns the customer's phone number.


postBox: String

Returns the customer's post box.


postalCode: String

Returns the customer's postal code.


salutation: String

Returns the customer's salutation.


secondName: String

Returns the customer's second name.


stateCode: String

Returns the customer's state.


suffix: String

Returns the customer's suffix.


suite: String

Returns the customer's suite.


title: String

Returns the customer's title.


getAddress1(): String

Returns the customer's first address.

Returns:

  • the first address value.

getAddress2(): String

Returns the customer's second address value.

Returns:

  • the value of the second address.

getCity(): String

Returns the customer's city.

Returns:

  • the customer's city.

getCompanyName(): String

Returns the customer's company name.

Returns:

  • the company name.

getCountryCode(): EnumValue

Returns the customer's country code. Commerce Cloud Digital supports two-character country codes per ISO 3166-1 alpha-2. See http://www.iso.org/iso/country_codes/iso_3166-faqs/iso_3166_faqs_general.htm for additional information.

Returns:

  • the two-digit country code.

getFirstName(): String

Returns the customer's first name.

Returns:

  • the customer first name.

getFullName(): String

Returns a concatenation of the customer's first, middle, and last names and its suffix.

Returns:

  • a concatenation of the customer's first, middle, and last names and its suffix.

getID(): String

Returns the name of the address.

Returns:

  • the address name.

getJobTitle(): String

Returns the customer's job title.

Returns:

  • the job title.

getLastName(): String

Returns the customer's last name.

Returns:

  • the last name.

getPhone(): String

Returns the customer's phone number.

Returns:

  • the phone number.

getPostBox(): String

Returns the customer's post box.

Returns:

  • the post box.

getPostalCode(): String

Returns the customer's postal code.

Returns:

  • the postal code.

getSalutation(): String

Returns the customer's salutation.

Returns:

  • the salutation.

getSecondName(): String

Returns the customer's second name.

Returns:

  • the second name.

getStateCode(): String

Returns the customer's state.

Returns:

  • the state.

getSuffix(): String

Returns the customer's suffix.

Returns:

  • the suffix.

getSuite(): String

Returns the customer's suite.

Returns:

  • the suite.

getTitle(): String

Returns the customer's title.

Returns:

  • the title.

isEquivalentAddress(address: Object): Boolean

Returns true if the specified address is equivalent to this address. An equivalent address is an address whose core attributes contain the same values. The core attributes are:

  • address1
  • address2
  • city
  • companyName
  • countryCode
  • firstName
  • lastName
  • postalCode
  • postBox
  • stateCode

Parameters:

  • address - the address to test.

Returns:

  • true if the specified address is equivalent to this address, false otherwise.

setAddress1(value: String): void

Sets the value of the customer's first address.

Parameters:

  • value - The value to set.

setAddress2(value: String): void

Sets the customer's second address value.

Parameters:

  • value - The value to set.

setCity(city: String): void

Sets the customer's city.

Parameters:

  • city - the customer's city to set.

setCompanyName(companyName: String): void

Sets the customer's company name.

Parameters:

  • companyName - the name of the company.

setCountryCode(countryCode: String): void

Sets the customer's country code. Commerce Cloud Digital supports two-character country codes per ISO 3166-1 alpha-2. See http://www.iso.org/iso/country_codes/iso_3166-faqs/iso_3166_faqs_general.htm for additional information.

Parameters:

  • countryCode - the country code, must be no more than 2 characters or will be truncated.

setFirstName(firstName: String): void

Sets the customer's first name.

Parameters:

  • firstName - the customer's first name to set.

setID(value: String): void

Sets the address name.

Parameters:

  • value - the name to use.

setJobTitle(jobTitle: String): void

Sets the customer's job title.

Parameters:

  • jobTitle - The jobTitle to set.

setLastName(lastName: String): void

Sets the customer's last name.

Parameters:

  • lastName - The last name to set.

setPhone(phoneNumber: String): void

Sets the customer's phone number. The length is restricted to 32 characters.

Parameters:

  • phoneNumber - The phone number to set.

setPostBox(postBox: String): void

Sets the customer's post box.

Parameters:

  • postBox - The post box to set.

setPostalCode(postalCode: String): void

Sets the customer's postal code.

Parameters:

  • postalCode - The postal code to set.

setSaluation(value: String): void

Sets the customer's salutation.

Parameters:

  • value - the salutation.

Deprecated:

Use setSalutation(String)


setSalutation(value: String): void

Sets the customer's salutation.

Parameters:

  • value - the salutation.

setSecondName(secondName: String): void

Sets the customer's second name.

Parameters:

  • secondName - The second name to set.

setStateCode(state: String): void

Sets the customer's state.

Parameters:

  • state - The state to set.

setSuffix(suffix: String): void

Sets the customer's suffix.

Parameters:

  • suffix - The suffix to set.

setSuite(value: String): void

Sets the customer's suite. The length is restricted to 32 characters.

Parameters:

  • value - the suite to set.

setTitle(title: String): void

Sets the customer's title.

Parameters:

  • title - The title to set.