AttributeEditor

AttributeEditor

An interface for editing attributes.

Example

const contact = await sdk.contact
const editor = await contact.editAttributes()

editor.set("my_attribute", "some_value")
await editor.apply()

Methods

apply() → {Promise.<void>}

Applies any previously queued changes.

Returns:
  • resolves if changes were applied successfully.

  • Type:
    Promise.<void>

remove(key) → {AttributeEditor}

Queue an attribute removal.

Parameters:
Name Type Description
key string

the attribute name

Returns:
Type:
AttributeEditor

set(key, value) → {AttributeEditor}

Queue an attribute set.

Parameters:
Name Type Description
key string

the attribute name

value string | number | Date | Object

the value to apply

Returns:
Type:
AttributeEditor