[balanceplatform] Code generation: update services and models#480
[balanceplatform] Code generation: update services and models#480AdyenAutomationBot wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces the CustomPayoutSchedulesSweepsApi and ManagedPayoutSchedulesApi services while refactoring BalanceAccountsApi by relocating its sweep-related methods. Feedback indicates that the removal of these methods from BalanceAccountsApi constitutes a breaking change, and it is recommended to retain them as deprecated aliases. Additionally, both new API classes currently use hardcoded test environment URLs, which must be updated to resolve dynamically for production support. Finally, the use of the parameter name 'id' in ManagedPayoutSchedulesApi should be renamed to avoid shadowing the Python built-in function.
I am having trouble creating individual review comments. Click here to see my feedback.
Adyen/services/balancePlatform/balance_accounts_api.py (26-54)
The removal of sweep-related methods (such as create_sweep, delete_sweep, and get_all_sweeps_for_balance_account) from BalanceAccountsApi constitutes a breaking change for users of this SDK. Although these methods have been relocated to the new CustomPayoutSchedulesSweepsApi class, existing code that calls these methods on the balance_accounts_api instance will fail. To ensure a smooth transition, consider keeping these methods in BalanceAccountsApi as deprecated aliases that call the new service.
Adyen/services/balancePlatform/custom_payout_schedules_sweeps_api.py (14)
The baseUrl is hardcoded to the test environment URL (https://balanceplatform-api-test.adyen.com/bcl/v2). This prevents the service from functioning correctly in production environments. The base URL should be dynamically resolved based on the environment (test or live) configured in the AdyenClient instance.
Adyen/services/balancePlatform/managed_payout_schedules_api.py (14)
The baseUrl is hardcoded to the test environment. This is a critical issue for production usage. Please update the generator or the class to use a base URL that respects the client's environment configuration.
Adyen/services/balancePlatform/managed_payout_schedules_api.py (27-32)
The parameter name id shadows the Python built-in function id(). It is recommended to use a more descriptive name, such as payout_schedule_id, to avoid shadowing and improve code clarity. This applies to multiple methods in this class.
self, balanceAccountId, payout_schedule_id, idempotency_key=None, **kwargs
):
"""
Delete a managed payout schedule on a balance account
"""
endpoint = self.baseUrl + f"/balanceAccounts/{balanceAccountId}/payoutSchedules/{payout_schedule_id}"
158356b to
f6d97e4
Compare
|



This PR contains the automated changes for the
balanceplatformservice.The commit history of this PR reflects the
adyen-openapicommits that have been applied.