/**
  * instantiating the VendAPI object and passing the required parameters
  */
 public function __construct(TokenManager $tokenManager)
 {
     $this->tokenManager = $tokenManager;
     $config = \SiteConfig::current_site_config();
     $shopName = $config->VendShopName;
     $url = "https://{$shopName}.vendhq.com";
     parent::__construct($url, 'Bearer', $tokenManager->getToken());
 }
 /**
  * Gets first token and stores them
  * @param $code
  * @return bool
  */
 private function getFirstToken($code)
 {
     return $this->tokenManager->getFirstToken($code);
 }