Set the Stripe API version

This method forces to add a Stripe-Version header, so that you can use the wanted version no matter
what the setting is on Stripe

@param  string $version
@return void
769017
public function setApiVersion($version)
    {
        if (!in_array($version, $this->availableVersions, true)) {
            throw new UnsupportedStripeVersionException(sprintf(
                'The given Stripe version ("%s") is not supported by ZfrStripe. Value must be one of the following: "%s"',
                $version,
                implode(', ', $this->availableVersions)
            ));
        }

        $this->version = (string) $version;
        $this->setDefaultOption('headers', ['Stripe-Version' => $this->version]);

        if ($this->version < '2015-08-19') {
            $descriptor = __DIR__ . '/ServiceDescription/Stripe-v1.0.php';
        } else {
            $descriptor = __DIR__ . '/ServiceDescription/Stripe-v1.1.php';
        }

        // Note that we need to recreate a whole new CompositeFactory whenever the version is changed
        $this->setCommandFactory(new CompositeFactory());
        $this->setDescription(ServiceDescription::factory($descriptor));
    }
293044
public function setVersion($version)
    {
        if(!is_float($version)){
            $version = (float) 1.1;
        }

        $this->options['version']=$version;
        return $this;
    }
814130
public function setProtocolVersion($version)
	{
		if (!array_key_exists($version, self::$protocolVersionMap)) {
			throw new InvalidArgumentException(sprintf('The HTTP protkoll version %s is unknown', $version));			
		}

		$this->protocolVersion = $version;

		return $this;
	}
1016471
public function importVersion($version)
    {
        return $this
            ->setMajor($version->getMajor())
            ->setMinor($version->getMinor())
            ->setPatch($version->getPatch())
            ->setPreRelease($version->getPreRelease())
            ->setBuild($version->getBuild());
    }
867331
public function withProtocolVersion($version)
    {
        if ($this->getProtocolVersion() === $version) {
            return $this;
        }

        $newInstance = clone $this;
        $newInstance->setProtocolVersion($version);
        return $newInstance;
    }
456121
public function setApiVersion($apiVersion = null)
    {
        // No version specified.
        if (is_null($apiVersion)) {
            $apiVersion = config('personality-insights.api_version') ?: 'v3';
        }

        $this->apiVersion = $apiVersion;

        return $this;
    }
1031298
public function setProtocolVersion($version)
    {
        if (!preg_match('/^\d(\.\d+)+$/', $version))
        {
            throw new InvalidArgumentException('Invalid protocol version: ' . $version);
        }
        $this->protocolVersion = $version;
        return $this;
    }
764511
public void setCompileVersion(String version) {
        if (version == null || ClassUtils.isBeforeJava6(version)) {
            JavassistCompiler javassistCompiler = new JavassistCompiler();
            javassistCompiler.setLogger(logger);
            javassistCompiler.setCodeDirectory(codeDirectory);
            compiler = javassistCompiler;
        } else {
            JdkCompiler jdkCompiler = new JdkCompiler();
            jdkCompiler.setCompileVersion(version);
            jdkCompiler.setLogger(logger);
            jdkCompiler.setCodeDirectory(codeDirectory);
            compiler = jdkCompiler;
        }
    }
341011
public void setVersion(int version)
    {
        if (version < 0 || 255 < version)
        {
            throw new IllegalArgumentException("'version' is out of the valid range: " + version);
        }

        mVersion = version;

        getData()[VERSION_INDEX] = (byte)(version & 0xFF);
    }
635666
public function renderVersion(string $version, DataCollection $collection) : void
    {
        foreach ($this->writers as $writer) {
            $writer->renderVersion(
                [
                    'version' => $version,
                    'released' => $collection->getGenerationDate()->format('r'),
                    'format' => $writer->getFormatter()->getType(),
                    'type' => $writer->getFilter()->getType(),
                ]
            );
        }
    }
940741
public function setHTTPVersion(int $version)
    {
        $this->http_version = ($version === 1 ? '1.0' : '' . $version);

        if ($this->http_version !== '1.0' && $this->http_version !== '1.1') {
            throw new RuntimeException('HTTP version  must be 1.0 or 1.1');
        }
    }
637039
public function put_version($collection, $version)
    {
        if ($version) {
            $this->get_versions();
            $this->versions[$collection] = $version;
            $version_path = $this->get_path('versions');
            return $this->write_cache($version_path, $this->versions);
        }
    }
346535
public function setVersionMapping(array &$mapping)
    {
        if ($mapping['type'] !== 'int' && $mapping['type'] !== 'date') {
            throw LockException::invalidVersionFieldType($mapping['type']);
        }

        $this->isVersioned  = true;
        $this->versionField = $mapping['fieldName'];
    }
341543
public function selectVersion($version)
	{
		if ( ! in_array($version, $this->versions))
		{
			// not a value version
			return false;
		}

		$this->version = $version;

		return $this;
	}
126685
protected function registerSupportedVersions(VersionControl $version): void
    {
        foreach ($this->versions as $code => $namespace) {
            $version->addVersion($code, $namespace);
        }

        if (! is_null($this->defaultVersion)) {
            $version->setDefaultVersion($this->defaultVersion);
        }
    }
1022836
@Override
    public void setVersion(String version) {
        try {
            this.message.setVersion(version);
        } catch (UnsupportedProtocolVersionException e) {
            this.message.setVersion(VersionValues.V11);
        }
    }
602996
private function version4($version = false)
    {
        if (!env('APP_CDN', true)) {
            FrontendAsset::add('vendor/font-awesome/css/font-awesome.min.css');

            return;
        }

        $version = FrontendAsset::version(class_basename(__CLASS__), $version);
        FrontendAsset::add('https://maxcdn.bootstrapcdn.com/font-awesome/'.$version.'/css/font-awesome.min.css');
    }