public function save(StockistInterface $stockist)
    {
        /** @var StockistInterface|\Magento\Framework\Model\AbstractModel $stockist */
        if ($stockist->getStoreId() == "") {
            $storeId = $this->storeManager->getStore()->getId();
            $stockist->setStoreId($storeId);
        }
        try {
            $this->resource->save($stockist);
        } catch (\Exception $exception) {
            throw new CouldNotSaveException(__(
                'Could not save the store: %1',
                $exception->getMessage()
            ));
        }
        return $stockist;
    }
public function save(StockistInterface $stockist)
    {
        /** @var StockistInterface|\Magento\Framework\Model\AbstractModel $stockist */
        if ($stockist->getStoreId() == "") {
            $storeId = $this->storeManager->getStore()->getId();
            $stockist->setStoreId($storeId);
        }
        try {
            $this->resource->save($stockist);
        } catch (\Exception $exception) {
            throw new CouldNotSaveException(__(
                'Could not save the store: %1',
                $exception->getMessage()
            ));
        }
        return $stockist;
    }
public function save ( StockistInterface $ stockist ) { /** @var StockistInterface|\Magento\Framework\Model\AbstractModel $stockist */ if ( $ stockist -> getStoreId ( ) == "" ) { $ storeId = $ this -> storeManager -> getStore ( ) -> getId ( ) ; $ stockist -> setStoreId ( $ storeId ) ; } try { $ this -> resource -> save ( $ stockist ) ; } catch ( \ Exception $ exception ) { throw new CouldNotSaveException ( __ ( 'Could not save the store: %1' , $ exception -> getMessage ( ) ) ) ; } return $ stockist ; }
Save page.

@param \Limesharp\Stockists\Api\Data\StockistInterface $stockist
@return \Limesharp\Stockists\Api\Data\StockistInterface
@throws \Magento\Framework\Exception\LocalizedException
Save page .