adyen-ruby-api-library 10.4.0 → 11.0.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 +4 -10
- data/VERSION +1 -1
- data/lib/adyen/client.rb +49 -14
- data/lib/adyen/errors.rb +8 -6
- 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.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/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/client_spec.rb +101 -2
- data/spec/data_protection_spec.rb +1 -1
- data/spec/disputes_spec.rb +2 -1
- 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/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.mustache +1 -1
- metadata +31 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f7ba37ee06a22e3d1f014c6f5db4e64a9953a1b09e3486b343520464cacef8a
|
4
|
+
data.tar.gz: 42dcac0cf673d4136551db350fa75c19041349499f8d2d401f13f6367f0e6dc4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c21b9c1a93ffa502019fec7db2fcdcf6b7d8e2bea6b0acd3974a93274deef99db442027fc2a9477d9fbe69e27c726b01edd4f02adb376cc61ec25c77317d9823
|
7
|
+
data.tar.gz: f45339daac6e469bdd429ea87eb14e5adf25bf43fee4441c60ad2d70d41fbf8b6713ba9aba715bac0195bed10322c5eded6cf6ea98fb52da4968b5da919bc8e6
|
data/.github/CODEOWNERS
CHANGED
@@ -1 +1 @@
|
|
1
|
-
* @Adyen/developer-relations
|
1
|
+
* @Adyen/developer-relations @Adyen/api-library-maintainers
|
@@ -22,14 +22,15 @@ on:
|
|
22
22
|
|
23
23
|
jobs:
|
24
24
|
release:
|
25
|
+
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
|
25
26
|
permissions:
|
26
27
|
contents: write
|
27
28
|
pull-requests: write
|
28
29
|
runs-on: ubuntu-latest
|
29
30
|
steps:
|
30
|
-
- uses: actions/checkout@
|
31
|
+
- uses: actions/checkout@v5
|
31
32
|
- name: Prepare the next main release
|
32
|
-
uses: Adyen/release-automation-action@v1.
|
33
|
+
uses: Adyen/release-automation-action@v1.4.0
|
33
34
|
with:
|
34
35
|
token: ${{ secrets.ADYEN_AUTOMATION_BOT_ACCESS_TOKEN }}
|
35
36
|
develop-branch: main
|
data/.github/workflows/ruby.yml
CHANGED
data/README.md
CHANGED
@@ -13,8 +13,10 @@ This library supports the following:
|
|
13
13
|
| [Checkout API](https://docs.adyen.com/api-explorer/Checkout/71/overview) | v71 | Our latest integration for accepting online payments. | [CheckoutAPI](lib/adyen/services/checkout.rb) |
|
14
14
|
| [Configuration API](https://docs.adyen.com/api-explorer/balanceplatform/2/overview) | v2 | The Configuration API enables you to create a platform where you can onboard your users as account holders and create balance accounts, cards, and business accounts. | [BalancePlatform](lib/adyen/services/balancePlatform.rb) |
|
15
15
|
| [DataProtection API](https://docs.adyen.com/development-resources/data-protection-api) | v1 | Adyen Data Protection API provides a way for you to process [Subject Erasure Requests](https://gdpr-info.eu/art-17-gdpr/) as mandated in GDPR. Use our API to submit a request to delete shopper's data, including payment details and other related information (for example, delivery address or shopper email) | [DataProtection](lib/adyen/services/dataProtection.rb) |
|
16
|
-
| [Legal Entity Management API](https://docs.adyen.com/api-explorer/legalentity/3/overview) |
|
17
|
-
| [Management API](https://docs.adyen.com/api-explorer/Management/3/overview)
|
16
|
+
| [Legal Entity Management API](https://docs.adyen.com/api-explorer/legalentity/3/overview) | v4 | Manage legal entities that contain information required for verification. | [LegalEntityManagement](lib/adyen/services/legalEntityManagement.rb) |
|
17
|
+
| [Management API](https://docs.adyen.com/api-explorer/Management/3/overview) | v3 | Configure and manage your Adyen company and merchant accounts, stores, and payment terminals. | [Management](lib/adyen/services/management.rb) |
|
18
|
+
| [OpenBanking API](https://docs.adyen.com/api-explorer/open-banking/1/overview) | v1 | Securely share financial data and services with third parties. | [OpenBanking](lib/adyen/services/openBanking.rb) |
|
19
|
+
| [SessionAuthentication API](https://docs.adyen.com/api-explorer/sessionauthentication/1/overview) | v1 | The Session authentication API enables you to create and manage the JSON Web Tokens (JWT) required for integrating components. | [SessionAuthentication](lib/adyen/services/sessionAuthentication.rb) |
|
18
20
|
| [Payments API](https://docs.adyen.com/api-explorer/Payment/68/overview) | v68 | Our classic integration for online payments. | [Classic Integration API](lib/adyen/services/payment.rb) |
|
19
21
|
| [Payouts API](https://docs.adyen.com/api-explorer/Payout/68/overview) | v68 | Endpoints for sending funds to your customers. | [Payout](lib/adyen/services/payout.rb) |
|
20
22
|
| [POS Terminal Management API](https://docs.adyen.com/api-explorer/postfmapi/1/overview) | ~~v1~~ | ~~Endpoints for managing your point-of-sale payment terminals.~~ ‼️ **Deprecated**: use instead the [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview) for the management of your terminal fleet. | ~~[TerminalManagement](lib/adyen/services/posTerminalManagement.rb)~~ || [Recurring API](https://docs.adyen.com/api-explorer/Recurring/68/overview) | v68 | Endpoints for managing saved payment details. | [Recurring](lib/adyen/services/recurring.rb) |
|
@@ -89,11 +91,6 @@ response = adyen.checkout.payments_api.payments({
|
|
89
91
|
})
|
90
92
|
~~~~
|
91
93
|
|
92
|
-
- Change API Version
|
93
|
-
~~~~ruby
|
94
|
-
adyen.checkout.version = 69
|
95
|
-
~~~~
|
96
|
-
|
97
94
|
### Example integration
|
98
95
|
|
99
96
|
For a closer look at how our Ruby library works, clone our [example integration](https://github.com/adyen-examples/adyen-rails-online-payments). This includes commented code, highlighting key features and concepts, and examples of API calls that can be made using the library.
|
@@ -231,9 +228,6 @@ adyen.oauth_token = "oauth_token"
|
|
231
228
|
|
232
229
|
The APIs available to use through OAuth in this library depend on the [OAuth Scopes](https://docs.adyen.com/development-resources/oauth/scopes/) defined when [Registering your OAuth client](https://docs.adyen.com/development-resources/oauth/integration/#step-1-register-your-client).
|
233
230
|
|
234
|
-
## Feedback
|
235
|
-
We value your input! Help us enhance our API Libraries and improve the integration experience by providing your feedback. Please take a moment to fill out [our feedback form](https://forms.gle/A4EERrR6CWgKWe5r9) to share your thoughts, suggestions or ideas.
|
236
|
-
|
237
231
|
## Contributing
|
238
232
|
|
239
233
|
We encourage you to contribute to this repository, so everyone can benefit from new features, bug fixes, and any other improvements.
|
data/VERSION
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
|
1
|
+
11.0.0
|
2
2
|
|
data/lib/adyen/client.rb
CHANGED
@@ -76,7 +76,7 @@ module Adyen
|
|
76
76
|
when 'Account', 'Fund', 'Notification', 'Hop'
|
77
77
|
url = "https://cal-#{@env}.adyen.com/cal/services/#{service}"
|
78
78
|
supports_live_url_prefix = false
|
79
|
-
when 'Recurring', 'Payment', 'Payout', 'BinLookup', 'StoredValue', '
|
79
|
+
when 'Recurring', 'Payment', 'Payout', 'BinLookup', 'StoredValue', 'BalanceControl'
|
80
80
|
url = "https://pal-#{@env}.adyen.com/pal/servlet/#{service}"
|
81
81
|
supports_live_url_prefix = true
|
82
82
|
when 'PosTerminalManagement'
|
@@ -113,8 +113,7 @@ module Adyen
|
|
113
113
|
|
114
114
|
if @live_url_prefix.nil? && (@env == :live) && supports_live_url_prefix
|
115
115
|
raise ArgumentError,
|
116
|
-
"Please set Client.live_url_prefix to the portion \
|
117
|
-
of your merchant-specific URL prior to '-[service]-live.adyenpayments.com'"
|
116
|
+
"Please set Client.live_url_prefix to the portion \n of your merchant-specific URL prior to '-[service]-live.adyenpayments.com'"
|
118
117
|
end
|
119
118
|
|
120
119
|
if @env == :live && supports_live_url_prefix
|
@@ -215,13 +214,21 @@ module Adyen
|
|
215
214
|
end
|
216
215
|
# check for API errors
|
217
216
|
case response.status
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
217
|
+
when 400
|
218
|
+
full_message = build_error_message(response.body, 'Invalid format or fields')
|
219
|
+
raise Adyen::FormatError.new(full_message, request_data, response.body)
|
220
|
+
when 401
|
221
|
+
full_message = build_error_message(response.body, 'Authentication error')
|
222
|
+
raise Adyen::AuthenticationError.new(full_message, request_data)
|
223
|
+
when 403
|
224
|
+
full_message = build_error_message(response.body, 'Authorisation error')
|
225
|
+
raise Adyen::PermissionError.new(full_message, request_data, response.body)
|
226
|
+
when 422
|
227
|
+
full_message = build_error_message(response.body, 'Validation error')
|
228
|
+
raise Adyen::ValidationError.new(full_message, request_data, response.body)
|
229
|
+
when 500..599
|
230
|
+
full_message = build_error_message(response.body, 'Internal server error')
|
231
|
+
raise Adyen::ServerError.new(full_message, request_data, response.body)
|
225
232
|
end
|
226
233
|
|
227
234
|
# delete has no response.body (unless it throws an error)
|
@@ -292,10 +299,6 @@ module Adyen
|
|
292
299
|
@stored_value ||= Adyen::StoredValue.new(self)
|
293
300
|
end
|
294
301
|
|
295
|
-
def balance_control_service
|
296
|
-
@balance_control_service ||= Adyen::BalanceControlService.new(self)
|
297
|
-
end
|
298
|
-
|
299
302
|
def terminal_cloud_api
|
300
303
|
@terminal_cloud_api ||= Adyen::TerminalCloudAPI.new(self)
|
301
304
|
end
|
@@ -304,6 +307,19 @@ module Adyen
|
|
304
307
|
@pos_mobile ||= Adyen::PosMobile.new(self)
|
305
308
|
end
|
306
309
|
|
310
|
+
def open_banking
|
311
|
+
@open_banking ||= Adyen::OpenBanking.new(self)
|
312
|
+
end
|
313
|
+
|
314
|
+
def session_authentication
|
315
|
+
@open_banking ||= Adyen::SessionAuthentication.new(self)
|
316
|
+
end
|
317
|
+
|
318
|
+
def balance_control
|
319
|
+
@balance_control ||= Adyen::BalanceControl.new(self)
|
320
|
+
end
|
321
|
+
|
322
|
+
|
307
323
|
private
|
308
324
|
|
309
325
|
def auth_header(auth_type, faraday)
|
@@ -346,6 +362,25 @@ module Adyen
|
|
346
362
|
'Checkout service requires API-key or oauth_token'
|
347
363
|
end
|
348
364
|
end
|
365
|
+
|
366
|
+
# build the error message from the response payload
|
367
|
+
def build_error_message(response_body, default_message)
|
368
|
+
full_message = default_message
|
369
|
+
begin
|
370
|
+
error_details = response_body
|
371
|
+
# check different attributes to support both RFC 7807 and legacy models
|
372
|
+
message = error_details[:detail] || error_details[:message]
|
373
|
+
error_code = error_details[:errorCode]
|
374
|
+
if message && error_code
|
375
|
+
full_message = "#{message} ErrorCode: #{error_code}"
|
376
|
+
elsif message
|
377
|
+
full_message = message
|
378
|
+
end
|
379
|
+
rescue JSON::ParserError
|
380
|
+
# If the body isn't valid JSON, we fall back to the default message
|
381
|
+
end
|
382
|
+
full_message
|
383
|
+
end
|
349
384
|
end
|
350
385
|
end
|
351
386
|
# rubocop:enable all
|
data/lib/adyen/errors.rb
CHANGED
@@ -79,7 +79,15 @@ module Adyen
|
|
79
79
|
end
|
80
80
|
end
|
81
81
|
|
82
|
+
# when JSON payload is invalid
|
82
83
|
class FormatError < AdyenError
|
84
|
+
def initialize(msg, request, response)
|
85
|
+
super(request, response, msg, 400)
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
# when JSON payload cannot be processed (violates business rules)
|
90
|
+
class ValidationError < AdyenError
|
83
91
|
def initialize(msg, request, response)
|
84
92
|
super(request, response, msg, 422)
|
85
93
|
end
|
@@ -97,12 +105,6 @@ module Adyen
|
|
97
105
|
end
|
98
106
|
end
|
99
107
|
|
100
|
-
class ValidationError < AdyenError
|
101
|
-
def initialize(msg, request)
|
102
|
-
super(request, nil, msg, nil)
|
103
|
-
end
|
104
|
-
end
|
105
|
-
|
106
108
|
# catchall for errors which don't have more specific classes
|
107
109
|
class APIError < AdyenError
|
108
110
|
def initialize(msg, request, response, code)
|
@@ -1,19 +1,20 @@
|
|
1
|
-
require_relative '
|
1
|
+
require_relative '../service'
|
2
2
|
module Adyen
|
3
3
|
|
4
4
|
# NOTE: This class is auto generated by OpenAPI Generator
|
5
5
|
# Ref: https://openapi-generator.tech
|
6
6
|
#
|
7
7
|
# Do not edit the class manually.
|
8
|
-
class
|
8
|
+
class BalanceControlApi < Service
|
9
9
|
attr_accessor :service, :version
|
10
10
|
|
11
|
-
DEFAULT_VERSION = 1
|
12
11
|
def initialize(client, version = DEFAULT_VERSION)
|
13
|
-
super(client, version, '
|
12
|
+
super(client, version, 'BalanceControl')
|
14
13
|
end
|
15
14
|
|
16
15
|
# Start a balance transfer
|
16
|
+
#
|
17
|
+
# Deprecated since Adyen Balance Control API v1
|
17
18
|
def balance_transfer(request, headers: {})
|
18
19
|
endpoint = '/balanceTransfer'.gsub(/{.+?}/, '%s')
|
19
20
|
endpoint = endpoint.gsub(%r{^/}, '')
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require_relative 'balanceControl/balance_control_api'
|
2
|
+
|
3
|
+
module Adyen
|
4
|
+
|
5
|
+
# NOTE: This class is auto generated by OpenAPI Generator
|
6
|
+
# Ref: https://openapi-generator.tech
|
7
|
+
#
|
8
|
+
# Do not edit the class manually.
|
9
|
+
class BalanceControl
|
10
|
+
attr_accessor :service, :version
|
11
|
+
|
12
|
+
DEFAULT_VERSION = 1
|
13
|
+
def initialize(client, version = DEFAULT_VERSION)
|
14
|
+
@service = 'BalanceControl'
|
15
|
+
@client = client
|
16
|
+
@version = version
|
17
|
+
end
|
18
|
+
|
19
|
+
def balance_control_api
|
20
|
+
@balance_control_api ||= Adyen::BalanceControlApi.new(@client, @version)
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
end
|
@@ -13,7 +13,7 @@ module Adyen
|
|
13
13
|
end
|
14
14
|
|
15
15
|
# Create authorized users for a card.
|
16
|
-
def create_authorised_card_users(request, payment_instrument_id,
|
16
|
+
def create_authorised_card_users(request, payment_instrument_id, headers: {})
|
17
17
|
endpoint = '/paymentInstruments/{paymentInstrumentId}/authorisedCardUsers'.gsub(/{.+?}/, '%s')
|
18
18
|
endpoint = endpoint.gsub(%r{^/}, '')
|
19
19
|
endpoint = format(endpoint, payment_instrument_id)
|
@@ -43,7 +43,7 @@ module Adyen
|
|
43
43
|
end
|
44
44
|
|
45
45
|
# Update the authorized users for a card.
|
46
|
-
def update_authorised_card_users(request, payment_instrument_id,
|
46
|
+
def update_authorised_card_users(request, payment_instrument_id, headers: {})
|
47
47
|
endpoint = '/paymentInstruments/{paymentInstrumentId}/authorisedCardUsers'.gsub(/{.+?}/, '%s')
|
48
48
|
endpoint = endpoint.gsub(%r{^/}, '')
|
49
49
|
endpoint = format(endpoint, payment_instrument_id)
|
@@ -13,7 +13,7 @@ module Adyen
|
|
13
13
|
end
|
14
14
|
|
15
15
|
# Create a balance webhook setting
|
16
|
-
def create_webhook_setting(request, balance_platform_id, webhook_id,
|
16
|
+
def create_webhook_setting(request, balance_platform_id, webhook_id, headers: {})
|
17
17
|
endpoint = '/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings'.gsub(/{.+?}/, '%s')
|
18
18
|
endpoint = endpoint.gsub(%r{^/}, '')
|
19
19
|
endpoint = format(endpoint, balance_platform_id, webhook_id)
|
@@ -53,7 +53,7 @@ module Adyen
|
|
53
53
|
end
|
54
54
|
|
55
55
|
# Update a balance webhook setting by id
|
56
|
-
def update_webhook_setting(request, balance_platform_id, webhook_id, setting_id,
|
56
|
+
def update_webhook_setting(request, balance_platform_id, webhook_id, setting_id, headers: {})
|
57
57
|
endpoint = '/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings/{settingId}'.gsub(/{.+?}/, '%s')
|
58
58
|
endpoint = endpoint.gsub(%r{^/}, '')
|
59
59
|
endpoint = format(endpoint, balance_platform_id, webhook_id, setting_id)
|
@@ -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 TransferLimitsBalanceAccountLevelApi < Service
|
9
|
+
attr_accessor :service, :version
|
10
|
+
|
11
|
+
def initialize(client, version = DEFAULT_VERSION)
|
12
|
+
super(client, version, 'BalancePlatform')
|
13
|
+
end
|
14
|
+
|
15
|
+
# Approve pending transfer limits
|
16
|
+
def approve_pending_transfer_limits(request, id, headers: {})
|
17
|
+
endpoint = '/balanceAccounts/{id}/transferLimits/approve'.gsub(/{.+?}/, '%s')
|
18
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
19
|
+
endpoint = format(endpoint, id)
|
20
|
+
|
21
|
+
action = { method: 'post', url: endpoint }
|
22
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
23
|
+
end
|
24
|
+
|
25
|
+
# Create a transfer limit
|
26
|
+
def create_transfer_limit(request, id, headers: {})
|
27
|
+
endpoint = '/balanceAccounts/{id}/transferLimits'.gsub(/{.+?}/, '%s')
|
28
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
29
|
+
endpoint = format(endpoint, id)
|
30
|
+
|
31
|
+
action = { method: 'post', url: endpoint }
|
32
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
33
|
+
end
|
34
|
+
|
35
|
+
# Delete a scheduled or pending transfer limit
|
36
|
+
def delete_pending_transfer_limit(id, transfer_limit_id, headers: {})
|
37
|
+
endpoint = '/balanceAccounts/{id}/transferLimits/{transferLimitId}'.gsub(/{.+?}/, '%s')
|
38
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
39
|
+
endpoint = format(endpoint, id, transfer_limit_id)
|
40
|
+
|
41
|
+
action = { method: 'delete', url: endpoint }
|
42
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
43
|
+
end
|
44
|
+
|
45
|
+
# Get all current transfer limits
|
46
|
+
def get_current_transfer_limits(id, headers: {}, query_params: {})
|
47
|
+
endpoint = '/balanceAccounts/{id}/transferLimits/current'.gsub(/{.+?}/, '%s')
|
48
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
49
|
+
endpoint = format(endpoint, 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
|
+
# Get the details of a transfer limit
|
56
|
+
def get_specific_transfer_limit(id, transfer_limit_id, headers: {})
|
57
|
+
endpoint = '/balanceAccounts/{id}/transferLimits/{transferLimitId}'.gsub(/{.+?}/, '%s')
|
58
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
59
|
+
endpoint = format(endpoint, id, transfer_limit_id)
|
60
|
+
|
61
|
+
action = { method: 'get', url: endpoint }
|
62
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
63
|
+
end
|
64
|
+
|
65
|
+
# Filter and view the transfer limits
|
66
|
+
def get_transfer_limits(id, headers: {}, query_params: {})
|
67
|
+
endpoint = '/balanceAccounts/{id}/transferLimits'.gsub(/{.+?}/, '%s')
|
68
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
69
|
+
endpoint = format(endpoint, id)
|
70
|
+
endpoint += create_query_string(query_params)
|
71
|
+
action = { method: 'get', url: endpoint }
|
72
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
73
|
+
end
|
74
|
+
|
75
|
+
end
|
76
|
+
end
|
@@ -0,0 +1,56 @@
|
|
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 TransferLimitsBalancePlatformLevelApi < Service
|
9
|
+
attr_accessor :service, :version
|
10
|
+
|
11
|
+
def initialize(client, version = DEFAULT_VERSION)
|
12
|
+
super(client, version, 'BalancePlatform')
|
13
|
+
end
|
14
|
+
|
15
|
+
# Create a transfer limit
|
16
|
+
def create_transfer_limit(request, id, headers: {})
|
17
|
+
endpoint = '/balancePlatforms/{id}/transferLimits'.gsub(/{.+?}/, '%s')
|
18
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
19
|
+
endpoint = format(endpoint, id)
|
20
|
+
|
21
|
+
action = { method: 'post', url: endpoint }
|
22
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
23
|
+
end
|
24
|
+
|
25
|
+
# Delete a scheduled or pending transfer limit
|
26
|
+
def delete_pending_transfer_limit(id, transfer_limit_id, headers: {})
|
27
|
+
endpoint = '/balancePlatforms/{id}/transferLimits/{transferLimitId}'.gsub(/{.+?}/, '%s')
|
28
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
29
|
+
endpoint = format(endpoint, id, transfer_limit_id)
|
30
|
+
|
31
|
+
action = { method: 'delete', url: endpoint }
|
32
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
33
|
+
end
|
34
|
+
|
35
|
+
# Get the details of a transfer limit
|
36
|
+
def get_specific_transfer_limit(id, transfer_limit_id, headers: {})
|
37
|
+
endpoint = '/balancePlatforms/{id}/transferLimits/{transferLimitId}'.gsub(/{.+?}/, '%s')
|
38
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
39
|
+
endpoint = format(endpoint, id, transfer_limit_id)
|
40
|
+
|
41
|
+
action = { method: 'get', url: endpoint }
|
42
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
43
|
+
end
|
44
|
+
|
45
|
+
# Filter and view the transfer limits
|
46
|
+
def get_transfer_limits(id, headers: {}, query_params: {})
|
47
|
+
endpoint = '/balancePlatforms/{id}/transferLimits'.gsub(/{.+?}/, '%s')
|
48
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
49
|
+
endpoint = format(endpoint, 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
|
+
end
|
56
|
+
end
|
@@ -13,6 +13,8 @@ require_relative 'balancePlatform/payment_instrument_groups_api'
|
|
13
13
|
require_relative 'balancePlatform/payment_instruments_api'
|
14
14
|
require_relative 'balancePlatform/platform_api'
|
15
15
|
require_relative 'balancePlatform/transaction_rules_api'
|
16
|
+
require_relative 'balancePlatform/transfer_limits_balance_account_level_api'
|
17
|
+
require_relative 'balancePlatform/transfer_limits_balance_platform_level_api'
|
16
18
|
require_relative 'balancePlatform/transfer_routes_api'
|
17
19
|
|
18
20
|
module Adyen
|
@@ -91,6 +93,14 @@ module Adyen
|
|
91
93
|
@transaction_rules_api ||= Adyen::TransactionRulesApi.new(@client, @version)
|
92
94
|
end
|
93
95
|
|
96
|
+
def transfer_limits_balance_account_level_api
|
97
|
+
@transfer_limits_balance_account_level_api ||= Adyen::TransferLimitsBalanceAccountLevelApi.new(@client, @version)
|
98
|
+
end
|
99
|
+
|
100
|
+
def transfer_limits_balance_platform_level_api
|
101
|
+
@transfer_limits_balance_platform_level_api ||= Adyen::TransferLimitsBalancePlatformLevelApi.new(@client, @version)
|
102
|
+
end
|
103
|
+
|
94
104
|
def transfer_routes_api
|
95
105
|
@transfer_routes_api ||= Adyen::TransferRoutesApi.new(@client, @version)
|
96
106
|
end
|
@@ -0,0 +1,36 @@
|
|
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 BinLookupApi < Service
|
9
|
+
attr_accessor :service, :version
|
10
|
+
|
11
|
+
def initialize(client, version = DEFAULT_VERSION)
|
12
|
+
super(client, version, 'BinLookup')
|
13
|
+
end
|
14
|
+
|
15
|
+
# Check if 3D Secure is available
|
16
|
+
def get3ds_availability(request, headers: {})
|
17
|
+
endpoint = '/get3dsAvailability'.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
|
+
# Get a fees cost estimate
|
26
|
+
def get_cost_estimate(request, headers: {})
|
27
|
+
endpoint = '/getCostEstimate'.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
|
+
end
|
36
|
+
end
|
@@ -1,36 +1,23 @@
|
|
1
|
-
require_relative '
|
1
|
+
require_relative 'binLookup/bin_lookup_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 BinLookup
|
9
|
+
class BinLookup
|
9
10
|
attr_accessor :service, :version
|
10
11
|
|
11
12
|
DEFAULT_VERSION = 54
|
12
13
|
def initialize(client, version = DEFAULT_VERSION)
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
# Check if 3D Secure is available
|
17
|
-
def get3ds_availability(request, headers: {})
|
18
|
-
endpoint = '/get3dsAvailability'.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)
|
14
|
+
@service = 'BinLookup'
|
15
|
+
@client = client
|
16
|
+
@version = version
|
24
17
|
end
|
25
18
|
|
26
|
-
|
27
|
-
|
28
|
-
endpoint = '/getCostEstimate'.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)
|
19
|
+
def bin_lookup_api
|
20
|
+
@bin_lookup_api ||= Adyen::BinLookupApi.new(@client, @version)
|
34
21
|
end
|
35
22
|
|
36
23
|
end
|
@@ -22,7 +22,7 @@ module Adyen
|
|
22
22
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
23
23
|
end
|
24
24
|
|
25
|
-
#
|
25
|
+
# Make a donation
|
26
26
|
def donations(request, headers: {})
|
27
27
|
endpoint = '/donations'.gsub(/{.+?}/, '%s')
|
28
28
|
endpoint = endpoint.gsub(%r{^/}, '')
|
@@ -44,5 +44,15 @@ module Adyen
|
|
44
44
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
45
45
|
end
|
46
46
|
|
47
|
+
# Validates shopper Id
|
48
|
+
def validate_shopper_id(request, headers: {})
|
49
|
+
endpoint = '/validateShopperId'.gsub(/{.+?}/, '%s')
|
50
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
51
|
+
endpoint = format(endpoint)
|
52
|
+
|
53
|
+
action = { method: 'post', url: endpoint }
|
54
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
55
|
+
end
|
56
|
+
|
47
57
|
end
|
48
58
|
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 DataProtectionApi < Service
|
9
|
+
attr_accessor :service, :version
|
10
|
+
|
11
|
+
def initialize(client, version = DEFAULT_VERSION)
|
12
|
+
super(client, version, 'DataProtection')
|
13
|
+
end
|
14
|
+
|
15
|
+
# Submit a Subject Erasure Request.
|
16
|
+
def request_subject_erasure(request, headers: {})
|
17
|
+
endpoint = '/requestSubjectErasure'.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
|