InvoiceLineItemsAPI

Provides coroutine-based and callback-based methods for managing invoice line items.

Each operation returns or delivers a pair of a nullable result and a nullable NetworkingError. Exactly one of the two will be non-null on completion.

Functions

Link copied to clipboard

Creates a new line item on the specified invoice.

Creates a new line item on the specified invoice, delivering the result via a callback.

Link copied to clipboard

Deletes a line item from the specified invoice.

Deletes a line item from the specified invoice, delivering the result via a callback.

Link copied to clipboard

Retrieves all line items belonging to the specified invoice.

Retrieves all line items belonging to the specified invoice, delivering the result via a callback.

Link copied to clipboard
suspend fun getInvoiceLineItemWith(invoiceId: String, invoiceLineItemId: String): Pair<InvoiceLineItem?, NetworkingError?>

Retrieves a single line item by its identifier from the specified invoice.

fun getInvoiceLineItemWith(invoiceId: String, invoiceLineItemId: String, completionHandler: (InvoiceLineItem?, NetworkingError?) -> Unit)

Retrieves a single line item by its identifier from the specified invoice, delivering the result via a callback.

Link copied to clipboard

Updates an existing line item on the specified invoice.

fun updateInvoiceLineItem(invoiceId: String, invoiceLineItemId: String, request: InvoiceLineItemRequests.UpdateLineItemRequest, completionHandler: (InvoiceLineItem?, NetworkingError?) -> Unit)

Updates an existing line item on the specified invoice, delivering the result via a callback.