FortnoxEx.Models.Supplier (FortnoxEx v0.3.0) View Source
Link to this section Summary
Functions
Creates a supplier
Deletes a supplier
Gets a supplier
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.
Updates a supplier
Link to this section Functions
Creates a supplier
Examples
iex> create_supplier(client, %{"Name" => "ACME") {:ok, %{"SupplierNumber" => "1", "Name" => "ACME"}}
iex> create_supplier(client, supplier_attrs)
Deletes a supplier
Examples
iex> delete_supplier(client, "1") :ok
iex> delete_supplier(client, "missing")
Gets a supplier
Examples
iex> get_supplier(client, "1")
iex> get_supplier(clientm "1")
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, [])
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, [])
Updates a supplier
Examples
iex> update_supplier(client, "1", %{"Name" => "Johnny"})
iex> update_supplier(clientm "1", supplier_attrs)