From 92f7c41a658b4ae6accf54d3ead1c3d94f60f10d Mon Sep 17 00:00:00 2001 From: AdyenAutomationBot <38424300+AdyenAutomationBot@users.noreply.github.com> Date: Mon, 17 Nov 2025 11:08:53 +0000 Subject: [PATCH 1/3] false[adyen-sdk-automation] automated change --- lib/adyen/services/balancePlatform.rb | 10 ++++ .../sca_association_management_api.rb | 46 +++++++++++++++++++ .../sca_device_management_api.rb | 46 +++++++++++++++++++ .../legal_entities_api.rb | 10 ++++ 4 files changed, 112 insertions(+) create mode 100644 lib/adyen/services/balancePlatform/sca_association_management_api.rb create mode 100644 lib/adyen/services/balancePlatform/sca_device_management_api.rb diff --git a/lib/adyen/services/balancePlatform.rb b/lib/adyen/services/balancePlatform.rb index 1c10de40..24ca6c38 100644 --- a/lib/adyen/services/balancePlatform.rb +++ b/lib/adyen/services/balancePlatform.rb @@ -12,6 +12,8 @@ require_relative 'balancePlatform/payment_instrument_groups_api' require_relative 'balancePlatform/payment_instruments_api' require_relative 'balancePlatform/platform_api' +require_relative 'balancePlatform/sca_association_management_api' +require_relative 'balancePlatform/sca_device_management_api' require_relative 'balancePlatform/transaction_rules_api' require_relative 'balancePlatform/transfer_limits_balance_account_level_api' require_relative 'balancePlatform/transfer_limits_balance_platform_level_api' @@ -89,6 +91,14 @@ def platform_api @platform_api ||= Adyen::PlatformApi.new(@client, @version) end + def sca_association_management_api + @sca_association_management_api ||= Adyen::SCAAssociationManagementApi.new(@client, @version) + end + + def sca_device_management_api + @sca_device_management_api ||= Adyen::SCADeviceManagementApi.new(@client, @version) + end + def transaction_rules_api @transaction_rules_api ||= Adyen::TransactionRulesApi.new(@client, @version) end diff --git a/lib/adyen/services/balancePlatform/sca_association_management_api.rb b/lib/adyen/services/balancePlatform/sca_association_management_api.rb new file mode 100644 index 00000000..7376486b --- /dev/null +++ b/lib/adyen/services/balancePlatform/sca_association_management_api.rb @@ -0,0 +1,46 @@ +require_relative '../service' +module Adyen + + # NOTE: This class is auto generated by OpenAPI Generator + # Ref: https://openapi-generator.tech + # + # Do not edit the class manually. + class SCAAssociationManagementApi < Service + attr_accessor :service, :version + + def initialize(client, version = DEFAULT_VERSION) + super(client, version, 'BalancePlatform') + end + + # Approve a pending approval association + def approve_association(request, headers: {}) + endpoint = '/scaAssociations'.gsub(/{.+?}/, '%s') + endpoint = endpoint.gsub(%r{^/}, '') + endpoint = format(endpoint) + + action = { method: 'patch', url: endpoint } + @client.call_adyen_api(@service, action, request, headers, @version) + end + + # Get a list of devices associated with an entity + def list_associations(headers: {}, query_params: {}) + endpoint = '/scaAssociations'.gsub(/{.+?}/, '%s') + endpoint = endpoint.gsub(%r{^/}, '') + endpoint = format(endpoint) + endpoint += create_query_string(query_params) + action = { method: 'get', url: endpoint } + @client.call_adyen_api(@service, action, {}, headers, @version) + end + + # Delete association to devices + def remove_association(request, headers: {}) + endpoint = '/scaAssociations'.gsub(/{.+?}/, '%s') + endpoint = endpoint.gsub(%r{^/}, '') + endpoint = format(endpoint) + + action = { method: 'delete', url: endpoint } + @client.call_adyen_api(@service, action, request, headers, @version) + end + + end +end diff --git a/lib/adyen/services/balancePlatform/sca_device_management_api.rb b/lib/adyen/services/balancePlatform/sca_device_management_api.rb new file mode 100644 index 00000000..895f1cf8 --- /dev/null +++ b/lib/adyen/services/balancePlatform/sca_device_management_api.rb @@ -0,0 +1,46 @@ +require_relative '../service' +module Adyen + + # NOTE: This class is auto generated by OpenAPI Generator + # Ref: https://openapi-generator.tech + # + # Do not edit the class manually. + class SCADeviceManagementApi < Service + attr_accessor :service, :version + + def initialize(client, version = DEFAULT_VERSION) + super(client, version, 'BalancePlatform') + end + + # Begin SCA device registration + def begin_sca_device_registration(request, headers: {}) + endpoint = '/scaDevices'.gsub(/{.+?}/, '%s') + endpoint = endpoint.gsub(%r{^/}, '') + endpoint = format(endpoint) + + action = { method: 'post', url: endpoint } + @client.call_adyen_api(@service, action, request, headers, @version) + end + + # Finish registration process for a SCA device + def finish_sca_device_registration(request, device_id, headers: {}) + endpoint = '/scaDevices/{deviceId}'.gsub(/{.+?}/, '%s') + endpoint = endpoint.gsub(%r{^/}, '') + endpoint = format(endpoint, device_id) + + action = { method: 'patch', url: endpoint } + @client.call_adyen_api(@service, action, request, headers, @version) + end + + # Create a new SCA association for a device + def submit_sca_association(request, device_id, headers: {}) + endpoint = '/scaDevices/{deviceId}/scaAssociations'.gsub(/{.+?}/, '%s') + endpoint = endpoint.gsub(%r{^/}, '') + endpoint = format(endpoint, device_id) + + action = { method: 'post', url: endpoint } + @client.call_adyen_api(@service, action, request, headers, @version) + end + + end +end diff --git a/lib/adyen/services/legalEntityManagement/legal_entities_api.rb b/lib/adyen/services/legalEntityManagement/legal_entities_api.rb index 973351ad..fcc2bf8a 100644 --- a/lib/adyen/services/legalEntityManagement/legal_entities_api.rb +++ b/lib/adyen/services/legalEntityManagement/legal_entities_api.rb @@ -62,6 +62,16 @@ def get_legal_entity(id, headers: {}) @client.call_adyen_api(@service, action, {}, headers, @version) end + # Request periodic data review. + def request_periodic_review(id, headers: {}) + endpoint = '/legalEntities/{id}/requestPeriodicReview'.gsub(/{.+?}/, '%s') + endpoint = endpoint.gsub(%r{^/}, '') + endpoint = format(endpoint, id) + + action = { method: 'post', url: endpoint } + @client.call_adyen_api(@service, action, {}, headers, @version) + end + # Update a legal entity def update_legal_entity(request, id, headers: {}) endpoint = '/legalEntities/{id}'.gsub(/{.+?}/, '%s') From 7ab63e81db40b129cdf0b6bc652a002437ddd83d Mon Sep 17 00:00:00 2001 From: beppe Date: Fri, 21 Nov 2025 11:39:48 +0100 Subject: [PATCH 2/3] Add test for LEM /requestPeriodicReview --- spec/lem_spec.rb | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/spec/lem_spec.rb b/spec/lem_spec.rb index 4792d612..6add7cfe 100644 --- a/spec/lem_spec.rb +++ b/spec/lem_spec.rb @@ -114,4 +114,25 @@ expect(error.msg).to eq('Legal entity not found ErrorCode: 100') end end + + it 'makes a LegaleEntity /requestPeriodicReview call' do + url = @shared_values[:client].service_url(@shared_values[:service], "legalEntities/LE123/requestPeriodicReview", + @shared_values[:client].legal_entity_management.version) + WebMock.stub_request(:post, url) + .with( + headers: { + 'x-api-key' => @shared_values[:client].api_key + } + ) + .to_return( + body: '{}' + ) + + result = @shared_values[:client].legal_entity_management.legal_entities_api.request_periodic_review('LE123') + result.response + + expect(result.status) + .to eq(200) + end + end From e266efcb8d1518f35198e5adcc472b98c62d1837 Mon Sep 17 00:00:00 2001 From: beppe Date: Fri, 21 Nov 2025 11:51:48 +0100 Subject: [PATCH 3/3] Revert SCA service (to include in another release) --- lib/adyen/services/balancePlatform.rb | 10 ---- .../sca_association_management_api.rb | 46 ------------------- .../sca_device_management_api.rb | 46 ------------------- 3 files changed, 102 deletions(-) delete mode 100644 lib/adyen/services/balancePlatform/sca_association_management_api.rb delete mode 100644 lib/adyen/services/balancePlatform/sca_device_management_api.rb diff --git a/lib/adyen/services/balancePlatform.rb b/lib/adyen/services/balancePlatform.rb index 24ca6c38..1c10de40 100644 --- a/lib/adyen/services/balancePlatform.rb +++ b/lib/adyen/services/balancePlatform.rb @@ -12,8 +12,6 @@ require_relative 'balancePlatform/payment_instrument_groups_api' require_relative 'balancePlatform/payment_instruments_api' require_relative 'balancePlatform/platform_api' -require_relative 'balancePlatform/sca_association_management_api' -require_relative 'balancePlatform/sca_device_management_api' require_relative 'balancePlatform/transaction_rules_api' require_relative 'balancePlatform/transfer_limits_balance_account_level_api' require_relative 'balancePlatform/transfer_limits_balance_platform_level_api' @@ -91,14 +89,6 @@ def platform_api @platform_api ||= Adyen::PlatformApi.new(@client, @version) end - def sca_association_management_api - @sca_association_management_api ||= Adyen::SCAAssociationManagementApi.new(@client, @version) - end - - def sca_device_management_api - @sca_device_management_api ||= Adyen::SCADeviceManagementApi.new(@client, @version) - end - def transaction_rules_api @transaction_rules_api ||= Adyen::TransactionRulesApi.new(@client, @version) end diff --git a/lib/adyen/services/balancePlatform/sca_association_management_api.rb b/lib/adyen/services/balancePlatform/sca_association_management_api.rb deleted file mode 100644 index 7376486b..00000000 --- a/lib/adyen/services/balancePlatform/sca_association_management_api.rb +++ /dev/null @@ -1,46 +0,0 @@ -require_relative '../service' -module Adyen - - # NOTE: This class is auto generated by OpenAPI Generator - # Ref: https://openapi-generator.tech - # - # Do not edit the class manually. - class SCAAssociationManagementApi < Service - attr_accessor :service, :version - - def initialize(client, version = DEFAULT_VERSION) - super(client, version, 'BalancePlatform') - end - - # Approve a pending approval association - def approve_association(request, headers: {}) - endpoint = '/scaAssociations'.gsub(/{.+?}/, '%s') - endpoint = endpoint.gsub(%r{^/}, '') - endpoint = format(endpoint) - - action = { method: 'patch', url: endpoint } - @client.call_adyen_api(@service, action, request, headers, @version) - end - - # Get a list of devices associated with an entity - def list_associations(headers: {}, query_params: {}) - endpoint = '/scaAssociations'.gsub(/{.+?}/, '%s') - endpoint = endpoint.gsub(%r{^/}, '') - endpoint = format(endpoint) - endpoint += create_query_string(query_params) - action = { method: 'get', url: endpoint } - @client.call_adyen_api(@service, action, {}, headers, @version) - end - - # Delete association to devices - def remove_association(request, headers: {}) - endpoint = '/scaAssociations'.gsub(/{.+?}/, '%s') - endpoint = endpoint.gsub(%r{^/}, '') - endpoint = format(endpoint) - - action = { method: 'delete', url: endpoint } - @client.call_adyen_api(@service, action, request, headers, @version) - end - - end -end diff --git a/lib/adyen/services/balancePlatform/sca_device_management_api.rb b/lib/adyen/services/balancePlatform/sca_device_management_api.rb deleted file mode 100644 index 895f1cf8..00000000 --- a/lib/adyen/services/balancePlatform/sca_device_management_api.rb +++ /dev/null @@ -1,46 +0,0 @@ -require_relative '../service' -module Adyen - - # NOTE: This class is auto generated by OpenAPI Generator - # Ref: https://openapi-generator.tech - # - # Do not edit the class manually. - class SCADeviceManagementApi < Service - attr_accessor :service, :version - - def initialize(client, version = DEFAULT_VERSION) - super(client, version, 'BalancePlatform') - end - - # Begin SCA device registration - def begin_sca_device_registration(request, headers: {}) - endpoint = '/scaDevices'.gsub(/{.+?}/, '%s') - endpoint = endpoint.gsub(%r{^/}, '') - endpoint = format(endpoint) - - action = { method: 'post', url: endpoint } - @client.call_adyen_api(@service, action, request, headers, @version) - end - - # Finish registration process for a SCA device - def finish_sca_device_registration(request, device_id, headers: {}) - endpoint = '/scaDevices/{deviceId}'.gsub(/{.+?}/, '%s') - endpoint = endpoint.gsub(%r{^/}, '') - endpoint = format(endpoint, device_id) - - action = { method: 'patch', url: endpoint } - @client.call_adyen_api(@service, action, request, headers, @version) - end - - # Create a new SCA association for a device - def submit_sca_association(request, device_id, headers: {}) - endpoint = '/scaDevices/{deviceId}/scaAssociations'.gsub(/{.+?}/, '%s') - endpoint = endpoint.gsub(%r{^/}, '') - endpoint = format(endpoint, device_id) - - action = { method: 'post', url: endpoint } - @client.call_adyen_api(@service, action, request, headers, @version) - end - - end -end