OrderItemRepositoryInterface
in
Interface OrderItemRepositoryInterface
Tags
Table of Contents
- addToOrder() : int
- Adds an order item to the order item repository.
- deleteItemById() : OrderItemRepositoryInterface
- Deletes an order item from the repository by the given order item ID.
- deleteItemsByOrderId() : OrderItemRepositoryInterface
- Deletes order items from the repository by the given order ID.
- getItemById() : StoredOrderItemInterface
- Returns a stored order ID by the given order item ID.
- getItemsByOrderId() : StoredOrderItemCollection
- Returns a stored order item collection by the given order ID.
- store() : OrderItemRepositoryInterface
- Saves the order item in the repository.
Methods
addToOrder()
Adds an order item to the order item repository.
public
addToOrder(IdType $orderId, OrderItemInterface $orderItem) : int
Parameters
- $orderId : IdType
-
Order ID.
- $orderItem : OrderItemInterface
-
Order item to add.
Return values
int —ID of the StoredOrderItem
deleteItemById()
Deletes an order item from the repository by the given order item ID.
public
deleteItemById(IdType $orderItemId) : OrderItemRepositoryInterface
Parameters
- $orderItemId : IdType
-
Order item ID.
Return values
OrderItemRepositoryInterface —Same instance for method chaining.
deleteItemsByOrderId()
Deletes order items from the repository by the given order ID.
public
deleteItemsByOrderId(IdType $orderId) : OrderItemRepositoryInterface
Parameters
- $orderId : IdType
-
Order ID.
Return values
OrderItemRepositoryInterface —Same instance for method chaining.
getItemById()
Returns a stored order ID by the given order item ID.
public
getItemById(IdType $orderItemId) : StoredOrderItemInterface
Parameters
- $orderItemId : IdType
-
ID of the stored order item.
Return values
StoredOrderItemInterface —Stored order item.
getItemsByOrderId()
Returns a stored order item collection by the given order ID.
public
getItemsByOrderId(IdType $orderId) : StoredOrderItemCollection
Parameters
- $orderId : IdType
-
ID of the order.
Return values
StoredOrderItemCollection —Stored order item collection.
store()
Saves the order item in the repository.
public
store(StoredOrderItemInterface $storedOrderItem) : OrderItemRepositoryInterface
Parameters
- $storedOrderItem : StoredOrderItemInterface
-
Order item to save.
Return values
OrderItemRepositoryInterface —Same instance for method chaining.