SMSFactor.Notifications (SMSFactor v0.5.0)

View Source

Wrappers around Notifications section of SMSFactor API.

Summary

Types

Supports the following options

Types

balance_params()

@type balance_params() :: %{notifications: %{required(atom()) => String.t()}}

Supports the following options :

  • alert_trigger The trigger that when reached sends notifications.
  • alert_email Activate or deactivate option for email(1 for true and 0 for false)
  • alert_gsm Activate or deactivate option for gsm(1 for true and 0 for false)
  • email Email you want receive notification with
  • phone_number Number you want receive notification with

Example

{
  "notification":{
  "alert_trigger" : "500",
    "alert_email": "1",
    "alert_gsm": "1",
    "email" : "ano@nyme.com",
    "phone_number" : "33612345678"
  }
}

Functions

get_balance(client)

@spec get_balance(Tesla.Client.t()) :: Tesla.Env.result()

update_balance(client, params)

@spec update_balance(Tesla.Client.t(), balance_params()) :: Tesla.Env.result()