Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejs
linenumberstrue
... 
customer.flexAttributes
...

string customer.get(key)

Returns the value of key as string or null if no value is set under the key.

Example

Code Block
languagejs
linenumberstrue
... 
customer.get(key)
...

Parameter key:string (required)

The key to be looked up in the flexAttributes of the customer.

boolean customer.has(key)

Returns a boolean value depending on whether key is present for a given customer

...

Code Block
languagejs
linenumberstrue
... 
customer.has(key)
...

Parameter key:string (required)

The key to be checked in the flexAttributes of the customer.

customer.id

Returns the ID of a customer

...

Code Block
languagejs
linenumberstrue
... 
customer.increment(key)
...

Parameter key:string (required)

The key to be incremented in the flexAttributes of the customer.

date customer.lastLogin()

Returns the date of the last login of the customer

...

customer.remove(key)

Removes the given key from a the flexAttributes of the customer

Example

Code Block
languagejs
linenumberstrue
... 
customer.remove(key)
...

Parameter key:string (required)

The key to be removed from the flexAttributes of the customer.

customer.set(key, value

...

)

Sets the value of a specified key for a given customer.

...

Code Block
languagejs
linenumberstrue
... 
customer.set(key, value, [options])
...

Parameter key:string (required)

The key to be set in the flexAttributes of the customer.

Parameter value:string (required)

...

The value to be set for the key

void customer.setActive(bool=true)

...