View Source KoraPay.Client (korapay v0.1.0)
Create a connection to the korapay api,
and query it. Some routes may require different authentication types, ensure
the correct keys are supplied in ./config
before starting the application.
see: https://korahq.atlassian.net/wiki/spaces/AR/pages/733970455/Authentication
You may wish to verify a client build by querying the api in an iex
session:
iex(1)> KoraPay.Client.get_balances()
iex(2)> {:ok, %{"NGN" => %{"available_balance" => 0, "pending_balance" => 0}}}
Do not consume the client directly, use the public interface in your application:
defmodule MyApp do
def print_balance do
case KoraPay.balances() do
{:ok, balance} <- IO.inspect(balance)
{:error, error} <- IO.inspect(error)
end
end
end
Link to this section Summary
Link to this section Functions
@spec build_client(:public | :private) :: Tesla.Client.t()