FortnoxEx.Models.Account (FortnoxEx v0.3.0) View Source
Link to this section Summary
Functions
Creates a account
Deletes a account
Gets a account
Gets a list of partial account objects with pagination information.
Streams a partial account objects. Will go through each page of results with a delay between page. The stream will produce a single account data object for each hit.
Updates a account
Link to this section Functions
Creates a account
Examples
iex> create_account(client, %{"Name" => "ACME") {:ok, %{"AccountNumber" => "1", "Name" => "ACME"}}
iex> create_account(client, account_attrs)
Deletes a account
Examples
iex> delete_account(client, "1") :ok
iex> delete_account(client, "missing")
Gets a account
Examples
iex> get_account(client, "1")
iex> get_account(clientm "1")
Gets a list of partial account objects with pagination information.
Examples
iex> list_accounts(client, []) {:ok, %{"@CurrentPage" => 1, "@TotalPages" => 1, "@TotalResources" => 1}, [%{"AccountNumber" => "1", "Name" => "ACME"}]}
iex> list_accounts(client, [])
Streams a partial account objects. Will go through each page of results with a delay between page. The stream will produce a single account data object for each hit.
Examples
iex> stream_accounts(client, []) stream_of_accounts
iex> stream_accounts(client, [])
Updates a account
Examples
iex> update_account(client, "1", %{"Name" => "Johnny"})
iex> update_account(clientm "1", account_attrs)