StockItemConfigurationInterface.php 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. declare(strict_types=1);
  7. namespace Magento\InventoryConfigurationApi\Api\Data;
  8. /**
  9. * @api
  10. */
  11. interface StockItemConfigurationInterface extends \Magento\Framework\Api\ExtensibleDataInterface
  12. {
  13. const BACKORDERS_NO = 0;
  14. const BACKORDERS_YES_NONOTIFY = 1;
  15. const BACKORDERS_YES_NOTIFY = 2;
  16. const IS_QTY_DECIMAL = 'is_qty_decimal';
  17. const SHOW_DEFAULT_NOTIFICATION_MESSAGE = 'show_default_notification_message';
  18. /*
  19. * Safety stock threshold, not to confuse with the one used to show the "Only X left" label on frontend
  20. */
  21. const USE_CONFIG_MIN_QTY = 'use_config_min_qty';
  22. const MIN_QTY = 'min_qty';
  23. /*
  24. * Threshold intended to show the "Only X left" label on frontend
  25. */
  26. const USE_CONFIG_STOCK_THRESHOLD_QTY = 'use_config_stock_threshold_qty';
  27. const STOCK_THRESHOLD_QTY = 'stock_threshold_qty';
  28. /*
  29. * Used to prevent to buy less than a certain qty of a product, not to confuse with the safety stock threshold
  30. */
  31. const USE_CONFIG_MIN_SALE_QTY = 'use_config_min_sale_qty';
  32. const MIN_SALE_QTY = 'min_sale_qty';
  33. const USE_CONFIG_MAX_SALE_QTY = 'use_config_max_sale_qty';
  34. const MAX_SALE_QTY = 'max_sale_qty';
  35. const USE_CONFIG_BACKORDERS = 'use_config_backorders';
  36. const BACKORDERS = 'backorders';
  37. const USE_CONFIG_NOTIFY_STOCK_QTY = 'use_config_notify_stock_qty';
  38. const NOTIFY_STOCK_QTY = 'notify_stock_qty';
  39. const USE_CONFIG_QTY_INCREMENTS = 'use_config_qty_increments';
  40. const QTY_INCREMENTS = 'qty_increments';
  41. const USE_CONFIG_ENABLE_QTY_INC = 'use_config_enable_qty_inc';
  42. const ENABLE_QTY_INCREMENTS = 'enable_qty_increments';
  43. const USE_CONFIG_MANAGE_STOCK = 'use_config_manage_stock';
  44. const MANAGE_STOCK = 'manage_stock';
  45. const LOW_STOCK_DATE = 'low_stock_date';
  46. const IS_DECIMAL_DIVIDED = 'is_decimal_divided';
  47. const STOCK_STATUS_CHANGED_AUTO = 'stock_status_changed_auto';
  48. /**
  49. * @return bool
  50. */
  51. public function isQtyDecimal(): bool;
  52. /**
  53. * @param bool $isQtyDecimal
  54. * @return void
  55. */
  56. public function setIsQtyDecimal(bool $isQtyDecimal): void;
  57. /**
  58. * @return bool
  59. */
  60. public function isShowDefaultNotificationMessage(): bool;
  61. /**
  62. * @return bool
  63. */
  64. public function isUseConfigMinQty(): bool;
  65. /**
  66. * @param bool $useConfigMinQty
  67. * @return void
  68. */
  69. public function setUseConfigMinQty(bool $useConfigMinQty): void;
  70. /**
  71. * @return float
  72. */
  73. public function getMinQty(): float;
  74. /**
  75. * @param float $minQty
  76. * @return void
  77. */
  78. public function setMinQty(float $minQty): void;
  79. /**
  80. * @return bool
  81. */
  82. public function isUseConfigMinSaleQty(): bool;
  83. /**
  84. * @param bool $useConfigMinSaleQty
  85. * @return void
  86. */
  87. public function setUseConfigMinSaleQty(bool $useConfigMinSaleQty): void;
  88. /**
  89. * @return float
  90. */
  91. public function getMinSaleQty(): float;
  92. /**
  93. * @param float $minSaleQty
  94. * @return void
  95. */
  96. public function setMinSaleQty(float $minSaleQty): void;
  97. /**
  98. * @return bool
  99. */
  100. public function isUseConfigMaxSaleQty(): bool;
  101. /**
  102. * @param bool $useConfigMaxSaleQty
  103. * @return void
  104. */
  105. public function setUseConfigMaxSaleQty(bool $useConfigMaxSaleQty): void;
  106. /**
  107. * @return float
  108. */
  109. public function getMaxSaleQty(): float;
  110. /**
  111. * @param float $maxSaleQty
  112. * @return void
  113. */
  114. public function setMaxSaleQty(float $maxSaleQty): void;
  115. /**
  116. * @return bool
  117. */
  118. public function isUseConfigBackorders(): bool;
  119. /**
  120. * @param bool $useConfigBackorders
  121. * @return void
  122. */
  123. public function setUseConfigBackorders(bool $useConfigBackorders): void;
  124. /**
  125. * Retrieve backorders status
  126. *
  127. * @return int
  128. */
  129. public function getBackorders(): int;
  130. /**
  131. * @param int $backOrders
  132. * @return void
  133. */
  134. public function setBackorders(int $backOrders): void;
  135. /**
  136. * @return bool
  137. */
  138. public function isUseConfigNotifyStockQty(): bool;
  139. /**
  140. * @param bool $useConfigNotifyStockQty
  141. * @return void
  142. */
  143. public function setUseConfigNotifyStockQty(bool $useConfigNotifyStockQty): void;
  144. /**
  145. * @return float
  146. */
  147. public function getNotifyStockQty(): float;
  148. /**
  149. * @param float $notifyStockQty
  150. * @return void
  151. */
  152. public function setNotifyStockQty(float $notifyStockQty): void;
  153. /**
  154. * @return bool
  155. */
  156. public function isUseConfigQtyIncrements(): bool;
  157. /**
  158. * @param bool $useConfigQtyIncrements
  159. * @return void
  160. */
  161. public function setUseConfigQtyIncrements(bool $useConfigQtyIncrements): void;
  162. /**
  163. * Retrieve Quantity Increments data wrapper
  164. *
  165. * @return float
  166. */
  167. public function getQtyIncrements(): float;
  168. /**
  169. * @param float $qtyIncrements
  170. * @return void
  171. */
  172. public function setQtyIncrements(float $qtyIncrements): void;
  173. /**
  174. * @return bool
  175. */
  176. public function isUseConfigEnableQtyInc(): bool;
  177. /**
  178. * @param bool $useConfigEnableQtyInc
  179. * @return void
  180. */
  181. public function setUseConfigEnableQtyInc(bool $useConfigEnableQtyInc): void;
  182. /**
  183. * @return bool
  184. */
  185. public function isEnableQtyIncrements(): bool;
  186. /**
  187. * @param $enableQtyIncrements
  188. * @return void
  189. */
  190. public function setEnableQtyIncrements(bool $enableQtyIncrements): void;
  191. /**
  192. * @return bool
  193. */
  194. public function isUseConfigManageStock(): bool;
  195. /**
  196. * @param bool $useConfigManageStock
  197. * @return void
  198. */
  199. public function setUseConfigManageStock(bool $useConfigManageStock): void;
  200. /**
  201. * @return bool
  202. */
  203. public function isManageStock(): bool;
  204. /**
  205. * @param bool $manageStock
  206. * @return void
  207. */
  208. public function setManageStock(bool $manageStock): void;
  209. /**
  210. * @return string
  211. */
  212. public function getLowStockDate(): string;
  213. /**
  214. * @param string $lowStockDate
  215. * @return void
  216. */
  217. public function setLowStockDate(string $lowStockDate): void;
  218. /**
  219. * @return bool
  220. */
  221. public function isDecimalDivided(): bool;
  222. /**
  223. * @param bool $isDecimalDivided
  224. * @return void
  225. */
  226. public function setIsDecimalDivided(bool $isDecimalDivided): void;
  227. /**
  228. * @return int
  229. */
  230. public function getStockStatusChangedAuto(): bool;
  231. /**
  232. * @param int $stockStatusChangedAuto
  233. * @return void
  234. */
  235. public function setStockStatusChangedAuto(int $stockStatusChangedAuto): void;
  236. /**
  237. * @return float
  238. */
  239. public function getStockThresholdQty(): float;
  240. /**
  241. * Retrieve existing extension attributes object
  242. *
  243. * @return \Magento\InventoryConfigurationApi\Api\Data\StockItemConfigurationExtensionInterface|null
  244. */
  245. public function getExtensionAttributes(): ?StockItemConfigurationExtensionInterface;
  246. /**
  247. * Set an extension attributes object
  248. *
  249. * @param \Magento\InventoryConfigurationApi\Api\Data\StockItemConfigurationExtensionInterface $extensionAttributes
  250. * @return void
  251. */
  252. public function setExtensionAttributes(
  253. \Magento\InventoryConfigurationApi\Api\Data\StockItemConfigurationExtensionInterface $extensionAttributes
  254. ): void;
  255. }