BexioApiClient.Accounting (bexio_api_client v0.2.0)

Bexio API for the accounting part of the API.

Link to this section Summary

Functions

Fetch a list of account groups.

Fetch a list of accounts.

Fetch a list of calendar years.

Fetch a list of currencies.

Fetch a list of currency exchange rates.

Search accounts via query. The following search fields are supported

Link to this section Functions

Link to this function

fetch_account_groups(client, opts \\ [])

@spec fetch_account_groups(
  client :: Tesla.Client.t(),
  opts :: [BexioApiClient.GlobalArguments.offset_without_order_by_arg()]
) :: {:ok, [BexioApiClient.Accounting.AccountGroup.t()]} | {:error, any()}

Fetch a list of account groups.

Link to this function

fetch_accounts(client, opts \\ [])

@spec fetch_accounts(
  client :: Tesla.Client.t(),
  opts :: [BexioApiClient.GlobalArguments.offset_without_order_by_arg()]
) :: {:ok, [BexioApiClient.Accounting.Account.t()]} | {:error, any()}

Fetch a list of accounts.

Link to this function

fetch_calendar_years(client, opts \\ [])

@spec fetch_calendar_years(
  client :: Tesla.Client.t(),
  opts :: [BexioApiClient.GlobalArguments.offset_without_order_by_arg()]
) :: {:ok, [BexioApiClient.Accounting.CalendarYear.t()]} | {:error, any()}

Fetch a list of calendar years.

Link to this function

fetch_currencies(client, opts \\ [])

@spec fetch_currencies(
  client :: Tesla.Client.t(),
  opts :: [BexioApiClient.GlobalArguments.offset_without_order_by_arg()]
) :: {:ok, [BexioApiClient.Accounting.Currency.t()]} | {:error, any()}

Fetch a list of currencies.

Link to this function

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

@spec fetch_exchange_rates(
  client :: Tesla.Client.t(),
  id :: integer(),
  opts :: [BexioApiClient.GlobalArguments.offset_without_order_by_arg()]
) :: {:ok, [BexioApiClient.Accounting.Currency.t()]} | {:error, any()}

Fetch a list of currency exchange rates.

Link to this function

fetch_taxes(client, date \\ nil, types \\ nil, opts \\ [])

@spec fetch_taxes(
  client :: Tesla.Client.t(),
  date :: Date.t() | nil,
  types :: :sales_tax | :pre_tax | nil,
  opts :: [BexioApiClient.GlobalArguments.offset_without_order_by_arg()]
) :: {:ok, [BexioApiClient.Accounting.Tax.t()]} | {:error, any()}

Fetch a list of taxes.

Arguments:

  • date - all taxes which are active at the date given
  • types - filter the types of tax (:sales_tax or :pre_tax)
Link to this function

search_accounts(client, criteria, opts \\ [])

@spec search_accounts(
  client :: Tesla.Client.t(),
  criteria :: [BexioApiClient.SearchCriteria.t()],
  opts :: [BexioApiClient.GlobalArguments.offset_without_order_by_arg()]
) :: {:ok, [BexioApiClient.Accounting.Account.t()]} | {:error, any()}

Search accounts via query. The following search fields are supported:

  • account_no
  • fibo_account_group_id (TODO: test this)
  • name
  • account_type