public __construct ( |
||
$cartId | ||
$currency | string |
public function __construct(CartId $cartId, string $currency)
{
if (!Currencies::isValid($currency)) {
throw InvalidArgumentException::invalidCurrency($currency);
}
$this->id = $cartId;
$this->items = [];
$this->currency = $currency;
}