toJson method

Map<String, dynamic> toJson()

Converts the InvoiceTotal instance into a JSON map.

This method generates a map representation of the invoice total, which can be used for serializing the object into JSON format for APIs or storage. Example:

{
  "subtotal": 100.00,
  "vatAmount": 15.00,
  "grandTotal": 115.00
}

Implementation

Map<String, dynamic> toJson() => {
      "subtotal": subtotal,
      "vatAmount": vatAmount,
      "grandTotal": grandTotal,
    };