ItemAvailability
in package
FinalYes
Availability snapshot of a stock item across warehouses — read model returned by {@see \App\UI\Api\Store\Models\Services\StockReader}. Value object (no DI — the `*DTO*` folder mask in config/common.neon keeps it out of the container scan).
infoText / attributeClass (the availability semaphore) are the caller's concern —
it looks them up from the labelWarehouseId warehouse.
Table of Contents
Properties
- $available : string
- $deliveryDays : int|null
- $inStock : bool
- $labelWarehouseId : int|null
- $perWarehouse : array<string|int, mixed>
- $quantity : string
- $reserved : string
- $stockItemId : int
Methods
- __construct() : mixed
Properties
$available read-only
public
string
$available
$deliveryDays read-only
public
int|null
$deliveryDays
$inStock read-only
public
bool
$inStock
$labelWarehouseId read-only
public
int|null
$labelWarehouseId
$perWarehouse read-only
public
array<string|int, mixed>
$perWarehouse
= []
$quantity read-only
public
string
$quantity
$reserved read-only
public
string
$reserved
$stockItemId read-only
public
int
$stockItemId
Methods
__construct()
public
__construct(int $stockItemId, string $quantity, string $reserved, string $available, bool $inStock, int|null $deliveryDays, int|null $labelWarehouseId[, array<int, WarehouseAvailability> $perWarehouse = [] ]) : mixed
Parameters
- $stockItemId : int
- $quantity : string
- $reserved : string
- $available : string
- $inStock : bool
- $deliveryDays : int|null
- $labelWarehouseId : int|null
- $perWarehouse : array<int, WarehouseAvailability> = []