1 | <?php |
||
4 | class Summary implements \JsonSerializable |
||
5 | { |
||
6 | |||
7 | /** |
||
8 | * @var float |
||
9 | */ |
||
10 | protected $subtotal; |
||
11 | |||
12 | /** |
||
13 | * @var float |
||
14 | */ |
||
15 | protected $shippingCost; |
||
16 | |||
17 | /** |
||
18 | * @var float |
||
19 | */ |
||
20 | protected $totalTax; |
||
21 | |||
22 | /** |
||
23 | * @var float |
||
24 | */ |
||
25 | protected $totalCost; |
||
26 | |||
27 | /** |
||
28 | * Summary constructor. |
||
29 | * |
||
30 | * @param float $totalCost |
||
31 | */ |
||
32 | public function __construct(float $totalCost) |
||
36 | |||
37 | /** |
||
38 | * @param float $subtotal |
||
39 | * @return Summary |
||
40 | */ |
||
41 | public function setSubtotal(float $subtotal): Summary |
||
47 | |||
48 | /** |
||
49 | * @param float $shippingCost |
||
50 | * @return Summary |
||
51 | */ |
||
52 | public function setShippingCost(float $shippingCost): Summary |
||
58 | |||
59 | /** |
||
60 | * @param float $totalTax |
||
61 | * @return Summary |
||
62 | */ |
||
63 | public function setTotalTax(float $totalTax): Summary |
||
69 | |||
70 | /** |
||
71 | * @return array |
||
72 | */ |
||
73 | public function jsonSerialize(): array |
||
84 | } |
||
85 |