toJson method

  1. @override
Map<String, Object?> toJson()

Implementation

@override
Map<String, Object?> toJson() => {
      if (paymentMethodType != null)
        "payment_method_type": encodeValue(paymentMethodType),
      if (paymentMethodId != null)
        "payment_method_id": encodeValue(paymentMethodId),
      if (reference != null) "reference": encodeValue(reference),
      if (error != null) "error": encodeValue(error),
      "status": encodeValue(status),
      "initiated_at": encodeValue(initiatedAt),
      if (succeededAt != null) "succeeded_at": encodeValue(succeededAt),
    };