class commonAddAccountsViewResponse {
  List<States>? states;
  List<String>? accountTypes;
  String? error;
  String? message;

  commonAddAccountsViewResponse({
    this.states,

    this.accountTypes,
    this.error,
    this.message,
  });

  commonAddAccountsViewResponse.fromJson(Map<String, dynamic> json) {
    if (json['states'] != null) {
      states = <States>[];
      json['states'].forEach((v) {
        states!.add(States.fromJson(v));
      });
    }

    if (json['account_types'] != null) {
      accountTypes = json['account_types'].cast<String>();
    }

    error = json['error'];
    message = json['message'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    if (states != null) {
      data['states'] = states!.map((v) => v.toJson()).toList();
    }

    if (accountTypes != null) {
      data['account_types'] = accountTypes;
    }
    data['error'] = error;
    data['message'] = message;
    return data;
  }
}

class States {
  String? id;
  String? name;

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

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

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