Exact.Financial.GLAccount (exact_online v0.1.0)

Copy Markdown View Source

General ledger accounts, the chart of accounts of a division.

Frequently used fields: "ID", "Code", "Description", "Type", "TypeDescription", "BalanceSide" ("D" or "C"), "BalanceType" ("B" balance sheet, "W" profit and loss).

Reference: GLAccounts

Summary

Functions

Fetches one record by its ID. See Exact.Client.get/3.

The primary key field of this resource.

The path of this resource, relative to the division.

The path of a single record, including the key predicate.

Updates a record with the given fields. See Exact.Client.put/4.

Functions

create(client, attrs, opts \\ [])

@spec create(Exact.Client.t(), map(), keyword()) ::
  {:ok, map() | nil} | {:error, Exact.Error.t()}

Creates a record. See Exact.Client.post/4.

delete(client, id, opts \\ [])

@spec delete(Exact.Client.t(), term(), keyword()) ::
  {:ok, nil} | {:error, Exact.Error.t()}

Deletes a record. See Exact.Client.delete/3.

get(client, id, opts \\ [])

@spec get(Exact.Client.t(), term(), keyword()) ::
  {:ok, map() | nil} | {:error, Exact.Error.t()}

Fetches one record by its ID. See Exact.Client.get/3.

key()

@spec key() :: String.t()

The primary key field of this resource.

list(client, opts \\ [])

@spec list(Exact.Client.t(), keyword()) ::
  {:ok, Exact.Page.t()} | {:error, Exact.Error.t()}

Fetches one page. See Exact.Client.list/3.

path()

@spec path() :: String.t()

The path of this resource, relative to the division.

path(id)

@spec path(term()) :: String.t()

The path of a single record, including the key predicate.

Useful for the endpoints this module does not wrap, such as an action or a navigation property.

stream(client, opts \\ [])

@spec stream(Exact.Client.t(), keyword()) :: Enumerable.t()

Streams every record. See Exact.Client.stream/3.

update(client, id, attrs, opts \\ [])

@spec update(Exact.Client.t(), term(), map(), keyword()) ::
  {:ok, map() | nil} | {:error, Exact.Error.t()}

Updates a record with the given fields. See Exact.Client.put/4.