Log in
Model

Stock

Magento\Inventory\Model\Stock

What it does

This model class represents a Stock entity in Magento's Multi-Source Inventory (MSI) system.

Developers use it to work with stock records, which are collections of sources that define inventory pools for different sales channels or warehouses.

It provides getter and setter methods for stock properties like ID and name, and supports extension attributes for custom data.

Public Methods

  • getStockId()
  • setStockId()
  • getName()
  • setName()
  • getExtensionAttributes()
  • setExtensionAttributes()