1 | <?php |
||
5 | class Summary implements \JsonSerializable |
||
6 | { |
||
7 | /** |
||
8 | * @var int|int |
||
9 | */ |
||
10 | private $subtotal; |
||
11 | |||
12 | /** |
||
13 | * @var int[int |
||
14 | */ |
||
15 | private $shippingCost; |
||
16 | |||
17 | /** |
||
18 | * @var int|int |
||
19 | */ |
||
20 | private $totalTax; |
||
21 | |||
22 | /** |
||
23 | * @var int |
||
24 | */ |
||
25 | private $totalCost; |
||
26 | |||
27 | /** |
||
28 | * @param int $totalCost |
||
29 | * @param null|int $totalTax |
||
30 | * @param null|int $subtotal |
||
31 | * @param null|int $shippingCost |
||
32 | */ |
||
33 | 6 | public function __construct($totalCost, $totalTax = null, $subtotal = null, $shippingCost = null) |
|
40 | |||
41 | /** |
||
42 | * @return int |
||
43 | */ |
||
44 | 1 | public function getSubtotal() |
|
48 | |||
49 | /** |
||
50 | * @return int |
||
51 | */ |
||
52 | 1 | public function getShippingCost() |
|
56 | |||
57 | /** |
||
58 | * @return int |
||
59 | */ |
||
60 | 1 | public function getTotalTax() |
|
64 | |||
65 | /** |
||
66 | * @return int |
||
67 | */ |
||
68 | 1 | public function getTotalCost() |
|
72 | |||
73 | /** |
||
74 | * @return array |
||
75 | */ |
||
76 | 1 | public function jsonSerialize() |
|
85 | } |
||
86 |