123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312 |
- <?php
- /**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
- declare(strict_types=1);
- namespace Magento\InventoryConfigurationApi\Api\Data;
- /**
- * @api
- */
- interface StockItemConfigurationInterface extends \Magento\Framework\Api\ExtensibleDataInterface
- {
- const BACKORDERS_NO = 0;
- const BACKORDERS_YES_NONOTIFY = 1;
- const BACKORDERS_YES_NOTIFY = 2;
- const IS_QTY_DECIMAL = 'is_qty_decimal';
- const SHOW_DEFAULT_NOTIFICATION_MESSAGE = 'show_default_notification_message';
- /*
- * Safety stock threshold, not to confuse with the one used to show the "Only X left" label on frontend
- */
- const USE_CONFIG_MIN_QTY = 'use_config_min_qty';
- const MIN_QTY = 'min_qty';
- /*
- * Threshold intended to show the "Only X left" label on frontend
- */
- const USE_CONFIG_STOCK_THRESHOLD_QTY = 'use_config_stock_threshold_qty';
- const STOCK_THRESHOLD_QTY = 'stock_threshold_qty';
- /*
- * Used to prevent to buy less than a certain qty of a product, not to confuse with the safety stock threshold
- */
- const USE_CONFIG_MIN_SALE_QTY = 'use_config_min_sale_qty';
- const MIN_SALE_QTY = 'min_sale_qty';
- const USE_CONFIG_MAX_SALE_QTY = 'use_config_max_sale_qty';
- const MAX_SALE_QTY = 'max_sale_qty';
- const USE_CONFIG_BACKORDERS = 'use_config_backorders';
- const BACKORDERS = 'backorders';
- const USE_CONFIG_NOTIFY_STOCK_QTY = 'use_config_notify_stock_qty';
- const NOTIFY_STOCK_QTY = 'notify_stock_qty';
- const USE_CONFIG_QTY_INCREMENTS = 'use_config_qty_increments';
- const QTY_INCREMENTS = 'qty_increments';
- const USE_CONFIG_ENABLE_QTY_INC = 'use_config_enable_qty_inc';
- const ENABLE_QTY_INCREMENTS = 'enable_qty_increments';
- const USE_CONFIG_MANAGE_STOCK = 'use_config_manage_stock';
- const MANAGE_STOCK = 'manage_stock';
- const LOW_STOCK_DATE = 'low_stock_date';
- const IS_DECIMAL_DIVIDED = 'is_decimal_divided';
- const STOCK_STATUS_CHANGED_AUTO = 'stock_status_changed_auto';
- /**
- * @return bool
- */
- public function isQtyDecimal(): bool;
- /**
- * @param bool $isQtyDecimal
- * @return void
- */
- public function setIsQtyDecimal(bool $isQtyDecimal): void;
- /**
- * @return bool
- */
- public function isShowDefaultNotificationMessage(): bool;
- /**
- * @return bool
- */
- public function isUseConfigMinQty(): bool;
- /**
- * @param bool $useConfigMinQty
- * @return void
- */
- public function setUseConfigMinQty(bool $useConfigMinQty): void;
- /**
- * @return float
- */
- public function getMinQty(): float;
- /**
- * @param float $minQty
- * @return void
- */
- public function setMinQty(float $minQty): void;
- /**
- * @return bool
- */
- public function isUseConfigMinSaleQty(): bool;
- /**
- * @param bool $useConfigMinSaleQty
- * @return void
- */
- public function setUseConfigMinSaleQty(bool $useConfigMinSaleQty): void;
- /**
- * @return float
- */
- public function getMinSaleQty(): float;
- /**
- * @param float $minSaleQty
- * @return void
- */
- public function setMinSaleQty(float $minSaleQty): void;
- /**
- * @return bool
- */
- public function isUseConfigMaxSaleQty(): bool;
- /**
- * @param bool $useConfigMaxSaleQty
- * @return void
- */
- public function setUseConfigMaxSaleQty(bool $useConfigMaxSaleQty): void;
- /**
- * @return float
- */
- public function getMaxSaleQty(): float;
- /**
- * @param float $maxSaleQty
- * @return void
- */
- public function setMaxSaleQty(float $maxSaleQty): void;
- /**
- * @return bool
- */
- public function isUseConfigBackorders(): bool;
- /**
- * @param bool $useConfigBackorders
- * @return void
- */
- public function setUseConfigBackorders(bool $useConfigBackorders): void;
- /**
- * Retrieve backorders status
- *
- * @return int
- */
- public function getBackorders(): int;
- /**
- * @param int $backOrders
- * @return void
- */
- public function setBackorders(int $backOrders): void;
- /**
- * @return bool
- */
- public function isUseConfigNotifyStockQty(): bool;
- /**
- * @param bool $useConfigNotifyStockQty
- * @return void
- */
- public function setUseConfigNotifyStockQty(bool $useConfigNotifyStockQty): void;
- /**
- * @return float
- */
- public function getNotifyStockQty(): float;
- /**
- * @param float $notifyStockQty
- * @return void
- */
- public function setNotifyStockQty(float $notifyStockQty): void;
- /**
- * @return bool
- */
- public function isUseConfigQtyIncrements(): bool;
- /**
- * @param bool $useConfigQtyIncrements
- * @return void
- */
- public function setUseConfigQtyIncrements(bool $useConfigQtyIncrements): void;
- /**
- * Retrieve Quantity Increments data wrapper
- *
- * @return float
- */
- public function getQtyIncrements(): float;
- /**
- * @param float $qtyIncrements
- * @return void
- */
- public function setQtyIncrements(float $qtyIncrements): void;
- /**
- * @return bool
- */
- public function isUseConfigEnableQtyInc(): bool;
- /**
- * @param bool $useConfigEnableQtyInc
- * @return void
- */
- public function setUseConfigEnableQtyInc(bool $useConfigEnableQtyInc): void;
- /**
- * @return bool
- */
- public function isEnableQtyIncrements(): bool;
- /**
- * @param $enableQtyIncrements
- * @return void
- */
- public function setEnableQtyIncrements(bool $enableQtyIncrements): void;
- /**
- * @return bool
- */
- public function isUseConfigManageStock(): bool;
- /**
- * @param bool $useConfigManageStock
- * @return void
- */
- public function setUseConfigManageStock(bool $useConfigManageStock): void;
- /**
- * @return bool
- */
- public function isManageStock(): bool;
- /**
- * @param bool $manageStock
- * @return void
- */
- public function setManageStock(bool $manageStock): void;
- /**
- * @return string
- */
- public function getLowStockDate(): string;
- /**
- * @param string $lowStockDate
- * @return void
- */
- public function setLowStockDate(string $lowStockDate): void;
- /**
- * @return bool
- */
- public function isDecimalDivided(): bool;
- /**
- * @param bool $isDecimalDivided
- * @return void
- */
- public function setIsDecimalDivided(bool $isDecimalDivided): void;
- /**
- * @return int
- */
- public function getStockStatusChangedAuto(): bool;
- /**
- * @param int $stockStatusChangedAuto
- * @return void
- */
- public function setStockStatusChangedAuto(int $stockStatusChangedAuto): void;
- /**
- * @return float
- */
- public function getStockThresholdQty(): float;
- /**
- * Retrieve existing extension attributes object
- *
- * @return \Magento\InventoryConfigurationApi\Api\Data\StockItemConfigurationExtensionInterface|null
- */
- public function getExtensionAttributes(): ?StockItemConfigurationExtensionInterface;
- /**
- * Set an extension attributes object
- *
- * @param \Magento\InventoryConfigurationApi\Api\Data\StockItemConfigurationExtensionInterface $extensionAttributes
- * @return void
- */
- public function setExtensionAttributes(
- \Magento\InventoryConfigurationApi\Api\Data\StockItemConfigurationExtensionInterface $extensionAttributes
- ): void;
- }
|