Skip to content

[balanceplatform] Code generation: update services and models - #409

Open
AdyenAutomationBot wants to merge 1 commit into
mainfrom
sdk-automation/balanceplatform
Open

AdyenAutomationBot wants to merge 1 commit into
mainfrom
sdk-automation/balanceplatform

Conversation

@AdyenAutomationBot

@AdyenAutomationBot AdyenAutomationBot commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

This PR contains the automated changes for the balanceplatform service.

Adyen/adyen-openapi@2c1f3ab

The commit history of this PR reflects the adyen-openapi commits that have been applied.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces the get_sweep_executions method to the CustomPayoutSchedulesSweepsApi class, enabling users to retrieve executions of a custom payout schedule. It also updates the SDK generation metadata. The feedback highlights the need to add a corresponding unit test in spec/balance_platform_spec.rb to ensure the new endpoint is thoroughly tested and adheres to existing codebase conventions.

Comment on lines +48 to +53
def get_sweep_executions(balance_account_id, sweep_id, headers: {}, query_params: {})
endpoint = build_endpoint('/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}/executions', balance_account_id, sweep_id)
endpoint += create_query_string(query_params)
action = { method: 'get', url: endpoint }
@client.call_adyen_api(@service, action, {}, headers, @version)
end

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The new method get_sweep_executions is added to CustomPayoutSchedulesSweepsApi, but there is no corresponding unit test in spec/balance_platform_spec.rb. Please add a test case to verify that this endpoint is called correctly with the expected parameters, following the existing test patterns (e.g., asserting both be_a Adyen::HashWithAccessors and be_a_kind_of Hash for response hashes).

Example test case:

it 'makes a get_sweep_executions GET call' do
  response_body = json_from_file('mocks/responses/BalancePlatform/get_sweep_executions.json')

  url = @shared_values[:client].service_url(
    @shared_values[:service],
    'balanceAccounts/balanceAccountID/sweeps/sweepID/executions',
    @shared_values[:client].balance_platform.version
  )
  WebMock.stub_request(:get, url)
         .with(
           query: { 'limit' => 5 },
           headers: { 'x-api-key' => @shared_values[:client].api_key }
         )
         .to_return(body: response_body)

  result = @shared_values[:client].balance_platform.custom_payout_schedules_sweeps_api
                 .get_sweep_executions('balanceAccountID', 'sweepID', query_params: { 'limit' => 5 })
  response_hash = result.response

  expect(result.status).to eq(200)
  expect(response_hash).to eq(JSON.parse(response_body))
  expect(response_hash).to be_a Adyen::HashWithAccessors
  expect(response_hash).to be_a_kind_of Hash
end
References
  1. Follow existing codebase conventions in tests, such as asserting both be_a Adyen::HashWithAccessors and be_a_kind_of Hash for response hashes, even if they seem redundant.

@AdyenAutomationBot
AdyenAutomationBot force-pushed the sdk-automation/balanceplatform branch from f32c50b to c27bf2a Compare October 22, 2026 13:33
@AdyenAutomationBot
AdyenAutomationBot force-pushed the sdk-automation/balanceplatform branch from c27bf2a to 9132e6f Compare October 22, 2026 14:18
@sonarqubecloud

Copy link
Copy Markdown

@andrej-gajduk-adyen

Copy link
Copy Markdown

Do not merge, waiting for patchable fix

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants