accounting v0.11.0 Accounting.Adapter behaviour

A behaviour module for implementing the adapter for a particular journal.

Link to this section Summary

Link to this section Callbacks

Link to this callback child_spec(keyword)
child_spec(keyword) :: Supervisor.child_spec
Link to this callback fetch_accounts(arg0, list, timeout)
fetch_accounts(Accounting.Journal.id, [account_number], timeout) ::
  {:ok, Accounting.Journal.accounts} |
  {:error, term}
Link to this callback list_accounts(arg0, timeout)
list_accounts(Accounting.Journal.id, timeout) ::
  {:ok, [account_number]} |
  {:error, term}
Link to this callback record_entries(arg0, list, timeout)
record_entries(Accounting.Journal.id, [Accounting.Entry.t, ...], timeout) ::
  :ok |
  {:error, [Accounting.Entry.Error.t] | term}
Link to this callback record_invoices(arg0, list, timeout)
record_invoices(Accounting.Journal.id, [Accounting.Entry.t, ...], timeout) ::
  :ok |
  {:error, [Accounting.Entry.Error.t] | term}
Link to this callback register_account(arg0, account_number, arg2, timeout)
register_account(Accounting.Journal.id, account_number, String.t, timeout) ::
  :ok |
  {:error, term}
Link to this callback register_categories(arg0, list, timeout)
register_categories(Accounting.Journal.id, [atom], timeout) ::
  :ok |
  {:error, term}
Link to this callback setup_account_conversions(arg0, .., pos_integer, list, timeout)
setup_account_conversions(Accounting.Journal.id, 1..12, pos_integer, [Accounting.Account.setup, ...], timeout) ::
  :ok |
  {:error, term}
Link to this callback setup_accounts(arg0, list, timeout)
setup_accounts(Accounting.Journal.id, [Accounting.Account.setup, ...], timeout) ::
  :ok |
  {:error, term}
Link to this callback start_link(opts)
start_link(opts :: any) :: Supervisor.on_start