1 | <?php |
||
14 | final class CartItemQuantityChanged implements SerializableInterface |
||
15 | { |
||
16 | /** |
||
17 | * @var UuidInterface |
||
18 | */ |
||
19 | private $cartId; |
||
20 | |||
21 | /** |
||
22 | * @var ProductCode |
||
23 | */ |
||
24 | private $productCode; |
||
25 | |||
26 | /** |
||
27 | * @var CartItemQuantity |
||
28 | */ |
||
29 | private $oldCartItemQuantity; |
||
30 | |||
31 | /** |
||
32 | * @var CartItemQuantity |
||
33 | */ |
||
34 | private $newCartItemQuantity; |
||
35 | |||
36 | /** |
||
37 | * @param UuidInterface $cartId |
||
38 | * @param ProductCode $productCode |
||
39 | * @param CartItemQuantity $oldCartItemQuantity |
||
40 | * @param CartItemQuantity $newCartItemQuantity |
||
41 | */ |
||
42 | private function __construct( |
||
53 | |||
54 | /** |
||
55 | * @param UuidInterface $cartId |
||
56 | * @param ProductCode $productCode |
||
57 | * @param CartItemQuantity $oldCartItemQuantity |
||
58 | * @param CartItemQuantity $newCartItemQuantity |
||
59 | * |
||
60 | * @return CartItemQuantityChanged |
||
61 | */ |
||
62 | public static function occur( |
||
70 | |||
71 | /** |
||
72 | * @return UuidInterface |
||
73 | */ |
||
74 | public function getCartId(): UuidInterface |
||
78 | |||
79 | /** |
||
80 | * @return ProductCode |
||
81 | */ |
||
82 | public function getProductCode(): ProductCode |
||
86 | |||
87 | /** |
||
88 | * @return CartItemQuantity |
||
89 | */ |
||
90 | public function getOldCartItemQuantity(): CartItemQuantity |
||
94 | |||
95 | /** |
||
96 | * @return CartItemQuantity |
||
97 | */ |
||
98 | public function getNewCartItemQuantity(): CartItemQuantity |
||
102 | |||
103 | /** |
||
104 | * {@inheritdoc} |
||
105 | */ |
||
106 | public static function deserialize(array $data): self |
||
115 | |||
116 | /** |
||
117 | * {@inheritdoc} |
||
118 | */ |
||
119 | public function serialize(): array |
||
128 | } |
||
129 |