/**
  * Retrieve active store by code
  *
  * @param int $id
  * @return \Magento\Store\Api\Data\StoreInterface
  * @throws NoSuchEntityException
  */
 protected function getDefaultStoreById($id)
 {
     try {
         $store = $this->storeRepository->getActiveStoreById($id);
     } catch (StoreIsInactiveException $e) {
         throw new NoSuchEntityException(__('Default store is inactive'));
     }
     return $store;
 }