Scale Intelligence■ Docs
Docs / The model / Invoice

Invoice.

One invoice: the lines by kind of usage from the metered rows, the fee, the amount recomputed from the record, the provider's id and the state

Figure 1Invoicespecified
INVOICEfact at tenant scopeperiodWindowkind, quantity, price, amountlines[json]feemoneyrecomputed from the rowsamountmoneycurrencytextprovider_invoice_idtextoptionalstateenum:draft|issued|paid|fa…WINDOWthrough period
Invoice is a fact at tenant scope. The drawing shows its fields and the objects that they point at.
kind
fact
scope
tenant
key
the tenant and the period
store
postgres
family
operations

Fields#

fieldtyperequirednote
periodWindowyes
lines[json]yeskind, quantity, price, amount
feemoneyyes
amountmoneyyesrecomputed from the rows
currencytextyes
provider_invoice_idtextno
stateone of draft | issued | paid | failed | voidyes

Routes that use it#

No route takes or returns Invoice directly. The record holds it, and the objects that point at it reach it.