import 'PointsAmountPerYear.dart';
import 'PointsDetails.dart';

class LakumInquiryInformationObjVersion {
  num accountNumber;
  String accountStatus;
  String barCode;
  num consumedPoints;
  String consumedPointsAmount;
  List<PointsAmountPerYear> consumedPointsAmountPerYear;
  List<PointsDetails> consumedPointsDetails;
  String createdDate;
  num expiredPoints;
  String expiryDate;
  num gainedPoints;
  num gainedPointsAmount;
  List<PointsAmountPerYear> gainedPointsAmountPerYear;
  List<PointsDetails> gainedPointsDetails;
  String lakumMessageStatus;
  String memberName;
  String memberUniversalId;
  String mobileNumber;
  num pointsBalance;
  num pointsBalanceAmount;
  num pointsWillBeExpired;
  String prefLang;
  num statusCode;
  num transferPoints;
  List<PointsAmountPerYear> transferPointsAmountPerYear;
  List<PointsDetails> transferPointsDetails;
  dynamic waitingPoints;
  dynamic loyalityAmount;
  dynamic loyalityPoints;
  num purchaseRate;

  LakumInquiryInformationObjVersion(
      {this.accountNumber,
        this.accountStatus,
        this.barCode,
        this.consumedPoints,
        this.consumedPointsAmount,
        this.consumedPointsAmountPerYear,
        this.consumedPointsDetails,
        this.createdDate,
        this.expiredPoints,
        this.expiryDate,
        this.gainedPoints,
        this.gainedPointsAmount,
        this.gainedPointsAmountPerYear,
        this.gainedPointsDetails,
        this.lakumMessageStatus,
        this.memberName,
        this.memberUniversalId,
        this.mobileNumber,
        this.pointsBalance,
        this.pointsBalanceAmount,
        this.pointsWillBeExpired,
        this.prefLang,
        this.statusCode,
        this.transferPoints,
        this.transferPointsAmountPerYear,
        this.transferPointsDetails,
        this.waitingPoints,
        this.loyalityAmount,
        this.loyalityPoints,
        this.purchaseRate});

  LakumInquiryInformationObjVersion.fromJson(Map<String, dynamic> json) {
    accountNumber = json['AccountNumber'];
    accountStatus = json['AccountStatus'];
    barCode = json['BarCode'];
    consumedPoints = json['ConsumedPoints'];
    consumedPointsAmount = json['ConsumedPointsAmount'];
    if (json['ConsumedPointsAmountPerYear'] != null) {
      consumedPointsAmountPerYear = new List<PointsAmountPerYear>();
      json['ConsumedPointsAmountPerYear'].forEach((v) {
        consumedPointsAmountPerYear.add(PointsAmountPerYear.fromJson(v));
      });
    }
    if (json['ConsumedPointsDetails'] != null) {
      consumedPointsDetails = new List<PointsDetails>();
      json['ConsumedPointsDetails'].forEach((v) {
        consumedPointsDetails.add(PointsDetails.fromJson(v));
      });
    }
    createdDate = json['CreatedDate'];
    expiredPoints = json['ExpiredPoints'];
    expiryDate = json['ExpiryDate'];
    gainedPoints = json['GainedPoints'];
    gainedPointsAmount = json['GainedPointsAmount'];
    if (json['GainedPointsAmountPerYear'] != null) {
      gainedPointsAmountPerYear = new List<PointsAmountPerYear>();
      json['GainedPointsAmountPerYear'].forEach((v) {
        gainedPointsAmountPerYear.add(PointsAmountPerYear.fromJson(v));
      });
    }
    if (json['GainedPointsDetails'] != null) {
      gainedPointsDetails = new List<PointsDetails>();
      json['GainedPointsDetails'].forEach((v) {
        gainedPointsDetails.add(PointsDetails.fromJson(v));
      });
    }
    lakumMessageStatus = json['LakumMessageStatus'];
    memberName = json['MemberName'];
    memberUniversalId = json['MemberUniversalId'];
    mobileNumber = json['MobileNumber'];
    pointsBalance = json['PointsBalance'];
    pointsBalanceAmount = json['PointsBalanceAmount'];
    pointsWillBeExpired = json['PointsWillBeExpired'];
    prefLang = json['PrefLang'];
    statusCode = json['StatusCode'];
    transferPoints = json['TransferPoints'];
    if (json['TransferPointsAmountPerYear'] != null) {
      transferPointsAmountPerYear = new List<PointsAmountPerYear>();
      json['TransferPointsAmountPerYear'].forEach((v) {
        transferPointsAmountPerYear.add(PointsAmountPerYear.fromJson(v));
      });
    }
    if (json['TransferPointsDetails'] != null) {
      transferPointsDetails = new List<PointsDetails>();
      json['TransferPointsDetails'].forEach((v) {
        transferPointsDetails.add(PointsDetails.fromJson(v));
      });
    }
    waitingPoints = json['WaitingPoints'];
    loyalityAmount = json['loyalityAmount'];
    loyalityPoints = json['loyalityPoints'];
    purchaseRate = json['purchaseRate'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['AccountNumber'] = this.accountNumber;
    data['AccountStatus'] = this.accountStatus;
    data['BarCode'] = this.barCode;
    data['ConsumedPoints'] = this.consumedPoints;
    data['ConsumedPointsAmount'] = this.consumedPointsAmount;
    if (this.consumedPointsAmountPerYear != null) {
      data['ConsumedPointsAmountPerYear'] =
          this.consumedPointsAmountPerYear.map((v) => v).toList();
    }
    if (this.consumedPointsDetails != null) {
      data['ConsumedPointsDetails'] =
          this.consumedPointsDetails.map((v) => v).toList();
    }
    data['CreatedDate'] = this.createdDate;
    data['ExpiredPoints'] = this.expiredPoints;
    data['ExpiryDate'] = this.expiryDate;
    data['GainedPoints'] = this.gainedPoints;
    data['GainedPointsAmount'] = this.gainedPointsAmount;
    if (this.gainedPointsAmountPerYear != null) {
      data['GainedPointsAmountPerYear'] =
          this.gainedPointsAmountPerYear.map((v) => v).toList();
    }
    if (this.gainedPointsDetails != null) {
      data['GainedPointsDetails'] =
          this.gainedPointsDetails.map((v) => v).toList();
    }
    data['LakumMessageStatus'] = this.lakumMessageStatus;
    data['MemberName'] = this.memberName;
    data['MemberUniversalId'] = this.memberUniversalId;
    data['MobileNumber'] = this.mobileNumber;
    data['PointsBalance'] = this.pointsBalance;
    data['PointsBalanceAmount'] = this.pointsBalanceAmount;
    data['PointsWillBeExpired'] = this.pointsWillBeExpired;
    data['PrefLang'] = this.prefLang;
    data['StatusCode'] = this.statusCode;
    data['TransferPoints'] = this.transferPoints;
    if (this.transferPointsAmountPerYear != null) {
      data['TransferPointsAmountPerYear'] =
          this.transferPointsAmountPerYear.map((v) => v).toList();
    }
    if (this.transferPointsDetails != null) {
      data['TransferPointsDetails'] =
          this.transferPointsDetails.map((v) => v).toList();
    }
    data['WaitingPoints'] = this.waitingPoints;
    data['loyalityAmount'] = this.loyalityAmount;
    data['loyalityPoints'] = this.loyalityPoints;
    data['purchaseRate'] = this.purchaseRate;
    return data;
  }
}