marketplaceClient = $marketplaceClient; } /** * For tests only. * @internal * @return Api\Client */ public function getApiClient() { return $this->marketplaceClient; } public function clearCache() { $this->consumer = false; $this->isValid = null; } public function getConsumer() { if ($this->consumer === false) { $consumer = $this->marketplaceClient->getConsumer(); if (!empty($consumer)) { $this->consumer = $consumer; } else { $this->consumer = array(); } } return $this->consumer; } public function isValidConsumer() { if (!isset($this->isValid)) { $this->isValid = $this->marketplaceClient->isValidConsumer(); } return $this->isValid; } }