Read and write the chart of accounts (GL accounts).
Accounts are the building blocks of accounting — every transaction maps to one or more
accounts. Use list/2,3 to fetch the chart of accounts for a company.
Account Types
| Type | Subtypes |
|---|---|
Asset | Current, NonCurrent, Fixed |
Liability | Current, NonCurrent |
Equity | CommonStock, RetainedEarnings, OpeningBalanceEquity |
Income | Operating, NonOperating |
Expense | Operating, NonOperating, Depreciation, CostOfSales |
Summary
Functions
Creates a new accounts (async). Returns a push operation.
Deletes a accounts by ID (async).
Fetches all accounts across all pages concurrently.
Fetches a single accounts by ID.
Returns the push model for creating accounts.
Returns the push model for updating a accounts record.
Returns a paginated list of accounts.
Returns a lazy Stream of all results.
Updates an existing accounts (async).
Functions
@spec create( Codat.Client.t() | String.t(), String.t(), String.t() | map(), map() | keyword() ) :: {:ok, map()} | {:error, Codat.Error.t()}
Creates a new accounts (async). Returns a push operation.
@spec delete(Codat.Client.t() | String.t(), String.t(), String.t() | keyword()) :: {:ok, nil} | {:error, Codat.Error.t()}
Deletes a accounts by ID (async).
@spec fetch_all(Codat.Client.t() | String.t(), String.t() | keyword(), keyword()) :: {:ok, [map()]} | {:error, Codat.Error.t()}
Fetches all accounts across all pages concurrently.
@spec get(Codat.Client.t() | String.t(), String.t(), String.t() | keyword()) :: {:ok, map()} | {:error, Codat.Error.t()}
Fetches a single accounts by ID.
@spec get_create_model(Codat.Client.t() | String.t(), String.t(), keyword()) :: {:ok, map()} | {:error, Codat.Error.t()}
Returns the push model for creating accounts.
@spec get_update_model( Codat.Client.t() | String.t(), String.t(), String.t() | keyword(), keyword() ) :: {:ok, map()} | {:error, Codat.Error.t()}
Returns the push model for updating a accounts record.
@spec list(Codat.Client.t() | String.t(), String.t() | keyword(), keyword()) :: {:ok, Codat.Pagination.t()} | {:error, Codat.Error.t()}
Returns a paginated list of accounts.
@spec stream(Codat.Client.t() | String.t(), String.t() | keyword(), keyword()) :: Enumerable.t()
Returns a lazy Stream of all results.
@spec update( Codat.Client.t() | String.t(), String.t(), String.t(), String.t() | map(), map() | keyword() ) :: {:ok, map()} | {:error, Codat.Error.t()}
Updates an existing accounts (async).