Shared JSON/REST request helper used by Tipalti.Payees, Tipalti.Invoices,
Tipalti.Payments, and the Tipalti.Procurement.* modules.
Handles URL/query building, JSON encoding/decoding, auth header injection
(OAuth2 bearer token for :rest, static x-api-key for :procurement),
and translates HTTP error responses into the Tipalti.Error hierarchy.
Summary
Functions
Performs a JSON request against either the REST or Procurement API.
Types
Functions
@spec request(api(), Tipalti.Config.t(), Tipalti.HTTP.method(), String.t(), keyword()) :: {:ok, term()} | {:error, Exception.t()}
Performs a JSON request against either the REST or Procurement API.
Options
:query— map/keyword of query string params.:json— a term to JSON-encode as the request body.:headers— additional request headers.:operation— an atom used only for telemetry metadata and error messages (e.g.:list_payees).