Skip to content

Commit e528c50

Browse files
committed
Add test
1 parent 828eb09 commit e528c50

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"transferLimits": [
3+
{
4+
"amount": {
5+
"value": 10000,
6+
"currency": "EUR"
7+
},
8+
"id": "TRLI00000000000000000000000001",
9+
"endsAt": "2026-08-13T23:00:00+01:00",
10+
"scope": "perDay",
11+
"reference": "Your reference for the transfer limit",
12+
"scaInformation": {
13+
"exemption": "initialLimit",
14+
"status": "notPerformed"
15+
},
16+
"startsAt": "2025-08-13T23:00:00+01:00",
17+
"limitStatus": "active",
18+
"transferType": "instant"
19+
}
20+
]
21+
}

tests/Unit/BalancePlatformTest.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
use Adyen\Service\BalancePlatform\BankAccountValidationApi;
1515
use Adyen\Service\BalancePlatform\PaymentInstrumentGroupsApi;
1616
use Adyen\Service\BalancePlatform\PlatformApi;
17+
use Adyen\Service\BalancePlatform\TransferLimitsBalanceAccountLevelApi;
1718
use http\Env;
1819
use PharIo\Manifest\Url;
1920
use function PHPUnit\Framework\assertEquals;
@@ -203,4 +204,20 @@ public function testGetSweepUrlCheckLive()
203204
$this->requestUrl
204205
);
205206
}
207+
208+
public function testGetCurrentTransferLimits()
209+
{
210+
$client = $this->createMockClientUrl(
211+
'tests/Resources/BalancePlatform/get-current-transfer-limits.json',
212+
Environment::LIVE
213+
);
214+
$service = new TransferLimitsBalanceAccountLevelApi($client);
215+
$response = $service->getCurrentTransferLimits('balanceAccountId');
216+
217+
self::assertCount(1, $response->getTransferLimits());
218+
self::assertEquals(
219+
'https://balanceplatform-api-live.adyen.com/bcl/v2/balanceAccounts/balanceAccountId/transferLimits/current',
220+
$this->requestUrl
221+
);
222+
}
206223
}

0 commit comments

Comments
 (0)