@@ -87,6 +87,71 @@ def test_creating_payment_instrument(self):
8787 xapikey = "YourXapikey"
8888 )
8989
90+ def test_creating_transfer_limit (self ):
91+ request = {
92+ "amount" : {
93+ "currency" : "EUR" ,
94+ "value" : 10000
95+ },
96+ "reference" : "Your reference for the transfer limit" ,
97+ "scaInformation" : {
98+ "scaOnApproval" : True
99+ },
100+ "scope" : "perTransaction" ,
101+ "startsAt" : "2025-08-15T06:36:20+01:00" ,
102+ "endsAt" : "2026-08-14T00:00:00+01:00" ,
103+ "transferType" : "all"
104+ }
105+
106+ balance_platform_id = 'YOUR_BALANCE_PLATFORM_ID'
107+
108+ self .adyen .client = self .test .create_client_from_file (200 , request , "test/mocks/configuration/"
109+ "transfer-limit-created.json" )
110+ result = self .adyen .balancePlatform .transfer_limits_balance_platform_level_api .create_transfer_limit (request ,
111+ balance_platform_id )
112+ self .assertEqual ("TRLI00000000000000000000000001" , result .message ['id' ])
113+ self .adyen .client .http_client .request .assert_called_once_with (
114+ 'POST' ,
115+ f'{ self .balance_platform_url } /balancePlatforms/{ balance_platform_id } /transferLimits' ,
116+ headers = {'adyen-library-name' : 'adyen-python-api-library' , 'adyen-library-version' : settings .LIB_VERSION },
117+ json = request ,
118+ xapikey = "YourXapikey"
119+ )
120+
121+ def test_creating_webhook (self ):
122+ request = {
123+ "type" : "balance" ,
124+ "target" : {
125+ "type" : "balanceAccount" ,
126+ "id" : "BA00000000000000000LIABLE"
127+ },
128+ "currency" : "USD" ,
129+ "status" : "active" ,
130+ "conditions" : [
131+ {
132+ "balanceType" : "available" ,
133+ "conditionType" : "lessThan" ,
134+ "value" : 500000
135+ }
136+ ]
137+ }
138+
139+ balance_platform_id = 'YOUR_BALANCE_PLATFORM_ID'
140+ webhook_id = 'YOUR_WEBHOOK_ID'
141+
142+ self .adyen .client = self .test .create_client_from_file (200 , request , "test/mocks/configuration/"
143+ "webhook-setting-created.json" )
144+ result = self .adyen .balancePlatform .balances_api .create_webhook_setting (request , balance_platform_id , webhook_id )
145+ self .assertEqual ("active" , result .message ['status' ])
146+ self .assertEqual ("BWHS00000000000000000000000001" , result .message ['id' ])
147+ self .adyen .client .http_client .request .assert_called_once_with (
148+ 'POST' ,
149+ f'{ self .balance_platform_url } /balancePlatforms/{ balance_platform_id } /webhooks/{ webhook_id } /settings' ,
150+ headers = {'adyen-library-name' : 'adyen-python-api-library' , 'adyen-library-version' : settings .LIB_VERSION },
151+ json = request ,
152+ xapikey = "YourXapikey"
153+ )
154+
90155 def test_creating_payment_instrument_group (self ):
91156 request = {
92157 "balancePlatform" : "YOUR_BALANCE_PLATFORM" ,
0 commit comments