[documentcollector] Code generation: update services and models - #402
[documentcollector] Code generation: update services and models#402AdyenAutomationBot wants to merge 1 commit into
Conversation
|
There was a problem hiding this comment.
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.
| attr_accessor :service, :version | ||
|
|
||
| def initialize(client, version = DEFAULT_VERSION) | ||
| super(client, version, 'DocumentCollector') | ||
| end |
There was a problem hiding this comment.
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


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