public function setCurlNumRetries($retries)
    {
        if (!is_numeric($retries) || $retries < 0) {
            throw new \InvalidArgumentException('Retries value must be numeric and a non-negative number.');
        }

        $this->curlNumRetries = $retries;
        return $this;
    }