Update() [InvoiceManager]

Update an existing invoice

Description

Updates an existing invoice.

Package Details

Interface

IInvoiceManager

Syntax

await invoiceManager.Update(updatedInvoice);

Returns

Task<Invoice>

API

PUT
/api/v1/invoices/

Parameters

Parameter

Description

Parameter Type

Parameter

Description

Parameter Type

invoice

invoice

request body

Sample request body

{ "Id": 0, "ServiceRequestId": 0, "Number": "string", "PaymentReferenceNumber": "string", "Amount": 0, "Date": "2020-01-01" }

Returns

200 OK - Invoice

Example

//get the invoice by number. var invoice = await _invoiceManager.GetByNumber(invoiceNumber); // or, get the new invoice by payment reference. var invoice = await _invoiceManager.GetByPaymentReference(paymentReferenceNumber); //update any of the properties. invoice.Amount = 499.99M; await _invoiceManager.Update(invoice);