Wise.Client (Wise v1.0.0)

Copy Markdown View Source

Core HTTP client for the Wise Platform API.

Handles authentication, JSON encoding/decoding, error parsing, rate limiting, circuit breaking, and retry logic.

All service modules delegate to this client.

Summary

Functions

Performs a DELETE request.

Performs a GET request.

Performs a GET request and returns raw binary (for statement downloads).

Performs a PATCH request with JSON body.

Performs a POST request with JSON body.

Performs a PUT request with JSON body.

Functions

delete(config, path)

@spec delete(Wise.Config.t(), String.t()) :: {:ok, :ok} | {:error, Wise.Error.t()}

Performs a DELETE request.

get(config, path, params \\ [])

@spec get(Wise.Config.t(), String.t(), keyword()) ::
  {:ok, any()} | {:error, Wise.Error.t()}

Performs a GET request.

get_raw(config, path, params \\ [])

@spec get_raw(Wise.Config.t(), String.t(), keyword()) ::
  {:ok, binary()} | {:error, Wise.Error.t()}

Performs a GET request and returns raw binary (for statement downloads).

patch(config, path, body \\ nil)

@spec patch(Wise.Config.t(), String.t(), any()) ::
  {:ok, any()} | {:error, Wise.Error.t()}

Performs a PATCH request with JSON body.

post(config, path, body \\ nil)

@spec post(Wise.Config.t(), String.t(), any()) ::
  {:ok, any()} | {:error, Wise.Error.t()}

Performs a POST request with JSON body.

put(config, path, body \\ nil)

@spec put(Wise.Config.t(), String.t(), any()) ::
  {:ok, any()} | {:error, Wise.Error.t()}

Performs a PUT request with JSON body.