def request_query_request(type = "all", full_record = false)
      query_params = {
        "aid"         => need_auth_id(patron_barcode, patron_library_symbol),
        "type"        => type.to_s,
        "fullRecord"  => (full_record ? "1" : "0")
      }

      response = request query_params

      # RequestQuery sometimes returns odd 200 OK response with
      # AuthFailed, at least as of 29 Sep 2015. Catch it and
      # raise it properly. 
      if response["AuthorizationState"] && response["AuthorizationState"]["State"] == false
        raise BorrowDirect::InvalidAidError.new("API returned AuthorizationState.State == false", nil, response["AuthorizationState"]["AuthorizationId"])
      end

      return response
    end
def request_query_request(type = "all", full_record = false)
      query_params = {
        "aid"         => need_auth_id(patron_barcode, patron_library_symbol),
        "type"        => type.to_s,
        "fullRecord"  => (full_record ? "1" : "0")
      }

      response = request query_params

      # RequestQuery sometimes returns odd 200 OK response with
      # AuthFailed, at least as of 29 Sep 2015. Catch it and
      # raise it properly. 
      if response["AuthorizationState"] && response["AuthorizationState"]["State"] == false
        raise BorrowDirect::InvalidAidError.new("API returned AuthorizationState.State == false", nil, response["AuthorizationState"]["AuthorizationId"])
      end

      return response
    end
Returns raw BD response as a hash.
 * type defaults to 'all', but can be BD values of xdays, all
   open, allposttoweb, unopenedposttoweb, onloan.
   xdays not really supported yet, cause no way to pass an xdays param yet
 * full_record can be true or false, defaults to false.