public function processRequest()
    {
        try {
            $router = new Router($this->api, $this->class, $this->normalize, $this->cacheInstance);

            // check if url is set via the initRest method
            if (!empty(self::$url)) {
                $router->setUrl(self::$url);
            }

            // check if the method vas set via initRest method
            if (!empty(self::$method)) {
                $router->setHttpMethod(self::$method);
            }

            return $router->processRequest();
        } catch (\Exception $e) {
            $exception = new RestException('Unable to process request for class "' . $this->class . '". ' . $e->getMessage());
            $exception->setRequestedClass($this->class);
            throw $exception;
        }
    }