Repository

StockRepositoryInterface

Magento\CatalogInventory\Api\StockRepositoryInterface

What it does

This repository interface provides CRUD operations for managing inventory stock data in Magento 2.

Developers use it to save, retrieve, search, and delete stock records programmatically.

Note that this interface is deprecated since version 100.3.0 and has been replaced by the Multi Source Inventory (MSI) system.

Public Methods

  • save()
  • get()
  • getList()
  • delete()