toJson method

Map toJson()

Creates a json from the object

Implementation

Map toJson() {
  return {
    'id': id,
    'from': from,
    'currency': currency,
    'total_amount': totalAmount,
    'invoice_payload': invoicePayload,
    'shipping_option_id': shippingOptionId,
    'order_info': orderInfo,
  }..removeWhere((_, v) => v == null);
}