taxjar v0.1.1 Taxjar.Query

All requests to Taxjar will be composed via a Taxjar.Query struct.

Link to this section Summary

Functions

Customize the parser to be used on the response body

Merges a map of headers into the provided Taxjar.Query

Merges a map of params into the provided Taxjar.Query

Creates a new Query struct with provided data

Link to this section Types

Link to this type action()
action() :: nil | Atom.t()
Link to this type headers()
headers() :: Map.t()
Link to this type http_method()
http_method() :: :get | :post | :put | :patch | :delete
Link to this type params()
params() :: Map.t()
Link to this type parser()
parser() :: (String.t(), action() -> Taxjar.Parser.result())
Link to this type path()
path() :: String.t()
Link to this type t()
t() :: %Taxjar.Query{action: action(), additional_headers: headers(), http_method: http_method(), params: params(), parser: parser(), path: path()}

Link to this section Functions

Link to this function customize_parser(query, parser_fun)
customize_parser(t(), parser()) :: t()

Customize the parser to be used on the response body.

Link to this function merge_headers(query, headers)
merge_headers(t(), headers()) :: t()

Merges a map of headers into the provided Taxjar.Query

Link to this function merge_params(query, params)
merge_params(t(), params()) :: t()

Merges a map of params into the provided Taxjar.Query

Link to this function new(path, method, action)
new(path(), http_method(), action()) :: t()

Creates a new Query struct with provided data

Link to this function perform(query, config)
perform(t(), Keyword.t()) :: {:ok, any()} | {:error, Taxjar.Error.t()}