class LakumInquiryInformationResponseModel {
  int? accountNumber;
  String? accountStatus;
  String? barCode;
  num? consumedPoints;
  dynamic consumedPointsAmount;
  dynamic consumedPointsAmountPerYear;

  // List<Null>? consumedPointsDetails;
  String? createdDate;
  num? expiredPoints;
  String? expiryDate;
  num? gainedPoints;
  num? gainedPointsAmount;
  List<GainedPointsAmountPerYear>? gainedPointsAmountPerYear;

  // List<Null>? gainedPointsDetails;
  String? lakumMessageStatus;
  String? memberName;
  String? memberUniversalId;
  String? mobileNumber;
  num? pointsBalance;
  num? pointsBalanceAmount;
  num? pointsWillBeExpired;
  String? prefLang;
  num? statusCode;
  num? transferPoints;
  dynamic transferPointsAmountPerYear;

  // List<Null>? transferPointsDetails;
  num? waitingPoints;
  num? loyalityAmount;
  num? loyalityPoints;
  num? purchaseRate;

  LakumInquiryInformationResponseModel(
      {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});

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

class GainedPointsAmountPerYear {
  num? amountPerYear;
  List<PointsAmountPerMonth>? pointsAmountPerMonth;
  num? pointsPerYear;
  int? year;

  GainedPointsAmountPerYear({this.amountPerYear, this.pointsAmountPerMonth, this.pointsPerYear, this.year});

  GainedPointsAmountPerYear.fromJson(Map<String, dynamic> json) {
    amountPerYear = json['AmountPerYear'];
    if (json['PointsAmountPerMonth'] != null) {
      pointsAmountPerMonth = <PointsAmountPerMonth>[];
      json['PointsAmountPerMonth'].forEach((v) {
        pointsAmountPerMonth!.add(new PointsAmountPerMonth.fromJson(v));
      });
    }
    pointsPerYear = json['PointsPerYear'];
    year = json['Year'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['AmountPerYear'] = this.amountPerYear;
    if (this.pointsAmountPerMonth != null) {
      data['PointsAmountPerMonth'] = this.pointsAmountPerMonth!.map((v) => v.toJson()).toList();
    }
    data['PointsPerYear'] = this.pointsPerYear;
    data['Year'] = this.year;
    return data;
  }
}

class PointsAmountPerMonth {
  num? amountPerMonth;
  String? month;
  num? monthNumber;
  List<PointsAmountPerday>? pointsAmountPerday;
  num? pointsPerMonth;

  PointsAmountPerMonth({this.amountPerMonth, this.month, this.monthNumber, this.pointsAmountPerday, this.pointsPerMonth});

  PointsAmountPerMonth.fromJson(Map<String, dynamic> json) {
    amountPerMonth = json['AmountPerMonth'];
    month = json['Month'];
    monthNumber = json['MonthNumber'];
    if (json['PointsAmountPerday'] != null) {
      pointsAmountPerday = <PointsAmountPerday>[];
      json['PointsAmountPerday'].forEach((v) {
        pointsAmountPerday!.add(new PointsAmountPerday.fromJson(v));
      });
    }
    pointsPerMonth = json['PointsPerMonth'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['AmountPerMonth'] = this.amountPerMonth;
    data['Month'] = this.month;
    data['MonthNumber'] = this.monthNumber;
    if (this.pointsAmountPerday != null) {
      data['PointsAmountPerday'] = this.pointsAmountPerday!.map((v) => v.toJson()).toList();
    }
    data['PointsPerMonth'] = this.pointsPerMonth;
    return data;
  }
}

class PointsAmountPerday {
  num? amountPerDay;
  String? day;
  List<PointsDetails>? pointsDetails;
  num? pointsPerDay;
  String? transationDate;

  PointsAmountPerday({this.amountPerDay, this.day, this.pointsDetails, this.pointsPerDay, this.transationDate});

  PointsAmountPerday.fromJson(Map<String, dynamic> json) {
    amountPerDay = json['AmountPerDay'];
    day = json['Day'];
    if (json['PointsDetails'] != null) {
      pointsDetails = <PointsDetails>[];
      json['PointsDetails'].forEach((v) {
        pointsDetails!.add(new PointsDetails.fromJson(v));
      });
    }
    pointsPerDay = json['PointsPerDay'];
    transationDate = json['TransationDate'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['AmountPerDay'] = this.amountPerDay;
    data['Day'] = this.day;
    if (this.pointsDetails != null) {
      data['PointsDetails'] = this.pointsDetails!.map((v) => v.toJson()).toList();
    }
    data['PointsPerDay'] = this.pointsPerDay;
    data['TransationDate'] = this.transationDate;
    return data;
  }
}

class PointsDetails {
  int? accNumber;
  String? accountStatus;
  num? amount;
  int? lineItemNo;
  String? operationType;
  num? points;
  num? 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'];
    purchasePoints = json['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;
  }
}
