Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Data Fields
StockItemInterface Interface Reference
Inheritance diagram for StockItemInterface:
ExtensibleDataInterface Item Item

Public Member Functions

 getItemId ()
 
 setItemId ($itemId)
 
 getProductId ()
 
 setProductId ($productId)
 
 getStockId ()
 
 setStockId ($stockId)
 
 getQty ()
 
 setQty ($qty)
 
 getIsInStock ()
 
 setIsInStock ($isInStock)
 
 getIsQtyDecimal ()
 
 setIsQtyDecimal ($isQtyDecimal)
 
 getShowDefaultNotificationMessage ()
 
 getUseConfigMinQty ()
 
 setUseConfigMinQty ($useConfigMinQty)
 
 getMinQty ()
 
 setMinQty ($minQty)
 
 getUseConfigMinSaleQty ()
 
 setUseConfigMinSaleQty ($useConfigMinSaleQty)
 
 getMinSaleQty ()
 
 setMinSaleQty ($minSaleQty)
 
 getUseConfigMaxSaleQty ()
 
 setUseConfigMaxSaleQty ($useConfigMaxSaleQty)
 
 getMaxSaleQty ()
 
 setMaxSaleQty ($maxSaleQty)
 
 getUseConfigBackorders ()
 
 setUseConfigBackorders ($useConfigBackorders)
 
 getBackorders ()
 
 setBackorders ($backOrders)
 
 getUseConfigNotifyStockQty ()
 
 setUseConfigNotifyStockQty ($useConfigNotifyStockQty)
 
 getNotifyStockQty ()
 
 setNotifyStockQty ($notifyStockQty)
 
 getUseConfigQtyIncrements ()
 
 setUseConfigQtyIncrements ($useConfigQtyIncrements)
 
 getQtyIncrements ()
 
 setQtyIncrements ($qtyIncrements)
 
 getUseConfigEnableQtyInc ()
 
 setUseConfigEnableQtyInc ($useConfigEnableQtyInc)
 
 getEnableQtyIncrements ()
 
 setEnableQtyIncrements ($enableQtyIncrements)
 
 getUseConfigManageStock ()
 
 setUseConfigManageStock ($useConfigManageStock)
 
 getManageStock ()
 
 setManageStock ($manageStock)
 
 getLowStockDate ()
 
 setLowStockDate ($lowStockDate)
 
 getIsDecimalDivided ()
 
 setIsDecimalDivided ($isDecimalDivided)
 
 getStockStatusChangedAuto ()
 
 setStockStatusChangedAuto ($stockStatusChangedAuto)
 
 getExtensionAttributes ()
 
 setExtensionAttributes (\Magento\CatalogInventory\Api\Data\StockItemExtensionInterface $extensionAttributes)
 

Data Fields

const BACKORDERS_NO = 0
 
const ITEM_ID = 'item_id'
 
const PRODUCT_ID = 'product_id'
 
const STOCK_ID = 'stock_id'
 
const QTY = 'qty'
 
const IS_QTY_DECIMAL = 'is_qty_decimal'
 
const SHOW_DEFAULT_NOTIFICATION_MESSAGE = 'show_default_notification_message'
 
const USE_CONFIG_MIN_QTY = 'use_config_min_qty'
 
const MIN_QTY = 'min_qty'
 
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 IS_IN_STOCK = 'is_in_stock'
 
const LOW_STOCK_DATE = 'low_stock_date'
 
const IS_DECIMAL_DIVIDED = 'is_decimal_divided'
 
const STOCK_STATUS_CHANGED_AUTO = 'stock_status_changed_auto'
 
const STORE_ID = 'store_id'
 
const CUSTOMER_GROUP_ID = 'customer_group_id'
 
- Data Fields inherited from ExtensibleDataInterface
const EXTENSION_ATTRIBUTES_KEY = 'extension_attributes'
 

Detailed Description

Interface StockItem @api

Since
100.0.2
Deprecated:
2.3.0 Replaced with Multi Source Inventory https://devdocs.magento.com/guides/v2.3/inventory/catalog-inventory-replacements.html

Definition at line 19 of file StockItemInterface.php.

Member Function Documentation

◆ getBackorders()

getBackorders ( )

Retrieve backorders status

Returns
int

Implemented in Item.

◆ getEnableQtyIncrements()

getEnableQtyIncrements ( )

Retrieve whether Quantity Increments is enabled

Returns
bool @SuppressWarnings(PHPMD.BooleanGetMethodName)

Implemented in Item.

◆ getExtensionAttributes()

getExtensionAttributes ( )

Retrieve existing extension attributes object or create a new one.

Returns
\Magento\CatalogInventory\Api\Data\StockItemExtensionInterface|null

Implemented in Item.

◆ getIsDecimalDivided()

getIsDecimalDivided ( )
Returns
bool @SuppressWarnings(PHPMD.BooleanGetMethodName)

Implemented in Item.

◆ getIsInStock()

getIsInStock ( )

Retrieve Stock Availability

Returns
bool|int

Implemented in Item.

◆ getIsQtyDecimal()

getIsQtyDecimal ( )
Returns
bool @SuppressWarnings(PHPMD.BooleanGetMethodName)

Implemented in Item.

◆ getItemId()

getItemId ( )
Returns
int|null

Implemented in Item.

◆ getLowStockDate()

getLowStockDate ( )
Returns
string

Implemented in Item.

◆ getManageStock()

getManageStock ( )

Retrieve can Manage Stock

Returns
bool @SuppressWarnings(PHPMD.BooleanGetMethodName)

Implemented in Item.

◆ getMaxSaleQty()

getMaxSaleQty ( )

Retrieve Maximum Qty Allowed in Shopping Cart data wrapper

Returns
float

Implemented in Item.

◆ getMinQty()

getMinQty ( )

Retrieve minimal quantity available for item status in stock

Returns
float

Implemented in Item.

◆ getMinSaleQty()

getMinSaleQty ( )

Retrieve Minimum Qty Allowed in Shopping Cart or NULL when there is no limitation

Returns
float

Implemented in Item.

◆ getNotifyStockQty()

getNotifyStockQty ( )

Retrieve Notify for Quantity Below data wrapper

Returns
float

Implemented in Item.

◆ getProductId()

getProductId ( )
Returns
int|null

Implemented in Item.

◆ getQty()

getQty ( )
Returns
float

Implemented in Item.

◆ getQtyIncrements()

getQtyIncrements ( )

Retrieve Quantity Increments data wrapper

Returns
float|false

Implemented in Item.

◆ getShowDefaultNotificationMessage()

getShowDefaultNotificationMessage ( )
Returns
bool @SuppressWarnings(PHPMD.BooleanGetMethodName)

Implemented in Item, and Item.

◆ getStockId()

getStockId ( )

Retrieve stock identifier

Returns
int|null

Implemented in Item.

◆ getStockStatusChangedAuto()

getStockStatusChangedAuto ( )
Returns
int

Implemented in Item.

◆ getUseConfigBackorders()

getUseConfigBackorders ( )
Returns
bool @SuppressWarnings(PHPMD.BooleanGetMethodName)

Implemented in Item.

◆ getUseConfigEnableQtyInc()

getUseConfigEnableQtyInc ( )
Returns
bool @SuppressWarnings(PHPMD.BooleanGetMethodName)

Implemented in Item.

◆ getUseConfigManageStock()

getUseConfigManageStock ( )
Returns
bool @SuppressWarnings(PHPMD.BooleanGetMethodName)

Implemented in Item.

◆ getUseConfigMaxSaleQty()

getUseConfigMaxSaleQty ( )
Returns
bool @SuppressWarnings(PHPMD.BooleanGetMethodName)

Implemented in Item.

◆ getUseConfigMinQty()

getUseConfigMinQty ( )
Returns
bool @SuppressWarnings(PHPMD.BooleanGetMethodName)

Implemented in Item.

◆ getUseConfigMinSaleQty()

getUseConfigMinSaleQty ( )
Returns
int

Implemented in Item.

◆ getUseConfigNotifyStockQty()

getUseConfigNotifyStockQty ( )
Returns
bool @SuppressWarnings(PHPMD.BooleanGetMethodName)

Implemented in Item.

◆ getUseConfigQtyIncrements()

getUseConfigQtyIncrements ( )
Returns
bool @SuppressWarnings(PHPMD.BooleanGetMethodName)

Implemented in Item.

◆ setBackorders()

setBackorders (   $backOrders)

Set backOrders status

Parameters
int$backOrders
Returns
$this

Implemented in Item.

◆ setEnableQtyIncrements()

setEnableQtyIncrements (   $enableQtyIncrements)

Set whether Quantity Increments is enabled

Parameters
bool$enableQtyIncrements
Returns
$this

Implemented in Item.

◆ setExtensionAttributes()

setExtensionAttributes ( \Magento\CatalogInventory\Api\Data\StockItemExtensionInterface  $extensionAttributes)

Set an extension attributes object.

Parameters
\Magento\CatalogInventory\Api\Data\StockItemExtensionInterface$extensionAttributes
Returns
$this

Implemented in Item.

◆ setIsDecimalDivided()

setIsDecimalDivided (   $isDecimalDivided)
Parameters
bool$isDecimalDivided
Returns
$this

Implemented in Item.

◆ setIsInStock()

setIsInStock (   $isInStock)

Set Stock Availability

Parameters
bool | int$isInStock
Returns
$this

Implemented in Item.

◆ setIsQtyDecimal()

setIsQtyDecimal (   $isQtyDecimal)
Parameters
bool$isQtyDecimal
Returns
$this

Implemented in Item.

◆ setItemId()

setItemId (   $itemId)
Parameters
int$itemId
Returns
$this

Implemented in Item.

◆ setLowStockDate()

setLowStockDate (   $lowStockDate)
Parameters
string$lowStockDate
Returns
$this

Implemented in Item.

◆ setManageStock()

setManageStock (   $manageStock)
Parameters
bool$manageStock
Returns
$this

Implemented in Item.

◆ setMaxSaleQty()

setMaxSaleQty (   $maxSaleQty)

Set Maximum Qty Allowed in Shopping Cart data wrapper

Parameters
float$maxSaleQty
Returns
$this

Implemented in Item.

◆ setMinQty()

setMinQty (   $minQty)

Set minimal quantity available for item status in stock

Parameters
float$minQty
Returns
$this

Implemented in Item.

◆ setMinSaleQty()

setMinSaleQty (   $minSaleQty)

Set Minimum Qty Allowed in Shopping Cart or NULL when there is no limitation

Parameters
float$minSaleQty
Returns
$this

Implemented in Item.

◆ setNotifyStockQty()

setNotifyStockQty (   $notifyStockQty)

Set Notify for Quantity Below data wrapper

Parameters
float$notifyStockQty
Returns
$this

Implemented in Item.

◆ setProductId()

setProductId (   $productId)
Parameters
int$productId
Returns
$this

Implemented in Item.

◆ setQty()

setQty (   $qty)
Parameters
float$qty
Returns
$this

Implemented in Item.

◆ setQtyIncrements()

setQtyIncrements (   $qtyIncrements)

Set Quantity Increments data wrapper

Parameters
float$qtyIncrements
Returns
$this

Implemented in Item.

◆ setStockId()

setStockId (   $stockId)

Set stock identifier

Parameters
int$stockId
Returns
$this

Implemented in Item.

◆ setStockStatusChangedAuto()

setStockStatusChangedAuto (   $stockStatusChangedAuto)
Parameters
int$stockStatusChangedAuto
Returns
$this

Implemented in Item.

◆ setUseConfigBackorders()

setUseConfigBackorders (   $useConfigBackorders)
Parameters
bool$useConfigBackorders
Returns
$this

Implemented in Item.

◆ setUseConfigEnableQtyInc()

setUseConfigEnableQtyInc (   $useConfigEnableQtyInc)
Parameters
bool$useConfigEnableQtyInc
Returns
$this

Implemented in Item.

◆ setUseConfigManageStock()

setUseConfigManageStock (   $useConfigManageStock)
Parameters
bool$useConfigManageStock
Returns
$this

Implemented in Item.

◆ setUseConfigMaxSaleQty()

setUseConfigMaxSaleQty (   $useConfigMaxSaleQty)
Parameters
bool$useConfigMaxSaleQty
Returns
$this

Implemented in Item.

◆ setUseConfigMinQty()

setUseConfigMinQty (   $useConfigMinQty)
Parameters
bool$useConfigMinQty
Returns
$this

Implemented in Item.

◆ setUseConfigMinSaleQty()

setUseConfigMinSaleQty (   $useConfigMinSaleQty)
Parameters
int$useConfigMinSaleQty
Returns
$this

Implemented in Item.

◆ setUseConfigNotifyStockQty()

setUseConfigNotifyStockQty (   $useConfigNotifyStockQty)
Parameters
bool$useConfigNotifyStockQty
Returns
$this

Implemented in Item.

◆ setUseConfigQtyIncrements()

setUseConfigQtyIncrements (   $useConfigQtyIncrements)
Parameters
bool$useConfigQtyIncrements
Returns
$this

Implemented in Item.

Field Documentation

◆ BACKORDERS

const BACKORDERS = 'backorders'

Definition at line 40 of file StockItemInterface.php.

◆ BACKORDERS_NO

const BACKORDERS_NO = 0

Definition at line 21 of file StockItemInterface.php.

◆ CUSTOMER_GROUP_ID

const CUSTOMER_GROUP_ID = 'customer_group_id'

Definition at line 60 of file StockItemInterface.php.

◆ ENABLE_QTY_INCREMENTS

const ENABLE_QTY_INCREMENTS = 'enable_qty_increments'

Definition at line 49 of file StockItemInterface.php.

◆ IS_DECIMAL_DIVIDED

const IS_DECIMAL_DIVIDED = 'is_decimal_divided'

Definition at line 56 of file StockItemInterface.php.

◆ IS_IN_STOCK

const IS_IN_STOCK = 'is_in_stock'

Definition at line 54 of file StockItemInterface.php.

◆ IS_QTY_DECIMAL

const IS_QTY_DECIMAL = 'is_qty_decimal'

Definition at line 27 of file StockItemInterface.php.

◆ ITEM_ID

const ITEM_ID = 'item_id'

Definition at line 23 of file StockItemInterface.php.

◆ LOW_STOCK_DATE

const LOW_STOCK_DATE = 'low_stock_date'

Definition at line 55 of file StockItemInterface.php.

◆ MANAGE_STOCK

const MANAGE_STOCK = 'manage_stock'

Definition at line 52 of file StockItemInterface.php.

◆ MAX_SALE_QTY

const MAX_SALE_QTY = 'max_sale_qty'

Definition at line 37 of file StockItemInterface.php.

◆ MIN_QTY

const MIN_QTY = 'min_qty'

Definition at line 31 of file StockItemInterface.php.

◆ MIN_SALE_QTY

const MIN_SALE_QTY = 'min_sale_qty'

Definition at line 34 of file StockItemInterface.php.

◆ NOTIFY_STOCK_QTY

const NOTIFY_STOCK_QTY = 'notify_stock_qty'

Definition at line 43 of file StockItemInterface.php.

◆ PRODUCT_ID

const PRODUCT_ID = 'product_id'

Definition at line 24 of file StockItemInterface.php.

◆ QTY

const QTY = 'qty'

Definition at line 26 of file StockItemInterface.php.

◆ QTY_INCREMENTS

const QTY_INCREMENTS = 'qty_increments'

Definition at line 46 of file StockItemInterface.php.

◆ SHOW_DEFAULT_NOTIFICATION_MESSAGE

const SHOW_DEFAULT_NOTIFICATION_MESSAGE = 'show_default_notification_message'

Definition at line 28 of file StockItemInterface.php.

◆ STOCK_ID

const STOCK_ID = 'stock_id'

Definition at line 25 of file StockItemInterface.php.

◆ STOCK_STATUS_CHANGED_AUTO

const STOCK_STATUS_CHANGED_AUTO = 'stock_status_changed_auto'

Definition at line 57 of file StockItemInterface.php.

◆ STORE_ID

const STORE_ID = 'store_id'

Definition at line 59 of file StockItemInterface.php.

◆ USE_CONFIG_BACKORDERS

const USE_CONFIG_BACKORDERS = 'use_config_backorders'

Definition at line 39 of file StockItemInterface.php.

◆ USE_CONFIG_ENABLE_QTY_INC

const USE_CONFIG_ENABLE_QTY_INC = 'use_config_enable_qty_inc'

Definition at line 48 of file StockItemInterface.php.

◆ USE_CONFIG_MANAGE_STOCK

const USE_CONFIG_MANAGE_STOCK = 'use_config_manage_stock'

Definition at line 51 of file StockItemInterface.php.

◆ USE_CONFIG_MAX_SALE_QTY

const USE_CONFIG_MAX_SALE_QTY = 'use_config_max_sale_qty'

Definition at line 36 of file StockItemInterface.php.

◆ USE_CONFIG_MIN_QTY

const USE_CONFIG_MIN_QTY = 'use_config_min_qty'

Definition at line 30 of file StockItemInterface.php.

◆ USE_CONFIG_MIN_SALE_QTY

const USE_CONFIG_MIN_SALE_QTY = 'use_config_min_sale_qty'

Definition at line 33 of file StockItemInterface.php.

◆ USE_CONFIG_NOTIFY_STOCK_QTY

const USE_CONFIG_NOTIFY_STOCK_QTY = 'use_config_notify_stock_qty'

Definition at line 42 of file StockItemInterface.php.

◆ USE_CONFIG_QTY_INCREMENTS

const USE_CONFIG_QTY_INCREMENTS = 'use_config_qty_increments'

Definition at line 45 of file StockItemInterface.php.


The documentation for this interface was generated from the following file: