public function __construct($version, $apiKey, $apiVersion)
{
$this->setVersion($version);
$this->setApiKey($apiKey ?: getenv('STRIPE_API_KEY'));
$this->setApiVersion($apiVersion ?: getenv('STRIPE_API_VERSION') ?: '2015-03-24');
if (!$this->apiKey) {
throw new \RuntimeException('The Stripe API key is not defined!');
}
}