Handkit.Connect (Handkit v0.2.0) View Source
A client module for connecting and interfacing with the Handcash Connect API endpoints.
Link to this section Summary
Functions
Returns the Handcash API URL for the given environment.
Returns the Handcash Client URL for the given environment.
Handles the result from a Connect request.
Initiates a new Handcash Connect client.
Link to this section Types
Specs
env() :: :prod | :beta | :iae
Connect environment
Specs
t() :: %Handkit.Connect{client: Tesla.Client.t()}
Handcash Connect client
Link to this section Functions
Specs
Returns the Handcash API URL for the given environment.
Specs
Returns the Handcash Client URL for the given environment.
Specs
handle_result(Tesla.Env.result(), String.t() | nil) :: {:ok, any()} | {:error, any()}
Handles the result from a Connect request.
If the result is a success, the request body is returned. Where the request
returns an error, a %ConnectError{}
exception is returned.
Specs
Initiates a new Handcash Connect client.
Must be passed a valid auth token.