ClickSend

API Facade for ClickSend REST v3.

Examples

Account

Show

ClickSend.Account.show()

Account Recharge

List Packages

ClickSend.AccountRecharge.list_packages("USA")

Purchase a Package

ClickSend.AccountRecharge.purchase_package(1)

Email

Send

ClickSend.EmailMessage.new(
  "test1@test.com",
  "John Doe",
  1111,
  "My App Registrations",
  "Your account needs verification",
  "Please go to https://cool-app.com/account/4b787ca2-15cc-11e9-9330-c48e8ff5e241/verify to verify your account"
)
|> ClickSend.Email.send()

SMS

Send

ClickSend.SmsMessage.new("+14055555555", "Hello world!")
|> ClickSend.Sms.send()

Installation

  1. Add click_send to your list of dependencies in mix.exs
def deps do
  [
    {:click_send, "~> 0.7.0"}
  ]
end
  1. Setup your configuration
config :click_send,
  api_key: "F0E14CF8-1691-11E9-9019-C48E8FF5E241",
  username: "my_username",
  sms_from_number: "+11234567890"

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/click_send.