class BillingsHistoryModel { List? billings; BillingsHistoryModel({this.billings}); BillingsHistoryModel.fromJson(Map json) { if (json['billings'] != null) { billings = []; json['billings'].forEach((v) { billings!.add(Billings.fromJson(v)); }); } } Map toJson() { final Map data = {}; if (billings != null) { data['billings'] = billings!.map((v) => v.toJson()).toList(); } return data; } } class PaginationBillings { final int page; final List billings; PaginationBillings({required this.page, required this.billings}); } class Billings { int? id; int? credit; int? amount; String? refId; String? type; String? status; String? createdAt; Billings( {this.id, this.credit, this.amount, this.refId, this.type, this.status, this.createdAt}); Billings.fromJson(Map json) { id = json['id']; credit = json['credit']; amount = json['amount']; refId = json['ref_id']; type = json['type']; status = json['status']; createdAt = json['created_at']; } Map toJson() { final Map data = {}; data['id'] = id; data['credit'] = credit; data['amount'] = amount; data['ref_id'] = refId; data['type'] = type; data['status'] = status; data['created_at'] = createdAt; return data; } }