Model

Stock

Magento\CatalogInventory\Model\Stock

What it does

This class represents a catalog inventory stock entity in Magento 2, managing stock information like stock ID, website ID, and stock name.

Developers use this model to work with inventory stock records, retrieve stock data, and manage stock assignments across different websites in a multi-website Magento installation.

Public Methods

  • getStockId()
  • getWebsiteId()
  • getStockName()
  • setStockId()
  • setWebsiteId()
  • setStockName()
  • getExtensionAttributes()
  • setExtensionAttributes()