1 | <?php |
||
7 | class PaymentLine |
||
8 | { |
||
9 | /** |
||
10 | * @var string |
||
11 | */ |
||
12 | protected $productNumber; |
||
13 | |||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | protected $name; |
||
18 | |||
19 | /** |
||
20 | * @var int |
||
21 | */ |
||
22 | protected $quantity; |
||
23 | |||
24 | /** |
||
25 | * The price excl vat. |
||
26 | * |
||
27 | * @var float |
||
28 | */ |
||
29 | protected $price; |
||
30 | |||
31 | /** |
||
32 | * This is the VAT percentage, i.e. 25 for Denmark. |
||
33 | * |
||
34 | * @var int |
||
35 | */ |
||
36 | protected $vat; |
||
37 | |||
38 | /** |
||
39 | * @var Payment |
||
40 | */ |
||
41 | protected $payment; |
||
42 | |||
43 | /****************** |
||
44 | * Helper methods * |
||
45 | *****************/ |
||
46 | |||
47 | /** |
||
48 | * @return float |
||
49 | */ |
||
50 | 3 | public function getPriceExclVat(): float |
|
54 | |||
55 | /** |
||
56 | * @return float |
||
57 | */ |
||
58 | 3 | public function getPriceInclVat(): float |
|
68 | |||
69 | /********************* |
||
70 | * Getters / Setters * |
||
71 | ********************/ |
||
72 | |||
73 | /** |
||
74 | * @return string |
||
75 | */ |
||
76 | 6 | public function getProductNumber(): string |
|
80 | |||
81 | /** |
||
82 | * @param string $productNumber |
||
83 | * |
||
84 | * @return PaymentLine |
||
85 | */ |
||
86 | 9 | public function setProductNumber(string $productNumber): self |
|
92 | |||
93 | /** |
||
94 | * @return string |
||
95 | */ |
||
96 | 6 | public function getName(): string |
|
100 | |||
101 | /** |
||
102 | * @param string $name |
||
103 | * |
||
104 | * @return PaymentLine |
||
105 | */ |
||
106 | 9 | public function setName($name): self |
|
112 | |||
113 | /** |
||
114 | * @return int |
||
115 | */ |
||
116 | 6 | public function getQuantity(): int |
|
120 | |||
121 | /** |
||
122 | * @param int $quantity |
||
123 | * |
||
124 | * @return PaymentLine |
||
125 | */ |
||
126 | 9 | public function setQuantity($quantity): self |
|
132 | |||
133 | /** |
||
134 | * Returns the price excl vat. |
||
135 | * |
||
136 | * @return float |
||
137 | */ |
||
138 | 6 | public function getPrice(): float |
|
142 | |||
143 | /** |
||
144 | * @param float $price |
||
145 | * |
||
146 | * @return PaymentLine |
||
147 | */ |
||
148 | 9 | public function setPrice($price): self |
|
154 | |||
155 | /** |
||
156 | * Returns the VAT percentage. |
||
157 | * |
||
158 | * @return int |
||
159 | */ |
||
160 | 6 | public function getVat(): int |
|
164 | |||
165 | /** |
||
166 | * @param int $vat |
||
167 | * |
||
168 | * @return PaymentLine |
||
169 | */ |
||
170 | 9 | public function setVat($vat): self |
|
176 | |||
177 | /** |
||
178 | * @return Payment |
||
179 | */ |
||
180 | 3 | public function getPayment(): Payment |
|
184 | |||
185 | /** |
||
186 | * @param Payment $payment |
||
187 | * |
||
188 | * @return PaymentLine |
||
189 | */ |
||
190 | 6 | public function setPayment(Payment $payment): self |
|
196 | } |
||
197 |