protected function setConnectionOptions(Array $options)
    {
        if (!is_resource($this->connection)) {
            throw new ConnectionErrorException('cURL connection has not been set up yet!');
        }
        if (!curl_setopt_array($this->connection, $options)) {
            throw new ConnectionErrorException('Unable to set cURL options' . PHP_EOL . curl_error($this->connection));
        }
        return $this;
    }