create Invoice
suspend fun createInvoice(request: InvoiceRequests.CreateInvoiceRequest): Pair<Invoice?, NetworkingError?>
Creates a new invoice.
Return
A pair containing the created Invoice on success, or a NetworkingError on failure.
Parameters
request
The parameters for the invoice to create.
fun createInvoice(request: InvoiceRequests.CreateInvoiceRequest, completionHandler: (Invoice?, NetworkingError?) -> Unit)
Creates a new invoice and delivers the result via a callback.
Parameters
request
The parameters for the invoice to create.
completion Handler
Invoked on completion with the created Invoice on success, or a NetworkingError on failure.