1 | <?php |
||
15 | class PaymentInformation |
||
16 | { |
||
17 | /** |
||
18 | * @var string |
||
19 | */ |
||
20 | protected $id; |
||
21 | |||
22 | /** |
||
23 | * @var array |
||
24 | */ |
||
25 | protected $transactions; |
||
26 | |||
27 | /** |
||
28 | * @var bool |
||
29 | */ |
||
30 | protected $batchBooking; |
||
31 | |||
32 | /** |
||
33 | * @var \DateTime |
||
34 | */ |
||
35 | protected $executionDate; |
||
36 | |||
37 | /** |
||
38 | * @var string |
||
39 | */ |
||
40 | protected $debtorName; |
||
41 | |||
42 | /** |
||
43 | * @var FinancialInstitutionInterface |
||
44 | */ |
||
45 | protected $debtorAgent; |
||
46 | |||
47 | /** |
||
48 | * @var IBAN |
||
49 | */ |
||
50 | protected $debtorIBAN; |
||
51 | |||
52 | /** |
||
53 | * Constructor |
||
54 | * |
||
55 | * @param string $id Identifier of this group (should be unique within a message) |
||
56 | * @param string $debtorName Name of the debtor |
||
57 | * @param BC|BIC $debtorAgent BC or BIC of the debtor's financial institution |
||
58 | * @param IBAN $debtorIBAN IBAN of the debtor's account |
||
59 | */ |
||
60 | 3 | public function __construct($id, $debtorName, FinancialInstitutionInterface $debtorAgent, IBAN $debtorIBAN) |
|
74 | |||
75 | /** |
||
76 | * Adds a single transaction to this payment |
||
77 | * |
||
78 | * @param CreditTransfer $transaction The transaction to be added |
||
79 | * |
||
80 | * @return PaymentInformation This payment instruction |
||
81 | */ |
||
82 | 2 | public function addTransaction(CreditTransfer $transaction) |
|
88 | |||
89 | /** |
||
90 | * Gets the number of transactions |
||
91 | * |
||
92 | * @return int Number of transactions |
||
93 | */ |
||
94 | 2 | public function getTransactionCount() |
|
98 | |||
99 | /** |
||
100 | * Gets the sum of transactions |
||
101 | * |
||
102 | * @return Money\Mixed Sum of transactions |
||
103 | */ |
||
104 | 2 | public function getTransactionSum() |
|
114 | |||
115 | /** |
||
116 | * Sets the required execution date. |
||
117 | * Where appropriate, the value data is automatically modified to the next possible banking/Post Office working day. |
||
118 | * |
||
119 | * @param \DateTime $executionDate |
||
120 | * |
||
121 | * @return PaymentInformation This payment instruction |
||
122 | */ |
||
123 | public function setExecutionDate(\DateTime $executionDate) |
||
129 | |||
130 | /** |
||
131 | * Sets the batch booking option. |
||
132 | * It is recommended that one payment instruction is created for each currency transferred. |
||
133 | * |
||
134 | * @param bool $batchBooking |
||
135 | * |
||
136 | * @return PaymentInformation This payment instruction |
||
137 | */ |
||
138 | public function setBatchBooking($batchBooking) |
||
144 | |||
145 | /** |
||
146 | * Builds a DOM tree of this payment instruction |
||
147 | * |
||
148 | * @param \DOMDocument $doc |
||
149 | * |
||
150 | * @return \DOMElement The built DOM tree |
||
151 | */ |
||
152 | 2 | public function asDom(\DOMDocument $doc) |
|
181 | } |
||
182 |