Production-grade Elixir client for the Codat API.
Quick Start
client = Codat.client()
{:ok, company} = Codat.Platform.Companies.create(client, %{name: "Acme Corp"})
redirect_to(company["redirect"])
{:ok, page} = Codat.Accounting.Invoices.list(client, company["id"])Configuration
config :codat,
api_key: System.get_env("CODAT_API_KEY"),
http_timeout: 30_000,
max_retries: 3
Summary
Functions
Creates a %Codat.Client{} using application config and environment.
Creates a %Codat.Client{} with the given options.
Returns the current application configuration.
Returns the version of the codat hex package.
Functions
@spec client() :: Codat.Client.t()
Creates a %Codat.Client{} using application config and environment.
@spec client(keyword()) :: Codat.Client.t()
Creates a %Codat.Client{} with the given options.
@spec config() :: Codat.Config.t()
Returns the current application configuration.
@spec version() :: String.t()
Returns the version of the codat hex package.