toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  return {
    'splitPaymentId': splitPaymentId,
    'totalAmountPaid': totalAmountPaid,
    'totalAmountOutstanding': totalAmountOutstanding,
    'orderTotal': orderTotal,
    'state': state,
    if (explicitTipAmount != null) 'explicitTipAmount': explicitTipAmount,
    'paymentLegs': paymentLegs.map((e) => e.toJson()).toList(),
    if (lastRefundId != null) 'lastRefundId': lastRefundId,
  };
}