1 | <?php |
||
13 | class Entry |
||
14 | { |
||
15 | /** |
||
16 | * @var Statement |
||
17 | */ |
||
18 | private $statement; |
||
19 | /** |
||
20 | * @var Money |
||
21 | */ |
||
22 | private $amount; |
||
23 | /** |
||
24 | * @var DateTimeImmutable |
||
25 | */ |
||
26 | private $bookingDate; |
||
27 | /** |
||
28 | * @var DateTimeImmutable |
||
29 | */ |
||
30 | private $valueDate; |
||
31 | /** |
||
32 | * @var EntryTransactionDetail[] |
||
33 | */ |
||
34 | private $transactionDetails = []; |
||
35 | /** |
||
36 | * @var bool |
||
37 | */ |
||
38 | private $reversalIndicator = false; |
||
39 | /** |
||
40 | * @var string |
||
41 | */ |
||
42 | private $reference; |
||
43 | /** |
||
44 | * @var string |
||
45 | */ |
||
46 | private $accountServicerReference; |
||
47 | /** |
||
48 | * @var int |
||
49 | */ |
||
50 | private $index; |
||
51 | /** |
||
52 | * @var string |
||
53 | */ |
||
54 | private $batchPaymentId; |
||
55 | |||
56 | /** |
||
57 | * @param Statement $statement |
||
58 | * @param int $index |
||
59 | * @param Money $amount |
||
60 | * @param DateTimeImmutable $bookingDate |
||
61 | * @param DateTimeImmutable $valueDate |
||
62 | */ |
||
63 | 10 | public function __construct(Statement $statement, $index, Money $amount, DateTimeImmutable $bookingDate, DateTimeImmutable $valueDate) |
|
71 | |||
72 | /** |
||
73 | * @return Statement |
||
74 | */ |
||
75 | public function getStatement() |
||
79 | |||
80 | /** |
||
81 | * @return Money |
||
82 | */ |
||
83 | 2 | public function getAmount() |
|
87 | |||
88 | /** |
||
89 | * @return DateTimeImmutable |
||
90 | */ |
||
91 | 1 | public function getBookingDate() |
|
95 | |||
96 | /** |
||
97 | * @return DateTimeImmutable |
||
98 | */ |
||
99 | 1 | public function getValueDate() |
|
103 | |||
104 | /** |
||
105 | * @param EntryTransactionDetail $detail |
||
106 | */ |
||
107 | 9 | public function addTransactionDetail(EntryTransactionDetail $detail) |
|
111 | |||
112 | /** |
||
113 | * @return EntryTransactionDetail[] |
||
114 | */ |
||
115 | 2 | public function getTransactionDetails() |
|
119 | |||
120 | /** |
||
121 | * @return EntryTransactionDetail |
||
122 | */ |
||
123 | 1 | public function getTransactionDetail() |
|
131 | |||
132 | /** |
||
133 | * @return bool |
||
134 | */ |
||
135 | public function getReversalIndicator() |
||
139 | |||
140 | /** |
||
141 | * @param boolean $reversalIndicator |
||
142 | */ |
||
143 | 1 | public function setReversalIndicator($reversalIndicator) |
|
144 | { |
||
145 | 1 | $this->reversalIndicator = $reversalIndicator; |
|
146 | 1 | } |
|
147 | |||
148 | /** |
||
149 | * @return string |
||
150 | */ |
||
151 | public function getReference() |
||
155 | |||
156 | /** |
||
157 | * @param string $reference |
||
158 | */ |
||
159 | 1 | public function setReference($reference) |
|
160 | { |
||
161 | 1 | $this->reference = $reference; |
|
162 | 1 | } |
|
163 | |||
164 | /** |
||
165 | * Unique reference as assigned by the account servicing institution to unambiguously identify the entry. |
||
166 | * @return string |
||
167 | */ |
||
168 | public function getAccountServicerReference() |
||
172 | |||
173 | /** |
||
174 | * @param string $accountServicerReference |
||
175 | */ |
||
176 | 3 | public function setAccountServicerReference($accountServicerReference) |
|
180 | |||
181 | /** |
||
182 | * @return int |
||
183 | */ |
||
184 | public function getIndex() |
||
188 | |||
189 | /** |
||
190 | * @param string $batchPaymentId |
||
191 | */ |
||
192 | 1 | public function setBatchPaymentId($batchPaymentId) |
|
193 | { |
||
194 | 1 | $this->batchPaymentId = trim($batchPaymentId); |
|
195 | 1 | } |
|
196 | |||
197 | /** |
||
198 | * @return string |
||
199 | */ |
||
200 | public function getBatchPaymentId() |
||
204 | } |
||
205 |