Sales invoices, including their lines.
Lines live in the "SalesInvoiceLines" navigation property. They are not
returned by default, so ask for them explicitly, and send them nested when
creating an invoice:
Exact.Sales.SalesInvoice.list(client, expand: ["SalesInvoiceLines"])
Exact.Sales.SalesInvoice.create(client, %{
"OrderedBy" => account_id,
"SalesInvoiceLines" => [
%{"Item" => item_id, "Quantity" => 2, "UnitPrice" => 12.50}
]
})Reference: SalesInvoices
Summary
Functions
Creates a record. See Exact.Client.post/4.
Deletes a record. See Exact.Client.delete/3.
Fetches one record by its InvoiceID. See Exact.Client.get/3.
The primary key field of this resource.
Fetches one page. See Exact.Client.list/3.
The path of this resource, relative to the division.
The path of a single record, including the key predicate.
Streams every record. See Exact.Client.stream/3.
Updates a record with the given fields. See Exact.Client.put/4.
Functions
@spec create(Exact.Client.t(), map(), keyword()) :: {:ok, map() | nil} | {:error, Exact.Error.t()}
Creates a record. See Exact.Client.post/4.
@spec delete(Exact.Client.t(), term(), keyword()) :: {:ok, nil} | {:error, Exact.Error.t()}
Deletes a record. See Exact.Client.delete/3.
@spec get(Exact.Client.t(), term(), keyword()) :: {:ok, map() | nil} | {:error, Exact.Error.t()}
Fetches one record by its InvoiceID. See Exact.Client.get/3.
@spec key() :: String.t()
The primary key field of this resource.
@spec list(Exact.Client.t(), keyword()) :: {:ok, Exact.Page.t()} | {:error, Exact.Error.t()}
Fetches one page. See Exact.Client.list/3.
@spec path() :: String.t()
The path of this resource, relative to the division.
The path of a single record, including the key predicate.
Useful for the endpoints this module does not wrap, such as an action or a navigation property.
@spec stream(Exact.Client.t(), keyword()) :: Enumerable.t()
Streams every record. See Exact.Client.stream/3.
@spec update(Exact.Client.t(), term(), map(), keyword()) :: {:ok, map() | nil} | {:error, Exact.Error.t()}
Updates a record with the given fields. See Exact.Client.put/4.