public function createRequestUrl(array $data)
    {
        $this->ensureApiIsConfigured();

        $data = $this->createRequestData($data);

        $url = $this->getEndpoint() . '?' .
            implode('&', array_map(function ($key, $value) {
                return $key . '=' . rawurlencode($value);
            }, array_keys($data), $data));

        return $url;
    }