public function setApiVersion($apiVersion)
    {
        if (!in_array($apiVersion = intval($apiVersion), $this->getSupportedApiVersions())) {
            throw new UnsupportedApiVersionException();
        }

        $this->apiVersion = $apiVersion;
    }