1 | <?php |
||
18 | final class Cart implements CreatableFromArray |
||
19 | { |
||
20 | /** |
||
21 | * @var int |
||
22 | */ |
||
23 | private $id; |
||
24 | |||
25 | /** |
||
26 | * @var Customer |
||
27 | */ |
||
28 | private $customer; |
||
29 | |||
30 | /** |
||
31 | * @var string |
||
32 | */ |
||
33 | private $currencyCode; |
||
34 | |||
35 | /** |
||
36 | * @var string |
||
37 | */ |
||
38 | private $localeCode; |
||
39 | |||
40 | /** |
||
41 | * @var string |
||
42 | */ |
||
43 | private $checkoutState; |
||
44 | |||
45 | /** |
||
46 | * @var CartItem[] |
||
47 | */ |
||
48 | private $items; |
||
49 | |||
50 | /** |
||
51 | * CartCreated constructor. |
||
52 | */ |
||
53 | private function __construct( |
||
68 | |||
69 | /** |
||
70 | * @return Cart |
||
71 | */ |
||
72 | public static function createFromArray(array $data): self |
||
108 | |||
109 | public function getId(): int |
||
113 | |||
114 | public function getCustomer(): Customer |
||
118 | |||
119 | public function getCurrencyCode(): string |
||
123 | |||
124 | public function getLocaleCode(): string |
||
128 | |||
129 | public function getCheckoutState(): string |
||
133 | |||
134 | /** |
||
135 | * @return CartItem[] |
||
136 | */ |
||
137 | public function getItems(): array |
||
141 | } |
||
142 |