1 | <?php |
||
9 | class Transaction |
||
10 | { |
||
11 | const CD_CREDIT = 'credit'; |
||
12 | const CD_DEBIT = 'debit'; |
||
13 | const CD_CREDIT_CANCELLATION = 'credit_cancellation'; |
||
14 | const CD_DEBIT_CANCELLATION = 'debit_cancellation'; |
||
15 | |||
16 | /** |
||
17 | * @var \DateTime|null |
||
18 | */ |
||
19 | protected $bookingDate; |
||
20 | |||
21 | /** |
||
22 | * @var \DateTime|null |
||
23 | */ |
||
24 | protected $valutaDate; |
||
25 | |||
26 | /** |
||
27 | * @var float |
||
28 | */ |
||
29 | protected $amount; |
||
30 | |||
31 | /** |
||
32 | * @var string |
||
33 | */ |
||
34 | protected $creditDebit; |
||
35 | |||
36 | /** |
||
37 | * @var string |
||
38 | */ |
||
39 | protected $bookingText; |
||
40 | |||
41 | /** |
||
42 | * @var string |
||
43 | */ |
||
44 | protected $description1; |
||
45 | |||
46 | /** |
||
47 | * @var string |
||
48 | */ |
||
49 | protected $description2; |
||
50 | |||
51 | /** |
||
52 | * Array keys are identifiers like "SVWZ" for the main description. |
||
53 | * @var string[] |
||
54 | */ |
||
55 | protected $structuredDescription; |
||
56 | |||
57 | /** |
||
58 | * @var string |
||
59 | */ |
||
60 | protected $bankCode; |
||
61 | |||
62 | /** |
||
63 | * @var string |
||
64 | */ |
||
65 | protected $accountNumber; |
||
66 | |||
67 | /** |
||
68 | * @var string |
||
69 | */ |
||
70 | protected $name; |
||
71 | |||
72 | /** |
||
73 | * See https://www.bayernlb.de/internet/media/de/ir/downloads_1/zahlungsverkehr/formate_1/MT940_942.pdf page 451 / 8.2.6 Geschäftsvorfallcodes |
||
74 | * @var string |
||
75 | */ |
||
76 | protected $transactionCode; |
||
77 | |||
78 | /** |
||
79 | * Get booking date. |
||
80 | * |
||
81 | * @deprecated Use getBookingDate() instead |
||
82 | * @codeCoverageIgnore |
||
83 | * @return \DateTime|null |
||
84 | */ |
||
85 | public function getDate() |
||
89 | |||
90 | /** |
||
91 | * Get booking date |
||
92 | * |
||
93 | * @return \DateTime|null |
||
94 | */ |
||
95 | 1 | public function getBookingDate() |
|
99 | |||
100 | /** |
||
101 | * Get date |
||
102 | * |
||
103 | * @return \DateTime|null |
||
104 | */ |
||
105 | 1 | public function getValutaDate() |
|
109 | |||
110 | /** |
||
111 | * Set booking date |
||
112 | * |
||
113 | * @param \DateTime|null $date |
||
114 | * |
||
115 | * @return $this |
||
116 | */ |
||
117 | 1 | public function setBookingDate(\DateTime $date = null) |
|
123 | |||
124 | /** |
||
125 | * Set valuta date |
||
126 | * |
||
127 | * @param \DateTime|null $date |
||
128 | * |
||
129 | * @return $this |
||
130 | */ |
||
131 | 1 | public function setValutaDate(\DateTime $date = null) |
|
137 | |||
138 | /** |
||
139 | * Get the signed amount based on credit/debit setting. |
||
140 | * Debits and canceled credits have a negative sign. |
||
141 | * @return float |
||
142 | */ |
||
143 | 1 | public function getSignedAmount() |
|
153 | |||
154 | /** |
||
155 | * Get amount |
||
156 | * |
||
157 | * @return float |
||
158 | */ |
||
159 | 1 | public function getAmount() |
|
163 | |||
164 | /** |
||
165 | * Set amount |
||
166 | * |
||
167 | * @param float $amount |
||
168 | * |
||
169 | * @return $this |
||
170 | */ |
||
171 | 2 | public function setAmount($amount) |
|
177 | |||
178 | /** |
||
179 | * Get creditDebit |
||
180 | * |
||
181 | * @return string |
||
182 | */ |
||
183 | 1 | public function getCreditDebit() |
|
187 | |||
188 | /** |
||
189 | * Set creditDebit |
||
190 | * |
||
191 | * @param string $creditDebit |
||
192 | * |
||
193 | * @return $this |
||
194 | */ |
||
195 | 2 | public function setCreditDebit($creditDebit) |
|
201 | |||
202 | /** |
||
203 | * Get bookingText |
||
204 | * |
||
205 | * @return string |
||
206 | */ |
||
207 | 1 | public function getBookingText() |
|
211 | |||
212 | /** |
||
213 | * Set bookingText |
||
214 | * |
||
215 | * @param string $bookingText |
||
216 | * |
||
217 | * @return $this |
||
218 | */ |
||
219 | 1 | public function setBookingText($bookingText) |
|
225 | |||
226 | /** |
||
227 | * Get description1 |
||
228 | * |
||
229 | * @return string |
||
230 | */ |
||
231 | 1 | public function getDescription1() |
|
235 | |||
236 | /** |
||
237 | * Set description1 |
||
238 | * |
||
239 | * @param string $description1 |
||
240 | * |
||
241 | * @return $this |
||
242 | */ |
||
243 | 1 | public function setDescription1($description1) |
|
249 | |||
250 | /** |
||
251 | * Get description2 |
||
252 | * |
||
253 | * @return string |
||
254 | */ |
||
255 | 1 | public function getDescription2() |
|
259 | |||
260 | /** |
||
261 | * Set description2 |
||
262 | * |
||
263 | * @param string $description2 |
||
264 | * |
||
265 | * @return $this |
||
266 | */ |
||
267 | 1 | public function setDescription2($description2) |
|
273 | |||
274 | /** |
||
275 | * Get structuredDescription |
||
276 | * |
||
277 | * @return string[] |
||
278 | */ |
||
279 | public function getStructuredDescription() |
||
283 | |||
284 | /** |
||
285 | * Set structuredDescription |
||
286 | * |
||
287 | * @param string[] $structuredDescription |
||
288 | * |
||
289 | * @return $this |
||
290 | */ |
||
291 | public function setStructuredDescription($structuredDescription) |
||
297 | |||
298 | /** |
||
299 | * Get the main description (SVWZ) |
||
300 | * |
||
301 | * @return string |
||
302 | */ |
||
303 | public function getMainDescription() |
||
311 | |||
312 | /** |
||
313 | * Get bankCode |
||
314 | * |
||
315 | * @return string |
||
316 | */ |
||
317 | 1 | public function getBankCode() |
|
321 | |||
322 | /** |
||
323 | * Set bankCode |
||
324 | * |
||
325 | * @param string $bankCode |
||
326 | * |
||
327 | * @return $this |
||
328 | */ |
||
329 | 1 | public function setBankCode($bankCode) |
|
335 | |||
336 | /** |
||
337 | * Get accountNumber |
||
338 | * |
||
339 | * @return string |
||
340 | */ |
||
341 | 1 | public function getAccountNumber() |
|
345 | |||
346 | /** |
||
347 | * Set accountNumber |
||
348 | * |
||
349 | * @param string $accountNumber |
||
350 | * |
||
351 | * @return $this |
||
352 | */ |
||
353 | 1 | public function setAccountNumber($accountNumber) |
|
359 | |||
360 | /** |
||
361 | * Get name |
||
362 | * |
||
363 | * @return string |
||
364 | */ |
||
365 | 1 | public function getName() |
|
369 | |||
370 | /** |
||
371 | * Set name |
||
372 | * |
||
373 | * @param string $name |
||
374 | * |
||
375 | * @return $this |
||
376 | */ |
||
377 | 1 | public function setName($name) |
|
383 | |||
384 | /** |
||
385 | * Get see https://www.bayernlb.de/internet/media/de/ir/downloads_1/zahlungsverkehr/formate_1/MT940_942.pdf page 451 / 8.2.6 Geschäftsvorfallcodes |
||
386 | * |
||
387 | * @return string |
||
388 | */ |
||
389 | public function getTransactionCode() |
||
393 | |||
394 | /** |
||
395 | * Set see https://www.bayernlb.de/internet/media/de/ir/downloads_1/zahlungsverkehr/formate_1/MT940_942.pdf page 451 / 8.2.6 Geschäftsvorfallcodes |
||
396 | * |
||
397 | * @param string $transactionCode See https://www.bayernlb.de/internet/media/de/ir/downloads_1/zahlungsverkehr/formate_1/MT940_942.pdf page 451 / 8.2.6 Geschäftsvorfallcodes |
||
398 | * |
||
399 | * @return self |
||
400 | */ |
||
401 | public function setTransactionCode(string $transactionCode) |
||
407 | } |
||
408 |