StockRepository
Magento\Inventory\Model\StockRepository
What it does
This class serves as the main repository for managing Stock entities in Magento's Multi-Source Inventory (MSI) system.
Developers use this class to perform CRUD operations on stocks - creating, retrieving, updating, and deleting stock records, as well as fetching filtered lists of stocks using search criteria.
It acts as a facade that delegates operations to specialized command classes for better separation of concerns.
Public Methods
- save()
- get()
- deleteById()
- getList()