Codat.Expenses.TrackingCategories (codat v1.0.0)

Copy Markdown View Source

Read tracking categories (departments, projects) for the Expenses API.

Summary

Functions

fetch_all(client_or_company_id, company_id_or_opts \\ [], opts \\ [])

@spec fetch_all(Codat.Client.t() | String.t(), String.t() | keyword(), keyword()) ::
  {:ok, [map()]} | {:error, Codat.Error.t()}

Fetches all trackingCategories across all pages concurrently.

get(client_or_company_id, company_or_resource_id, resource_id_or_opts \\ [])

@spec get(Codat.Client.t() | String.t(), String.t(), String.t() | keyword()) ::
  {:ok, map()} | {:error, Codat.Error.t()}

Fetches a single trackingCategories by ID.

list(client_or_company_id, company_id_or_opts \\ [], opts \\ [])

@spec list(Codat.Client.t() | String.t(), String.t() | keyword(), keyword()) ::
  {:ok, Codat.Pagination.t()} | {:error, Codat.Error.t()}

Returns a paginated list of trackingCategories.

stream(client_or_company_id, company_id_or_opts \\ [], opts \\ [])

@spec stream(Codat.Client.t() | String.t(), String.t() | keyword(), keyword()) ::
  Enumerable.t()

Returns a lazy Stream of all results.