aman-kassa-flutter/lib/core/models/card_data.dart

32 lines
1.1 KiB
Dart

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<String, dynamic> 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<String, dynamic> toJson() =>
{
'transactionNumber': transactionNumber,
'cardExpiryDate': cardExpiryDate,
'cardNumber': cardNumber,
'transactionType': transactionType,
'cardPaymentSystemType': cardPaymentSystemType,
'authorizationCode': authorizationCode,
};
}