Versions Compared

Key

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

...

Code Block
languagejs
linenumberstrue
... 
orderItem.flexAttributes()
...

string orderItem.get(key)

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

Example

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

Parameter key:string (required)

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

boolean orderItem.has(key)

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

Example

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

Parameter key:string (required)

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

orderItem.id

Returns the id of an orderItem

...

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

Parameter key:string (required)

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

orderItem.order

Returns the order of an orderItem

...

orderItem.remove(key)

Removes the given key from a customerthe flexAttributes of the orderItem

Example

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

Parameter key:string (required)

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

orderItem.set(key, value

...

)

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

...

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

Parameter key:string (required)

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

Parameter value:string (required)

...

The value to be set for the key

orderItem.setAmount(quantity)

...