API reference / Quittio \ Core \ Data \ Extensions
IncludedProduct
final readonly class in quittio/core · uses Immutable
Quittio\Core\Data\Extensions\IncludedProduct · Source
Component of a set or bundle (profile EXTENDED).
Properties#
| Property | Type | Description |
|---|---|---|
$description readonly | ?string | |
$name readonly | string | |
$quantity readonly | ?Brick\Math\BigDecimal | |
$sellerId readonly | ?string | |
$unit readonly | UnitCode|RawCode|null |
Methods#
| Method | Description |
|---|---|
->__construct() | |
->with() | Returns a copy with the given properties replaced. |
__construct()#
public function __construct(
string $name,
?BigDecimal $quantity = null,
UnitCode|RawCode|null $unit = null,
?string $description = null,
?string $sellerId = null,
)| Parameter | Type | Description |
|---|---|---|
$name | string | |
$quantity | ?Brick\Math\BigDecimal = null | |
$unit | UnitCode|RawCode|null = null | |
$description | ?string = null | |
$sellerId | ?string = null |
with()#
public function with(array<string, mixed> $changes): staticReturns a copy with the given properties replaced.
| Parameter | Type | Description |
|---|---|---|
$changes | array<string, mixed> |
- Returns
static