9
9
namespace UnzerSDK \Interfaces ;
10
10
11
11
use DateTime ;
12
+ use RuntimeException ;
12
13
use UnzerSDK \Exceptions \UnzerApiException ;
13
14
use UnzerSDK \Resources \AbstractUnzerResource ;
14
15
use UnzerSDK \Resources \Basket ;
24
25
use UnzerSDK \Resources \TransactionTypes \Charge ;
25
26
use UnzerSDK \Resources \TransactionTypes \Payout ;
26
27
use UnzerSDK \Resources \TransactionTypes \Shipment ;
27
- use RuntimeException ;
28
28
29
29
interface PaymentServiceInterface
30
30
{
@@ -48,8 +48,8 @@ public function performAuthorization(
48
48
Authorization $ authorization ,
49
49
$ paymentType ,
50
50
$ customer = null ,
51
- Metadata $ metadata = null ,
52
- Basket $ basket = null
51
+ ? Metadata $ metadata = null ,
52
+ ? Basket $ basket = null
53
53
): Authorization ;
54
54
55
55
/**
@@ -130,8 +130,8 @@ public function performCharge(
130
130
Charge $ charge ,
131
131
$ paymentType ,
132
132
$ customer = null ,
133
- Metadata $ metadata = null ,
134
- Basket $ basket = null
133
+ ? Metadata $ metadata = null ,
134
+ ? Basket $ basket = null
135
135
): Charge ;
136
136
137
137
/**
@@ -229,9 +229,9 @@ public function performChargeOnPayment(
229
229
*/
230
230
public function chargeAuthorization (
231
231
$ payment ,
232
- float $ amount = null ,
233
- string $ orderId = null ,
234
- string $ invoiceId = null
232
+ ? float $ amount = null ,
233
+ ? string $ orderId = null ,
234
+ ? string $ invoiceId = null
235
235
): Charge ;
236
236
237
237
/**
@@ -252,9 +252,9 @@ public function chargeAuthorization(
252
252
*/
253
253
public function chargePayment (
254
254
$ payment ,
255
- float $ amount = null ,
256
- string $ orderId = null ,
257
- string $ invoiceId = null
255
+ ? float $ amount = null ,
256
+ ? string $ orderId = null ,
257
+ ? string $ invoiceId = null
258
258
): Charge ;
259
259
260
260
/**
@@ -284,11 +284,11 @@ public function payout(
284
284
$ paymentType ,
285
285
string $ returnUrl ,
286
286
$ customer = null ,
287
- string $ orderId = null ,
288
- Metadata $ metadata = null ,
289
- Basket $ basket = null ,
290
- string $ invoiceId = null ,
291
- string $ referenceText = null
287
+ ? string $ orderId = null ,
288
+ ? Metadata $ metadata = null ,
289
+ ? Basket $ basket = null ,
290
+ ? string $ invoiceId = null ,
291
+ ? string $ referenceText = null
292
292
): Payout ;
293
293
294
294
/**
@@ -303,7 +303,7 @@ public function payout(
303
303
* @throws UnzerApiException An UnzerApiException is thrown if there is an error returned on API-request.
304
304
* @throws RuntimeException A RuntimeException is thrown when there is an error while using the SDK.
305
305
*/
306
- public function ship ($ payment , string $ invoiceId = null , string $ orderId = null ): Shipment ;
306
+ public function ship ($ payment , ? string $ invoiceId = null , ? string $ orderId = null ): Shipment ;
307
307
308
308
/**
309
309
* Initializes a PayPage for charge transaction and returns the PayPage resource.
@@ -328,9 +328,9 @@ public function ship($payment, string $invoiceId = null, string $orderId = null)
328
328
*/
329
329
public function initPayPageCharge (
330
330
Paypage $ paypage ,
331
- Customer $ customer = null ,
332
- Basket $ basket = null ,
333
- Metadata $ metadata = null
331
+ ? Customer $ customer = null ,
332
+ ? Basket $ basket = null ,
333
+ ? Metadata $ metadata = null
334
334
): Paypage ;
335
335
336
336
/**
@@ -356,9 +356,9 @@ public function initPayPageCharge(
356
356
*/
357
357
public function initPayPageAuthorize (
358
358
Paypage $ paypage ,
359
- Customer $ customer = null ,
360
- Basket $ basket = null ,
361
- Metadata $ metadata = null
359
+ ? Customer $ customer = null ,
360
+ ? Basket $ basket = null ,
361
+ ? Metadata $ metadata = null
362
362
): Paypage ;
363
363
364
364
/**
@@ -378,7 +378,7 @@ public function fetchInstallmentPlans(
378
378
float $ amount ,
379
379
string $ currency ,
380
380
float $ effectiveInterest ,
381
- DateTime $ orderDate = null
381
+ ? DateTime $ orderDate = null
382
382
): InstalmentPlans ;
383
383
384
384
/**
0 commit comments