You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
diplomatic-quarter/lib/core/model/pharmacies/PointsDetails.dart

58 lines
1.8 KiB
Dart

4 years ago
class PointsDetails {
int accNumber;
String accountStatus;
double amount;
int lineItemNo;
String operationType;
double points;
double purchasePoints;
int subTransactionType;
String subTransactionTypeDescription;
String transactionDate;
PointsDetails(
{this.accNumber,
this.accountStatus,
this.amount,
this.lineItemNo,
this.operationType,
this.points,
this.purchasePoints,
this.subTransactionType,
this.subTransactionTypeDescription,
this.transactionDate});
PointsDetails.fromJson(Map<String, dynamic> json) {
accNumber = json['AccNumber'];
accountStatus = json['AccountStatus'];
amount = json['Amount'];
lineItemNo = json['LineItemNo'];
operationType = json['OperationType'];
points = json['Points'];
var purchasePoints = json['PurchasePoints'];
if(purchasePoints is int){
this.purchasePoints = (purchasePoints).roundToDouble();
}else {
this.purchasePoints = purchasePoints;
}
subTransactionType = json['SubTransactionType'];
subTransactionTypeDescription = json['SubTransactionTypeDescription'];
transactionDate = json['TransactionDate'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['AccNumber'] = this.accNumber;
data['AccountStatus'] = this.accountStatus;
data['Amount'] = this.amount;
data['LineItemNo'] = this.lineItemNo;
data['OperationType'] = this.operationType;
data['Points'] = this.points;
data['PurchasePoints'] = this.purchasePoints;
data['SubTransactionType'] = this.subTransactionType;
data['SubTransactionTypeDescription'] = this.subTransactionTypeDescription;
data['TransactionDate'] = this.transactionDate;
return data;
}
}