class CardData {
  final int? transactionNumber;
  final int? operationDay;
  final int? terminalId;
  final String? cardNumber;
  final String? cardholderName;
  final String? authorizationCode;
  final String? transactionType;

  CardData({this.transactionNumber, this.operationDay, this.cardNumber, this.cardholderName,  this.authorizationCode, this.terminalId, this.transactionType });

  static CardData? fromJson(Map<String, dynamic>? json) {
    return json != null ?
    CardData(
      transactionNumber: json['transactionNumber'],
      operationDay: json['operationDay'],
      terminalId: json['terminalId'],
      cardNumber: json['cardNumber'],
      cardholderName: json['cardholderName'],
      authorizationCode: json['authorizationCode'],
      transactionType: json['transactionType'],
    )
    : null;
  }
  Map<String, dynamic> toJson() =>
      {
        'transactionNumber': transactionNumber,
        'operationDay': operationDay,
        'cardNumber': cardNumber,
        'cardholderName': cardholderName,
        'authorizationCode': authorizationCode,
        'terminalId' : terminalId,
        'transactionType' : transactionType,
      };
}