toJSON method

Map<String, dynamic> toJSON()

Implementation

Map<String, dynamic> toJSON() {
  return <String, dynamic>{
    'id': id,
    'userId': userId,
    'userEmail': userEmail,
    'userName': userName,
    'userPhone': userPhone,
    'type': type,
    'invoiceId': invoiceId,
    'subscriptionId': subscriptionId,
    'amount': amount,
    'currency': currency,
    'attemptNumber': attemptNumber,
    'whatsappSent': whatsappSent,
    'whatsappMessageId': whatsappMessageId,
    'escalationLevel': escalationLevel,
    'createdAt': createdAt,
    // v2
    'failureReason': failureReason,
    'failureMessage': failureMessage,
    'paymentMethodBrand': paymentMethodBrand,
    'paymentMethodLast4': paymentMethodLast4,
    'planName': planName,
    'nextRetryDate': nextRetryDate,
  };
}