public function getTax(Shopware_StoreApi_Models_Auth $authModel) { if (!$authModel instanceof Shopware_StoreApi_Models_Auth) { throw new Enlight_Exception('The parameter authModel is not an instance of the class Shopware_StoreApi_Models_Auth'); } return $this->gateway->getTax($authModel->getShopwareId(), $authModel->getToken()); }
public function isTokenValid(Shopware_StoreApi_Models_Auth $authModel) { if (!$authModel instanceof Shopware_StoreApi_Models_Auth) { return false; } $array = $this->gateway->isTokenValid($authModel->getShopwareId(), $authModel->getToken()); if ($array['authorized'] == true) { return true; } else { return false; } }
/** * @return null|Shopware_StoreApi_Models_Auth */ public function getIdentity() { if (!$this->identity instanceof Shopware_StoreApi_Models_Auth) { $this->identity = new Shopware_StoreApi_Models_Auth(); $this->identity->setShopwareId(Shopware()->BackendSession()->pluginManagerShopwareId); $this->identity->setToken(Shopware()->BackendSession()->pluginManagerAccountToken); $this->identity->setAccountUrl(Shopware()->BackendSession()->pluginManagerAccountUrl); } return $this->identity; }