View Source Hyperswitch.Client behaviour (hyperswitch v0.1.0)

Link to this section Summary

Link to this section Types

@type body() :: nil | map()
@type error() :: (message :: binary()) | {code :: binary(), message :: binary()}
@type headers() :: nil | [{binary(), binary()}]
@type method() :: :get | :post | :delete
@type params() :: nil | keyword()
@type path() :: binary()
@type request() :: %{
  :method => method(),
  optional(:headers) => headers(),
  :path => path(),
  optional(:params) => params(),
  optional(:body) => params()
}
@type response() :: response(map())
@type response(t) :: {:ok, t} | {:error, error()}

Link to this section Callbacks

@callback request(request()) :: response()

Link to this section Functions

@spec request(request()) :: response()