|
8 | 8 | import com.adyen.model.acswebhooks.RelayedAuthenticationRequest; |
9 | 9 | import com.adyen.model.balancewebhooks.BalanceAccountBalanceNotificationRequest; |
10 | 10 | import com.adyen.model.balancewebhooks.BalanceWebhooksHandler; |
| 11 | +import com.adyen.model.balancewebhooks.ReleasedBlockedBalanceNotificationRequest; |
11 | 12 | import com.adyen.model.configurationwebhooks.*; |
12 | 13 | import com.adyen.model.disputewebhooks.DisputeNotificationRequest; |
13 | 14 | import com.adyen.model.disputewebhooks.DisputeWebhooksHandler; |
@@ -328,6 +329,34 @@ public void testBalanceAccountBalanceNotificationRequest() { |
328 | 329 | assertFalse(balanceAccountBalanceNotificationRequest.getData().getSettingIds().isEmpty()); |
329 | 330 | } |
330 | 331 |
|
| 332 | + @Test |
| 333 | + public void testBalanceAccountBalanceBlockReleasedNotificationRequest() { |
| 334 | + String json = |
| 335 | + getFileContents( |
| 336 | + "mocks/balancePlatform-webhooks/balancePlatform-balanceAccount-balance-block-released.json"); |
| 337 | + |
| 338 | + Optional<ReleasedBlockedBalanceNotificationRequest> |
| 339 | + releasedBlockedBalanceNotificationRequestOptional = |
| 340 | + new BalanceWebhooksHandler(json).getReleasedBlockedBalanceNotificationRequest(); |
| 341 | + assertTrue(releasedBlockedBalanceNotificationRequestOptional.isPresent()); |
| 342 | + |
| 343 | + ReleasedBlockedBalanceNotificationRequest releasedBlockedBalanceNotificationRequest = |
| 344 | + releasedBlockedBalanceNotificationRequestOptional.get(); |
| 345 | + assertNotNull(releasedBlockedBalanceNotificationRequest.getData()); |
| 346 | + |
| 347 | + assertEquals( |
| 348 | + ReleasedBlockedBalanceNotificationRequest.TypeEnum |
| 349 | + .BALANCEPLATFORM_BALANCEACCOUNT_BALANCE_BLOCK_RELEASED, |
| 350 | + releasedBlockedBalanceNotificationRequest.getType()); |
| 351 | + assertEquals( |
| 352 | + "BATCH_REF_20250925", |
| 353 | + releasedBlockedBalanceNotificationRequest.getData().getBatchReference()); |
| 354 | + assertNotNull(releasedBlockedBalanceNotificationRequest.getData().getBalanceAccount()); |
| 355 | + assertEquals( |
| 356 | + "BA00000000000000000001", |
| 357 | + releasedBlockedBalanceNotificationRequest.getData().getBalanceAccount().getId()); |
| 358 | + } |
| 359 | + |
331 | 360 | @Test |
332 | 361 | public void testNetworkTokenCreatedNotificationRequest() { |
333 | 362 | String json = |
|
0 commit comments