Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't that against DRY? I mean - the method name is descriptive enough.

*
* @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