/**
  * Retrieve store ids for given website
  *
  * @param $websiteId
  *
  * @return array
  * @throws \LogicException
  */
 protected function getStoresByWebsiteId($websiteId)
 {
     if (empty($this->storesByWebsite)) {
         $this->storesByWebsite[$websiteId] = [];
         $storesList = $this->transport->getStores();
         foreach ($storesList as $store) {
             $this->storesByWebsite[$store['website_id']][] = $store['store_id'];
         }
     }
     $stores = $this->storesByWebsite[$websiteId];
     if (empty($this->storesByWebsite[$websiteId])) {
         throw new \LogicException(sprintf('Could not resolve store dependency for website id: %d', $websiteId));
     }
     return $stores;
 }