1 | <?php |
||
23 | class ApplicationGateway extends AbstractGateway |
||
24 | { |
||
25 | /** |
||
26 | * @author WN |
||
27 | * @param int $id |
||
28 | * @param string $token |
||
29 | * @return ApplicationEntity |
||
30 | * @throws SdkException |
||
31 | */ |
||
32 | 2 | public function getApplication($id, $token) |
|
36 | |||
37 | /** |
||
38 | * @author WN |
||
39 | * @param ApplicationEntity $application |
||
40 | * @param string $token |
||
41 | * @return ApplicationEntity |
||
42 | * @throws SdkException |
||
43 | */ |
||
44 | 6 | public function initialiseApplication(ApplicationEntity $application, $token) |
|
67 | |||
68 | /** |
||
69 | * @author EA, EB |
||
70 | * @param ApplicationEntity $application |
||
71 | * @param string $token |
||
72 | * @return ApplicationEntity |
||
73 | * @throws SdkException |
||
74 | */ |
||
75 | 2 | public function initialiseAssistedApplication(ApplicationEntity $application, $token) |
|
99 | |||
100 | /** |
||
101 | * @author WN, EB |
||
102 | * @param int $id |
||
103 | * @param string $token |
||
104 | * @param string $reference |
||
105 | * @return bool |
||
106 | * @throws SdkException |
||
107 | */ |
||
108 | 2 | public function fulfilApplication($id, $token, $reference = null) |
|
112 | |||
113 | /** |
||
114 | * @param int $id |
||
115 | * @param string $description |
||
116 | * @param string $token |
||
117 | * @return bool |
||
118 | * @throws SdkException |
||
119 | */ |
||
120 | 2 | public function cancelApplication($id, $description, $token) |
|
128 | |||
129 | /** |
||
130 | * @author JH |
||
131 | * @param int $installationId |
||
132 | * @param int $application |
||
133 | * @param int $amount |
||
134 | * @param string $description |
||
135 | * @param string $token |
||
136 | * @return array |
||
137 | */ |
||
138 | public function amendOrder($installationId, $application, $amount, $description, $token) |
||
150 | |||
151 | /** |
||
152 | * @param $token |
||
153 | * @return array |
||
154 | * @throws SdkException |
||
155 | */ |
||
156 | 2 | public function getPendingCancellations($installationId, $token) |
|
165 | |||
166 | /** |
||
167 | * Get Merchant Payments. Filter Params can accept |
||
168 | * - since, until : (string - ISO8601 Date Part Only) |
||
169 | * - count, offset : (int) |
||
170 | * |
||
171 | * @author SL |
||
172 | * @param $application |
||
173 | * @param $token |
||
174 | * @param array $filterParams |
||
175 | * @return array |
||
176 | */ |
||
177 | 2 | public function getMerchantPayments($application, $token, array $filterParams = []) |
|
186 | |||
187 | /** |
||
188 | * Add a Merchant Payment to the given application. Amount should be supplied in pence. |
||
189 | * |
||
190 | * @author SL |
||
191 | * @param string $application |
||
192 | * @param \DateTime $effectiveDate |
||
193 | * @param int $amount |
||
194 | * @param string $token |
||
195 | * @return array |
||
196 | */ |
||
197 | 2 | public function addMerchantPayment($application, \DateTime $effectiveDate, $amount, $token) |
|
209 | |||
210 | /** |
||
211 | * @author EB |
||
212 | * @param $installationId |
||
213 | * @param $application |
||
214 | * @param $token |
||
215 | * @return array |
||
216 | */ |
||
217 | 2 | public function getApplicationCreditInfo($installationId, $application, $token) |
|
226 | |||
227 | /** |
||
228 | * Get application history |
||
229 | * |
||
230 | * @author SL |
||
231 | * @param $application |
||
232 | * @param $token |
||
233 | * @return array |
||
234 | */ |
||
235 | 2 | public function getApplicationHistory($application, $token) |
|
243 | |||
244 | /** |
||
245 | * @author WN |
||
246 | * @param string $action |
||
247 | * @param array $data |
||
248 | * @param string $token |
||
249 | * @return bool |
||
250 | * @throws SdkException |
||
251 | */ |
||
252 | 4 | private function requestAction($action, $data, $token) |
|
257 | } |
||
258 |