Log in
Interface

ReservationBuilderInterface

Magento\InventoryReservationsApi\Model\ReservationBuilderInterface

What it does

This interface defines a builder pattern for creating inventory reservation objects in Magento 2's Multi-Source Inventory (MSI) system.

Developers use this to construct reservations that track inventory quantity changes for specific products (SKU) on a stock, typically when processing orders, refunds, or cancellations.

The builder pattern ensures all required data (stock ID, SKU, quantity, and optional metadata) is properly set before creating the reservation.

Public Methods

  • setStockId()
  • setSku()
  • setQuantity()
  • setMetadata()
  • build()