Skip to content

Commit 1a5902a

Browse files
false[adyen-sdk-automation] automated change (#271)
1 parent 53137a0 commit 1a5902a

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

lib/adyen/services/transfers/transfers_api.rb

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,24 @@ def initialize(client, version = DEFAULT_VERSION)
77
super(client, version, 'Transfers')
88
end
99

10+
def approve_initiated_transfers(request, headers: {})
11+
endpoint = '/transfers/approve'.gsub(/{.+?}/, '%s')
12+
endpoint = endpoint.gsub(%r{^/}, '')
13+
endpoint = format(endpoint)
14+
15+
action = { method: 'post', url: endpoint }
16+
@client.call_adyen_api(@service, action, request, headers, @version)
17+
end
18+
19+
def cancel_initiated_transfers(request, headers: {})
20+
endpoint = '/transfers/cancel'.gsub(/{.+?}/, '%s')
21+
endpoint = endpoint.gsub(%r{^/}, '')
22+
endpoint = format(endpoint)
23+
24+
action = { method: 'post', url: endpoint }
25+
@client.call_adyen_api(@service, action, request, headers, @version)
26+
end
27+
1028
def get_all_transfers(headers: {}, query_params: {})
1129
endpoint = '/transfers'.gsub(/{.+?}/, '%s')
1230
endpoint = endpoint.gsub(%r{^/}, '')

0 commit comments

Comments
 (0)