import 'PointsAmountPerday.dart'; class PointsAmountPerMonth { num? amountPerMonth; String? month; num? monthNumber; List? pointsAmountPerday; num? pointsPerMonth; PointsAmountPerMonth( {this.amountPerMonth, this.month, this.monthNumber, this.pointsAmountPerday, this.pointsPerMonth}); PointsAmountPerMonth.fromJson(Map json) { amountPerMonth = json['AmountPerMonth']; month = json['Month']; monthNumber = json['MonthNumber']; if (json['PointsAmountPerday'] != null) { pointsAmountPerday = []; json['PointsAmountPerday'].forEach((v) { pointsAmountPerday!.add(new PointsAmountPerday.fromJson(v)); }); } pointsPerMonth = json['PointsPerMonth']; } Map toJson() { final Map data = new Map(); 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; } }