protected function buildRequestURL($sub = 'gateway', $path = '', $token = '')
    {
        $protocol = ($this->getApiConfig('protocol')) ? $this->getApiConfig('protocol') : 'https';

        $sub      = \Genesis\Config::getSubDomain($sub);

        $domain   = \Genesis\Config::getEndpoint();

        $port     = ($this->getApiConfig('port')) ? $this->getApiConfig('port') : 443;

        $path     = ($token) ? sprintf('%s/%s/', $path, $token) : $path;

        return sprintf(
            '%s://%s%s:%s/%s',
            $protocol,
            $sub,
            $domain,
            $port,
            $path
        );
    }