Exact.System.Division (exact_online v0.1.0)

Copy Markdown View Source

The administrations the token has access to.

A division is one administration inside an Exact Online account. Every other endpoint is scoped to one, and a token can reach several, so a multi-tenant integration usually lists these once and lets the user pick.

The primary key is the integer Code, not a GUID.

Reference: Divisions

Summary

Functions

Fetches one record by its Code. 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.

Functions

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

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

Fetches one record by its Code. 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.