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

Link to this section Summary

Functions

Gets a list of partial price_list objects with pagination information.

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

Link to this section Functions

Link to this function

create_price_list(client, price_list_data)

View Source

Creates a price_list

Examples

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

iex> create_price_list(client, price_list_attrs)

Link to this function

delete_price_list(client, price_list_number)

View Source

Deletes a price_list

Examples

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

iex> delete_price_list(client, "missing")

Link to this function

get_price_list(client, price_list_number)

View Source

Gets a price_list

Examples

iex> get_price_list(client, "1")

iex> get_price_list(clientm "1")

Link to this function

list_price_lists(client, query)

View Source

Gets a list of partial price_list objects with pagination information.

Examples

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

iex> list_price_lists(client, [])

Link to this function

stream_price_lists(client, query)

View Source

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

Examples

iex> stream_price_lists(client, []) stream_of_price_lists

iex> stream_price_lists(client, [])

Link to this function

update_price_list(client, price_list_number, price_list_data)

View Source

Updates a price_list

Examples

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

iex> update_price_list(clientm "1", price_list_attrs)