StockInterface.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\CatalogInventory\Api\Data;
  7. use Magento\Framework\Api\ExtensibleDataInterface;
  8. /**
  9. * Interface Stock
  10. * @api
  11. * @since 100.0.2
  12. *
  13. * @deprecated 100.3.0 Replaced with Multi Source Inventory
  14. * @link https://devdocs.magento.com/guides/v2.3/inventory/index.html
  15. * @link https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html
  16. */
  17. interface StockInterface extends ExtensibleDataInterface
  18. {
  19. const STOCK_ID = 'stock_id';
  20. const STOCK_NAME = 'stock_name';
  21. /**
  22. * Retrieve stock identifier
  23. *
  24. * @return int
  25. */
  26. public function getStockId();
  27. /**
  28. * Set stock identifier
  29. *
  30. * @param int $stockId
  31. * @return $this
  32. */
  33. public function setStockId($stockId);
  34. /**
  35. * Retrieve stock name
  36. *
  37. * @return string
  38. */
  39. public function getStockName();
  40. /**
  41. * Set stock name
  42. *
  43. * @param string $stockName
  44. * @return $this
  45. */
  46. public function setStockName($stockName);
  47. /**
  48. * Retrieve existing extension attributes object or create a new one.
  49. *
  50. * @return \Magento\CatalogInventory\Api\Data\StockExtensionInterface|null
  51. */
  52. public function getExtensionAttributes();
  53. /**
  54. * Set an extension attributes object.
  55. *
  56. * @param \Magento\CatalogInventory\Api\Data\StockExtensionInterface $extensionAttributes
  57. * @return $this
  58. */
  59. public function setExtensionAttributes(
  60. \Magento\CatalogInventory\Api\Data\StockExtensionInterface $extensionAttributes
  61. );
  62. }