@@ -13,6 +13,22 @@ def __init__(self, client=None):
1313 self .service = "balancePlatform"
1414 self .baseUrl = "https://balanceplatform-api-test.adyen.com/bcl/v2"
1515
16+ def create_balance_account (self , request , idempotency_key = None , ** kwargs ):
17+ """
18+ Create a balance account
19+ """
20+ endpoint = self .baseUrl + f"/balanceAccounts"
21+ method = "POST"
22+ return self .client .call_adyen_api (request , self .service , method , endpoint , idempotency_key , ** kwargs )
23+
24+ def create_sweep (self , request , balanceAccountId , idempotency_key = None , ** kwargs ):
25+ """
26+ Create a sweep
27+ """
28+ endpoint = self .baseUrl + f"/balanceAccounts/{ balanceAccountId } /sweeps"
29+ method = "POST"
30+ return self .client .call_adyen_api (request , self .service , method , endpoint , idempotency_key , ** kwargs )
31+
1632 def delete_sweep (self , balanceAccountId , sweepId , idempotency_key = None , ** kwargs ):
1733 """
1834 Delete a sweep
@@ -21,19 +37,19 @@ def delete_sweep(self, balanceAccountId, sweepId, idempotency_key=None, **kwargs
2137 method = "DELETE"
2238 return self .client .call_adyen_api (None , self .service , method , endpoint , idempotency_key , ** kwargs )
2339
24- def get_all_sweeps_for_balance_account (self , balanceAccountId , idempotency_key = None , ** kwargs ):
40+ def get_all_payment_instruments_for_balance_account (self , id , idempotency_key = None , ** kwargs ):
2541 """
26- Get all sweeps for a balance account
42+ Get all payment instruments for a balance account
2743 """
28- endpoint = self .baseUrl + f"/balanceAccounts/{ balanceAccountId } /sweeps "
44+ endpoint = self .baseUrl + f"/balanceAccounts/{ id } /paymentInstruments "
2945 method = "GET"
3046 return self .client .call_adyen_api (None , self .service , method , endpoint , idempotency_key , ** kwargs )
3147
32- def get_sweep (self , balanceAccountId , sweepId , idempotency_key = None , ** kwargs ):
48+ def get_all_sweeps_for_balance_account (self , balanceAccountId , idempotency_key = None , ** kwargs ):
3349 """
34- Get a sweep
50+ Get all sweeps for a balance account
3551 """
36- endpoint = self .baseUrl + f"/balanceAccounts/{ balanceAccountId } /sweeps/ { sweepId } "
52+ endpoint = self .baseUrl + f"/balanceAccounts/{ balanceAccountId } /sweeps"
3753 method = "GET"
3854 return self .client .call_adyen_api (None , self .service , method , endpoint , idempotency_key , ** kwargs )
3955
@@ -45,22 +61,14 @@ def get_balance_account(self, id, idempotency_key=None, **kwargs):
4561 method = "GET"
4662 return self .client .call_adyen_api (None , self .service , method , endpoint , idempotency_key , ** kwargs )
4763
48- def get_all_payment_instruments_for_balance_account (self , id , idempotency_key = None , ** kwargs ):
64+ def get_sweep (self , balanceAccountId , sweepId , idempotency_key = None , ** kwargs ):
4965 """
50- Get all payment instruments for a balance account
66+ Get a sweep
5167 """
52- endpoint = self .baseUrl + f"/balanceAccounts/{ id } /paymentInstruments "
68+ endpoint = self .baseUrl + f"/balanceAccounts/{ balanceAccountId } /sweeps/ { sweepId } "
5369 method = "GET"
5470 return self .client .call_adyen_api (None , self .service , method , endpoint , idempotency_key , ** kwargs )
5571
56- def update_sweep (self , request , balanceAccountId , sweepId , idempotency_key = None , ** kwargs ):
57- """
58- Update a sweep
59- """
60- endpoint = self .baseUrl + f"/balanceAccounts/{ balanceAccountId } /sweeps/{ sweepId } "
61- method = "PATCH"
62- return self .client .call_adyen_api (request , self .service , method , endpoint , idempotency_key , ** kwargs )
63-
6472 def update_balance_account (self , request , id , idempotency_key = None , ** kwargs ):
6573 """
6674 Update a balance account
@@ -69,19 +77,11 @@ def update_balance_account(self, request, id, idempotency_key=None, **kwargs):
6977 method = "PATCH"
7078 return self .client .call_adyen_api (request , self .service , method , endpoint , idempotency_key , ** kwargs )
7179
72- def create_balance_account (self , request , idempotency_key = None , ** kwargs ):
73- """
74- Create a balance account
75- """
76- endpoint = self .baseUrl + f"/balanceAccounts"
77- method = "POST"
78- return self .client .call_adyen_api (request , self .service , method , endpoint , idempotency_key , ** kwargs )
79-
80- def create_sweep (self , request , balanceAccountId , idempotency_key = None , ** kwargs ):
80+ def update_sweep (self , request , balanceAccountId , sweepId , idempotency_key = None , ** kwargs ):
8181 """
82- Create a sweep
82+ Update a sweep
8383 """
84- endpoint = self .baseUrl + f"/balanceAccounts/{ balanceAccountId } /sweeps"
85- method = "POST "
84+ endpoint = self .baseUrl + f"/balanceAccounts/{ balanceAccountId } /sweeps/ { sweepId } "
85+ method = "PATCH "
8686 return self .client .call_adyen_api (request , self .service , method , endpoint , idempotency_key , ** kwargs )
8787
0 commit comments