View Source AtEx.Gateway.Airtime (AtEx v0.20.23)
This module holds the implementation for the HTTP Gateway that runs calls against the Africas Talking API Application Data endpoint, use it to POST and GET requests to the Application endpoint
Summary
Functions
Process results from calling the gateway
Sends airtime to one or more numbers, accepts a map of parameters contaitning a list of maps each containing a
phone numbers and an amount of airtime to send out to a number this is expected in the recipients key.
Types
@type send_input() :: %{recipients: [map()]}
Functions
Process results from calling the gateway
@spec send_airtime(send_input()) :: call_return()
Sends airtime to one or more numbers, accepts a map of parameters contaitning a list of maps each containing a
phone numbers and an amount of airtime to send out to a number this is expected in the recipients key.
Parameters
map: map containing a recipients which is a list of maps each with a phone number and amount
Examples
AtEx.Gateway.Airtime.send_airtime(%{recipients: [%{phone_number: "+254721978097", amount: "KES 50"}]})