TaxJar (tax_jar v0.1.1)

Interact with TaxJar's API.

Configuration

To be able to use this successfully you need to configure the required values.

  • :api_key - The 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".
  • :mode - (Optional) You can explicitly specify the mode as :production or :sandbox. The default is :sandbox. This will also control which url is used.

Summary

Functions

Link to this function

fetch_env!(key)

@spec fetch_env!(atom()) :: any()
@spec get_api_key() :: binary()
Link to this function

get_api_version()

@spec get_api_version() :: binary()
Link to this function

get_env(key, default \\ nil)

@spec get_env(atom(), any()) :: any()
@spec get_mode() :: :sandbox | :production
Link to this function

get_sales_tax_for_order(payload)

See TaxJar.Requests.get_sales_tax_for_order/1.

Link to this function

put_env(key, value, opts \\ [])