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