Skip to content

Commit

Permalink
ENGCOM-4502: MSI: Add deprecation message to CatalogInventory SPIs #2…
Browse files Browse the repository at this point in the history
  • Loading branch information
sidolov authored Mar 18, 2019
2 parents bfce73c + 1a5e412 commit a7f930a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,33 @@

/**
* Interface StockRegistryProviderInterface
*
* @deprecated 2.3.0 Replaced with Multi Source Inventory
* @link https://devdocs.magento.com/guides/v2.3/inventory/index.html
* @link https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html
*/
interface StockRegistryProviderInterface
{
/**
* Get stock.
*
* @param int $scopeId
* @return \Magento\CatalogInventory\Api\Data\StockInterface
*/
public function getStock($scopeId);

/**
* Get stock item.
*
* @param int $productId
* @param int $scopeId
* @return \Magento\CatalogInventory\Api\Data\StockItemInterface
*/
public function getStockItem($productId, $scopeId);

/**
* Get stock status.
*
* @param int $productId
* @param int $scopeId
* @return \Magento\CatalogInventory\Api\Data\StockStatusInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,32 @@

/**
* Interface StockStateProviderInterface
*
* @deprecated 2.3.0 Replaced with Multi Source Inventory
* @link https://devdocs.magento.com/guides/v2.3/inventory/index.html
* @link https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html
*/
interface StockStateProviderInterface
{
/**
* Verify stock.
*
* @param StockItemInterface $stockItem
* @return bool
*/
public function verifyStock(StockItemInterface $stockItem);

/**
* Verify notification.
*
* @param StockItemInterface $stockItem
* @return bool
*/
public function verifyNotification(StockItemInterface $stockItem);

/**
* Validate quote qty.
*
* @param StockItemInterface $stockItem
* @param int|float $itemQty
* @param int|float $qtyToCheck
Expand All @@ -44,8 +54,9 @@ public function checkQuoteItemQty(StockItemInterface $stockItem, $itemQty, $qtyT
public function checkQty(StockItemInterface $stockItem, $qty);

/**
* Returns suggested qty that satisfies qty increments and minQty/maxQty/minSaleQty/maxSaleQty conditions
* or original qty if such value does not exist
* Returns suggested qty or original qty if such value does not exist.
*
* Suggested qty satisfies qty increments and minQty/maxQty/minSaleQty/maxSaleQty conditions.
*
* @param StockItemInterface $stockItem
* @param int|float $qty
Expand All @@ -54,6 +65,8 @@ public function checkQty(StockItemInterface $stockItem, $qty);
public function suggestQty(StockItemInterface $stockItem, $qty);

/**
* Check qty increments.
*
* @param StockItemInterface $stockItem
* @param int|float $qty
* @return \Magento\Framework\DataObject
Expand Down

0 comments on commit a7f930a

Please sign in to comment.