protected static function resolveFullUrl($entities = [], $params = [])
    {
        $uri = static::getUri();

        if (!empty($entities)) {
            if (is_array($entities)) {
                $entities = implode('/', $entities) . '/';
            }

            if (!is_scalar($entities)) {
                throw new InvalidQueryException();
            }

            $uri .= $entities;
        }

        if (!empty($params)) {
            $uri .= '?' . http_build_query($params);
        }

        return $uri;
    }