class commonAccountLedgerResponse { List? ledgerList; AccountDetails? accountDetails; String? error; String? message; commonAccountLedgerResponse( {this.ledgerList, this.accountDetails, this.error, this.message}); commonAccountLedgerResponse.fromJson(Map json) { if (json['ledger_list'] != null) { ledgerList = []; json['ledger_list'].forEach((v) { ledgerList!.add(new LedgerList.fromJson(v)); }); } accountDetails = json['account_details'] != null ? new AccountDetails.fromJson(json['account_details']) : null; error = json['error']; message = json['message']; } Map toJson() { final Map data = new Map(); if (this.ledgerList != null) { data['ledger_list'] = this.ledgerList!.map((v) => v.toJson()).toList(); } if (this.accountDetails != null) { data['account_details'] = this.accountDetails!.toJson(); } data['error'] = this.error; data['message'] = this.message; return data; } } class LedgerList { String? id; String? accountId; String? refType; String? refId; String? type; String? description; String? creditAmount; String? debitAmount; String? date; String? createdDatetime; LedgerList( {this.id, this.accountId, this.refType, this.refId, this.type, this.description, this.creditAmount, this.debitAmount, this.date, this.createdDatetime}); LedgerList.fromJson(Map json) { id = json['id']; accountId = json['account_id']; refType = json['ref_type']; refId = json['ref_id']; type = json['type']; description = json['description']; creditAmount = json['credit_amount']; debitAmount = json['debit_amount']; date = json['date']; createdDatetime = json['created_datetime']; } Map toJson() { final Map data = new Map(); data['id'] = this.id; data['account_id'] = this.accountId; data['ref_type'] = this.refType; data['ref_id'] = this.refId; data['type'] = this.type; data['description'] = this.description; data['credit_amount'] = this.creditAmount; data['debit_amount'] = this.debitAmount; data['date'] = this.date; data['created_datetime'] = this.createdDatetime; return data; } } class AccountDetails { String? id; String? name; AccountDetails({this.id, this.name}); AccountDetails.fromJson(Map json) { id = json['id']; name = json['name']; } Map toJson() { final Map data = new Map(); data['id'] = this.id; data['name'] = this.name; return data; } }