StockStatusInterface.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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 StockStatusInterface
  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 StockStatusInterface extends ExtensibleDataInterface
  18. {
  19. /**#@+
  20. * Stock Status values.
  21. */
  22. const STATUS_OUT_OF_STOCK = 0;
  23. const STATUS_IN_STOCK = 1;
  24. /**#@-*/
  25. /**#@+
  26. * Stock status object data keys
  27. */
  28. const PRODUCT_ID = 'product_id';
  29. const STOCK_ID = 'stock_id';
  30. const QTY = 'qty';
  31. const STOCK_STATUS = 'stock_status';
  32. const STOCK_ITEM = 'stock_item';
  33. /**#@-*/
  34. /**
  35. * @return int
  36. */
  37. public function getProductId();
  38. /**
  39. * @param int $productId
  40. * @return $this
  41. */
  42. public function setProductId($productId);
  43. /**
  44. * @return int
  45. */
  46. public function getStockId();
  47. /**
  48. * @param int $stockId
  49. * @return $this
  50. */
  51. public function setStockId($stockId);
  52. /**
  53. * @return int
  54. */
  55. public function getQty();
  56. /**
  57. * @param int $qty
  58. * @return $this
  59. */
  60. public function setQty($qty);
  61. /**
  62. * @return int
  63. */
  64. public function getStockStatus();
  65. /**
  66. * @param int $stockStatus
  67. * @return $this
  68. */
  69. public function setStockStatus($stockStatus);
  70. /**
  71. * @return \Magento\CatalogInventory\Api\Data\StockItemInterface
  72. */
  73. public function getStockItem();
  74. /**
  75. * Retrieve existing extension attributes object or create a new one.
  76. *
  77. * @return \Magento\CatalogInventory\Api\Data\StockStatusExtensionInterface|null
  78. */
  79. public function getExtensionAttributes();
  80. /**
  81. * Set an extension attributes object.
  82. *
  83. * @param \Magento\CatalogInventory\Api\Data\StockStatusExtensionInterface $extensionAttributes
  84. * @return $this
  85. */
  86. public function setExtensionAttributes(
  87. \Magento\CatalogInventory\Api\Data\StockStatusExtensionInterface $extensionAttributes
  88. );
  89. }