Locks the invoice’s line items, calculates taxes and totals, and changes status
from draft
to open
, making the invoice ready for payment.
ID of the draft invoice to finalize.
Returns the Invoice object with status updated to open, line-items locked, and amount_due computed. Raises an error if the invoice is already finalized, void, or paid.