public static function getResourceTypeFromUrl($url)
    {
        $matchFound = preg_match('/\/v[23]\/(\w+)[\/?]?/', $url, $matches);
        if( ! $matchFound || ! is_array($matches) || ! isset($matches[1])) {
            throw new \Exception('Unable to find resource type in url', 1462733277);
        }

        if ($matches[1] == 'getReport') {
            return 'report';
        } elseif ($matches[1] == 'price') {
            return 'prices';
        }

        return $matches[1];
    }