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

Link to this section Summary

Functions

Gets a list of partial supplier objects with pagination information.

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

Link to this section Functions

Link to this function

create_supplier(client, supplier_data)

View Source

Creates a supplier

Examples

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

iex> create_supplier(client, supplier_attrs)

Link to this function

delete_supplier(client, supplier_number)

View Source

Deletes a supplier

Examples

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

iex> delete_supplier(client, "missing")

Link to this function

get_supplier(client, supplier_number)

View Source

Gets a supplier

Examples

iex> get_supplier(client, "1")

iex> get_supplier(clientm "1")

Link to this function

list_suppliers(client, query)

View Source

Gets a list of partial supplier objects with pagination information.

Examples

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

iex> list_suppliers(client, [])

Link to this function

stream_suppliers(client, query)

View Source

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

Examples

iex> stream_suppliers(client, []) stream_of_suppliers

iex> stream_suppliers(client, [])

Link to this function

update_supplier(client, supplier_number, supplier_data)

View Source

Updates a supplier

Examples

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

iex> update_supplier(clientm "1", supplier_attrs)