Invoice .update
PATCH /{namespace}/invoices/{id}
Changes the given properties of an Invoice.
- Noun
- Invoice
- Mode
do- Event
Invoice.updated
Update changes the given properties of an Invoice. It is inherited: every Noun has get, list, create, update and delete.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
id | string | required | The id of the Invoice. |
total | money | The amount due. | |
due | date | When payment is due. | |
paidAt | datetime | When it was paid. | |
collection | string | charge charges the saved payment method; send sends the Invoice and waits for a transfer. charge by default. | |
terms | integer | Days from issue until a send Invoice is due, such as 30; sets due. | |
purchaseOrder | string | The Customer’s purchase order number, printed on the Invoice. | |
refunded | money | The total returned to the Customer, from zero up to the amount paid. | |
number | string | The Invoice number, sequential per Startup and never reused, voided Invoices included. | |
lines | json | Each Offer billed: its quantity, Period and amount, with any Coupon or Credit Grant applied. | |
pdf | url | The Invoice, or its receipt once paid, as a PDF on the Startup’s Domain that names the seller of record. | |
payUrl | url | The page on the Startup’s Domain where the Customer pays it by card or bank transfer. |
Outputs
| Output | Type | Required | Description |
|---|---|---|---|
invoice | Invoice | required | The Invoice. |
Effects
- Emits
Invoice.updated. - Two-way:
try,send,do.
Refuses when
| Check | Error | Fix | Then call |
|---|---|---|---|
| The key is valid, but its scopes do not allow this operation. | forbidden | Use a key whose scopes cover the operation, or ask an owner of the namespace to grant them. | Invoice.update |
When it waits
| Gate | Default |
|---|---|
| Decision class | Low: two-way, nothing at stake |
| Delay window | None: it runs once review passes. |
| Limit | The call Limit of the Permission it runs under. |
| Over the Limit | It waits pending for an Approval from the Founder. Approved, it runs; refused, it ends refused with limit-exceeded; unanswered by its deadline, it ends canceled. |