class CardData { final int transactionNumber; final String cardExpiryDate; final String cardNumber; final String transactionType; final String cardPaymentSystemType; final String authorizationCode; CardData({this.transactionNumber, this.cardExpiryDate, this.cardNumber, this.transactionType, this.cardPaymentSystemType, this.authorizationCode}); static CardData fromJson(Map json) { return json != null ? CardData( transactionNumber: json['transactionNumber'], cardExpiryDate: json['cardExpiryDate'], cardNumber: json['cardNumber'], transactionType: json['transactionType'], cardPaymentSystemType: json['cardPaymentSystemType'], authorizationCode: json['authorizationCode'], ) : null; } Map toJson() => { 'transactionNumber': transactionNumber, 'cardExpiryDate': cardExpiryDate, 'cardNumber': cardNumber, 'transactionType': transactionType, 'cardPaymentSystemType': cardPaymentSystemType, 'authorizationCode': authorizationCode, }; }