StockRepositoryInterface.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\CatalogInventory\Api;
  7. /**
  8. * Interface StockRepositoryInterface
  9. * @api
  10. * @since 100.0.2
  11. *
  12. * @deprecated 100.3.0 Replaced with Multi Source Inventory
  13. * @link https://devdocs.magento.com/guides/v2.3/inventory/index.html
  14. * @link https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html
  15. */
  16. interface StockRepositoryInterface
  17. {
  18. /**
  19. * Save Stock data
  20. *
  21. * @param \Magento\CatalogInventory\Api\Data\StockInterface $stock
  22. * @return \Magento\CatalogInventory\Api\Data\StockInterface
  23. */
  24. public function save(\Magento\CatalogInventory\Api\Data\StockInterface $stock);
  25. /**
  26. * Load Stock data by given stockId and parameters
  27. *
  28. * @param int $stockId
  29. * @return \Magento\CatalogInventory\Api\Data\StockInterface
  30. */
  31. public function get($stockId);
  32. /**
  33. * Load Stock data collection by given search criteria
  34. *
  35. * @param \Magento\CatalogInventory\Api\StockCriteriaInterface $collectionBuilder
  36. * @return \Magento\CatalogInventory\Api\Data\StockCollectionInterface
  37. */
  38. public function getList(StockCriteriaInterface $collectionBuilder);
  39. /**
  40. * Delete stock by given stockId
  41. *
  42. * @param \Magento\CatalogInventory\Api\Data\StockInterface $stock
  43. * @return bool
  44. */
  45. public function delete(\Magento\CatalogInventory\Api\Data\StockInterface $stock);
  46. }