FortnoxEx.Models.Order (FortnoxEx v0.1.0) View Source

Link to this section Summary

Functions

Gets a list of partial order objects with pagination information.

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

Link to this section Functions

Link to this function

create_order(client, order_data)

View Source

Creates a order

Examples

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

iex> create_order(client, order_attrs)

Link to this function

delete_order(client, order_number)

View Source

Deletes a order

Examples

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

iex> delete_order(client, "missing")

Link to this function

get_order(client, order_number)

View Source

Gets a order

Examples

iex> get_order(client, "1")

iex> get_order(clientm "1")

Link to this function

list_orders(client, query)

View Source

Gets a list of partial order objects with pagination information.

Examples

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

iex> list_orders(client, [])

Link to this function

stream_orders(client, query)

View Source

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

Examples

iex> stream_orders(client, []) stream_of_orders

iex> stream_orders(client, [])

Link to this function

update_order(client, order_number, order_data)

View Source

Updates a order

Examples

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

iex> update_order(clientm "1", order_attrs)