plaid v1.7.2 Plaid.Utils View Source

Utility functions.

Link to this section Summary

Functions

Handles Plaid response and maps to the correct data structure

Maps an endpoint’s response to the corresponding internal data structure

Link to this section Types

Link to this type endpoint() View Source
endpoint() :: atom()
Link to this type response() View Source
response() :: %{required(String.t()) => any()}

Link to this section Functions

Link to this function handle_resp(arg, endpoint) View Source
handle_resp(
  {:ok, HTTPoison.Response.t()} | {:error, HTTPoison.Error.t()},
  endpoint()
) :: {:ok, any()} | {:error, Plaid.Error.t() | HTTPoison.Error.t()}

Handles Plaid response and maps to the correct data structure.

Link to this function map_response(response, atom) View Source
map_response(response(), endpoint()) :: any()

Maps an endpoint’s response to the corresponding internal data structure.