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));
    }