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