toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() => {
      'status': status.wire,
      'requestIdempotencyKey': requestIdempotencyKey,
      if (referenceId != null) 'referenceId': referenceId,
      if (transactionId != null) 'transactionId': transactionId,
      'amountMinorUnits': amountMinorUnits,
      'currency': currency,
      'entryMode': entryMode.wire,
      if (card != null) 'card': card!.toJson(),
      if (gatewayResponse != null) 'gatewayResponse': gatewayResponse!.toJson(),
      if (error != null) 'error': error!.toJson(),
      'completedAt': completedAt.toUtc().toIso8601String(),
    };