FortnoxEx.Models.Currency (FortnoxEx v0.3.0) View Source

Link to this section Summary

Functions

Gets a list of partial currency objects with pagination information.

Streams a partial currency objects. Will go through each page of results with a delay between page. The stream will produce a single currency data object for each hit.

Link to this section Functions

Link to this function

create_currency(client, currency_data)

View Source

Creates a currency

Examples

iex> create_currency(client, %{"Name" => "ACME") {:ok, %{"CurrencyNumber" => "1", "Name" => "ACME"}}

iex> create_currency(client, currency_attrs)

Link to this function

delete_currency(client, currency_number)

View Source

Deletes a currency

Examples

iex> delete_currency(client, "1") :ok

iex> delete_currency(client, "missing")

Link to this function

get_currency(client, currency_number)

View Source

Gets a currency

Examples

iex> get_currency(client, "1")

iex> get_currency(clientm "1")

Link to this function

list_currencys(client, query)

View Source

Gets a list of partial currency objects with pagination information.

Examples

iex> list_currencys(client, []) {:ok, %{"@CurrentPage" => 1, "@TotalPages" => 1, "@TotalResources" => 1}, [%{"CurrencyNumber" => "1", "Name" => "ACME"}]}

iex> list_currencys(client, [])

Link to this function

stream_currencys(client, query)

View Source

Streams a partial currency objects. Will go through each page of results with a delay between page. The stream will produce a single currency data object for each hit.

Examples

iex> stream_currencys(client, []) stream_of_currencys

iex> stream_currencys(client, [])

Link to this function

update_currency(client, currency_number, currency_data)

View Source

Updates a currency

Examples

iex> update_currency(client, "1", %{"Name" => "Johnny"})

iex> update_currency(clientm "1", currency_attrs)