adyen-ruby-api-library 10.4.0 → 11.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/CODEOWNERS +1 -1
- data/.github/workflows/codeql.yml +1 -1
- data/.github/workflows/release.yml +3 -2
- data/.github/workflows/ruby.yml +1 -1
- data/.github/workflows/rubygems_release.yml +1 -1
- data/README.md +6 -10
- data/VERSION +1 -1
- data/lib/adyen/client.rb +64 -19
- data/lib/adyen/errors.rb +11 -3
- data/lib/adyen/services/{balanceControlService.rb → balanceControl/balance_control_api.rb} +5 -4
- data/lib/adyen/services/balanceControl.rb +24 -0
- data/lib/adyen/services/balancePlatform/authorized_card_users_api.rb +2 -2
- data/lib/adyen/services/balancePlatform/balances_api.rb +2 -2
- data/lib/adyen/services/balancePlatform/transfer_limits_balance_account_level_api.rb +76 -0
- data/lib/adyen/services/balancePlatform/transfer_limits_balance_platform_level_api.rb +56 -0
- data/lib/adyen/services/balancePlatform.rb +10 -0
- data/lib/adyen/services/binLookup/bin_lookup_api.rb +36 -0
- data/lib/adyen/services/binLookup.rb +8 -21
- data/lib/adyen/services/checkout/donations_api.rb +1 -1
- data/lib/adyen/services/checkout/utility_api.rb +10 -0
- data/lib/adyen/services/dataProtection/data_protection_api.rb +26 -0
- data/lib/adyen/services/dataProtection.rb +8 -11
- data/lib/adyen/services/disputes/disputes_api.rb +66 -0
- data/lib/adyen/services/disputes.rb +8 -51
- data/lib/adyen/services/legalEntityManagement/legal_entities_api.rb +10 -0
- data/lib/adyen/services/legalEntityManagement.rb +1 -1
- data/lib/adyen/services/management/split_configuration_merchant_level_api.rb +7 -7
- data/lib/adyen/services/openBanking/account_verification_api.rb +36 -0
- data/lib/adyen/services/openBanking.rb +24 -0
- data/lib/adyen/services/payment/modifications_api.rb +98 -0
- data/lib/adyen/services/payment/payments_api.rb +66 -0
- data/lib/adyen/services/payment.rb +11 -131
- data/lib/adyen/services/paymentsApp/payments_app_api.rb +66 -0
- data/lib/adyen/services/paymentsApp.rb +8 -51
- data/lib/adyen/services/posMobile/pos_mobile_api.rb +26 -0
- data/lib/adyen/services/posMobile.rb +8 -11
- data/lib/adyen/services/recurring/recurring_api.rb +80 -0
- data/lib/adyen/services/recurring.rb +8 -61
- data/lib/adyen/services/sessionAuthentication/session_authentication_api.rb +1 -1
- data/lib/adyen/services/storedValue/stored_value_api.rb +76 -0
- data/lib/adyen/services/storedValue.rb +8 -61
- data/lib/adyen/version.rb +1 -1
- data/lib/adyen-ruby-api-library.rb +4 -1
- data/renovate.json +3 -1
- data/spec/balance_control_spec.rb +7 -5
- data/spec/balance_platform_spec.rb +344 -63
- data/spec/bin_lookup_spec.rb +4 -3
- data/spec/checkout_spec.rb +13 -0
- data/spec/client_spec.rb +157 -3
- data/spec/data_protection_spec.rb +2 -2
- data/spec/disputes_spec.rb +5 -4
- data/spec/lem_spec.rb +75 -0
- data/spec/mocks/requests/BalancePlatform/create_transfer_limit.json +14 -0
- data/spec/mocks/requests/BalancePlatform/create_webhook_setting.json +16 -0
- data/spec/mocks/requests/OpenBanking/create_account_verification_routes.json +6 -0
- data/spec/mocks/requests/SessionAuthentication/create_authentication_session.json +16 -0
- data/spec/mocks/responses/BalancePlatform/create_transfer_limit.json +16 -0
- data/spec/mocks/responses/BalancePlatform/create_webhook_setting.json +17 -0
- data/spec/mocks/responses/BalancePlatform/get_all_authorised_card_users.json +6 -0
- data/spec/mocks/responses/BalancePlatform/get_all_webhook_settings.json +38 -0
- data/spec/mocks/responses/BalancePlatform/get_specific_transfer_limit.json +17 -0
- data/spec/mocks/responses/BalancePlatform/get_transfer_limits.json +38 -0
- data/spec/mocks/responses/LegalEntityManagement/get_legal_entity.json +14 -0
- data/spec/mocks/responses/OpenBanking/create_account_verification_routes.json +11 -0
- data/spec/mocks/responses/OpenBanking/get_account_verification_report.json +30 -0
- data/spec/mocks/responses/SessionAuthentication/create_authentication_session.json +4 -0
- data/spec/open_banking_spec.rb +68 -0
- data/spec/payments_spec.rb +1 -1
- data/spec/recurring_spec.rb +1 -1
- data/spec/session_authentication_spec.rb +40 -0
- data/spec/stored_value_spec.rb +1 -1
- data/templates/api-single.mustache +1 -1
- data/templates/api.mustache +2 -2
- metadata +36 -7
- data/Makefile +0 -79
- /data/spec/mocks/requests/{DataProtectionService → DataProtection}/request_subject_erasure.json +0 -0
- /data/spec/mocks/requests/{DisputesService → Disputes}/retrieve_applicable_defense_reasons.json +0 -0
- /data/spec/mocks/responses/{DataProtectionService → DataProtection}/request_subject_erasure.json +0 -0
- /data/spec/mocks/responses/{DisputesService → Disputes}/retrieve_applicable_defense_reasons.json +0 -0
|
@@ -1,148 +1,28 @@
|
|
|
1
|
-
require_relative '
|
|
1
|
+
require_relative 'payment/modifications_api'
|
|
2
|
+
require_relative 'payment/payments_api'
|
|
3
|
+
|
|
2
4
|
module Adyen
|
|
3
5
|
|
|
4
6
|
# NOTE: This class is auto generated by OpenAPI Generator
|
|
5
7
|
# Ref: https://openapi-generator.tech
|
|
6
8
|
#
|
|
7
9
|
# Do not edit the class manually.
|
|
8
|
-
class Payment
|
|
10
|
+
class Payment
|
|
9
11
|
attr_accessor :service, :version
|
|
10
12
|
|
|
11
13
|
DEFAULT_VERSION = 68
|
|
12
14
|
def initialize(client, version = DEFAULT_VERSION)
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
# Change the authorised amount
|
|
17
|
-
def adjust_authorisation(request, headers: {})
|
|
18
|
-
endpoint = '/adjustAuthorisation'.gsub(/{.+?}/, '%s')
|
|
19
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
20
|
-
endpoint = format(endpoint)
|
|
21
|
-
|
|
22
|
-
action = { method: 'post', url: endpoint }
|
|
23
|
-
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
# Create an authorisation
|
|
27
|
-
def authorise(request, headers: {})
|
|
28
|
-
endpoint = '/authorise'.gsub(/{.+?}/, '%s')
|
|
29
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
30
|
-
endpoint = format(endpoint)
|
|
31
|
-
|
|
32
|
-
action = { method: 'post', url: endpoint }
|
|
33
|
-
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
# Complete a 3DS authorisation
|
|
37
|
-
def authorise3d(request, headers: {})
|
|
38
|
-
endpoint = '/authorise3d'.gsub(/{.+?}/, '%s')
|
|
39
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
40
|
-
endpoint = format(endpoint)
|
|
41
|
-
|
|
42
|
-
action = { method: 'post', url: endpoint }
|
|
43
|
-
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
# Complete a 3DS2 authorisation
|
|
47
|
-
def authorise3ds2(request, headers: {})
|
|
48
|
-
endpoint = '/authorise3ds2'.gsub(/{.+?}/, '%s')
|
|
49
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
50
|
-
endpoint = format(endpoint)
|
|
51
|
-
|
|
52
|
-
action = { method: 'post', url: endpoint }
|
|
53
|
-
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
54
|
-
end
|
|
55
|
-
|
|
56
|
-
# Cancel an authorisation
|
|
57
|
-
def cancel(request, headers: {})
|
|
58
|
-
endpoint = '/cancel'.gsub(/{.+?}/, '%s')
|
|
59
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
60
|
-
endpoint = format(endpoint)
|
|
61
|
-
|
|
62
|
-
action = { method: 'post', url: endpoint }
|
|
63
|
-
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
64
|
-
end
|
|
65
|
-
|
|
66
|
-
# Cancel or refund a payment
|
|
67
|
-
def cancel_or_refund(request, headers: {})
|
|
68
|
-
endpoint = '/cancelOrRefund'.gsub(/{.+?}/, '%s')
|
|
69
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
70
|
-
endpoint = format(endpoint)
|
|
71
|
-
|
|
72
|
-
action = { method: 'post', url: endpoint }
|
|
73
|
-
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
74
|
-
end
|
|
75
|
-
|
|
76
|
-
# Capture an authorisation
|
|
77
|
-
def capture(request, headers: {})
|
|
78
|
-
endpoint = '/capture'.gsub(/{.+?}/, '%s')
|
|
79
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
80
|
-
endpoint = format(endpoint)
|
|
81
|
-
|
|
82
|
-
action = { method: 'post', url: endpoint }
|
|
83
|
-
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
84
|
-
end
|
|
85
|
-
|
|
86
|
-
# Create a donation
|
|
87
|
-
#
|
|
88
|
-
# Deprecated
|
|
89
|
-
def donate(request, headers: {})
|
|
90
|
-
endpoint = '/donate'.gsub(/{.+?}/, '%s')
|
|
91
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
92
|
-
endpoint = format(endpoint)
|
|
93
|
-
|
|
94
|
-
action = { method: 'post', url: endpoint }
|
|
95
|
-
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
96
|
-
end
|
|
97
|
-
|
|
98
|
-
# Get the 3DS authentication result
|
|
99
|
-
def get_authentication_result(request, headers: {})
|
|
100
|
-
endpoint = '/getAuthenticationResult'.gsub(/{.+?}/, '%s')
|
|
101
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
102
|
-
endpoint = format(endpoint)
|
|
103
|
-
|
|
104
|
-
action = { method: 'post', url: endpoint }
|
|
105
|
-
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
106
|
-
end
|
|
107
|
-
|
|
108
|
-
# Refund a captured payment
|
|
109
|
-
def refund(request, headers: {})
|
|
110
|
-
endpoint = '/refund'.gsub(/{.+?}/, '%s')
|
|
111
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
112
|
-
endpoint = format(endpoint)
|
|
113
|
-
|
|
114
|
-
action = { method: 'post', url: endpoint }
|
|
115
|
-
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
116
|
-
end
|
|
117
|
-
|
|
118
|
-
# Get the 3DS2 authentication result
|
|
119
|
-
def retrieve3ds2_result(request, headers: {})
|
|
120
|
-
endpoint = '/retrieve3ds2Result'.gsub(/{.+?}/, '%s')
|
|
121
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
122
|
-
endpoint = format(endpoint)
|
|
123
|
-
|
|
124
|
-
action = { method: 'post', url: endpoint }
|
|
125
|
-
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
15
|
+
@service = 'Payment'
|
|
16
|
+
@client = client
|
|
17
|
+
@version = version
|
|
126
18
|
end
|
|
127
19
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
endpoint = '/technicalCancel'.gsub(/{.+?}/, '%s')
|
|
131
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
132
|
-
endpoint = format(endpoint)
|
|
133
|
-
|
|
134
|
-
action = { method: 'post', url: endpoint }
|
|
135
|
-
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
20
|
+
def modifications_api
|
|
21
|
+
@modifications_api ||= Adyen::ClassicModificationsApi.new(@client, @version)
|
|
136
22
|
end
|
|
137
23
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
endpoint = '/voidPendingRefund'.gsub(/{.+?}/, '%s')
|
|
141
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
142
|
-
endpoint = format(endpoint)
|
|
143
|
-
|
|
144
|
-
action = { method: 'post', url: endpoint }
|
|
145
|
-
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
24
|
+
def payments_api
|
|
25
|
+
@payments_api ||= Adyen::ClassicPaymentsApi.new(@client, @version)
|
|
146
26
|
end
|
|
147
27
|
|
|
148
28
|
end
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
require_relative '../service'
|
|
2
|
+
module Adyen
|
|
3
|
+
|
|
4
|
+
# NOTE: This class is auto generated by OpenAPI Generator
|
|
5
|
+
# Ref: https://openapi-generator.tech
|
|
6
|
+
#
|
|
7
|
+
# Do not edit the class manually.
|
|
8
|
+
class PaymentsAppApi < Service
|
|
9
|
+
attr_accessor :service, :version
|
|
10
|
+
|
|
11
|
+
def initialize(client, version = DEFAULT_VERSION)
|
|
12
|
+
super(client, version, 'PaymentsApp')
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# Create a boarding token - merchant level
|
|
16
|
+
def generate_payments_app_boarding_token_for_merchant(request, merchant_id, headers: {})
|
|
17
|
+
endpoint = '/merchants/{merchantId}/generatePaymentsAppBoardingToken'.gsub(/{.+?}/, '%s')
|
|
18
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
19
|
+
endpoint = format(endpoint, merchant_id)
|
|
20
|
+
|
|
21
|
+
action = { method: 'post', url: endpoint }
|
|
22
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# Create a boarding token - store level
|
|
26
|
+
def generate_payments_app_boarding_token_for_store(request, merchant_id, store_id, headers: {})
|
|
27
|
+
endpoint = '/merchants/{merchantId}/stores/{storeId}/generatePaymentsAppBoardingToken'.gsub(/{.+?}/, '%s')
|
|
28
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
29
|
+
endpoint = format(endpoint, merchant_id, store_id)
|
|
30
|
+
|
|
31
|
+
action = { method: 'post', url: endpoint }
|
|
32
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Get a list of Payments Apps - merchant level
|
|
36
|
+
def list_payments_app_for_merchant(merchant_id, headers: {}, query_params: {})
|
|
37
|
+
endpoint = '/merchants/{merchantId}/paymentsApps'.gsub(/{.+?}/, '%s')
|
|
38
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
39
|
+
endpoint = format(endpoint, merchant_id)
|
|
40
|
+
endpoint += create_query_string(query_params)
|
|
41
|
+
action = { method: 'get', url: endpoint }
|
|
42
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Get a list of Payments Apps - store level
|
|
46
|
+
def list_payments_app_for_store(merchant_id, store_id, headers: {}, query_params: {})
|
|
47
|
+
endpoint = '/merchants/{merchantId}/stores/{storeId}/paymentsApps'.gsub(/{.+?}/, '%s')
|
|
48
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
49
|
+
endpoint = format(endpoint, merchant_id, store_id)
|
|
50
|
+
endpoint += create_query_string(query_params)
|
|
51
|
+
action = { method: 'get', url: endpoint }
|
|
52
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Revoke Payments App instance authentication
|
|
56
|
+
def revoke_payments_app(merchant_id, installation_id, headers: {})
|
|
57
|
+
endpoint = '/merchants/{merchantId}/paymentsApps/{installationId}/revoke'.gsub(/{.+?}/, '%s')
|
|
58
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
59
|
+
endpoint = format(endpoint, merchant_id, installation_id)
|
|
60
|
+
|
|
61
|
+
action = { method: 'post', url: endpoint }
|
|
62
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
end
|
|
66
|
+
end
|
|
@@ -1,66 +1,23 @@
|
|
|
1
|
-
require_relative '
|
|
1
|
+
require_relative 'paymentsApp/payments_app_api'
|
|
2
|
+
|
|
2
3
|
module Adyen
|
|
3
4
|
|
|
4
5
|
# NOTE: This class is auto generated by OpenAPI Generator
|
|
5
6
|
# Ref: https://openapi-generator.tech
|
|
6
7
|
#
|
|
7
8
|
# Do not edit the class manually.
|
|
8
|
-
class PaymentsApp
|
|
9
|
+
class PaymentsApp
|
|
9
10
|
attr_accessor :service, :version
|
|
10
11
|
|
|
11
12
|
DEFAULT_VERSION = 1
|
|
12
13
|
def initialize(client, version = DEFAULT_VERSION)
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
# Create a boarding token - merchant level
|
|
17
|
-
def generate_payments_app_boarding_token_for_merchant(request, merchant_id, boarding_token_request, headers: {})
|
|
18
|
-
endpoint = '/merchants/{merchantId}/generatePaymentsAppBoardingToken'.gsub(/{.+?}/, '%s')
|
|
19
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
20
|
-
endpoint = format(endpoint,_merchant_id)
|
|
21
|
-
|
|
22
|
-
action = { method: 'post', url: endpoint }
|
|
23
|
-
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
# Create a boarding token - store level
|
|
27
|
-
def generate_payments_app_boarding_token_for_store(request, merchant_id, store_id, boarding_token_request, headers: {})
|
|
28
|
-
endpoint = '/merchants/{merchantId}/stores/{storeId}/generatePaymentsAppBoardingToken'.gsub(/{.+?}/, '%s')
|
|
29
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
30
|
-
endpoint = format(endpoint,_merchant_id,_store_id)
|
|
31
|
-
|
|
32
|
-
action = { method: 'post', url: endpoint }
|
|
33
|
-
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
# Get a list of Payments Apps - merchant level
|
|
37
|
-
def list_payments_app_for_merchant(merchant_id, headers: {}, query_params: {})
|
|
38
|
-
endpoint = '/merchants/{merchantId}/paymentsApps'.gsub(/{.+?}/, '%s')
|
|
39
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
40
|
-
endpoint = format(endpoint,_merchant_id)
|
|
41
|
-
endpoint += create_query_string(query_params)
|
|
42
|
-
action = { method: 'get', url: endpoint }
|
|
43
|
-
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
# Get a list of Payments Apps - store level
|
|
47
|
-
def list_payments_app_for_store(merchant_id, store_id, headers: {}, query_params: {})
|
|
48
|
-
endpoint = '/merchants/{merchantId}/stores/{storeId}/paymentsApps'.gsub(/{.+?}/, '%s')
|
|
49
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
50
|
-
endpoint = format(endpoint,_merchant_id,_store_id)
|
|
51
|
-
endpoint += create_query_string(query_params)
|
|
52
|
-
action = { method: 'get', url: endpoint }
|
|
53
|
-
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
14
|
+
@service = 'PaymentsApp'
|
|
15
|
+
@client = client
|
|
16
|
+
@version = version
|
|
54
17
|
end
|
|
55
18
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
endpoint = '/merchants/{merchantId}/paymentsApps/{installationId}/revoke'.gsub(/{.+?}/, '%s')
|
|
59
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
60
|
-
endpoint = format(endpoint,_merchant_id,_installation_id)
|
|
61
|
-
|
|
62
|
-
action = { method: 'post', url: endpoint }
|
|
63
|
-
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
19
|
+
def payments_app_api
|
|
20
|
+
@payments_app_api ||= Adyen::PaymentsAppApi.new(@client, @version)
|
|
64
21
|
end
|
|
65
22
|
|
|
66
23
|
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
require_relative '../service'
|
|
2
|
+
module Adyen
|
|
3
|
+
|
|
4
|
+
# NOTE: This class is auto generated by OpenAPI Generator
|
|
5
|
+
# Ref: https://openapi-generator.tech
|
|
6
|
+
#
|
|
7
|
+
# Do not edit the class manually.
|
|
8
|
+
class PosMobileApi < Service
|
|
9
|
+
attr_accessor :service, :version
|
|
10
|
+
|
|
11
|
+
def initialize(client, version = DEFAULT_VERSION)
|
|
12
|
+
super(client, version, 'PosMobile')
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# Create a communication session
|
|
16
|
+
def create_communication_session(request, headers: {})
|
|
17
|
+
endpoint = '/sessions'.gsub(/{.+?}/, '%s')
|
|
18
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
19
|
+
endpoint = format(endpoint)
|
|
20
|
+
|
|
21
|
+
action = { method: 'post', url: endpoint }
|
|
22
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -1,26 +1,23 @@
|
|
|
1
|
-
require_relative '
|
|
1
|
+
require_relative 'posMobile/pos_mobile_api'
|
|
2
|
+
|
|
2
3
|
module Adyen
|
|
3
4
|
|
|
4
5
|
# NOTE: This class is auto generated by OpenAPI Generator
|
|
5
6
|
# Ref: https://openapi-generator.tech
|
|
6
7
|
#
|
|
7
8
|
# Do not edit the class manually.
|
|
8
|
-
class PosMobile
|
|
9
|
+
class PosMobile
|
|
9
10
|
attr_accessor :service, :version
|
|
10
11
|
|
|
11
12
|
DEFAULT_VERSION = 68
|
|
12
13
|
def initialize(client, version = DEFAULT_VERSION)
|
|
13
|
-
|
|
14
|
+
@service = 'PosMobile'
|
|
15
|
+
@client = client
|
|
16
|
+
@version = version
|
|
14
17
|
end
|
|
15
18
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
endpoint = '/sessions'.gsub(/{.+?}/, '%s')
|
|
19
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
20
|
-
endpoint = format(endpoint)
|
|
21
|
-
|
|
22
|
-
action = { method: 'post', url: endpoint }
|
|
23
|
-
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
19
|
+
def pos_mobile_api
|
|
20
|
+
@pos_mobile_api ||= Adyen::PosMobileApi.new(@client, @version)
|
|
24
21
|
end
|
|
25
22
|
|
|
26
23
|
end
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
require_relative '../service'
|
|
2
|
+
module Adyen
|
|
3
|
+
|
|
4
|
+
# NOTE: This class is auto generated by OpenAPI Generator
|
|
5
|
+
# Ref: https://openapi-generator.tech
|
|
6
|
+
#
|
|
7
|
+
# Do not edit the class manually.
|
|
8
|
+
class RecurringApi < Service
|
|
9
|
+
attr_accessor :service, :version
|
|
10
|
+
|
|
11
|
+
def initialize(client, version = DEFAULT_VERSION)
|
|
12
|
+
super(client, version, 'Recurring')
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# Create new permits linked to a recurring contract.
|
|
16
|
+
#
|
|
17
|
+
# Deprecated since Adyen Recurring API v68
|
|
18
|
+
def create_permit(request, headers: {})
|
|
19
|
+
endpoint = '/createPermit'.gsub(/{.+?}/, '%s')
|
|
20
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
21
|
+
endpoint = format(endpoint)
|
|
22
|
+
|
|
23
|
+
action = { method: 'post', url: endpoint }
|
|
24
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Disable stored payment details
|
|
28
|
+
def disable(request, headers: {})
|
|
29
|
+
endpoint = '/disable'.gsub(/{.+?}/, '%s')
|
|
30
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
31
|
+
endpoint = format(endpoint)
|
|
32
|
+
|
|
33
|
+
action = { method: 'post', url: endpoint }
|
|
34
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# Disable an existing permit.
|
|
38
|
+
#
|
|
39
|
+
# Deprecated since Adyen Recurring API v68
|
|
40
|
+
def disable_permit(request, headers: {})
|
|
41
|
+
endpoint = '/disablePermit'.gsub(/{.+?}/, '%s')
|
|
42
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
43
|
+
endpoint = format(endpoint)
|
|
44
|
+
|
|
45
|
+
action = { method: 'post', url: endpoint }
|
|
46
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Get stored payment details
|
|
50
|
+
def list_recurring_details(request, headers: {})
|
|
51
|
+
endpoint = '/listRecurringDetails'.gsub(/{.+?}/, '%s')
|
|
52
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
53
|
+
endpoint = format(endpoint)
|
|
54
|
+
|
|
55
|
+
action = { method: 'post', url: endpoint }
|
|
56
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# Ask issuer to notify the shopper
|
|
60
|
+
def notify_shopper(request, headers: {})
|
|
61
|
+
endpoint = '/notifyShopper'.gsub(/{.+?}/, '%s')
|
|
62
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
63
|
+
endpoint = format(endpoint)
|
|
64
|
+
|
|
65
|
+
action = { method: 'post', url: endpoint }
|
|
66
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Schedule running the Account Updater
|
|
70
|
+
def schedule_account_updater(request, headers: {})
|
|
71
|
+
endpoint = '/scheduleAccountUpdater'.gsub(/{.+?}/, '%s')
|
|
72
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
73
|
+
endpoint = format(endpoint)
|
|
74
|
+
|
|
75
|
+
action = { method: 'post', url: endpoint }
|
|
76
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
end
|
|
80
|
+
end
|
|
@@ -1,76 +1,23 @@
|
|
|
1
|
-
require_relative '
|
|
1
|
+
require_relative 'recurring/recurring_api'
|
|
2
|
+
|
|
2
3
|
module Adyen
|
|
3
4
|
|
|
4
5
|
# NOTE: This class is auto generated by OpenAPI Generator
|
|
5
6
|
# Ref: https://openapi-generator.tech
|
|
6
7
|
#
|
|
7
8
|
# Do not edit the class manually.
|
|
8
|
-
class Recurring
|
|
9
|
+
class Recurring
|
|
9
10
|
attr_accessor :service, :version
|
|
10
11
|
|
|
11
12
|
DEFAULT_VERSION = 68
|
|
12
13
|
def initialize(client, version = DEFAULT_VERSION)
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
# Create new permits linked to a recurring contract.
|
|
17
|
-
def create_permit(request, headers: {})
|
|
18
|
-
endpoint = '/createPermit'.gsub(/{.+?}/, '%s')
|
|
19
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
20
|
-
endpoint = format(endpoint)
|
|
21
|
-
|
|
22
|
-
action = { method: 'post', url: endpoint }
|
|
23
|
-
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
# Disable stored payment details
|
|
27
|
-
def disable(request, headers: {})
|
|
28
|
-
endpoint = '/disable'.gsub(/{.+?}/, '%s')
|
|
29
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
30
|
-
endpoint = format(endpoint)
|
|
31
|
-
|
|
32
|
-
action = { method: 'post', url: endpoint }
|
|
33
|
-
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
# Disable an existing permit.
|
|
37
|
-
def disable_permit(request, headers: {})
|
|
38
|
-
endpoint = '/disablePermit'.gsub(/{.+?}/, '%s')
|
|
39
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
40
|
-
endpoint = format(endpoint)
|
|
41
|
-
|
|
42
|
-
action = { method: 'post', url: endpoint }
|
|
43
|
-
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
# Get stored payment details
|
|
47
|
-
def list_recurring_details(request, headers: {})
|
|
48
|
-
endpoint = '/listRecurringDetails'.gsub(/{.+?}/, '%s')
|
|
49
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
50
|
-
endpoint = format(endpoint)
|
|
51
|
-
|
|
52
|
-
action = { method: 'post', url: endpoint }
|
|
53
|
-
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
54
|
-
end
|
|
55
|
-
|
|
56
|
-
# Ask issuer to notify the shopper
|
|
57
|
-
def notify_shopper(request, headers: {})
|
|
58
|
-
endpoint = '/notifyShopper'.gsub(/{.+?}/, '%s')
|
|
59
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
60
|
-
endpoint = format(endpoint)
|
|
61
|
-
|
|
62
|
-
action = { method: 'post', url: endpoint }
|
|
63
|
-
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
14
|
+
@service = 'Recurring'
|
|
15
|
+
@client = client
|
|
16
|
+
@version = version
|
|
64
17
|
end
|
|
65
18
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
endpoint = '/scheduleAccountUpdater'.gsub(/{.+?}/, '%s')
|
|
69
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
70
|
-
endpoint = format(endpoint)
|
|
71
|
-
|
|
72
|
-
action = { method: 'post', url: endpoint }
|
|
73
|
-
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
19
|
+
def recurring_api
|
|
20
|
+
@recurring_api ||= Adyen::RecurringApi.new(@client, @version)
|
|
74
21
|
end
|
|
75
22
|
|
|
76
23
|
end
|
|
@@ -13,7 +13,7 @@ module Adyen
|
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
# Create a session token
|
|
16
|
-
def create_authentication_session(request,
|
|
16
|
+
def create_authentication_session(request, headers: {})
|
|
17
17
|
endpoint = '/sessions'.gsub(/{.+?}/, '%s')
|
|
18
18
|
endpoint = endpoint.gsub(%r{^/}, '')
|
|
19
19
|
endpoint = format(endpoint)
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
require_relative '../service'
|
|
2
|
+
module Adyen
|
|
3
|
+
|
|
4
|
+
# NOTE: This class is auto generated by OpenAPI Generator
|
|
5
|
+
# Ref: https://openapi-generator.tech
|
|
6
|
+
#
|
|
7
|
+
# Do not edit the class manually.
|
|
8
|
+
class StoredValueApi < Service
|
|
9
|
+
attr_accessor :service, :version
|
|
10
|
+
|
|
11
|
+
def initialize(client, version = DEFAULT_VERSION)
|
|
12
|
+
super(client, version, 'StoredValue')
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# Changes the status of the payment method.
|
|
16
|
+
def change_status(request, headers: {})
|
|
17
|
+
endpoint = '/changeStatus'.gsub(/{.+?}/, '%s')
|
|
18
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
19
|
+
endpoint = format(endpoint)
|
|
20
|
+
|
|
21
|
+
action = { method: 'post', url: endpoint }
|
|
22
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# Checks the balance.
|
|
26
|
+
def check_balance(request, headers: {})
|
|
27
|
+
endpoint = '/checkBalance'.gsub(/{.+?}/, '%s')
|
|
28
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
29
|
+
endpoint = format(endpoint)
|
|
30
|
+
|
|
31
|
+
action = { method: 'post', url: endpoint }
|
|
32
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Issues a new card.
|
|
36
|
+
def issue(request, headers: {})
|
|
37
|
+
endpoint = '/issue'.gsub(/{.+?}/, '%s')
|
|
38
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
39
|
+
endpoint = format(endpoint)
|
|
40
|
+
|
|
41
|
+
action = { method: 'post', url: endpoint }
|
|
42
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Loads the payment method.
|
|
46
|
+
def load(request, headers: {})
|
|
47
|
+
endpoint = '/load'.gsub(/{.+?}/, '%s')
|
|
48
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
49
|
+
endpoint = format(endpoint)
|
|
50
|
+
|
|
51
|
+
action = { method: 'post', url: endpoint }
|
|
52
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Merge the balance of two cards.
|
|
56
|
+
def merge_balance(request, headers: {})
|
|
57
|
+
endpoint = '/mergeBalance'.gsub(/{.+?}/, '%s')
|
|
58
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
59
|
+
endpoint = format(endpoint)
|
|
60
|
+
|
|
61
|
+
action = { method: 'post', url: endpoint }
|
|
62
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# Voids a transaction.
|
|
66
|
+
def void_transaction(request, headers: {})
|
|
67
|
+
endpoint = '/voidTransaction'.gsub(/{.+?}/, '%s')
|
|
68
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
69
|
+
endpoint = format(endpoint)
|
|
70
|
+
|
|
71
|
+
action = { method: 'post', url: endpoint }
|
|
72
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
end
|
|
76
|
+
end
|