class addPaymentRequestionResponse {
  List<String>? requestingPurposes;
  List<Accounts>? accounts;
  List<PaymentModes>? paymentModes;
  String? error;
  String? message;

  addPaymentRequestionResponse(
      {this.requestingPurposes,
        this.accounts,
        this.paymentModes,
        this.error,
        this.message});

  addPaymentRequestionResponse.fromJson(Map<String, dynamic> json) {
    requestingPurposes = json['requesting_purposes'].cast<String>();
    if (json['accounts'] != null) {
      accounts = <Accounts>[];
      json['accounts'].forEach((v) {
        accounts!.add(new Accounts.fromJson(v));
      });
    }
    if (json['payment_modes'] != null) {
      paymentModes = <PaymentModes>[];
      json['payment_modes'].forEach((v) {
        paymentModes!.add(new PaymentModes.fromJson(v));
      });
    }
    error = json['error'];
    message = json['message'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['requesting_purposes'] = this.requestingPurposes;
    if (this.accounts != null) {
      data['accounts'] = this.accounts!.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 Accounts {
  String? id;
  String? name;

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

  Accounts.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 PaymentModes {
  String? id;
  String? name;

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

  PaymentModes.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;
  }
}