1 | <?php |
||
12 | class CustomerCreditTransfer extends AbstractMessage |
||
13 | { |
||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | protected $id; |
||
18 | |||
19 | /** |
||
20 | * @var string |
||
21 | */ |
||
22 | protected $initiatingParty; |
||
23 | |||
24 | /** |
||
25 | * @var array |
||
26 | */ |
||
27 | protected $payments; |
||
28 | |||
29 | /** |
||
30 | * @var \DateTime |
||
31 | */ |
||
32 | protected $creationTime; |
||
33 | |||
34 | /** |
||
35 | * Constructor |
||
36 | * |
||
37 | * @param string $id Identifier of the message (should usually be unique over a period of at least 90 days) |
||
38 | * @param string $initiatingParty Name of the initiating party |
||
39 | * |
||
40 | * @throws \InvalidArgumentException When any of the inputs contain invalid characters or are too long. |
||
41 | */ |
||
42 | 3 | public function __construct($id, $initiatingParty) |
|
49 | |||
50 | /** |
||
51 | * Manually sets the creation time |
||
52 | * |
||
53 | * @param \DateTime $creationTime The desired creation time |
||
54 | * |
||
55 | * @return CustomerCreditTransfer This message |
||
56 | */ |
||
57 | public function setCreationTime(\DateTime $creationTime) |
||
63 | |||
64 | /** |
||
65 | * Adds a payment instruction |
||
66 | * |
||
67 | * @param PaymentInformation $payment The payment to be added |
||
68 | * |
||
69 | * @return CustomerCreditTransfer This message |
||
70 | */ |
||
71 | 3 | public function addPayment(PaymentInformation $payment) |
|
77 | |||
78 | /** |
||
79 | * Gets the number of payments |
||
80 | * |
||
81 | * @return int Number of payments |
||
82 | */ |
||
83 | 1 | public function getPaymentCount() |
|
87 | |||
88 | /** |
||
89 | * {@inheritdoc} |
||
90 | */ |
||
91 | 2 | protected function getSchemaName() |
|
95 | |||
96 | /** |
||
97 | * {@inheritdoc} |
||
98 | */ |
||
99 | 2 | protected function getSchemaLocation() |
|
103 | |||
104 | /** |
||
105 | * {@inheritdoc} |
||
106 | */ |
||
107 | 2 | protected function buildDom(\DOMDocument $doc) |
|
134 | } |
||
135 |