BasketReservationService
Service for working with basket reserves
Table of Contents
Methods
- __construct() : mixed
- add() : Result
- Add reservation row
- delete() : Result
- Delete reservation row
- getAvailableCountForBasketItem() : float
- The available amount to be debited based on the reservation history.
- getAvailableCountForBasketItems() : array<string|int, mixed>
- The available amount to be debited based on the reservation history.
- getAvailableCountForOrder() : array<string|int, mixed>
- The available amount to be debited based on the reservation history.
- getInstance() : self
- Service instance.
- update() : Result
- Update reservation row
Methods
__construct()
public
__construct(BasketReservationHistoryService $historyService) : mixed
Parameters
- $historyService : BasketReservationHistoryService
add()
Add reservation row
public
add(array<string|int, mixed> $fields) : Result
Parameters
- $fields : array<string|int, mixed>
Return values
Resultdelete()
Delete reservation row
public
delete(int $id) : Result
Parameters
- $id : int
Return values
ResultgetAvailableCountForBasketItem()
The available amount to be debited based on the reservation history.
public
getAvailableCountForBasketItem(int $basketId, int $storeId) : float
Parameters
- $basketId : int
- $storeId : int
Tags
Return values
floatgetAvailableCountForBasketItems()
The available amount to be debited based on the reservation history.
public
getAvailableCountForBasketItems(array<string|int, mixed> $basketItemFilter) : array<string|int, mixed>
Parameters
- $basketItemFilter : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getAvailableCountForOrder()
The available amount to be debited based on the reservation history.
public
getAvailableCountForOrder(int $orderId) : array<string|int, mixed>
Parameters
- $orderId : int
Tags
Return values
array<string|int, mixed>getInstance()
Service instance.
public
static getInstance() : self
Return values
selfupdate()
Update reservation row
public
update(int $id, array<string|int, mixed> $fields) : Result
Parameters
- $id : int
- $fields : array<string|int, mixed>