Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions lib/adyen/services/documentCollector.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
require_relative 'documentCollector/documents_api'

module Adyen

# NOTE: This class is auto generated by OpenAPI Generator
# Ref: https://openapi-generator.tech
#
# Do not edit the class manually.
class DocumentCollector
attr_accessor :service, :version

DEFAULT_VERSION = 1
def initialize(client, version = DEFAULT_VERSION)
@service = 'DocumentCollector'
@client = client
@version = version
end

def documents_api
@documents_api ||= Adyen::DocumentsApi.new(@client, @version)
end

end
end
24 changes: 24 additions & 0 deletions lib/adyen/services/documentCollector/documents_api.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
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 DocumentsApi < Service
attr_accessor :service, :version

def initialize(client, version = DEFAULT_VERSION)
super(client, version, 'DocumentCollector')
end
Comment on lines +9 to +13

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


# Upload a document
def upload_cross_border_invoice(headers: {})
endpoint = build_endpoint('/crossBorderInvoices')

action = { method: 'post', url: endpoint }
@client.call_adyen_api(@service, action, {}, headers, @version)
end

end
end
8 changes: 8 additions & 0 deletions sdk-generation-log/documentcollector.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"service": "documentcollector",
"project": "ruby",
"generatedAt": "2026-09-10T20:57:18Z",
"openapiCommitSha": "c4e0d44cf6c0f3dcdff65be8e250fdbfa9da1076",
"automationCommitSha": "d34376385296d6c542a454096b5081b467e00415",
"libraryCommitSha": "773b42b07b93eceb706d79d666496a2c864f62fe"
}
Loading