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
11 changes: 8 additions & 3 deletions lib/adyen/services/transfers.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require_relative 'transfers/capital_api'
require_relative 'transfers/capital_deprecated_api'
require_relative 'transfers/cash_out_api'
require_relative 'transfers/transactions_api'
require_relative 'transfers/transfers_api'

Expand All @@ -18,8 +19,12 @@ def initialize(client, version = DEFAULT_VERSION)
@version = version
end

def capital_api
@capital_api ||= Adyen::CapitalApi.new(@client, @version)
def capital_deprecated_api
@capital_deprecated_api ||= Adyen::CapitalDeprecatedApi.new(@client, @version)
end
Comment on lines +22 to +24
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

Renaming the public method capital_api to capital_deprecated_api is a breaking change for users of this SDK who are currently calling client.transfers.capital_api.

To maintain backward compatibility and prevent breaking existing integrations, please retain the capital_api method as a deprecated alias that delegates to capital_deprecated_api and outputs a deprecation warning.

    def capital_deprecated_api
      @capital_deprecated_api ||= Adyen::CapitalDeprecatedApi.new(@client, @version)
    end

    def capital_api
      warn "[DEPRECATION] `capital_api` is deprecated. Use `capital_deprecated_api` instead."
      capital_deprecated_api
    end


def cash_out_api
@cash_out_api ||= Adyen::CashOutApi.new(@client, @version)
end

def transactions_api
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module Adyen
# Ref: https://openapi-generator.tech
#
# Do not edit the class manually.
class CapitalApi < Service
class CapitalDeprecatedApi < Service
attr_accessor :service, :version

def initialize(client, version = DEFAULT_VERSION)
Expand Down
24 changes: 24 additions & 0 deletions lib/adyen/services/transfers/cash_out_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 CashOutApi < Service
attr_accessor :service, :version

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

# Initiate a cashout
def initiate_cashout(request, headers: {})
endpoint = build_endpoint('/cashouts')

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

end
end
8 changes: 4 additions & 4 deletions sdk-generation-log/transfers.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"service": "transfers",
"project": "ruby",
"generatedAt": "2026-04-20T13:39:51Z",
"openapiCommitSha": "3550ecd3f320efaad6bee55ffed5122cb9ba09d5",
"automationCommitSha": "4ad0c0c7e87bc0e5994a9a3350a991d0691350bb",
"libraryCommitSha": "60ccdbdbbb7069d54600a8a8cd19eea245661134"
"generatedAt": "2026-06-01T09:44:53Z",
"openapiCommitSha": "c0822241f611e20376f72b279f2b3e67dea27a43",
"automationCommitSha": "6f06b47d0661f0891defe6b85461d2c367fbd284",
"libraryCommitSha": "c80f38ce8b02c80778053741d0e9175e8e530742"
}
Loading