Skip to content

[documentcollector] Code generation: update services and models - #402

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

[documentcollector] Code generation: update services and models#402
AdyenAutomationBot wants to merge 1 commit into
mainfrom
sdk-automation/documentcollector

Conversation

@AdyenAutomationBot

Copy link
Copy Markdown
Collaborator

This PR contains the automated changes for the documentcollector service.

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

@AdyenAutomationBot
AdyenAutomationBot requested a review from a team as a code owner August 21, 2026 14:01
@sonarqubecloud

Copy link
Copy Markdown

@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 DocumentCollector service and its associated DocumentsApi class to support uploading cross-border invoices. A critical issue was identified in DocumentsApi where the DEFAULT_VERSION constant is referenced but not defined, which will lead to a NameError at runtime.

Comment on lines +9 to +13
attr_accessor :service, :version

def initialize(client, version = DEFAULT_VERSION)
super(client, version, 'DocumentCollector')
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.

high

The constant DEFAULT_VERSION is referenced as a default argument in DocumentsApi#initialize, but it is not defined within the DocumentsApi class or its parent Service class. This will result in a NameError: uninitialized constant Adyen::DocumentsApi::DEFAULT_VERSION at runtime if DocumentsApi.new is called without explicitly passing a version.

To fix this, define DEFAULT_VERSION = 1 inside the DocumentsApi class, matching the default version of the service.

    attr_accessor :service, :version

    DEFAULT_VERSION = 1

    def initialize(client, version = DEFAULT_VERSION)
      super(client, version, 'DocumentCollector')
    end

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant