1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Genkgo\Camt\DTO; |
4
|
|
|
|
5
|
|
|
use Money\Money; |
6
|
|
|
|
7
|
|
|
/** |
8
|
|
|
* Class EntryTransactionDetail |
9
|
|
|
* |
10
|
|
|
* @package Genkgo\Camt\DTO |
11
|
|
|
*/ |
12
|
|
|
class EntryTransactionDetail |
13
|
|
|
{ |
14
|
|
|
/** |
15
|
|
|
* @var Reference[] |
16
|
|
|
*/ |
17
|
|
|
private $references = []; |
18
|
|
|
/** |
19
|
|
|
* @var RelatedParty[] |
20
|
|
|
*/ |
21
|
|
|
private $relatedParties = []; |
22
|
|
|
/** |
23
|
|
|
* @var RelatedAgent[] |
24
|
|
|
*/ |
25
|
|
|
private $relatedAgents = []; |
26
|
|
|
/** |
27
|
|
|
* @var null|RemittanceInformation |
28
|
|
|
*/ |
29
|
|
|
private $remittanceInformation; |
30
|
|
|
/** |
31
|
|
|
* @var RelatedDates |
32
|
|
|
*/ |
33
|
|
|
private $relatedDates; |
34
|
|
|
/** |
35
|
|
|
* @var ReturnInformation |
36
|
|
|
*/ |
37
|
|
|
private $returnInformation; |
38
|
|
|
/** |
39
|
|
|
* @var null|AdditionalTransactionInformation |
40
|
|
|
*/ |
41
|
|
|
private $additionalTransactionInformation; |
42
|
|
|
|
43
|
|
|
/** |
44
|
|
|
* @var BankTransactionCode |
45
|
|
|
*/ |
46
|
|
|
private $bankTransactionCode; |
47
|
|
|
|
48
|
|
|
/** |
49
|
|
|
* @var Charges |
50
|
|
|
*/ |
51
|
|
|
private $charges; |
52
|
|
|
|
53
|
|
|
/** |
54
|
|
|
* @var null|Money |
55
|
|
|
*/ |
56
|
|
|
private $amountDetails; |
57
|
|
|
|
58
|
|
|
/** |
59
|
|
|
* @var null|Money |
60
|
|
|
*/ |
61
|
|
|
private $amount; |
62
|
|
|
|
63
|
|
|
/** |
64
|
|
|
* @param Reference $reference |
65
|
|
|
*/ |
66
|
18 |
|
public function addReference(Reference $reference) |
67
|
|
|
{ |
68
|
18 |
|
$this->references[] = $reference; |
69
|
18 |
|
} |
70
|
|
|
|
71
|
|
|
/** |
72
|
|
|
* @return Reference[] |
73
|
|
|
*/ |
74
|
1 |
|
public function getReferences() |
75
|
|
|
{ |
76
|
1 |
|
return $this->references; |
77
|
|
|
} |
78
|
|
|
|
79
|
|
|
/** |
80
|
|
|
* @return null|Reference |
81
|
|
|
*/ |
82
|
1 |
|
public function getReference(): ?Reference |
83
|
|
|
{ |
84
|
1 |
|
if (isset($this->references[0])) { |
85
|
1 |
|
return $this->references[0]; |
86
|
|
|
} |
87
|
|
|
|
88
|
|
|
return null; |
89
|
|
|
} |
90
|
|
|
|
91
|
|
|
/** |
92
|
|
|
* @param RelatedParty $relatedParty |
93
|
|
|
*/ |
94
|
22 |
|
public function addRelatedParty(RelatedParty $relatedParty) |
95
|
|
|
{ |
96
|
22 |
|
$this->relatedParties[] = $relatedParty; |
97
|
22 |
|
} |
98
|
|
|
|
99
|
|
|
/** |
100
|
|
|
* @return RelatedParty[] |
101
|
|
|
*/ |
102
|
3 |
|
public function getRelatedParties() |
103
|
|
|
{ |
104
|
3 |
|
return $this->relatedParties; |
105
|
|
|
} |
106
|
|
|
|
107
|
|
|
/** |
108
|
|
|
* @return null|RelatedParty |
109
|
|
|
*/ |
110
|
1 |
|
public function getRelatedParty(): ?RelatedParty |
111
|
|
|
{ |
112
|
1 |
|
if (isset($this->relatedParties[0])) { |
113
|
1 |
|
return $this->relatedParties[0]; |
114
|
|
|
} |
115
|
|
|
|
116
|
|
|
return null; |
117
|
|
|
} |
118
|
|
|
|
119
|
|
|
/** |
120
|
|
|
* @param RelatedAgent $relatedAgent |
121
|
|
|
*/ |
122
|
17 |
|
public function addRelatedAgent(RelatedAgent $relatedAgent) |
123
|
|
|
{ |
124
|
17 |
|
$this->relatedAgents[] = $relatedAgent; |
125
|
17 |
|
} |
126
|
|
|
|
127
|
|
|
/** |
128
|
|
|
* @return RelatedAgent[] |
129
|
|
|
*/ |
130
|
1 |
|
public function getRelatedAgents() |
131
|
|
|
{ |
132
|
1 |
|
return $this->relatedAgents; |
133
|
|
|
} |
134
|
|
|
|
135
|
|
|
/** |
136
|
|
|
* @return null|RelatedAgent |
137
|
|
|
*/ |
138
|
|
|
public function getRelatedAgent(): ?RelatedAgent |
139
|
|
|
{ |
140
|
|
|
if (isset($this->relatedAgents[0])) { |
141
|
|
|
return $this->relatedAgents[0]; |
142
|
|
|
} |
143
|
|
|
|
144
|
|
|
return null; |
145
|
|
|
} |
146
|
|
|
|
147
|
|
|
/** |
148
|
|
|
* @param null|RemittanceInformation $remittanceInformation |
149
|
|
|
*/ |
150
|
18 |
|
public function setRemittanceInformation(?RemittanceInformation $remittanceInformation) |
151
|
|
|
{ |
152
|
18 |
|
$this->remittanceInformation = $remittanceInformation; |
153
|
18 |
|
} |
154
|
|
|
|
155
|
|
|
/** |
156
|
|
|
* @return null|RemittanceInformation |
157
|
|
|
*/ |
158
|
4 |
|
public function getRemittanceInformation(): ?RemittanceInformation |
159
|
|
|
{ |
160
|
4 |
|
return $this->remittanceInformation; |
161
|
|
|
} |
162
|
|
|
|
163
|
|
|
/** |
164
|
|
|
* @param RelatedDates $relatedDates |
165
|
|
|
*/ |
166
|
|
|
public function setRelatedDates(RelatedDates $relatedDates) |
167
|
|
|
{ |
168
|
|
|
$this->relatedDates = $relatedDates; |
169
|
|
|
} |
170
|
|
|
|
171
|
|
|
/** |
172
|
|
|
* @return RelatedDates |
173
|
|
|
*/ |
174
|
|
|
public function getRelatedDates() |
175
|
|
|
{ |
176
|
|
|
return $this->relatedDates; |
177
|
|
|
} |
178
|
|
|
|
179
|
|
|
/** |
180
|
|
|
* @return null|ReturnInformation |
181
|
|
|
*/ |
182
|
|
|
public function getReturnInformation(): ?ReturnInformation |
183
|
|
|
{ |
184
|
|
|
return $this->returnInformation; |
185
|
|
|
} |
186
|
|
|
|
187
|
|
|
/** |
188
|
|
|
* @param ReturnInformation $information |
189
|
|
|
*/ |
190
|
|
|
public function setReturnInformation(ReturnInformation $information) |
191
|
|
|
{ |
192
|
|
|
$this->returnInformation = $information; |
193
|
|
|
} |
194
|
|
|
|
195
|
|
|
/** |
196
|
|
|
* @param null|AdditionalTransactionInformation $additionalTransactionInformation |
197
|
|
|
*/ |
198
|
|
|
public function setAdditionalTransactionInformation(?AdditionalTransactionInformation $additionalTransactionInformation) |
199
|
|
|
{ |
200
|
|
|
$this->additionalTransactionInformation = $additionalTransactionInformation; |
201
|
|
|
} |
202
|
|
|
|
203
|
|
|
/** |
204
|
|
|
* @return null|AdditionalTransactionInformation |
205
|
|
|
*/ |
206
|
|
|
public function getAdditionalTransactionInformation(): ?AdditionalTransactionInformation |
207
|
|
|
{ |
208
|
|
|
return $this->additionalTransactionInformation; |
209
|
|
|
} |
210
|
|
|
|
211
|
|
|
/** |
212
|
|
|
* @return BankTransactionCode |
213
|
|
|
*/ |
214
|
1 |
|
public function getBankTransactionCode() |
215
|
|
|
{ |
216
|
1 |
|
return $this->bankTransactionCode; |
217
|
|
|
} |
218
|
|
|
|
219
|
|
|
/** |
220
|
|
|
* @param BankTransactionCode $bankTransactionCode |
221
|
|
|
*/ |
222
|
22 |
|
public function setBankTransactionCode(BankTransactionCode $bankTransactionCode) |
223
|
|
|
{ |
224
|
22 |
|
$this->bankTransactionCode = $bankTransactionCode; |
225
|
22 |
|
} |
226
|
|
|
|
227
|
|
|
/** |
228
|
|
|
* @return Charges |
229
|
|
|
*/ |
230
|
|
|
public function getCharges() |
231
|
|
|
{ |
232
|
|
|
return $this->charges; |
233
|
|
|
} |
234
|
|
|
|
235
|
|
|
/** |
236
|
|
|
* @param Charges $charges |
237
|
|
|
*/ |
238
|
3 |
|
public function setCharges(Charges $charges) |
239
|
|
|
{ |
240
|
3 |
|
$this->charges = $charges; |
241
|
3 |
|
} |
242
|
|
|
|
243
|
|
|
/** |
244
|
|
|
* @return null|Money |
245
|
|
|
*/ |
246
|
|
|
public function getAmountDetails(): ?Money |
247
|
|
|
{ |
248
|
|
|
return $this->amountDetails; |
249
|
|
|
} |
250
|
|
|
|
251
|
|
|
/** |
252
|
|
|
* @param null|Money $amountDetails |
253
|
|
|
*/ |
254
|
7 |
|
public function setAmountDetails(?Money $amountDetails) |
255
|
|
|
{ |
256
|
7 |
|
$this->amountDetails = $amountDetails; |
257
|
7 |
|
} |
258
|
|
|
|
259
|
|
|
/** |
260
|
|
|
* @return null|Money |
261
|
|
|
*/ |
262
|
|
|
public function getAmount(): ?Money |
263
|
|
|
{ |
264
|
|
|
return $this->amount; |
265
|
|
|
} |
266
|
|
|
|
267
|
|
|
/** |
268
|
|
|
* @param null|Money $amount |
269
|
|
|
*/ |
270
|
14 |
|
public function setAmount(?Money $amount) |
271
|
|
|
{ |
272
|
14 |
|
$this->amount = $amount; |
273
|
14 |
|
} |
274
|
|
|
} |
275
|
|
|
|