Class: Invoices

Invoices()

An Library for Creating Invoices

Constructor

new Invoices()

Source:

Methods

AddLineItem(invoiceId, accountId, description, taxes, quantity, price) → {Promise}

Parameters:
Name Type Description
invoiceId string
accountId string
description string
taxes object
quantity number
price number
Source:
Returns:
lineNumber Promise will resolve to type number.
Type
Promise

ChangeInvoice(invoiceId, clientId, invoiceNumber, date, dueDate, notes)

Parameters:
Name Type Description
invoiceId string
clientId string
invoiceNumber string
date string
dueDate string
notes string
Source:

ChangeLineItem(invoiceId, lineNumber, accountId, description, taxes, quantity, price)

Parameters:
Name Type Description
invoiceId string
lineNumber number
accountId string
description string
taxes object
quantity number
price number
Source:

CreateInvoice(clientId, invoiceNumber, date, dueDate, notes) → {Promise}

Create a new invoice
Parameters:
Name Type Description
clientId string
invoiceNumber string
date string
dueDate string
notes string
Source:
Returns:
New invoice id Promise will resolve to type string.
Type
Promise

DeleteInvoice(invoiceId)

Delete an invoice
Parameters:
Name Type Description
invoiceId string
Source:

FindInvoiceByNumber(invoiceNumber) → {Promise}

Returns the Invoice ID or null
Parameters:
Name Type Description
invoiceNumber string
Source:
Returns:
Promise will resolve to type mixed.
Type
Promise

GetAllInvoices(page, perpage) → {Promise}

Parameters:
Name Type Description
page number
perpage number
Source:
Returns:
Promise will resolve to type array.
Type
Promise

GetInvoicesByClient(clientId) → {Promise}

Parameters:
Name Type Description
clientId string
Source:
Returns:
Promise will resolve to type array.
Type
Promise

GetInvoiceSummary(invoiceId) → {Promise}

Parameters:
Name Type Description
invoiceId string
Source:
Returns:
Promise will resolve to type object.
Type
Promise

GetLineItems(invoiceId) → {Promise}

Parameters:
Name Type Description
invoiceId string
Source:
Returns:
Line items for invoice Promise will resolve to type array.
Type
Promise

RemoveLineItem(invoiceId, lineNumber)

Parameters:
Name Type Description
invoiceId string
lineNumber number
Source: