class addDirectPaymentResponse { List? accounts; List? paymentAccounts; List? paymentModes; String? error; String? message; addDirectPaymentResponse( {this.accounts, this.paymentAccounts, this.paymentModes, this.error, this.message}); addDirectPaymentResponse.fromJson(Map json) { if (json['accounts'] != null) { accounts = []; json['accounts'].forEach((v) { accounts!.add(new DirectAccounts.fromJson(v)); }); } if (json['payment_accounts'] != null) { paymentAccounts = []; json['payment_accounts'].forEach((v) { paymentAccounts!.add(new DirectPaymentAccounts.fromJson(v)); }); } if (json['payment_modes'] != null) { paymentModes = []; json['payment_modes'].forEach((v) { paymentModes!.add(new DirectPaymentModes.fromJson(v)); }); } error = json['error']; message = json['message']; } Map toJson() { final Map data = new Map(); if (this.accounts != null) { data['accounts'] = this.accounts!.map((v) => v.toJson()).toList(); } if (this.paymentAccounts != null) { data['payment_accounts'] = this.paymentAccounts!.map((v) => v.toJson()).toList(); } if (this.paymentModes != null) { data['payment_modes'] = this.paymentModes!.map((v) => v.toJson()).toList(); } data['error'] = this.error; data['message'] = this.message; return data; } } class DirectAccounts { String? id; String? name; DirectAccounts({this.id, this.name}); DirectAccounts.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; } } class DirectPaymentAccounts { String? id; String? name; DirectPaymentAccounts({this.id, this.name}); DirectPaymentAccounts.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; } } class DirectPaymentModes { String? id; String? name; DirectPaymentModes({this.id, this.name}); DirectPaymentModes.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; } }