ExUssd.Ussd behaviour (ExUssd v0.1.1) View Source

Link to this section Summary

Types

A map value carrying api parameters, e.g %{ sessionId: "session_01", phoneNumber: "254722000000", networkCode: "Safaricom", serviceCode: "*544#", text: "1" }

An internal routing map that takes text value, session id and service code, e.g. %{text: "1", session_id: "session_01", service_code: "*544#"}

Menu Struct

Link to this section Types

Specs

api_parameters() :: map()

A map value carrying api parameters, e.g %{ sessionId: "session_01", phoneNumber: "254722000000", networkCode: "Safaricom", serviceCode: "*544#", text: "1" }

Specs

internal_routing() :: %{
  text: String.t(),
  session_id: String.t(),
  service_code: String.t()
}

An internal routing map that takes text value, session id and service code, e.g. %{text: "1", session_id: "session_01", service_code: "*544#"}

Specs

menu() :: ExUssd.Menu

Menu Struct

Link to this section Callbacks

Specs

end_session([{:session_id, String.t()}]) :: any()

Specs

get_menu([{:session_id, String.t()}]) :: any()

Specs

goto(
  internal_routing: internal_routing(),
  menu: menu(),
  api_parameters: api_parameters()
) :: any()