View Source Plaid behaviour (plaid v3.3.0)
An HTTP Client for Plaid.
Link to this section Summary
Link to this section Types
Link to this section Callbacks
@callback handle_response({:ok, Tesla.Env.t()} | {:error, any()}, mapper()) :: {:ok, term()} | {:error, Plaid.Error.t()} | {:error, any()}
Handle an HTTP response from Plaid.
Takes response argument in the form of {:ok, Tesla.Env.t}
or {:error, any()}
and a 1-arity mapping function argument which is applied to the body of the
Tesla.Env in the success case to unmarshal JSON into structured data.
Error cases are diverted into {:error, Plaid.Error.t}
and {:error, any()}
for handling Plaid and HTTP failure responses.
@callback send_request(Plaid.Client.Request.t(), Tesla.Client.t()) :: {:ok, Tesla.Env.t()} | {:error, any()}
Send an HTTP request to Plaid.
Takes a data structure Plaid.Request.t
and Tesla client built at runtime
and returns either {:ok, Tesla.Env.t}
or {:error, any()}
.