-
Notifications
You must be signed in to change notification settings - Fork 50
/
Copy pathpaymentsApp.rb
67 lines (56 loc) · 2.79 KB
/
paymentsApp.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
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 PaymentsApp < Service
attr_accessor :service, :version
DEFAULT_VERSION = 1
def initialize(client, version = DEFAULT_VERSION)
super(client, version, 'PaymentsApp')
end
# Create a boarding token - merchant level
def generate_payments_app_boarding_token_for_merchant(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
# Create a boarding token - store level
def generate_payments_app_boarding_token_for_store(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
# Get a list of Payments Apps - merchant level
def list_payments_app_for_merchant(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
# Get a list of Payments Apps - store level
def list_payments_app_for_store(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
# Revoke Payments App instance authentication
def revoke_payments_app(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
end
end