Methods
(static) this.addItem(invoiceItem, errorFunction) → {InvoiceBuilder}
Add invoice item for this invoice. You can add multiple items.
Parameters:
| Name | Type | Description |
|---|---|---|
invoiceItem |
InvoiceItem | An instance of InvoiceItem class, defined at the top. |
errorFunction |
function |
- Source:
Returns:
- Type
- InvoiceBuilder
(static) this.build(successFunction, errorFunction)
Build the invoice using the provided parameters.
Parameters:
| Name | Type | Description |
|---|---|---|
successFunction |
function | When success you will receive the Invoice object to this function |
errorFunction |
function |
- Source:
(static) this.companyName(companyName, errorFunction) → {InvoiceBuilder}
Set company name for invoice
Parameters:
| Name | Type | Description |
|---|---|---|
companyName |
string | Company name of the party this invoice is created for. |
errorFunction |
function |
- Source:
Returns:
- Type
- InvoiceBuilder
(static) this.purchaseOrderReference(reference, errorFunction) → {InvoiceBuilder}
Set a purchase order reference
Parameters:
| Name | Type | Description |
|---|---|---|
reference |
string | A unique ID string. |
errorFunction |
function |
- Source:
Returns:
- Type
- InvoiceBuilder