FortnoxEx.Models.Currency (FortnoxEx v0.3.0) View Source
Link to this section Summary
Functions
Creates a currency
Deletes a currency
Gets a currency
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.
Updates a currency
Link to this section Functions
Creates a currency
Examples
iex> create_currency(client, %{"Name" => "ACME") {:ok, %{"CurrencyNumber" => "1", "Name" => "ACME"}}
iex> create_currency(client, currency_attrs)
Deletes a currency
Examples
iex> delete_currency(client, "1") :ok
iex> delete_currency(client, "missing")
Gets a currency
Examples
iex> get_currency(client, "1")
iex> get_currency(clientm "1")
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, [])
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, [])
Updates a currency
Examples
iex> update_currency(client, "1", %{"Name" => "Johnny"})
iex> update_currency(clientm "1", currency_attrs)