class approveRejectPaymentRequestResponse {
  List<PaymentAccounts>? paymentAccounts;
  PaymentRequestDetails? paymentRequestDetails;
  List<PaymentModes>? paymentModes;
  String? error;
  String? message;

  approveRejectPaymentRequestResponse(
      {this.paymentAccounts,
        this.paymentRequestDetails,
        this.paymentModes,
        this.error,
        this.message});

  approveRejectPaymentRequestResponse.fromJson(Map<String, dynamic> json) {
    if (json['payment_accounts'] != null) {
      paymentAccounts = <PaymentAccounts>[];
      json['payment_accounts'].forEach((v) {
        paymentAccounts!.add(new PaymentAccounts.fromJson(v));
      });
    }
    paymentRequestDetails = json['payment_request_details'] != null
        ? new PaymentRequestDetails.fromJson(json['payment_request_details'])
        : null;
    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>();
    if (this.paymentAccounts != null) {
      data['payment_accounts'] =
          this.paymentAccounts!.map((v) => v.toJson()).toList();
    }
    if (this.paymentRequestDetails != null) {
      data['payment_request_details'] = this.paymentRequestDetails!.toJson();
    }
    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 PaymentAccounts {
  String? id;
  String? name;
  String? accountBalance;

  PaymentAccounts({this.id, this.name, this.accountBalance});

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

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

class PaymentRequestDetails {
  String? id;
  String? accountId;
  String? requestingPurpose;
  String? description;
  String? amount;
  String? requestedAmount;
  String? paymentRequestModeId;
  String? bankName;
  String? bankBranchName;
  String? bankIfscCode;
  String? bankAccountHolderName;
  String? bankAccountNumber;
  String? bankUpiId;

  PaymentRequestDetails(
      {this.id,
        this.accountId,
        this.requestingPurpose,
        this.description,
        this.amount,
        this.requestedAmount,
        this.paymentRequestModeId,
        this.bankName,
        this.bankBranchName,
        this.bankIfscCode,
        this.bankAccountHolderName,
        this.bankAccountNumber,
        this.bankUpiId});

  PaymentRequestDetails.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    accountId = json['account_id'];
    requestingPurpose = json['requesting_purpose'];
    description = json['description'];
    amount = json['amount'];
    requestedAmount = json['requested_amount'];
    paymentRequestModeId = json['payment_request_mode_id'];
    bankName = json['bank_name'];
    bankBranchName = json['bank_branch_name'];
    bankIfscCode = json['bank_ifsc_code'];
    bankAccountHolderName = json['bank_account_holder_name'];
    bankAccountNumber = json['bank_account_number'];
    bankUpiId = json['bank_upi_id'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['account_id'] = this.accountId;
    data['requesting_purpose'] = this.requestingPurpose;
    data['description'] = this.description;
    data['amount'] = this.amount;
    data['requested_amount'] = this.requestedAmount;
    data['payment_request_mode_id'] = this.paymentRequestModeId;
    data['bank_name'] = this.bankName;
    data['bank_branch_name'] = this.bankBranchName;
    data['bank_ifsc_code'] = this.bankIfscCode;
    data['bank_account_holder_name'] = this.bankAccountHolderName;
    data['bank_account_number'] = this.bankAccountNumber;
    data['bank_upi_id'] = this.bankUpiId;
    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;
  }
}
