TaxJar.Requests.Client (tax_jar v0.1.0)
HTTP Client for the TaxJar API.
Configuration
The following are relied on to make calls to the TaxJar API.
:api_key
- Must be a valid TaxJar API auth key for your account.:api_url
- (Optional) If you want to override the default url for the current env.:api_version
- Must be a valid TaxJar API version. Default is"2022-01-24"
.
Summary
Functions
Perform a POST request to the API using the given payload.
Perform an HTTP request using the given method, path and body. Options are passed directly
to :hackney.request/5
.
Functions
Link to this function
post(path, body, opts \\ [])
@spec post(binary(), map(), keyword()) :: {:ok, map()} | {:error, TaxJar.Requests.Error.t()}
Perform a POST request to the API using the given payload.
When successful the response body will be decoded into a map which is returned.
Options
Options are passed to :hackney.request/5
.
Link to this function
request(method, path, body, opts \\ [])
@spec request(binary(), binary(), map(), keyword()) :: {:ok, map()} | {:error, TaxJar.Requests.Error.t()}
Perform an HTTP request using the given method, path and body. Options are passed directly
to :hackney.request/5
.