class addDirectPaymentResponse {
  List<DirectAccounts>? accounts;
  List<DirectPaymentAccounts>? paymentAccounts;
  List<DirectPaymentModes>? paymentModes;
  String? error;
  String? message;

  addDirectPaymentResponse(
      {this.accounts,
        this.paymentAccounts,
        this.paymentModes,
        this.error,
        this.message});

  addDirectPaymentResponse.fromJson(Map<String, dynamic> json) {
    if (json['accounts'] != null) {
      accounts = <DirectAccounts>[];
      json['accounts'].forEach((v) {
        accounts!.add(new DirectAccounts.fromJson(v));
      });
    }
    if (json['payment_accounts'] != null) {
      paymentAccounts = <DirectPaymentAccounts>[];
      json['payment_accounts'].forEach((v) {
        paymentAccounts!.add(new DirectPaymentAccounts.fromJson(v));
      });
    }
    if (json['payment_modes'] != null) {
      paymentModes = <DirectPaymentModes>[];
      json['payment_modes'].forEach((v) {
        paymentModes!.add(new DirectPaymentModes.fromJson(v));
      });
    }
    error = json['error'];
    message = json['message'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    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<String, dynamic> json) {
    id = json['id'];
    name = json['name'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['name'] = this.name;
    return data;
  }
}
class DirectPaymentAccounts {
  String? id;
  String? name;

  DirectPaymentAccounts({this.id, this.name});

  DirectPaymentAccounts.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    name = json['name'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['name'] = this.name;
    return data;
  }
}
class DirectPaymentModes {
  String? id;
  String? name;

  DirectPaymentModes({this.id, this.name});

  DirectPaymentModes.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    name = json['name'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['name'] = this.name;
    return data;
  }
}