import 'PointsAmountPerMonth.dart';

class PointsAmountPerYear {
  num amountPerYear;
  List<PointsAmountPerMonth> pointsAmountPerMonth;
  num pointsPerYear;
  num year;

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

  PointsAmountPerYear.fromJson(Map<String, dynamic> json) {
    amountPerYear = json['AmountPerYear'];
    if (json['PointsAmountPerMonth'] != null) {
      pointsAmountPerMonth = new List<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;
  }
}
