Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Data Fields
ReservationInterface Interface Reference
Inheritance diagram for ReservationInterface:
Reservation

Public Member Functions

 getReservationId ()
 
 getStockId ()
 
 getSku ()
 
 getQuantity ()
 
 getMetadata ()
 

Data Fields

const RESERVATION_ID = 'reservation_id'
 
const STOCK_ID = 'stock_id'
 
const SKU = 'sku'
 
const QUANTITY = 'quantity'
 
const METADATA = 'metadata'
 

Detailed Description

The entity responsible for reservations, created to keep inventory amount (product quantity) up-to-date. It is created to have a state between order creation and inventory deduction (deduction of specific SourceItems).

Reservations are designed to be immutable entities.

@api

Definition at line 18 of file ReservationInterface.php.

Member Function Documentation

◆ getMetadata()

getMetadata ( )

Get Reservation Metadata

Metadata is used to store serialized data that encapsulates the semantic of a Reservation.

Returns
string|null

Implemented in Reservation.

◆ getQuantity()

getQuantity ( )

Get Product Qty

This value can be positive (>0) or negative (<0) depending on the Reservation semantic.

For example, when an Order is placed, a Reservation with negative quantity is appended. When that Order is processed and the SourceItems related to ordered products are updated, a Reservation with positive quantity is appended to neglect the first one.

Returns
float

Implemented in Reservation.

◆ getReservationId()

getReservationId ( )

Get Reservation Id

Returns
int|null

Implemented in Reservation.

◆ getSku()

getSku ( )

Get Product SKU

Returns
string

Implemented in Reservation.

◆ getStockId()

getStockId ( )

Get Stock Id

Returns
int

Implemented in Reservation.

Field Documentation

◆ METADATA

const METADATA = 'metadata'

Definition at line 27 of file ReservationInterface.php.

◆ QUANTITY

const QUANTITY = 'quantity'

Definition at line 26 of file ReservationInterface.php.

◆ RESERVATION_ID

const RESERVATION_ID = 'reservation_id'

Constants for keys of data array. Identical to the name of the getter in snake case

Definition at line 23 of file ReservationInterface.php.

◆ SKU

const SKU = 'sku'

Definition at line 25 of file ReservationInterface.php.

◆ STOCK_ID

const STOCK_ID = 'stock_id'

Definition at line 24 of file ReservationInterface.php.


The documentation for this interface was generated from the following file: