getInvoiceWith

suspend fun getInvoiceWith(invoiceId: String): Pair<Invoice?, NetworkingError?>

Retrieves a single invoice by its identifier.

Return

A pair containing the matching Invoice on success, or a NetworkingError on failure.

Parameters

invoiceId

The unique identifier of the invoice to retrieve.


fun getInvoiceWith(invoiceId: String, completionHandler: (Invoice?, NetworkingError?) -> Unit)

Retrieves a single invoice by its identifier and delivers the result via a callback.

Parameters

invoiceId

The unique identifier of the invoice to retrieve.

completionHandler

Invoked on completion with the matching Invoice on success, or a NetworkingError on failure.