adyen-ruby-api-library 11.3.0 → 12.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/workflows/ruby.yml +2 -2
- data/Gemfile +2 -2
- data/README.md +30 -7
- data/VERSION +1 -1
- data/adyen-ruby-api-library.gemspec +1 -1
- data/lib/adyen/client.rb +6 -11
- data/lib/adyen/deprecation.rb +34 -0
- data/lib/adyen/services/balanceControl/balance_control_api.rb +2 -0
- data/lib/adyen/services/balancePlatform/balance_accounts_api.rb +0 -40
- data/lib/adyen/services/balancePlatform/custom_payout_schedules_sweeps_api.rb +56 -0
- data/lib/adyen/services/balancePlatform/grant_accounts_api.rb +2 -0
- data/lib/adyen/services/balancePlatform/grant_offers_api.rb +4 -0
- data/lib/adyen/services/balancePlatform/managed_payout_schedules_api.rb +80 -0
- data/lib/adyen/services/balancePlatform/recurring_top_ups_api.rb +48 -0
- data/lib/adyen/services/balancePlatform/sca_device_management_api.rb +8 -0
- data/lib/adyen/services/balancePlatform.rb +15 -0
- data/lib/adyen/services/checkout/payments_api.rb +8 -0
- data/lib/adyen/services/checkout/utility_api.rb +2 -0
- data/lib/adyen/services/checkout.rb +1 -1
- data/lib/adyen/services/management/donation_campaigns_api.rb +64 -0
- data/lib/adyen/services/management.rb +5 -0
- data/lib/adyen/services/payment/modifications_api.rb +2 -0
- data/lib/adyen/services/posMobile/pos_mobile_api.rb +5 -0
- data/lib/adyen/services/posTerminalManagement.rb +10 -0
- data/lib/adyen/services/recurring/recurring_api.rb +4 -0
- data/lib/adyen/services/service.rb +2 -0
- data/lib/adyen/services/transfers/capital_api.rb +6 -0
- data/lib/adyen/services/transfers/cash_out_api.rb +24 -0
- data/lib/adyen/services/transfers.rb +5 -0
- data/lib/adyen/utils/hmac_validator.rb +15 -17
- data/lib/adyen/version.rb +1 -1
- data/sdk-generation-log/balanceplatform.json +4 -4
- data/sdk-generation-log/checkout.json +4 -4
- data/sdk-generation-log/management.json +4 -4
- data/sdk-generation-log/posmobile.json +4 -4
- data/sdk-generation-log/transfers.json +4 -4
- data/spec/balance_control_spec.rb +41 -0
- data/spec/balance_platform_spec.rb +498 -4
- data/spec/checkout-oauth_spec.rb +220 -10
- data/spec/checkout_spec.rb +245 -10
- data/spec/client_spec.rb +1 -5
- data/spec/deprecation_spec.rb +112 -0
- data/spec/management_spec.rb +184 -0
- data/spec/mocks/requests/BalancePlatform/apply_managed_schedule.json +14 -0
- data/spec/mocks/requests/BalancePlatform/begin_sca_device_registration.json +4 -0
- data/spec/mocks/requests/BalancePlatform/create_recurring_top_up.json +21 -0
- data/spec/mocks/requests/BalancePlatform/create_sweep.json +10 -0
- data/spec/mocks/requests/BalancePlatform/finish_sca_device_registration.json +3 -0
- data/spec/mocks/requests/BalancePlatform/submit_sca_association.json +8 -0
- data/spec/mocks/requests/BalancePlatform/update_balance_account_managed_schedule.json +5 -0
- data/spec/mocks/requests/BalancePlatform/update_recurring_top_ups.json +3 -0
- data/spec/mocks/requests/BalancePlatform/update_sweep.json +6 -0
- data/spec/mocks/requests/Checkout/amount_updates.json +1 -1
- data/spec/mocks/requests/Checkout/card_details.json +3 -0
- data/spec/mocks/requests/Checkout/create_stored_payment_method.json +10 -0
- data/spec/mocks/requests/Checkout/donation_campaigns.json +4 -0
- data/spec/mocks/requests/Checkout/donations.json +9 -0
- data/spec/mocks/requests/Checkout/orders.json +5 -3
- data/spec/mocks/requests/Checkout/payment-details.json +2 -14
- data/spec/mocks/requests/Checkout/payment_methods_balance.json +5 -2
- data/spec/mocks/requests/Checkout/payments.json +9 -10
- data/spec/mocks/requests/Checkout/paypal_update_order.json +5 -0
- data/spec/mocks/requests/Checkout/reversals.json +3 -0
- data/spec/mocks/requests/Checkout/update_session.json +7 -0
- data/spec/mocks/requests/Management/create_donation_campaign.json +7 -0
- data/spec/mocks/requests/Management/list_nonprofits.json +5 -0
- data/spec/mocks/requests/Management/update_donation_campaign.json +6 -0
- data/spec/mocks/requests/Transfers/initiate_cashout.json +12 -0
- data/spec/mocks/responses/BalancePlatform/apply_managed_schedule.json +17 -0
- data/spec/mocks/responses/BalancePlatform/begin_sca_device_registration.json +8 -0
- data/spec/mocks/responses/BalancePlatform/create_recurring_top_up.json +23 -0
- data/spec/mocks/responses/BalancePlatform/create_sweep.json +12 -0
- data/spec/mocks/responses/BalancePlatform/finish_sca_device_registration.json +7 -0
- data/spec/mocks/responses/BalancePlatform/get_all_sweeps_for_balance_account.json +31 -0
- data/spec/mocks/responses/BalancePlatform/get_balance_account_managed_schedule_by_id.json +17 -0
- data/spec/mocks/responses/BalancePlatform/get_balance_account_managed_schedules.json +26 -0
- data/spec/mocks/responses/BalancePlatform/get_balance_platform_managed_schedule_by_id.json +27 -0
- data/spec/mocks/responses/BalancePlatform/get_balance_platform_managed_schedules.json +31 -0
- data/spec/mocks/responses/BalancePlatform/get_payout_schedule_executions.json +21 -0
- data/spec/mocks/responses/BalancePlatform/get_recurring_top_ups.json +35 -0
- data/spec/mocks/responses/BalancePlatform/get_sweep.json +12 -0
- data/spec/mocks/responses/BalancePlatform/submit_sca_association.json +10 -0
- data/spec/mocks/responses/BalancePlatform/update_balance_account_managed_schedule.json +18 -0
- data/spec/mocks/responses/BalancePlatform/update_recurring_top_ups.json +23 -0
- data/spec/mocks/responses/BalancePlatform/update_sweep.json +12 -0
- data/spec/mocks/responses/Checkout/amount_updates.json +1 -1
- data/spec/mocks/responses/Checkout/card_details.json +5 -0
- data/spec/mocks/responses/Checkout/create_stored_payment_method.json +5 -0
- data/spec/mocks/responses/Checkout/donation_campaigns.json +1 -0
- data/spec/mocks/responses/Checkout/donations.json +5 -0
- data/spec/mocks/responses/Checkout/orders.json +6 -1
- data/spec/mocks/responses/Checkout/orders_cancel.json +1 -1
- data/spec/mocks/responses/Checkout/payment-details.json +2 -13
- data/spec/mocks/responses/Checkout/payment_links.json +3 -0
- data/spec/mocks/responses/Checkout/payment_methods.json +2 -2
- data/spec/mocks/responses/Checkout/payment_methods_balance.json +5 -1
- data/spec/mocks/responses/Checkout/payments.json +4 -94
- data/spec/mocks/responses/Checkout/paypal_update_order.json +4 -0
- data/spec/mocks/responses/Checkout/reversals.json +6 -0
- data/spec/mocks/responses/Checkout/update_session.json +3 -0
- data/spec/mocks/responses/Management/donation_campaign.json +13 -0
- data/spec/mocks/responses/Management/list_donation_campaigns.json +19 -0
- data/spec/mocks/responses/Management/list_nonprofits.json +34 -0
- data/spec/mocks/responses/Transfers/initiate_cashout.json +31 -0
- data/spec/spec_helper.rb +2 -2
- data/spec/transfers_spec.rb +28 -0
- data/spec/utils/consumer_smoke.rb +23 -0
- data/spec/utils/hmac_validator_spec.rb +55 -0
- data/templates/api-small.mustache +4 -2
- data/templates/api.mustache +4 -2
- metadata +58 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 693741925d32762e26160e80b884e798c099defd6a9c9f6cbcc237c0bb11ed59
|
|
4
|
+
data.tar.gz: cd90bd20010dfe6b74e25286790e7ce5a03e822e9763e26cc2d3d9cb8467d939
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3dd7cfdc8e6d5100689d09906e12450f4c545cb994e55c3e7613ca7b0b179782b9a67d960ed0c4bccb1dade3a7aa0f7c6b49843da675c88047900ac3ffcc2224
|
|
7
|
+
data.tar.gz: eed28c652c5086aed7d9c60a97fa97002070bd8c78d60a885fb5b79776e2debdda38a6f2bb2bb1f60d7756e0a538041fade7a8c1743fde940d3735aff33bd2e5
|
data/.github/workflows/ruby.yml
CHANGED
|
@@ -16,8 +16,8 @@ jobs:
|
|
|
16
16
|
fail-fast: false
|
|
17
17
|
matrix:
|
|
18
18
|
os: [ubuntu-latest]
|
|
19
|
-
# Due to https://github.com/actions/runner/issues/849, we have to use quotes for '
|
|
20
|
-
ruby: [
|
|
19
|
+
# Due to https://github.com/actions/runner/issues/849, we have to use quotes for '4.0'
|
|
20
|
+
ruby: [3.3, 3.4, '4.0', head]
|
|
21
21
|
runs-on: ${{ matrix.os }}
|
|
22
22
|
steps:
|
|
23
23
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
data/Gemfile
CHANGED
data/README.md
CHANGED
|
@@ -12,23 +12,28 @@ This library supports the following:
|
|
|
12
12
|
| API name | API version | Description | API object |
|
|
13
13
|
|-------------------------------------------------------------------------------------------------------------------------------|:-----------:|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------|
|
|
14
14
|
| [BIN lookup API](https://docs.adyen.com/api-explorer/BinLookup/54/overview) | v54 | The BIN Lookup API provides endpoints for retrieving information based on a given BIN. | [BinLookup](lib/adyen/services/binLookup.rb) |
|
|
15
|
-
| [Checkout API](https://docs.adyen.com/api-explorer/Checkout/
|
|
16
|
-
| [Capital API](https://docs.adyen.com/api-explorer/capital/1/overview) |
|
|
15
|
+
| [Checkout API](https://docs.adyen.com/api-explorer/Checkout/72/overview) | v72 | Our latest integration for accepting online payments. | [CheckoutAPI](lib/adyen/services/checkout.rb) |
|
|
16
|
+
| [Capital API](https://docs.adyen.com/api-explorer/capital/1/overview) | v1 | Provides endpoints for embedding Adyen Capital into your marketplace or platform. | [Capital](lib/adyen/services/capital.rb) |
|
|
17
17
|
| [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) |
|
|
18
18
|
| [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) |
|
|
19
|
-
| [Legal Entity Management API](https://docs.adyen.com/api-explorer/legalentity/
|
|
19
|
+
| [Legal Entity Management API](https://docs.adyen.com/api-explorer/legalentity/4/overview) | v4 | Manage legal entities that contain information required for verification. | [LegalEntityManagement](lib/adyen/services/legalEntityManagement.rb) |
|
|
20
20
|
| [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) |
|
|
21
21
|
| [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) |
|
|
22
22
|
| [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) |
|
|
23
23
|
| [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) |
|
|
24
24
|
| [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) |
|
|
25
|
-
| [POS Terminal Management API](https://docs.adyen.com/api-explorer/postfmapi/1/overview) |
|
|
25
|
+
| [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)~~ |
|
|
26
|
+
| [Recurring API](https://docs.adyen.com/api-explorer/Recurring/68/overview) | v68 | Endpoints for managing saved payment details. | [Recurring](lib/adyen/services/recurring.rb) |
|
|
26
27
|
| [Stored Value API](https://docs.adyen.com/payment-methods/gift-cards/stored-value-api) | v46 | Manage both online and point-of-sale gift cards and other stored-value cards. | [StoredValue](lib/adyen/services/storedValue.rb) |
|
|
27
28
|
| [Transfers API](https://docs.adyen.com/api-explorer/transfers/4/overview) | v4 | The Transfers API provides endpoints that can be used to get information about all your transactions, move funds within your balance platform or send funds from your balance platform to a transfer instrument. | [Transfers](lib/adyen/services/transfers.rb) |
|
|
28
29
|
| [Cloud-based Terminal API](https://docs.adyen.com/point-of-sale/design-your-integration/terminal-api/terminal-api-reference/) | - | Our point-of-sale integration. | [TerminalCloudAPI](lib/adyen/services/terminalCloudAPI.rb) |
|
|
29
30
|
| [Disputes API](https://docs.adyen.com/api-explorer/Disputes/30/overview) | v30 | You can use the [Disputes API](https://docs.adyen.com/risk-management/disputes-api) to automate the dispute handling process so that you can respond to disputes and chargebacks as soon as they are initiated. The Disputes API lets you retrieve defense reasons, supply and delete defense documents, and accept or defend disputes. | [Disputes](lib/adyen/services/disputes.rb) |
|
|
30
|
-
| [POS Mobile API](https://docs.adyen.com/api-explorer/possdk/68/overview) |
|
|
31
|
-
| [Payments App API](https://docs.adyen.com/api-explorer/payments-app/1/overview) |
|
|
31
|
+
| [POS Mobile API](https://docs.adyen.com/api-explorer/possdk/68/overview) | v68 | The POS Mobile API is used in the mutual authentication flow between an Adyen Android or iOS [POS Mobile SDK](https://docs.adyen.com/point-of-sale/ipp-mobile/) and the Adyen payments platform. The POS Mobile SDK for Android or iOS devices enables businesses to accept in-person payments using a commercial off-the-shelf (COTS) device like a phone. For example, Tap to Pay transactions, or transactions on a mobile device in combination with a card reader. | [POS Mobile](lib/adyen/services/posMobile.rb) |
|
|
32
|
+
| [Payments App API](https://docs.adyen.com/api-explorer/payments-app/1/overview) | v1 | The Payments App API is used to Board and manage the Adyen Payments App on your Android mobile devices. | [paymentsApp](lib/adyen/services/paymentsApp.rb) |
|
|
33
|
+
| [Classic Platforms Account API](https://docs.adyen.com/api-explorer/Account/6/overview) | v6 | This API is used for the classic integration. If you are just starting your implementation, refer to our new integration guide instead. | [Marketpay::Account](lib/adyen/services/marketpay.rb) |
|
|
34
|
+
| [Classic Platforms Fund API](https://docs.adyen.com/api-explorer/Fund/6/overview) | v6 | This API is used for the classic integration. If you are just starting your implementation, refer to our new integration guide instead. | [Marketpay::Fund](lib/adyen/services/marketpay.rb) |
|
|
35
|
+
| [Classic Platforms Hosted Onboarding Page API](https://docs.adyen.com/api-explorer/Hop/6/overview) | v6 | This API is used for the classic integration. If you are just starting your implementation, refer to our new integration guide instead. | [Marketpay::Hop](lib/adyen/services/marketpay.rb) |
|
|
36
|
+
| [Classic Platforms Notification Configuration API](https://docs.adyen.com/api-explorer/NotificationConfiguration/6/overview) | v6 | This API is used for the classic integration. If you are just starting your implementation, refer to our new integration guide instead. | [Marketpay::Notification](lib/adyen/services/marketpay.rb) |
|
|
32
37
|
|
|
33
38
|
|
|
34
39
|
|
|
@@ -37,7 +42,7 @@ For more information, refer to our [documentation](https://docs.adyen.com/) or t
|
|
|
37
42
|
## Prerequisites
|
|
38
43
|
- [Adyen test account](https://docs.adyen.com/get-started-with-adyen)
|
|
39
44
|
- [API key](https://docs.adyen.com/development-resources/api-credentials#generate-api-key). For testing, your API credential needs to have the [API PCI Payments role](https://docs.adyen.com/development-resources/api-credentials#roles).
|
|
40
|
-
- Ruby >=
|
|
45
|
+
- Ruby >= 3.3
|
|
41
46
|
|
|
42
47
|
## Installation
|
|
43
48
|
|
|
@@ -60,6 +65,24 @@ rspec
|
|
|
60
65
|
|
|
61
66
|
Follow the rest of our guides from the [documentation](https://adyen.github.io/adyen-ruby-api-library/) on how to use this library.
|
|
62
67
|
|
|
68
|
+
## Deprecations
|
|
69
|
+
|
|
70
|
+
Deprecated API methods emit Ruby deprecation warnings with the `:deprecated` warning category. These warnings are hidden by default in modern Ruby versions. To see them, enable the category in your application:
|
|
71
|
+
|
|
72
|
+
~~~~ruby
|
|
73
|
+
Warning[:deprecated] = true
|
|
74
|
+
~~~~
|
|
75
|
+
|
|
76
|
+
or run Ruby with the `-w` flag. Each warning names the deprecated method, the version it was deprecated since, and the recommended alternative when available.
|
|
77
|
+
|
|
78
|
+
To silence only this library's deprecation warnings (while keeping the category enabled for the rest of your application), use the attribute or the environment variable:
|
|
79
|
+
|
|
80
|
+
~~~~ruby
|
|
81
|
+
Adyen::Deprecation.silenced = true
|
|
82
|
+
~~~~
|
|
83
|
+
|
|
84
|
+
or set `ADYEN_SILENCE_DEPRECATIONS` to `1`, `true`, or `yes`. Explicitly setting the attribute (`true` or `false`) takes precedence over the environment variable. Silenced warnings never appear, even when the category is enabled.
|
|
85
|
+
|
|
63
86
|
## Using the library
|
|
64
87
|
|
|
65
88
|
### General use with API key
|
data/VERSION
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
12.0.0
|
|
2
2
|
|
|
@@ -3,7 +3,7 @@ require_relative 'lib/adyen/version'
|
|
|
3
3
|
Gem::Specification.new do |spec|
|
|
4
4
|
spec.name = 'adyen-ruby-api-library'
|
|
5
5
|
spec.version = Adyen::VERSION
|
|
6
|
-
spec.required_ruby_version = '>=
|
|
6
|
+
spec.required_ruby_version = '>= 3.3.0'
|
|
7
7
|
spec.authors = ['Adyen']
|
|
8
8
|
spec.email = ['support@adyen.com']
|
|
9
9
|
|
data/lib/adyen/client.rb
CHANGED
|
@@ -34,18 +34,13 @@ module Adyen
|
|
|
34
34
|
end
|
|
35
35
|
@mock_service_url_base = mock_service_url_base || "http://localhost:#{mock_port}"
|
|
36
36
|
self.live_url_prefix = live_url_prefix
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
timeout: 60
|
|
43
|
-
)
|
|
37
|
+
# set default timeouts
|
|
38
|
+
@connection_options = connection_options || Faraday::ConnectionOptions.new(
|
|
39
|
+
request: Faraday::RequestOptions.new(
|
|
40
|
+
open_timeout: 30,
|
|
41
|
+
timeout: 60
|
|
44
42
|
)
|
|
45
|
-
|
|
46
|
-
@connection_options = connection_options || Faraday::ConnectionOptions.new
|
|
47
|
-
end
|
|
48
|
-
|
|
43
|
+
)
|
|
49
44
|
@terminal_region = terminal_region
|
|
50
45
|
end
|
|
51
46
|
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
module Adyen
|
|
2
|
+
# Helper module for emitting deprecation warnings for deprecated API methods.
|
|
3
|
+
module Deprecation
|
|
4
|
+
# Set to true to silence all Adyen deprecation warnings, regardless of
|
|
5
|
+
# Warning[:deprecated]. Explicitly setting this attribute (true or false)
|
|
6
|
+
# overrides the ADYEN_SILENCE_DEPRECATIONS environment variable.
|
|
7
|
+
def self.silenced=(value)
|
|
8
|
+
@silenced = value
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
# True when deprecation warnings are silenced, either via the attribute or,
|
|
12
|
+
# when the attribute was never set, via the ADYEN_SILENCE_DEPRECATIONS
|
|
13
|
+
# environment variable ("1", "true" or "yes", case-insensitive).
|
|
14
|
+
def self.silenced?
|
|
15
|
+
return @silenced unless @silenced.nil?
|
|
16
|
+
|
|
17
|
+
%w[1 true yes].include?(ENV.fetch('ADYEN_SILENCE_DEPRECATIONS', '').downcase)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
# Emits a deprecation warning for a deprecated method.
|
|
21
|
+
#
|
|
22
|
+
# @param method_name [Symbol, String] name of the deprecated method
|
|
23
|
+
# @param since [String, nil] e.g. "Adyen Checkout API v67"
|
|
24
|
+
# @param message [String, nil] additional guidance, e.g. the alternative to use
|
|
25
|
+
def self.warn(method_name, since: nil, message: nil)
|
|
26
|
+
return if silenced?
|
|
27
|
+
|
|
28
|
+
text = "[DEPRECATED] `#{method_name}` is deprecated"
|
|
29
|
+
text += " since #{since}" if since
|
|
30
|
+
text += ". #{message}" if message
|
|
31
|
+
Kernel.warn(text, category: :deprecated, uplevel: 2)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -15,7 +15,9 @@ module Adyen
|
|
|
15
15
|
# Start a balance transfer
|
|
16
16
|
#
|
|
17
17
|
# Deprecated since Adyen Balance Control API v1
|
|
18
|
+
# @deprecated
|
|
18
19
|
def balance_transfer(request, headers: {})
|
|
20
|
+
Adyen::Deprecation.warn(:balance_transfer, since: 'Adyen Balance Control API v1')
|
|
19
21
|
endpoint = build_endpoint('/balanceTransfer')
|
|
20
22
|
|
|
21
23
|
action = { method: 'post', url: endpoint }
|
|
@@ -20,30 +20,6 @@ module Adyen
|
|
|
20
20
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
21
21
|
end
|
|
22
22
|
|
|
23
|
-
# Create a sweep
|
|
24
|
-
def create_sweep(request, balance_account_id, headers: {})
|
|
25
|
-
endpoint = build_endpoint('/balanceAccounts/{balanceAccountId}/sweeps', balance_account_id)
|
|
26
|
-
|
|
27
|
-
action = { method: 'post', url: endpoint }
|
|
28
|
-
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
# Delete a sweep
|
|
32
|
-
def delete_sweep(balance_account_id, sweep_id, headers: {})
|
|
33
|
-
endpoint = build_endpoint('/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}', balance_account_id, sweep_id)
|
|
34
|
-
|
|
35
|
-
action = { method: 'delete', url: endpoint }
|
|
36
|
-
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
# Get all sweeps for a balance account
|
|
40
|
-
def get_all_sweeps_for_balance_account(balance_account_id, headers: {}, query_params: {})
|
|
41
|
-
endpoint = build_endpoint('/balanceAccounts/{balanceAccountId}/sweeps', balance_account_id)
|
|
42
|
-
endpoint += create_query_string(query_params)
|
|
43
|
-
action = { method: 'get', url: endpoint }
|
|
44
|
-
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
45
|
-
end
|
|
46
|
-
|
|
47
23
|
# Get all transaction rules for a balance account
|
|
48
24
|
def get_all_transaction_rules_for_balance_account(id, headers: {})
|
|
49
25
|
endpoint = build_endpoint('/balanceAccounts/{id}/transactionRules', id)
|
|
@@ -68,14 +44,6 @@ module Adyen
|
|
|
68
44
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
69
45
|
end
|
|
70
46
|
|
|
71
|
-
# Get a sweep
|
|
72
|
-
def get_sweep(balance_account_id, sweep_id, headers: {})
|
|
73
|
-
endpoint = build_endpoint('/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}', balance_account_id, sweep_id)
|
|
74
|
-
|
|
75
|
-
action = { method: 'get', url: endpoint }
|
|
76
|
-
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
77
|
-
end
|
|
78
|
-
|
|
79
47
|
# Update a balance account
|
|
80
48
|
def update_balance_account(request, id, headers: {})
|
|
81
49
|
endpoint = build_endpoint('/balanceAccounts/{id}', id)
|
|
@@ -84,13 +52,5 @@ module Adyen
|
|
|
84
52
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
85
53
|
end
|
|
86
54
|
|
|
87
|
-
# Update a sweep
|
|
88
|
-
def update_sweep(request, balance_account_id, sweep_id, headers: {})
|
|
89
|
-
endpoint = build_endpoint('/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}', balance_account_id, sweep_id)
|
|
90
|
-
|
|
91
|
-
action = { method: 'patch', url: endpoint }
|
|
92
|
-
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
93
|
-
end
|
|
94
|
-
|
|
95
55
|
end
|
|
96
56
|
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 CustomPayoutSchedulesSweepsApi < 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 sweep
|
|
16
|
+
def create_sweep(request, balance_account_id, headers: {})
|
|
17
|
+
endpoint = build_endpoint('/balanceAccounts/{balanceAccountId}/sweeps', balance_account_id)
|
|
18
|
+
|
|
19
|
+
action = { method: 'post', url: endpoint }
|
|
20
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# Delete a sweep
|
|
24
|
+
def delete_sweep(balance_account_id, sweep_id, headers: {})
|
|
25
|
+
endpoint = build_endpoint('/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}', balance_account_id, sweep_id)
|
|
26
|
+
|
|
27
|
+
action = { method: 'delete', url: endpoint }
|
|
28
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Get all sweeps for a balance account
|
|
32
|
+
def get_all_sweeps_for_balance_account(balance_account_id, headers: {}, query_params: {})
|
|
33
|
+
endpoint = build_endpoint('/balanceAccounts/{balanceAccountId}/sweeps', balance_account_id)
|
|
34
|
+
endpoint += create_query_string(query_params)
|
|
35
|
+
action = { method: 'get', url: endpoint }
|
|
36
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Get a sweep
|
|
40
|
+
def get_sweep(balance_account_id, sweep_id, headers: {})
|
|
41
|
+
endpoint = build_endpoint('/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}', balance_account_id, sweep_id)
|
|
42
|
+
|
|
43
|
+
action = { method: 'get', url: endpoint }
|
|
44
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Update a sweep
|
|
48
|
+
def update_sweep(request, balance_account_id, sweep_id, headers: {})
|
|
49
|
+
endpoint = build_endpoint('/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}', balance_account_id, sweep_id)
|
|
50
|
+
|
|
51
|
+
action = { method: 'patch', url: endpoint }
|
|
52
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
end
|
|
56
|
+
end
|
|
@@ -16,7 +16,9 @@ module Adyen
|
|
|
16
16
|
#
|
|
17
17
|
# Deprecated since Configuration API v2
|
|
18
18
|
# Use the `/grantAccounts/{id}` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grantAccounts/(id)) instead.
|
|
19
|
+
# @deprecated
|
|
19
20
|
def get_grant_account(id, headers: {})
|
|
21
|
+
Adyen::Deprecation.warn(:get_grant_account, since: 'Configuration API v2', message: 'Use the `/grantAccounts/{id}` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grantAccounts/(id)) instead.')
|
|
20
22
|
endpoint = build_endpoint('/grantAccounts/{id}', id)
|
|
21
23
|
|
|
22
24
|
action = { method: 'get', url: endpoint }
|
|
@@ -16,7 +16,9 @@ module Adyen
|
|
|
16
16
|
#
|
|
17
17
|
# Deprecated since Configuration API v2
|
|
18
18
|
# Use the `/grantOffers` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grantOffers) instead.
|
|
19
|
+
# @deprecated
|
|
19
20
|
def get_all_available_grant_offers(headers: {}, query_params: {})
|
|
21
|
+
Adyen::Deprecation.warn(:get_all_available_grant_offers, since: 'Configuration API v2', message: 'Use the `/grantOffers` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grantOffers) instead.')
|
|
20
22
|
endpoint = build_endpoint('/grantOffers')
|
|
21
23
|
endpoint += create_query_string(query_params)
|
|
22
24
|
action = { method: 'get', url: endpoint }
|
|
@@ -27,7 +29,9 @@ module Adyen
|
|
|
27
29
|
#
|
|
28
30
|
# Deprecated since Configuration API v2
|
|
29
31
|
# Use the `/grantOffers/{id}` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grantOffers/(id)) instead.
|
|
32
|
+
# @deprecated
|
|
30
33
|
def get_grant_offer(grant_offer_id, headers: {})
|
|
34
|
+
Adyen::Deprecation.warn(:get_grant_offer, since: 'Configuration API v2', message: 'Use the `/grantOffers/{id}` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grantOffers/(id)) instead.')
|
|
31
35
|
endpoint = build_endpoint('/grantOffers/{grantOfferId}', grant_offer_id)
|
|
32
36
|
|
|
33
37
|
action = { method: 'get', url: endpoint }
|
|
@@ -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 ManagedPayoutSchedulesApi < Service
|
|
9
|
+
attr_accessor :service, :version
|
|
10
|
+
|
|
11
|
+
def initialize(client, version = DEFAULT_VERSION)
|
|
12
|
+
super(client, version, 'BalancePlatform')
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# Apply a managed payout schedule to a balance account
|
|
16
|
+
def apply_managed_schedule(request, balance_account_id, headers: {})
|
|
17
|
+
endpoint = build_endpoint('/balanceAccounts/{balanceAccountId}/payoutSchedules', balance_account_id)
|
|
18
|
+
|
|
19
|
+
action = { method: 'post', url: endpoint }
|
|
20
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# Delete a managed payout schedule on a balance account
|
|
24
|
+
def delete_balance_account_managed_schedule(balance_account_id, id, headers: {})
|
|
25
|
+
endpoint = build_endpoint('/balanceAccounts/{balanceAccountId}/payoutSchedules/{id}', balance_account_id, id)
|
|
26
|
+
|
|
27
|
+
action = { method: 'delete', url: endpoint }
|
|
28
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Get a specific managed payout schedule on a balance account
|
|
32
|
+
def get_balance_account_managed_schedule_by_id(balance_account_id, id, headers: {})
|
|
33
|
+
endpoint = build_endpoint('/balanceAccounts/{balanceAccountId}/payoutSchedules/{id}', balance_account_id, id)
|
|
34
|
+
|
|
35
|
+
action = { method: 'get', url: endpoint }
|
|
36
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Get all managed payout schedules on a balance account
|
|
40
|
+
def get_balance_account_managed_schedules(balance_account_id, headers: {}, query_params: {})
|
|
41
|
+
endpoint = build_endpoint('/balanceAccounts/{balanceAccountId}/payoutSchedules', balance_account_id)
|
|
42
|
+
endpoint += create_query_string(query_params)
|
|
43
|
+
action = { method: 'get', url: endpoint }
|
|
44
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# Get a specific managed payout schedule on your balance platform
|
|
48
|
+
def get_balance_platform_managed_schedule_by_id(balance_platform_id, id, headers: {})
|
|
49
|
+
endpoint = build_endpoint('/balancePlatforms/{balancePlatformId}/payoutSchedules/{id}', balance_platform_id, id)
|
|
50
|
+
|
|
51
|
+
action = { method: 'get', url: endpoint }
|
|
52
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Get all managed payout schedules on your balance platform
|
|
56
|
+
def get_balance_platform_managed_schedules(balance_platform_id, headers: {}, query_params: {})
|
|
57
|
+
endpoint = build_endpoint('/balancePlatforms/{balancePlatformId}/payoutSchedules', balance_platform_id)
|
|
58
|
+
endpoint += create_query_string(query_params)
|
|
59
|
+
action = { method: 'get', url: endpoint }
|
|
60
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
# View executions of a managed payout schedule
|
|
64
|
+
def get_payout_schedule_executions(balance_account_id, id, headers: {}, query_params: {})
|
|
65
|
+
endpoint = build_endpoint('/balanceAccounts/{balanceAccountId}/payoutSchedules/{id}/executions', balance_account_id, id)
|
|
66
|
+
endpoint += create_query_string(query_params)
|
|
67
|
+
action = { method: 'get', url: endpoint }
|
|
68
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
# Update a managed payout schedule on a balance account
|
|
72
|
+
def update_balance_account_managed_schedule(request, balance_account_id, id, headers: {})
|
|
73
|
+
endpoint = build_endpoint('/balanceAccounts/{balanceAccountId}/payoutSchedules/{id}', balance_account_id, id)
|
|
74
|
+
|
|
75
|
+
action = { method: 'patch', url: endpoint }
|
|
76
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
end
|
|
80
|
+
end
|
|
@@ -0,0 +1,48 @@
|
|
|
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 RecurringTopUpsApi < Service
|
|
9
|
+
attr_accessor :service, :version
|
|
10
|
+
|
|
11
|
+
def initialize(client, version = DEFAULT_VERSION)
|
|
12
|
+
super(client, version, 'BalancePlatform')
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# Create recurring top up
|
|
16
|
+
def create_recurring_top_up(request, balance_account_id, headers: {})
|
|
17
|
+
endpoint = build_endpoint('/balanceAccounts/{balanceAccountId}/recurringTopUps', balance_account_id)
|
|
18
|
+
|
|
19
|
+
action = { method: 'post', url: endpoint }
|
|
20
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# Delete a recurring top up
|
|
24
|
+
def delete_recurring_top_up(balance_account_id, top_up_id, headers: {})
|
|
25
|
+
endpoint = build_endpoint('/balanceAccounts/{balanceAccountId}/recurringTopUps/{topUpId}', balance_account_id, top_up_id)
|
|
26
|
+
|
|
27
|
+
action = { method: 'delete', url: endpoint }
|
|
28
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Get recurring top ups for a specific balanceAccountId
|
|
32
|
+
def get_recurring_top_ups(balance_account_id, headers: {}, query_params: {})
|
|
33
|
+
endpoint = build_endpoint('/balanceAccounts/{balanceAccountId}/recurringTopUps', balance_account_id)
|
|
34
|
+
endpoint += create_query_string(query_params)
|
|
35
|
+
action = { method: 'get', url: endpoint }
|
|
36
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Update a RecurringTopUp
|
|
40
|
+
def update_recurring_top_ups(request, balance_account_id, top_up_id, headers: {})
|
|
41
|
+
endpoint = build_endpoint('/balanceAccounts/{balanceAccountId}/recurringTopUps/{topUpId}', balance_account_id, top_up_id)
|
|
42
|
+
|
|
43
|
+
action = { method: 'patch', url: endpoint }
|
|
44
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
end
|
|
48
|
+
end
|
|
@@ -20,6 +20,14 @@ module Adyen
|
|
|
20
20
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
21
21
|
end
|
|
22
22
|
|
|
23
|
+
# Delete an SCA device
|
|
24
|
+
def delete_sca_device(device_id, headers: {})
|
|
25
|
+
endpoint = build_endpoint('/scaDevices/{deviceId}', device_id)
|
|
26
|
+
|
|
27
|
+
action = { method: 'delete', url: endpoint }
|
|
28
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
29
|
+
end
|
|
30
|
+
|
|
23
31
|
# Finish registration process for a SCA device
|
|
24
32
|
def finish_sca_device_registration(request, device_id, headers: {})
|
|
25
33
|
endpoint = build_endpoint('/scaDevices/{deviceId}', device_id)
|
|
@@ -4,15 +4,18 @@ require_relative 'balancePlatform/balance_accounts_api'
|
|
|
4
4
|
require_relative 'balancePlatform/balances_api'
|
|
5
5
|
require_relative 'balancePlatform/bank_account_validation_api'
|
|
6
6
|
require_relative 'balancePlatform/card_orders_api'
|
|
7
|
+
require_relative 'balancePlatform/custom_payout_schedules_sweeps_api'
|
|
7
8
|
require_relative 'balancePlatform/direct_debit_mandates_api'
|
|
8
9
|
require_relative 'balancePlatform/grant_accounts_api'
|
|
9
10
|
require_relative 'balancePlatform/grant_offers_api'
|
|
10
11
|
require_relative 'balancePlatform/manage_card_pin_api'
|
|
11
12
|
require_relative 'balancePlatform/manage_sca_devices_api'
|
|
13
|
+
require_relative 'balancePlatform/managed_payout_schedules_api'
|
|
12
14
|
require_relative 'balancePlatform/network_tokens_api'
|
|
13
15
|
require_relative 'balancePlatform/payment_instrument_groups_api'
|
|
14
16
|
require_relative 'balancePlatform/payment_instruments_api'
|
|
15
17
|
require_relative 'balancePlatform/platform_api'
|
|
18
|
+
require_relative 'balancePlatform/recurring_top_ups_api'
|
|
16
19
|
require_relative 'balancePlatform/sca_association_management_api'
|
|
17
20
|
require_relative 'balancePlatform/sca_device_management_api'
|
|
18
21
|
require_relative 'balancePlatform/transaction_rules_api'
|
|
@@ -60,6 +63,10 @@ module Adyen
|
|
|
60
63
|
@card_orders_api ||= Adyen::CardOrdersApi.new(@client, @version)
|
|
61
64
|
end
|
|
62
65
|
|
|
66
|
+
def custom_payout_schedules_sweeps_api
|
|
67
|
+
@custom_payout_schedules_sweeps_api ||= Adyen::CustomPayoutSchedulesSweepsApi.new(@client, @version)
|
|
68
|
+
end
|
|
69
|
+
|
|
63
70
|
def direct_debit_mandates_api
|
|
64
71
|
@direct_debit_mandates_api ||= Adyen::DirectDebitMandatesApi.new(@client, @version)
|
|
65
72
|
end
|
|
@@ -80,6 +87,10 @@ module Adyen
|
|
|
80
87
|
@manage_sca_devices_api ||= Adyen::ManageSCADevicesApi.new(@client, @version)
|
|
81
88
|
end
|
|
82
89
|
|
|
90
|
+
def managed_payout_schedules_api
|
|
91
|
+
@managed_payout_schedules_api ||= Adyen::ManagedPayoutSchedulesApi.new(@client, @version)
|
|
92
|
+
end
|
|
93
|
+
|
|
83
94
|
def network_tokens_api
|
|
84
95
|
@network_tokens_api ||= Adyen::NetworkTokensApi.new(@client, @version)
|
|
85
96
|
end
|
|
@@ -96,6 +107,10 @@ module Adyen
|
|
|
96
107
|
@platform_api ||= Adyen::PlatformApi.new(@client, @version)
|
|
97
108
|
end
|
|
98
109
|
|
|
110
|
+
def recurring_top_ups_api
|
|
111
|
+
@recurring_top_ups_api ||= Adyen::RecurringTopUpsApi.new(@client, @version)
|
|
112
|
+
end
|
|
113
|
+
|
|
99
114
|
def sca_association_management_api
|
|
100
115
|
@sca_association_management_api ||= Adyen::SCAAssociationManagementApi.new(@client, @version)
|
|
101
116
|
end
|
|
@@ -60,5 +60,13 @@ module Adyen
|
|
|
60
60
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
61
61
|
end
|
|
62
62
|
|
|
63
|
+
# Update a payment session
|
|
64
|
+
def update_session(request, session_id, headers: {})
|
|
65
|
+
endpoint = build_endpoint('/sessions/{sessionId}', session_id)
|
|
66
|
+
|
|
67
|
+
action = { method: 'patch', url: endpoint }
|
|
68
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
69
|
+
end
|
|
70
|
+
|
|
63
71
|
end
|
|
64
72
|
end
|
|
@@ -23,7 +23,9 @@ module Adyen
|
|
|
23
23
|
# Create originKey values for domains
|
|
24
24
|
#
|
|
25
25
|
# Deprecated since Adyen Checkout API v67
|
|
26
|
+
# @deprecated
|
|
26
27
|
def origin_keys(request, headers: {})
|
|
28
|
+
Adyen::Deprecation.warn(:origin_keys, since: 'Adyen Checkout API v67')
|
|
27
29
|
endpoint = build_endpoint('/originKeys')
|
|
28
30
|
|
|
29
31
|
action = { method: 'post', url: endpoint }
|