StockConfigurationInterface.php 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  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 StockConfigurationInterface
  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 StockConfigurationInterface
  17. {
  18. /**
  19. * Retrieve Default Scope ID
  20. *
  21. * @return int
  22. */
  23. public function getDefaultScopeId();
  24. /**
  25. * @param int $filter
  26. * @return int[]
  27. */
  28. public function getIsQtyTypeIds($filter = null);
  29. /**
  30. * Check if Stock Management is applicable for the given Product Type
  31. *
  32. * @param int $productTypeId
  33. * @return bool
  34. */
  35. public function isQty($productTypeId);
  36. /**
  37. * Check if is possible subtract value from item qty
  38. *
  39. * @param int $storeId
  40. * @return bool
  41. */
  42. public function canSubtractQty($storeId = null);
  43. /**
  44. * @param int $storeId
  45. * @return float
  46. */
  47. public function getMinQty($storeId = null);
  48. /**
  49. * @param int $storeId
  50. * @param int $customerGroupId
  51. * @return float
  52. */
  53. public function getMinSaleQty($storeId = null, $customerGroupId = null);
  54. /**
  55. * @param int $storeId
  56. * @return float
  57. */
  58. public function getMaxSaleQty($storeId = null);
  59. /**
  60. * @param int $storeId
  61. * @return float
  62. */
  63. public function getNotifyStockQty($storeId = null);
  64. /**
  65. * Retrieve whether Quantity Increments is enabled
  66. *
  67. * @param int $storeId
  68. * @return bool
  69. * @SuppressWarnings(PHPMD.BooleanGetMethodName)
  70. */
  71. public function getEnableQtyIncrements($storeId = null);
  72. /**
  73. * @param int $storeId
  74. * @return float
  75. */
  76. public function getQtyIncrements($store = null);
  77. /**
  78. * Retrieve backorders status
  79. *
  80. * @param int $storeId
  81. * @return int
  82. */
  83. public function getBackorders($storeId = null);
  84. /**
  85. * Retrieve Manage Stock data wrapper
  86. *
  87. * @param int $storeId
  88. * @return int
  89. */
  90. public function getManageStock($storeId = null);
  91. /**
  92. * Retrieve can Back in stock
  93. *
  94. * @param int $storeId
  95. * @return bool
  96. * @SuppressWarnings(PHPMD.BooleanGetMethodName)
  97. */
  98. public function getCanBackInStock($storeId = null);
  99. /**
  100. * Display out of stock products option
  101. *
  102. * @param int $storeId
  103. * @return bool
  104. */
  105. public function isShowOutOfStock($storeId = null);
  106. /**
  107. * Check if credit memo items auto return option is enabled
  108. *
  109. * @param int $storeId
  110. * @return bool
  111. */
  112. public function isAutoReturnEnabled($storeId = null);
  113. /**
  114. * Get 'Display product stock status' option value
  115. * Shows if it is necessary to show product stock status ('in stock'/'out of stock')
  116. *
  117. * @param int $storeId
  118. * @return bool
  119. */
  120. public function isDisplayProductStockStatus($storeId = null);
  121. /**
  122. * @param string $field
  123. * @param int $storeId
  124. * @return string
  125. */
  126. public function getDefaultConfigValue($field, $storeId = null);
  127. /**
  128. * Retrieve inventory item options (used in config)
  129. *
  130. * @return string[]
  131. */
  132. public function getConfigItemOptions();
  133. }