FortnoxEx.Models.Invoice (FortnoxEx v0.1.0) View Source
Link to this section Summary
Functions
Creates a invoice
Deletes a invoice
Gets a invoice
Gets a list of partial invoice objects with pagination information.
Streams a partial invoice objects. Will go through each page of results with a delay between page. The stream will produce a single invoice data object for each hit.
Updates a invoice
Link to this section Functions
Creates a invoice
Examples
iex> create_invoice(client, %{"Name" => "ACME") {:ok, %{"DocumentNumber" => "1", "Name" => "ACME"}}
iex> create_invoice(client, invoice_attrs)
Deletes a invoice
Examples
iex> delete_invoice(client, "1") :ok
iex> delete_invoice(client, "missing")
Gets a invoice
Examples
iex> get_invoice(client, "1")
iex> get_invoice(clientm "1")
Gets a list of partial invoice objects with pagination information.
Examples
iex> list_invoices(client, []) {:ok, %{"@CurrentPage" => 1, "@TotalPages" => 1, "@TotalResources" => 1}, [%{"DocumentNumber" => "1", "Name" => "ACME"}]}
iex> list_invoices(client, [])
Streams a partial invoice objects. Will go through each page of results with a delay between page. The stream will produce a single invoice data object for each hit.
Examples
iex> stream_invoices(client, []) stream_of_invoices
iex> stream_invoices(client, [])
Updates a invoice
Examples
iex> update_invoice(client, "1", %{"Name" => "Johnny"})
iex> update_invoice(clientm "1", invoice_attrs)