setVersion($version); $this->setApiKey($apiKey ?: getenv('STRIPE_API_KEY')); $this->setApiVersion($apiVersion ?: getenv('STRIPE_API_VERSION') ?: '2017-06-05'); } /** * {@inheritdoc} */ public function getVersion() { return $this->version; } /** * {@inheritdoc} */ public function setVersion($version) { $this->version = $version; return $this; } /** * {@inheritdoc} */ public function getApiKey() { return $this->apiKey; } /** * {@inheritdoc} */ public function setApiKey($apiKey) { $this->apiKey = $apiKey; return $this; } /** * {@inheritdoc} */ public function getApiVersion() { return $this->apiVersion; } /** * {@inheritdoc} */ public function setApiVersion($apiVersion) { $this->apiVersion = $apiVersion; return $this; } /** * {@inheritdoc} */ public function getIdempotencyKey() { return $this->idempotencyKey; } /** * {@inheritdoc} */ public function setIdempotencyKey($idempotencyKey) { $this->idempotencyKey = $idempotencyKey; return $this; } /** * Returns the managed account id. * * @return string */ public function getAccountId() { return $this->accountId; } /** * Sets the managed account id. * * @param string $accountId * @return $this */ public function setAccountId($accountId) { $this->accountId = $accountId; return $this; } /** * Returns the application's information. * * @return array|null */ public function getAppInfo() { return $this->appInfo; } /** * Sets the application's information. * * @param string $appName * @param string $appVersion * @param string $appUrl * @param string $appPartnerId * @return $this */ public function setAppInfo($appName, $appVersion = null, $appUrl = null, $appPartnerId = null) { $this->appInfo = [ 'name' => $appName, 'version' => $appVersion, 'url' => $appUrl, 'partner_id' => $appPartnerId, ]; return $this; } }