1 | <?php |
||
10 | final class ChangeProductQuantity |
||
11 | { |
||
12 | /** |
||
13 | * @var string |
||
14 | */ |
||
15 | private $cartId; |
||
16 | |||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | private $productCode; |
||
21 | |||
22 | /** |
||
23 | * @var int |
||
24 | */ |
||
25 | private $newQuantity; |
||
26 | |||
27 | /** |
||
28 | * @param string $cartId |
||
29 | * @param string $productCode |
||
30 | * @param int $newQuantity |
||
31 | */ |
||
32 | private function __construct(string $cartId, string $productCode, int $newQuantity) |
||
38 | |||
39 | /** |
||
40 | * @param string $cartId |
||
41 | * @param string $productCode |
||
42 | * @param int $newQuantity |
||
43 | * |
||
44 | * @return self |
||
45 | */ |
||
46 | public static function create(string $cartId, string $productCode, int $newQuantity): self |
||
50 | |||
51 | /** |
||
52 | * @return string |
||
53 | */ |
||
54 | public function getCartId(): string |
||
58 | |||
59 | /** |
||
60 | * @return string |
||
61 | */ |
||
62 | public function getProductCode(): string |
||
66 | |||
67 | /** |
||
68 | * @return int |
||
69 | */ |
||
70 | public function getNewQuantity(): int |
||
74 | } |
||
75 |