Total Complexity | 5 |
Total Lines | 43 |
Duplicated Lines | 0 % |
Coverage | 52.63% |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | class SettlementGateway extends AbstractGateway |
||
23 | { |
||
24 | /** |
||
25 | * @author WN, MS |
||
26 | * @param string $token |
||
27 | * @param Carbon|null $since |
||
28 | * @param Carbon|null $until |
||
29 | * @return array |
||
30 | */ |
||
31 | 1 | public function getSettlementReports($token, Carbon $since = null, Carbon $until = null) |
|
32 | { |
||
33 | 1 | return $this->fetchDocument( |
|
34 | 1 | '/v4/settlement-reports', |
|
35 | 1 | $token, |
|
36 | 1 | 'Settlement', |
|
37 | [ |
||
38 | 1 | 'since' => $since !== null?$since->format('Y-m-d'):null, |
|
39 | 1 | 'until' => $until !== null?$until->format('Y-m-d'):null, |
|
40 | ] |
||
41 | 1 | ); |
|
42 | } |
||
43 | |||
44 | /** |
||
45 | * @param string $token |
||
46 | * @param int $settlementId |
||
47 | * @return array |
||
48 | * @throws SdkException |
||
49 | */ |
||
50 | 1 | public function getSingleSettlementReport($token, $settlementId) |
|
51 | { |
||
52 | 1 | return $this->fetchDocument('/v4/settlement-reports/' . $settlementId, $token, 'Settlement Report'); |
|
53 | } |
||
54 | |||
55 | /** |
||
56 | * @author EA |
||
57 | * @param string $token |
||
58 | * @param int $settlementId |
||
59 | * @return array |
||
60 | * @throws SdkException |
||
61 | */ |
||
62 | public function getSingleAggregateSettlementReport($token, $settlementId) |
||
65 | } |
||
66 | } |
||
67 |