StockItemInterface.php 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408
  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 StockItem
  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 StockItemInterface extends ExtensibleDataInterface
  18. {
  19. const BACKORDERS_NO = 0;
  20. const ITEM_ID = 'item_id';
  21. const PRODUCT_ID = 'product_id';
  22. const STOCK_ID = 'stock_id';
  23. const QTY = 'qty';
  24. const IS_QTY_DECIMAL = 'is_qty_decimal';
  25. const SHOW_DEFAULT_NOTIFICATION_MESSAGE = 'show_default_notification_message';
  26. const USE_CONFIG_MIN_QTY = 'use_config_min_qty';
  27. const MIN_QTY = 'min_qty';
  28. const USE_CONFIG_MIN_SALE_QTY = 'use_config_min_sale_qty';
  29. const MIN_SALE_QTY = 'min_sale_qty';
  30. const USE_CONFIG_MAX_SALE_QTY = 'use_config_max_sale_qty';
  31. const MAX_SALE_QTY = 'max_sale_qty';
  32. const USE_CONFIG_BACKORDERS = 'use_config_backorders';
  33. const BACKORDERS = 'backorders';
  34. const USE_CONFIG_NOTIFY_STOCK_QTY = 'use_config_notify_stock_qty';
  35. const NOTIFY_STOCK_QTY = 'notify_stock_qty';
  36. const USE_CONFIG_QTY_INCREMENTS = 'use_config_qty_increments';
  37. const QTY_INCREMENTS = 'qty_increments';
  38. const USE_CONFIG_ENABLE_QTY_INC = 'use_config_enable_qty_inc';
  39. const ENABLE_QTY_INCREMENTS = 'enable_qty_increments';
  40. const USE_CONFIG_MANAGE_STOCK = 'use_config_manage_stock';
  41. const MANAGE_STOCK = 'manage_stock';
  42. const IS_IN_STOCK = 'is_in_stock';
  43. const LOW_STOCK_DATE = 'low_stock_date';
  44. const IS_DECIMAL_DIVIDED = 'is_decimal_divided';
  45. const STOCK_STATUS_CHANGED_AUTO = 'stock_status_changed_auto';
  46. const STORE_ID = 'store_id';
  47. const CUSTOMER_GROUP_ID = 'customer_group_id';
  48. /**
  49. * @return int|null
  50. */
  51. public function getItemId();
  52. /**
  53. * @param int $itemId
  54. * @return $this
  55. */
  56. public function setItemId($itemId);
  57. /**
  58. * @return int|null
  59. */
  60. public function getProductId();
  61. /**
  62. * @param int $productId
  63. * @return $this
  64. */
  65. public function setProductId($productId);
  66. /**
  67. * Retrieve stock identifier
  68. *
  69. * @return int|null
  70. */
  71. public function getStockId();
  72. /**
  73. * Set stock identifier
  74. *
  75. * @param int $stockId
  76. * @return $this
  77. */
  78. public function setStockId($stockId);
  79. /**
  80. * @return float
  81. */
  82. public function getQty();
  83. /**
  84. * @param float $qty
  85. * @return $this
  86. */
  87. public function setQty($qty);
  88. /**
  89. * Retrieve Stock Availability
  90. *
  91. * @return bool|int
  92. */
  93. public function getIsInStock();
  94. /**
  95. * Set Stock Availability
  96. *
  97. * @param bool|int $isInStock
  98. * @return $this
  99. */
  100. public function setIsInStock($isInStock);
  101. /**
  102. * @return bool
  103. * @SuppressWarnings(PHPMD.BooleanGetMethodName)
  104. */
  105. public function getIsQtyDecimal();
  106. /**
  107. * @param bool $isQtyDecimal
  108. * @return $this
  109. */
  110. public function setIsQtyDecimal($isQtyDecimal);
  111. /**
  112. * @return bool
  113. * @SuppressWarnings(PHPMD.BooleanGetMethodName)
  114. */
  115. public function getShowDefaultNotificationMessage();
  116. /**
  117. * @return bool
  118. * @SuppressWarnings(PHPMD.BooleanGetMethodName)
  119. */
  120. public function getUseConfigMinQty();
  121. /**
  122. * @param bool $useConfigMinQty
  123. * @return $this
  124. */
  125. public function setUseConfigMinQty($useConfigMinQty);
  126. /**
  127. * Retrieve minimal quantity available for item status in stock
  128. *
  129. * @return float
  130. */
  131. public function getMinQty();
  132. /**
  133. * Set minimal quantity available for item status in stock
  134. *
  135. * @param float $minQty
  136. * @return $this
  137. */
  138. public function setMinQty($minQty);
  139. /**
  140. * @return int
  141. */
  142. public function getUseConfigMinSaleQty();
  143. /**
  144. * @param int $useConfigMinSaleQty
  145. * @return $this
  146. */
  147. public function setUseConfigMinSaleQty($useConfigMinSaleQty);
  148. /**
  149. * Retrieve Minimum Qty Allowed in Shopping Cart or NULL when there is no limitation
  150. *
  151. * @return float
  152. */
  153. public function getMinSaleQty();
  154. /**
  155. * Set Minimum Qty Allowed in Shopping Cart or NULL when there is no limitation
  156. *
  157. * @param float $minSaleQty
  158. * @return $this
  159. */
  160. public function setMinSaleQty($minSaleQty);
  161. /**
  162. * @return bool
  163. * @SuppressWarnings(PHPMD.BooleanGetMethodName)
  164. */
  165. public function getUseConfigMaxSaleQty();
  166. /**
  167. * @param bool $useConfigMaxSaleQty
  168. * @return $this
  169. */
  170. public function setUseConfigMaxSaleQty($useConfigMaxSaleQty);
  171. /**
  172. * Retrieve Maximum Qty Allowed in Shopping Cart data wrapper
  173. *
  174. * @return float
  175. */
  176. public function getMaxSaleQty();
  177. /**
  178. * Set Maximum Qty Allowed in Shopping Cart data wrapper
  179. *
  180. * @param float $maxSaleQty
  181. * @return $this
  182. */
  183. public function setMaxSaleQty($maxSaleQty);
  184. /**
  185. * @return bool
  186. * @SuppressWarnings(PHPMD.BooleanGetMethodName)
  187. */
  188. public function getUseConfigBackorders();
  189. /**
  190. * @param bool $useConfigBackorders
  191. * @return $this
  192. */
  193. public function setUseConfigBackorders($useConfigBackorders);
  194. /**
  195. * Retrieve backorders status
  196. *
  197. * @return int
  198. */
  199. public function getBackorders();
  200. /**
  201. * Set backOrders status
  202. *
  203. * @param int $backOrders
  204. * @return $this
  205. */
  206. public function setBackorders($backOrders);
  207. /**
  208. * @return bool
  209. * @SuppressWarnings(PHPMD.BooleanGetMethodName)
  210. */
  211. public function getUseConfigNotifyStockQty();
  212. /**
  213. * @param bool $useConfigNotifyStockQty
  214. * @return $this
  215. */
  216. public function setUseConfigNotifyStockQty($useConfigNotifyStockQty);
  217. /**
  218. * Retrieve Notify for Quantity Below data wrapper
  219. *
  220. * @return float
  221. */
  222. public function getNotifyStockQty();
  223. /**
  224. * Set Notify for Quantity Below data wrapper
  225. *
  226. * @param float $notifyStockQty
  227. * @return $this
  228. */
  229. public function setNotifyStockQty($notifyStockQty);
  230. /**
  231. * @return bool
  232. * @SuppressWarnings(PHPMD.BooleanGetMethodName)
  233. */
  234. public function getUseConfigQtyIncrements();
  235. /**
  236. * @param bool $useConfigQtyIncrements
  237. * @return $this
  238. */
  239. public function setUseConfigQtyIncrements($useConfigQtyIncrements);
  240. /**
  241. * Retrieve Quantity Increments data wrapper
  242. *
  243. * @return float|false
  244. */
  245. public function getQtyIncrements();
  246. /**
  247. * Set Quantity Increments data wrapper
  248. *
  249. * @param float $qtyIncrements
  250. * @return $this
  251. */
  252. public function setQtyIncrements($qtyIncrements);
  253. /**
  254. * @return bool
  255. * @SuppressWarnings(PHPMD.BooleanGetMethodName)
  256. */
  257. public function getUseConfigEnableQtyInc();
  258. /**
  259. * @param bool $useConfigEnableQtyInc
  260. * @return $this
  261. */
  262. public function setUseConfigEnableQtyInc($useConfigEnableQtyInc);
  263. /**
  264. * Retrieve whether Quantity Increments is enabled
  265. *
  266. * @return bool
  267. * @SuppressWarnings(PHPMD.BooleanGetMethodName)
  268. */
  269. public function getEnableQtyIncrements();
  270. /**
  271. * Set whether Quantity Increments is enabled
  272. *
  273. * @param bool $enableQtyIncrements
  274. * @return $this
  275. */
  276. public function setEnableQtyIncrements($enableQtyIncrements);
  277. /**
  278. * @return bool
  279. * @SuppressWarnings(PHPMD.BooleanGetMethodName)
  280. */
  281. public function getUseConfigManageStock();
  282. /**
  283. * @param bool $useConfigManageStock
  284. * @return $this
  285. */
  286. public function setUseConfigManageStock($useConfigManageStock);
  287. /**
  288. * Retrieve can Manage Stock
  289. *
  290. * @return bool
  291. * @SuppressWarnings(PHPMD.BooleanGetMethodName)
  292. */
  293. public function getManageStock();
  294. /**
  295. * @param bool $manageStock
  296. * @return $this
  297. */
  298. public function setManageStock($manageStock);
  299. /**
  300. * @return string
  301. */
  302. public function getLowStockDate();
  303. /**
  304. * @param string $lowStockDate
  305. * @return $this
  306. */
  307. public function setLowStockDate($lowStockDate);
  308. /**
  309. * @return bool
  310. * @SuppressWarnings(PHPMD.BooleanGetMethodName)
  311. */
  312. public function getIsDecimalDivided();
  313. /**
  314. * @param bool $isDecimalDivided
  315. * @return $this
  316. */
  317. public function setIsDecimalDivided($isDecimalDivided);
  318. /**
  319. * @return int
  320. */
  321. public function getStockStatusChangedAuto();
  322. /**
  323. * @param int $stockStatusChangedAuto
  324. * @return $this
  325. */
  326. public function setStockStatusChangedAuto($stockStatusChangedAuto);
  327. /**
  328. * Retrieve existing extension attributes object or create a new one.
  329. *
  330. * @return \Magento\CatalogInventory\Api\Data\StockItemExtensionInterface|null
  331. */
  332. public function getExtensionAttributes();
  333. /**
  334. * Set an extension attributes object.
  335. *
  336. * @param \Magento\CatalogInventory\Api\Data\StockItemExtensionInterface $extensionAttributes
  337. * @return $this
  338. */
  339. public function setExtensionAttributes(
  340. \Magento\CatalogInventory\Api\Data\StockItemExtensionInterface $extensionAttributes
  341. );
  342. }