Skip to content

Commit

Permalink
false[adyen-sdk-automation] automated change
Browse files Browse the repository at this point in the history
  • Loading branch information
AdyenAutomationBot committed Oct 16, 2024
1 parent 53137a0 commit 9aeef44
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions lib/adyen/services/transfers/transfers_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,24 @@ def initialize(client, version = DEFAULT_VERSION)
super(client, version, 'Transfers')
end

def approve_initiated_transfers(request, headers: {})
endpoint = '/transfers/approve'.gsub(/{.+?}/, '%s')
endpoint = endpoint.gsub(%r{^/}, '')
endpoint = format(endpoint)

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

def cancel_initiated_transfers(request, headers: {})
endpoint = '/transfers/cancel'.gsub(/{.+?}/, '%s')
endpoint = endpoint.gsub(%r{^/}, '')
endpoint = format(endpoint)

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

def get_all_transfers(headers: {}, query_params: {})
endpoint = '/transfers'.gsub(/{.+?}/, '%s')
endpoint = endpoint.gsub(%r{^/}, '')
Expand Down

0 comments on commit 9aeef44

Please sign in to comment.