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 18, 2024
1 parent 53137a0 commit 0268a08
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@ def accept_terms_of_service(request, id, termsofservicedocumentid, headers: {})
@client.call_adyen_api(@service, action, request, headers, @version)
end

def get_accepted_terms_of_service_document(id, termsofserviceacceptancereference, headers: {}, query_params: {})
endpoint = '/legalEntities/{id}/acceptedTermsOfServiceDocument/{termsofserviceacceptancereference}'.gsub(/{.+?}/, '%s')
endpoint = endpoint.gsub(%r{^/}, '')
endpoint = format(endpoint, id, termsofserviceacceptancereference)
endpoint += create_query_string(query_params)
action = { method: 'get', url: endpoint }
@client.call_adyen_api(@service, action, {}, headers, @version)
end

def get_terms_of_service_document(request, id, headers: {})
endpoint = '/legalEntities/{id}/termsOfService'.gsub(/{.+?}/, '%s')
endpoint = endpoint.gsub(%r{^/}, '')
Expand Down
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 0268a08

Please sign in to comment.