11require_relative '../service'
22module Adyen
3+
4+ # NOTE: This class is auto generated by OpenAPI Generator
5+ # Ref: https://openapi-generator.tech
6+ #
7+ # Do not edit the class manually.
38 class BalanceAccountsApi < Service
49 attr_accessor :service , :version
510
611 def initialize ( client , version = DEFAULT_VERSION )
712 super ( client , version , 'BalancePlatform' )
813 end
914
15+ # Create a balance account
1016 def create_balance_account ( request , headers : { } )
1117 endpoint = '/balanceAccounts' . gsub ( /{.+?}/ , '%s' )
1218 endpoint = endpoint . gsub ( %r{^/} , '' )
@@ -16,6 +22,7 @@ def create_balance_account(request, headers: {})
1622 @client . call_adyen_api ( @service , action , request , headers , @version )
1723 end
1824
25+ # Create a sweep
1926 def create_sweep ( request , balance_account_id , headers : { } )
2027 endpoint = '/balanceAccounts/{balanceAccountId}/sweeps' . gsub ( /{.+?}/ , '%s' )
2128 endpoint = endpoint . gsub ( %r{^/} , '' )
@@ -25,6 +32,7 @@ def create_sweep(request, balance_account_id, headers: {})
2532 @client . call_adyen_api ( @service , action , request , headers , @version )
2633 end
2734
35+ # Delete a sweep
2836 def delete_sweep ( balance_account_id , sweep_id , headers : { } )
2937 endpoint = '/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}' . gsub ( /{.+?}/ , '%s' )
3038 endpoint = endpoint . gsub ( %r{^/} , '' )
@@ -34,6 +42,7 @@ def delete_sweep(balance_account_id, sweep_id, headers: {})
3442 @client . call_adyen_api ( @service , action , { } , headers , @version )
3543 end
3644
45+ # Get all sweeps for a balance account
3746 def get_all_sweeps_for_balance_account ( balance_account_id , headers : { } , query_params : { } )
3847 endpoint = '/balanceAccounts/{balanceAccountId}/sweeps' . gsub ( /{.+?}/ , '%s' )
3948 endpoint = endpoint . gsub ( %r{^/} , '' )
@@ -43,6 +52,17 @@ def get_all_sweeps_for_balance_account(balance_account_id, headers: {}, query_pa
4352 @client . call_adyen_api ( @service , action , { } , headers , @version )
4453 end
4554
55+ # Get all transaction rules for a balance account
56+ def get_all_transaction_rules_for_balance_account ( id , headers : { } )
57+ endpoint = '/balanceAccounts/{id}/transactionRules' . gsub ( /{.+?}/ , '%s' )
58+ endpoint = endpoint . gsub ( %r{^/} , '' )
59+ endpoint = format ( endpoint , id )
60+
61+ action = { method : 'get' , url : endpoint }
62+ @client . call_adyen_api ( @service , action , { } , headers , @version )
63+ end
64+
65+ # Get a balance account
4666 def get_balance_account ( id , headers : { } )
4767 endpoint = '/balanceAccounts/{id}' . gsub ( /{.+?}/ , '%s' )
4868 endpoint = endpoint . gsub ( %r{^/} , '' )
@@ -52,6 +72,7 @@ def get_balance_account(id, headers: {})
5272 @client . call_adyen_api ( @service , action , { } , headers , @version )
5373 end
5474
75+ # Get payment instruments linked to a balance account
5576 def get_payment_instruments_linked_to_balance_account ( id , headers : { } , query_params : { } )
5677 endpoint = '/balanceAccounts/{id}/paymentInstruments' . gsub ( /{.+?}/ , '%s' )
5778 endpoint = endpoint . gsub ( %r{^/} , '' )
@@ -61,6 +82,7 @@ def get_payment_instruments_linked_to_balance_account(id, headers: {}, query_par
6182 @client . call_adyen_api ( @service , action , { } , headers , @version )
6283 end
6384
85+ # Get a sweep
6486 def get_sweep ( balance_account_id , sweep_id , headers : { } )
6587 endpoint = '/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}' . gsub ( /{.+?}/ , '%s' )
6688 endpoint = endpoint . gsub ( %r{^/} , '' )
@@ -70,6 +92,7 @@ def get_sweep(balance_account_id, sweep_id, headers: {})
7092 @client . call_adyen_api ( @service , action , { } , headers , @version )
7193 end
7294
95+ # Update a balance account
7396 def update_balance_account ( request , id , headers : { } )
7497 endpoint = '/balanceAccounts/{id}' . gsub ( /{.+?}/ , '%s' )
7598 endpoint = endpoint . gsub ( %r{^/} , '' )
@@ -79,6 +102,7 @@ def update_balance_account(request, id, headers: {})
79102 @client . call_adyen_api ( @service , action , request , headers , @version )
80103 end
81104
105+ # Update a sweep
82106 def update_sweep ( request , balance_account_id , sweep_id , headers : { } )
83107 endpoint = '/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}' . gsub ( /{.+?}/ , '%s' )
84108 endpoint = endpoint . gsub ( %r{^/} , '' )
0 commit comments