FortnoxEx.Models.Order (FortnoxEx v0.1.0) View Source
Link to this section Summary
Functions
Creates a order
Deletes a order
Gets a order
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.
Updates a order
Link to this section Functions
Creates a order
Examples
iex> create_order(client, %{"Name" => "ACME") {:ok, %{"DocumentNumber" => "1", "Name" => "ACME"}}
iex> create_order(client, order_attrs)
Deletes a order
Examples
iex> delete_order(client, "1") :ok
iex> delete_order(client, "missing")
Gets a order
Examples
iex> get_order(client, "1")
iex> get_order(clientm "1")
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, [])
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, [])
Updates a order
Examples
iex> update_order(client, "1", %{"Name" => "Johnny"})
iex> update_order(clientm "1", order_attrs)