def parameterize(actor, action, payload, path)
      options = {}
      params = {}
      if actor == "auditor"
        path = path.sub(/:id/, payload[:audit_id].to_s || "")
        params = parameterize_audit(action, payload)
        options = {:filter_params => AUDIT_FILTER_PARAMS}
      elsif actor == "router" && action =~ /_tags/
        if action != "query_tags"
          params[:resource_hrefs] = [@self_href]
        else
          params[:resource_hrefs] = Array(payload[:hrefs]).flatten.compact if payload[:hrefs]
        end
        params[:tags] = Array(payload[:tags]).flatten.compact if payload[:tags]
      else
        # Can remove :agent_identity here since now carried in the authorization as the :agent
        payload.each { |k, v| params[k.to_sym] = v if k.to_sym != :agent_identity } if payload.is_a?(Hash)
      end
      [path, params, options]
    end
def parameterize(actor, action, payload, path)
      options = {}
      params = {}
      if actor == "auditor"
        path = path.sub(/:id/, payload[:audit_id].to_s || "")
        params = parameterize_audit(action, payload)
        options = {:filter_params => AUDIT_FILTER_PARAMS}
      elsif actor == "router" && action =~ /_tags/
        if action != "query_tags"
          params[:resource_hrefs] = [@self_href]
        else
          params[:resource_hrefs] = Array(payload[:hrefs]).flatten.compact if payload[:hrefs]
        end
        params[:tags] = Array(payload[:tags]).flatten.compact if payload[:tags]
      else
        # Can remove :agent_identity here since now carried in the authorization as the :agent
        payload.each { |k, v| params[k.to_sym] = v if k.to_sym != :agent_identity } if payload.is_a?(Hash)
      end
      [path, params, options]
    end
Convert payload to HTTP parameters

 @param [String] actor from request type
 @param [String] action from request type
 @param [Hash, NilClass] payload for request
 @param [String] path in URI for desired resource

 @return [Array] path string and parameters and options hashes