/**
  * @param StockStatusInterface $stockStatus
  * @return bool|true
  * @throws CouldNotDeleteException
  */
 public function delete(StockStatusInterface $stockStatus)
 {
     try {
         $this->resource->delete($stockStatus);
     } catch (\Exception $exception) {
         throw new CouldNotDeleteException(__($exception->getMessage()));
     }
     return true;
 }
 /**
  * @param StockStatusInterface $stockStatus
  * @return bool|true
  * @throws CouldNotDeleteException
  */
 public function delete(StockStatusInterface $stockStatus)
 {
     try {
         $this->resource->delete($stockStatus);
         $this->getStockRegistryStorage()->removeStockStatus($stockStatus->getProductId());
     } catch (\Exception $exception) {
         throw new CouldNotDeleteException(__('Unable to remove Stock Status for product %1', $stockStatus->getProductId()), $exception);
     }
     return true;
 }