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 Jul 24, 2024
1 parent 138b818 commit fe9109c
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 0 deletions.
19 changes: 19 additions & 0 deletions lib/adyen/services/paymentsApp.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
require_relative 'paymentsApp/payments_app_api'

module Adyen
class PaymentsApp
attr_accessor :service, :version

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

def payments_app_api
@payments_app_api ||= Adyen::PaymentsAppApi.new(@client, @version)
end

end
end
56 changes: 56 additions & 0 deletions lib/adyen/services/paymentsApp/payments_app_api.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
require_relative '../service'
module Adyen
class PaymentsAppApi < Service
attr_accessor :service, :version

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

def merchants_merchant_id_generate_payments_app_boarding_token_post(request, merchant_id, boarding_token_request, headers: {})
endpoint = '/merchants/{merchantId}/generatePaymentsAppBoardingToken'.gsub(/{.+?}/, '%s')
endpoint = endpoint.gsub(%r{^/}, '')
endpoint = format(endpoint, merchant_id)

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

def merchants_merchant_id_payments_apps_get(merchant_id, headers: {}, query_params: {})
endpoint = '/merchants/{merchantId}/paymentsApps'.gsub(/{.+?}/, '%s')
endpoint = endpoint.gsub(%r{^/}, '')
endpoint = format(endpoint, merchant_id)
endpoint += create_query_string(query_params)
action = { method: 'get', url: endpoint }
@client.call_adyen_api(@service, action, {}, headers, @version)
end

def merchants_merchant_id_payments_apps_installation_id_revoke_post(merchant_id, installation_id, headers: {})
endpoint = '/merchants/{merchantId}/paymentsApps/{installationId}/revoke'.gsub(/{.+?}/, '%s')
endpoint = endpoint.gsub(%r{^/}, '')
endpoint = format(endpoint, merchant_id, installation_id)

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

def merchants_merchant_id_stores_store_id_generate_payments_app_boarding_token_post(request, merchant_id, store_id, boarding_token_request, headers: {})
endpoint = '/merchants/{merchantId}/stores/{storeId}/generatePaymentsAppBoardingToken'.gsub(/{.+?}/, '%s')
endpoint = endpoint.gsub(%r{^/}, '')
endpoint = format(endpoint, merchant_id, store_id)

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

def merchants_merchant_id_stores_store_id_payments_apps_get(merchant_id, store_id, headers: {}, query_params: {})
endpoint = '/merchants/{merchantId}/stores/{storeId}/paymentsApps'.gsub(/{.+?}/, '%s')
endpoint = endpoint.gsub(%r{^/}, '')
endpoint = format(endpoint, merchant_id, store_id)
endpoint += create_query_string(query_params)
action = { method: 'get', url: endpoint }
@client.call_adyen_api(@service, action, {}, headers, @version)
end

end
end

0 comments on commit fe9109c

Please sign in to comment.