def _call_method(request)
      params = request.params
      resource_obj = nil
      resource_id = nil

      request.each_resource do |name, id|
        unless resource_obj
          (resource_obj = _load_resource(request.version, name)) or
            _error!(Errors::NotFoundError)
        else
          mounted_resource = resource_obj.mounts[name] or
            _error!(Errors::NotFoundError)
          resource_obj = mounted_resource.new
        end

        params.merge!(resource_obj.id_param => id) if id
        resource_id = id
      end

      resource_obj.process(request.request_method, !!resource_id, params)
    end
def _call_method(request)
      params = request.params
      resource_obj = nil
      resource_id = nil

      request.each_resource do |name, id|
        unless resource_obj
          (resource_obj = _load_resource(request.version, name)) or
            _error!(Errors::NotFoundError)
        else
          mounted_resource = resource_obj.mounts[name] or
            _error!(Errors::NotFoundError)
          resource_obj = mounted_resource.new
        end

        params.merge!(resource_obj.id_param => id) if id
        resource_id = id
      end

      resource_obj.process(request.request_method, !!resource_id, params)
    end
Calls the appropriate method on the appropriate Service::Resource for the
 request.