SMSFactor.Contacts (SMSFactor v0.2.0) View Source

Wrappers around Contacts section of SMSFactor API.

Link to this section Summary

Types

Params for defining contacts list.

Params for defining a contact.

Link to this section Types

Specs

contact_list_params() :: %{list: %{required(atom()) => String.t()}}

Params for defining contacts list.

Example

{
  "list": {
    "listId": 50433,
    "contacts": {
      "gsm": [
        {
          "value": "33612345678",
          "info1": "Hiroo",
          "info2": "Onoda"
        },
        {
          "value": "33612345677",
          "info1": "Grace",
          "info2": "Hopper"
        },
        {
          "value": "33612345676",
          "info1": "Hedy",
          "info2": "Lamarr",
          "info3": "Extase",
          "info4": "1933"
        }
      ]
    }
  }
}

Specs

contact_params() :: %{required(atom()) => String.t()}

Params for defining a contact.

Example

{
  "value": "33612345676",
  "info1": "Hedy",
  "info2": "Lamarr",
  "info3": "Extase",
  "info4": "1933"
}

Link to this section Functions

Link to this function

add_contact(client, params)

View Source

Specs

Link to this function

deduplicate_list(client, list_id)

View Source

Specs

deduplicate_list(Tesla.Client.t(), integer()) :: Tesla.Env.result()
Link to this function

insert_to_blacklist(client, params)

View Source

Specs

insert_to_blacklist(Tesla.Client.t(), contact_list_params()) ::
  Tesla.Env.result()
Link to this function

insert_to_npai_list(client, params)

View Source

Specs

insert_to_npai_list(Tesla.Client.t(), contact_list_params()) ::
  Tesla.Env.result()
Link to this function

remove_contact(client, contact_id)

View Source

Specs

remove_contact(Tesla.Client.t(), integer()) :: Tesla.Env.result()
Link to this function

update_contact(client, contact_id, params)

View Source

Specs

update_contact(Tesla.Client.t(), integer(), contact_params()) ::
  Tesla.Env.result()