adyen-ruby-api-library 11.2.0 → 11.3.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 +4 -4
- data/.github/workflows/release.yml +1 -1
- data/.github/workflows/ruby.yml +1 -1
- data/.github/workflows/rubygems_release.yml +1 -1
- data/.github/workflows/stale.yml +1 -1
- data/VERSION +1 -1
- data/lib/adyen/client.rb +4 -5
- data/lib/adyen/services/balanceControl/balance_control_api.rb +1 -3
- data/lib/adyen/services/balancePlatform/account_holders_api.rb +14 -18
- data/lib/adyen/services/balancePlatform/authorized_card_users_api.rb +4 -12
- data/lib/adyen/services/balancePlatform/balance_accounts_api.rb +10 -30
- data/lib/adyen/services/balancePlatform/balances_api.rb +5 -15
- data/lib/adyen/services/balancePlatform/bank_account_validation_api.rb +1 -3
- data/lib/adyen/services/balancePlatform/card_orders_api.rb +2 -6
- data/lib/adyen/services/balancePlatform/direct_debit_mandates_api.rb +48 -0
- data/lib/adyen/services/balancePlatform/grant_accounts_api.rb +1 -3
- data/lib/adyen/services/balancePlatform/grant_offers_api.rb +2 -6
- data/lib/adyen/services/balancePlatform/manage_card_pin_api.rb +3 -9
- data/lib/adyen/services/balancePlatform/manage_sca_devices_api.rb +6 -18
- data/lib/adyen/services/balancePlatform/network_tokens_api.rb +2 -6
- data/lib/adyen/services/balancePlatform/payment_instrument_groups_api.rb +3 -9
- data/lib/adyen/services/balancePlatform/payment_instruments_api.rb +9 -27
- data/lib/adyen/services/balancePlatform/platform_api.rb +3 -9
- data/lib/adyen/services/balancePlatform/sca_association_management_api.rb +3 -9
- data/lib/adyen/services/balancePlatform/sca_device_management_api.rb +3 -9
- data/lib/adyen/services/balancePlatform/transaction_rules_api.rb +4 -12
- data/lib/adyen/services/balancePlatform/transfer_limits_balance_account_level_api.rb +6 -18
- data/lib/adyen/services/balancePlatform/transfer_limits_balance_platform_level_api.rb +4 -12
- data/lib/adyen/services/balancePlatform/transfer_routes_api.rb +1 -3
- data/lib/adyen/services/balancePlatform.rb +5 -0
- data/lib/adyen/services/binLookup/bin_lookup_api.rb +2 -6
- data/lib/adyen/services/capital/dynamic_offers_api.rb +40 -0
- data/lib/adyen/services/capital/grant_accounts_api.rb +1 -3
- data/lib/adyen/services/capital/grant_offers_api.rb +4 -8
- data/lib/adyen/services/capital/grants_api.rb +6 -18
- data/lib/adyen/services/capital.rb +5 -0
- data/lib/adyen/services/checkout/donations_api.rb +2 -6
- data/lib/adyen/services/checkout/modifications_api.rb +6 -18
- data/lib/adyen/services/checkout/orders_api.rb +3 -9
- data/lib/adyen/services/checkout/payment_links_api.rb +3 -9
- data/lib/adyen/services/checkout/payments_api.rb +6 -18
- data/lib/adyen/services/checkout/recurring_api.rb +4 -12
- data/lib/adyen/services/checkout/utility_api.rb +4 -12
- data/lib/adyen/services/dataProtection/data_protection_api.rb +1 -3
- data/lib/adyen/services/disputes/disputes_api.rb +5 -15
- data/lib/adyen/services/legalEntityManagement/business_lines_api.rb +4 -12
- data/lib/adyen/services/legalEntityManagement/documents_api.rb +4 -12
- data/lib/adyen/services/legalEntityManagement/hosted_onboarding_api.rb +3 -9
- data/lib/adyen/services/legalEntityManagement/legal_entities_api.rb +7 -21
- data/lib/adyen/services/legalEntityManagement/pci_questionnaires_api.rb +5 -15
- data/lib/adyen/services/legalEntityManagement/tax_e_delivery_consent_api.rb +2 -6
- data/lib/adyen/services/legalEntityManagement/terms_of_service_api.rb +5 -15
- data/lib/adyen/services/legalEntityManagement/transfer_instruments_api.rb +4 -12
- data/lib/adyen/services/management/account_company_level_api.rb +3 -9
- data/lib/adyen/services/management/account_merchant_level_api.rb +4 -12
- data/lib/adyen/services/management/account_store_level_api.rb +8 -24
- data/lib/adyen/services/management/allowed_origins_company_level_api.rb +4 -12
- data/lib/adyen/services/management/allowed_origins_merchant_level_api.rb +4 -12
- data/lib/adyen/services/management/android_files_company_level_api.rb +6 -18
- data/lib/adyen/services/management/api_credentials_company_level_api.rb +4 -12
- data/lib/adyen/services/management/api_credentials_merchant_level_api.rb +4 -12
- data/lib/adyen/services/management/api_key_company_level_api.rb +1 -3
- data/lib/adyen/services/management/api_key_merchant_level_api.rb +1 -3
- data/lib/adyen/services/management/client_key_company_level_api.rb +1 -3
- data/lib/adyen/services/management/client_key_merchant_level_api.rb +1 -3
- data/lib/adyen/services/management/my_api_credential_api.rb +6 -18
- data/lib/adyen/services/management/payment_methods_merchant_level_api.rb +6 -18
- data/lib/adyen/services/management/payout_settings_merchant_level_api.rb +5 -15
- data/lib/adyen/services/management/split_configuration_merchant_level_api.rb +9 -27
- data/lib/adyen/services/management/terminal_actions_company_level_api.rb +2 -6
- data/lib/adyen/services/management/terminal_actions_terminal_level_api.rb +1 -3
- data/lib/adyen/services/management/terminal_orders_company_level_api.rb +10 -30
- data/lib/adyen/services/management/terminal_orders_merchant_level_api.rb +10 -30
- data/lib/adyen/services/management/terminal_settings_company_level_api.rb +4 -12
- data/lib/adyen/services/management/terminal_settings_merchant_level_api.rb +4 -12
- data/lib/adyen/services/management/terminal_settings_store_level_api.rb +8 -24
- data/lib/adyen/services/management/terminal_settings_terminal_level_api.rb +4 -12
- data/lib/adyen/services/management/terminals_terminal_level_api.rb +2 -6
- data/lib/adyen/services/management/users_company_level_api.rb +4 -12
- data/lib/adyen/services/management/users_merchant_level_api.rb +4 -12
- data/lib/adyen/services/management/webhooks_company_level_api.rb +7 -21
- data/lib/adyen/services/management/webhooks_merchant_level_api.rb +7 -21
- data/lib/adyen/services/payment/modifications_api.rb +8 -24
- data/lib/adyen/services/payment/payments_api.rb +5 -15
- data/lib/adyen/services/paymentsApp/payments_app_api.rb +5 -15
- data/lib/adyen/services/payout/initialization_api.rb +3 -9
- data/lib/adyen/services/payout/instant_payouts_api.rb +1 -3
- data/lib/adyen/services/payout/reviewing_api.rb +2 -6
- data/lib/adyen/services/posMobile/pos_mobile_api.rb +1 -3
- data/lib/adyen/services/recurring/recurring_api.rb +6 -18
- data/lib/adyen/services/service.rb +10 -2
- data/lib/adyen/services/sessionAuthentication/session_authentication_api.rb +1 -3
- data/lib/adyen/services/storedValue/stored_value_api.rb +6 -18
- data/lib/adyen/services/transfers/capital_api.rb +3 -9
- data/lib/adyen/services/transfers/transactions_api.rb +2 -6
- data/lib/adyen/services/transfers/transfers_api.rb +6 -18
- data/lib/adyen/utils/hmac_validator.rb +0 -1
- data/lib/adyen/version.rb +1 -1
- data/sdk-generation-log/balancecontrol.json +8 -0
- data/sdk-generation-log/balanceplatform.json +8 -0
- data/sdk-generation-log/binlookup.json +8 -0
- data/sdk-generation-log/capital.json +8 -0
- data/sdk-generation-log/checkout.json +8 -0
- data/sdk-generation-log/dataprotection.json +8 -0
- data/sdk-generation-log/disputes.json +8 -0
- data/sdk-generation-log/legalentitymanagement.json +8 -0
- data/sdk-generation-log/management.json +8 -0
- data/sdk-generation-log/payment.json +8 -0
- data/sdk-generation-log/paymentsapp.json +8 -0
- data/sdk-generation-log/payout.json +8 -0
- data/sdk-generation-log/posmobile.json +8 -0
- data/sdk-generation-log/recurring.json +8 -0
- data/sdk-generation-log/sessionauthentication.json +8 -0
- data/sdk-generation-log/storedvalue.json +8 -0
- data/sdk-generation-log/transfers.json +8 -0
- data/spec/balance_platform_spec.rb +111 -0
- data/spec/capital_spec.rb +82 -0
- data/spec/client_spec.rb +22 -0
- data/spec/mocks/requests/BalancePlatform/update_mandate.json +14 -0
- data/spec/mocks/responses/BalancePlatform/get_list_of_mandates.json +19 -0
- data/spec/mocks/responses/BalancePlatform/get_mandate_by_id.json +14 -0
- data/spec/mocks/responses/BalancePlatform/get_tax_form_summary.json +17 -0
- data/spec/mocks/responses/Capital/calculate-preliminary-offer-from-dynamic-offer.json +16 -0
- data/spec/mocks/responses/Capital/create-static-offer-from-dynamic-offer.json +9 -0
- data/spec/mocks/responses/Capital/get-all-dynamic-offers.json +18 -0
- data/spec/service_spec.rb +40 -0
- data/templates/api-small.mustache +1 -3
- data/templates/api.mustache +1 -3
- metadata +27 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 10f1c74499bd2f3448b7e4dbf1705bcb4def1719a63f4e23390eca41ff7adcfd
|
|
4
|
+
data.tar.gz: eb5f39decf49d935ad0b949be13684754af64da9cabaf1f08f98bdd3560188de
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5bba85b9828d293d97c44eceecfae49755d34496977755b40be3d0569840c093010dd1916203ecafb5adf2e19be578dc89cf6484195568f6e70b4296876975b9
|
|
7
|
+
data.tar.gz: f1285563c2abeaf38e4aa8260cba67250a992b30508cfc226eeb627d05a1fc0bafecf04f131d7ca84d20b6b8533f8bf768d8d0a1c9f6d3f38e0ab75800a70900
|
data/.github/CODEOWNERS
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
* @Adyen/
|
|
1
|
+
* @Adyen/api-library-maintainers
|
|
@@ -20,18 +20,18 @@ jobs:
|
|
|
20
20
|
|
|
21
21
|
steps:
|
|
22
22
|
- name: Checkout
|
|
23
|
-
uses: actions/checkout@
|
|
23
|
+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
|
24
24
|
|
|
25
25
|
- name: Initialize CodeQL
|
|
26
|
-
uses: github/codeql-action/init@
|
|
26
|
+
uses: github/codeql-action/init@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4
|
|
27
27
|
with:
|
|
28
28
|
languages: ${{ matrix.language }}
|
|
29
29
|
queries: +security-and-quality
|
|
30
30
|
|
|
31
31
|
- name: Autobuild
|
|
32
|
-
uses: github/codeql-action/autobuild@
|
|
32
|
+
uses: github/codeql-action/autobuild@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4
|
|
33
33
|
|
|
34
34
|
- name: Perform CodeQL Analysis
|
|
35
|
-
uses: github/codeql-action/analyze@
|
|
35
|
+
uses: github/codeql-action/analyze@95e58e9a2cdfd71adc6e0353d5c52f41a045d225 # v4
|
|
36
36
|
with:
|
|
37
37
|
category: "/language:${{ matrix.language }}"
|
|
@@ -28,7 +28,7 @@ jobs:
|
|
|
28
28
|
pull-requests: write
|
|
29
29
|
runs-on: ubuntu-latest
|
|
30
30
|
steps:
|
|
31
|
-
- uses: actions/checkout@
|
|
31
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
|
32
32
|
- name: Prepare the next main release
|
|
33
33
|
uses: Adyen/release-automation-action@3e5694d5b365f344a62436e84049511ef318ecf5 # v1.4.0
|
|
34
34
|
with:
|
data/.github/workflows/ruby.yml
CHANGED
|
@@ -20,7 +20,7 @@ jobs:
|
|
|
20
20
|
ruby: [2.7, '3.0', 3.1, 3.2, head]
|
|
21
21
|
runs-on: ${{ matrix.os }}
|
|
22
22
|
steps:
|
|
23
|
-
- uses: actions/checkout@
|
|
23
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
|
24
24
|
- uses: ruby/setup-ruby@8a836efbcebe5de0fe86b48a775b7a31b5c70c93 # v1
|
|
25
25
|
with:
|
|
26
26
|
ruby-version: ${{ matrix.ruby }}
|
|
@@ -9,7 +9,7 @@ jobs:
|
|
|
9
9
|
runs-on: ubuntu-latest
|
|
10
10
|
|
|
11
11
|
steps:
|
|
12
|
-
- uses: actions/checkout@
|
|
12
|
+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
|
|
13
13
|
- name: Release Gem on RubyGems
|
|
14
14
|
if: contains(github.ref, 'refs/tags/v')
|
|
15
15
|
uses: cadwallion/publish-rubygems-action@94a6f4cd5350581749c569b5001eecc864e3ad0b # v1.1.0
|
data/.github/workflows/stale.yml
CHANGED
|
@@ -7,7 +7,7 @@ jobs:
|
|
|
7
7
|
stale:
|
|
8
8
|
runs-on: ubuntu-latest
|
|
9
9
|
steps:
|
|
10
|
-
- uses: actions/stale@
|
|
10
|
+
- uses: actions/stale@b5d41d4e1d5dceea10e7104786b73624c18a190f # v10
|
|
11
11
|
with:
|
|
12
12
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
|
13
13
|
stale-issue-message: 'This issue has been automatically marked as stale due to inactivity and will be closed in 7 days if no further activity occurs.'
|
data/VERSION
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
11.
|
|
1
|
+
11.3.0
|
|
2
2
|
|
data/lib/adyen/client.rb
CHANGED
|
@@ -22,7 +22,7 @@ module Adyen
|
|
|
22
22
|
@ws_password = ws_password
|
|
23
23
|
@api_key = api_key
|
|
24
24
|
@oauth_token = oauth_token
|
|
25
|
-
|
|
25
|
+
self.env = env
|
|
26
26
|
@application_name = application_name
|
|
27
27
|
@adapter = adapter || Faraday.default_adapter
|
|
28
28
|
if Gem::Version.new(Faraday::VERSION) >= Gem::Version.new('2.1')
|
|
@@ -33,7 +33,7 @@ module Adyen
|
|
|
33
33
|
@adapter_options = adapter_options || {}
|
|
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
37
|
if RUBY_VERSION >= '3.2'
|
|
38
38
|
# set default timeouts
|
|
39
39
|
@connection_options = connection_options || Faraday::ConnectionOptions.new(
|
|
@@ -51,7 +51,7 @@ module Adyen
|
|
|
51
51
|
|
|
52
52
|
# make sure that env can only be :live, :test, or :mock
|
|
53
53
|
def env=(value)
|
|
54
|
-
raise ArgumentError, "Invalid value for Client.env: '#{value}'
|
|
54
|
+
raise ArgumentError, "Invalid value for Client.env: '#{value}' - must be one of [:live, :test, :mock]" unless %i[
|
|
55
55
|
live test mock
|
|
56
56
|
].include? value
|
|
57
57
|
|
|
@@ -60,8 +60,7 @@ module Adyen
|
|
|
60
60
|
|
|
61
61
|
# remove 'https' from live_url_prefix if necessary
|
|
62
62
|
def live_url_prefix=(value)
|
|
63
|
-
|
|
64
|
-
@live_url_prefix = value
|
|
63
|
+
@live_url_prefix = value.nil? ? value : value.sub('https://', '')
|
|
65
64
|
end
|
|
66
65
|
|
|
67
66
|
# base URL for API given service and @env
|
|
@@ -16,9 +16,7 @@ module Adyen
|
|
|
16
16
|
#
|
|
17
17
|
# Deprecated since Adyen Balance Control API v1
|
|
18
18
|
def balance_transfer(request, headers: {})
|
|
19
|
-
endpoint = '/balanceTransfer'
|
|
20
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
21
|
-
endpoint = format(endpoint)
|
|
19
|
+
endpoint = build_endpoint('/balanceTransfer')
|
|
22
20
|
|
|
23
21
|
action = { method: 'post', url: endpoint }
|
|
24
22
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
@@ -14,9 +14,7 @@ module Adyen
|
|
|
14
14
|
|
|
15
15
|
# Create an account holder
|
|
16
16
|
def create_account_holder(request, headers: {})
|
|
17
|
-
endpoint = '/accountHolders'
|
|
18
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
19
|
-
endpoint = format(endpoint)
|
|
17
|
+
endpoint = build_endpoint('/accountHolders')
|
|
20
18
|
|
|
21
19
|
action = { method: 'post', url: endpoint }
|
|
22
20
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
@@ -24,9 +22,7 @@ module Adyen
|
|
|
24
22
|
|
|
25
23
|
# Get an account holder
|
|
26
24
|
def get_account_holder(id, headers: {})
|
|
27
|
-
endpoint = '/accountHolders/{id}'
|
|
28
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
29
|
-
endpoint = format(endpoint, id)
|
|
25
|
+
endpoint = build_endpoint('/accountHolders/{id}', id)
|
|
30
26
|
|
|
31
27
|
action = { method: 'get', url: endpoint }
|
|
32
28
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
@@ -34,9 +30,7 @@ module Adyen
|
|
|
34
30
|
|
|
35
31
|
# Get all balance accounts of an account holder
|
|
36
32
|
def get_all_balance_accounts_of_account_holder(id, headers: {}, query_params: {})
|
|
37
|
-
endpoint = '/accountHolders/{id}/balanceAccounts'
|
|
38
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
39
|
-
endpoint = format(endpoint, id)
|
|
33
|
+
endpoint = build_endpoint('/accountHolders/{id}/balanceAccounts', id)
|
|
40
34
|
endpoint += create_query_string(query_params)
|
|
41
35
|
action = { method: 'get', url: endpoint }
|
|
42
36
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
@@ -44,9 +38,7 @@ module Adyen
|
|
|
44
38
|
|
|
45
39
|
# Get all transaction rules for an account holder
|
|
46
40
|
def get_all_transaction_rules_for_account_holder(id, headers: {})
|
|
47
|
-
endpoint = '/accountHolders/{id}/transactionRules'
|
|
48
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
49
|
-
endpoint = format(endpoint, id)
|
|
41
|
+
endpoint = build_endpoint('/accountHolders/{id}/transactionRules', id)
|
|
50
42
|
|
|
51
43
|
action = { method: 'get', url: endpoint }
|
|
52
44
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
@@ -54,9 +46,15 @@ module Adyen
|
|
|
54
46
|
|
|
55
47
|
# Get a tax form
|
|
56
48
|
def get_tax_form(id, headers: {}, query_params: {})
|
|
57
|
-
endpoint = '/accountHolders/{id}/taxForms'
|
|
58
|
-
endpoint
|
|
59
|
-
|
|
49
|
+
endpoint = build_endpoint('/accountHolders/{id}/taxForms', 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 summary of tax forms for an account holder
|
|
56
|
+
def get_tax_form_summary(id, headers: {}, query_params: {})
|
|
57
|
+
endpoint = build_endpoint('/accountHolders/{id}/taxFormSummary', id)
|
|
60
58
|
endpoint += create_query_string(query_params)
|
|
61
59
|
action = { method: 'get', url: endpoint }
|
|
62
60
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
@@ -64,9 +62,7 @@ module Adyen
|
|
|
64
62
|
|
|
65
63
|
# Update an account holder
|
|
66
64
|
def update_account_holder(request, id, headers: {})
|
|
67
|
-
endpoint = '/accountHolders/{id}'
|
|
68
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
69
|
-
endpoint = format(endpoint, id)
|
|
65
|
+
endpoint = build_endpoint('/accountHolders/{id}', id)
|
|
70
66
|
|
|
71
67
|
action = { method: 'patch', url: endpoint }
|
|
72
68
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
@@ -14,9 +14,7 @@ module Adyen
|
|
|
14
14
|
|
|
15
15
|
# Create authorized users for a card.
|
|
16
16
|
def create_authorised_card_users(request, payment_instrument_id, headers: {})
|
|
17
|
-
endpoint = '/paymentInstruments/{paymentInstrumentId}/authorisedCardUsers'
|
|
18
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
19
|
-
endpoint = format(endpoint, payment_instrument_id)
|
|
17
|
+
endpoint = build_endpoint('/paymentInstruments/{paymentInstrumentId}/authorisedCardUsers', payment_instrument_id)
|
|
20
18
|
|
|
21
19
|
action = { method: 'post', url: endpoint }
|
|
22
20
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
@@ -24,9 +22,7 @@ module Adyen
|
|
|
24
22
|
|
|
25
23
|
# Delete the authorized users for a card.
|
|
26
24
|
def delete_authorised_card_users(payment_instrument_id, headers: {})
|
|
27
|
-
endpoint = '/paymentInstruments/{paymentInstrumentId}/authorisedCardUsers'
|
|
28
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
29
|
-
endpoint = format(endpoint, payment_instrument_id)
|
|
25
|
+
endpoint = build_endpoint('/paymentInstruments/{paymentInstrumentId}/authorisedCardUsers', payment_instrument_id)
|
|
30
26
|
|
|
31
27
|
action = { method: 'delete', url: endpoint }
|
|
32
28
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
@@ -34,9 +30,7 @@ module Adyen
|
|
|
34
30
|
|
|
35
31
|
# Get authorized users for a card.
|
|
36
32
|
def get_all_authorised_card_users(payment_instrument_id, headers: {})
|
|
37
|
-
endpoint = '/paymentInstruments/{paymentInstrumentId}/authorisedCardUsers'
|
|
38
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
39
|
-
endpoint = format(endpoint, payment_instrument_id)
|
|
33
|
+
endpoint = build_endpoint('/paymentInstruments/{paymentInstrumentId}/authorisedCardUsers', payment_instrument_id)
|
|
40
34
|
|
|
41
35
|
action = { method: 'get', url: endpoint }
|
|
42
36
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
@@ -44,9 +38,7 @@ module Adyen
|
|
|
44
38
|
|
|
45
39
|
# Update the authorized users for a card.
|
|
46
40
|
def update_authorised_card_users(request, payment_instrument_id, headers: {})
|
|
47
|
-
endpoint = '/paymentInstruments/{paymentInstrumentId}/authorisedCardUsers'
|
|
48
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
49
|
-
endpoint = format(endpoint, payment_instrument_id)
|
|
41
|
+
endpoint = build_endpoint('/paymentInstruments/{paymentInstrumentId}/authorisedCardUsers', payment_instrument_id)
|
|
50
42
|
|
|
51
43
|
action = { method: 'patch', url: endpoint }
|
|
52
44
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
@@ -14,9 +14,7 @@ module Adyen
|
|
|
14
14
|
|
|
15
15
|
# Create a balance account
|
|
16
16
|
def create_balance_account(request, headers: {})
|
|
17
|
-
endpoint = '/balanceAccounts'
|
|
18
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
19
|
-
endpoint = format(endpoint)
|
|
17
|
+
endpoint = build_endpoint('/balanceAccounts')
|
|
20
18
|
|
|
21
19
|
action = { method: 'post', url: endpoint }
|
|
22
20
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
@@ -24,9 +22,7 @@ module Adyen
|
|
|
24
22
|
|
|
25
23
|
# Create a sweep
|
|
26
24
|
def create_sweep(request, balance_account_id, headers: {})
|
|
27
|
-
endpoint = '/balanceAccounts/{balanceAccountId}/sweeps'
|
|
28
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
29
|
-
endpoint = format(endpoint, balance_account_id)
|
|
25
|
+
endpoint = build_endpoint('/balanceAccounts/{balanceAccountId}/sweeps', balance_account_id)
|
|
30
26
|
|
|
31
27
|
action = { method: 'post', url: endpoint }
|
|
32
28
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
@@ -34,9 +30,7 @@ module Adyen
|
|
|
34
30
|
|
|
35
31
|
# Delete a sweep
|
|
36
32
|
def delete_sweep(balance_account_id, sweep_id, headers: {})
|
|
37
|
-
endpoint = '/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}'
|
|
38
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
39
|
-
endpoint = format(endpoint, balance_account_id, sweep_id)
|
|
33
|
+
endpoint = build_endpoint('/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}', balance_account_id, sweep_id)
|
|
40
34
|
|
|
41
35
|
action = { method: 'delete', url: endpoint }
|
|
42
36
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
@@ -44,9 +38,7 @@ module Adyen
|
|
|
44
38
|
|
|
45
39
|
# Get all sweeps for a balance account
|
|
46
40
|
def get_all_sweeps_for_balance_account(balance_account_id, headers: {}, query_params: {})
|
|
47
|
-
endpoint = '/balanceAccounts/{balanceAccountId}/sweeps'
|
|
48
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
49
|
-
endpoint = format(endpoint, balance_account_id)
|
|
41
|
+
endpoint = build_endpoint('/balanceAccounts/{balanceAccountId}/sweeps', balance_account_id)
|
|
50
42
|
endpoint += create_query_string(query_params)
|
|
51
43
|
action = { method: 'get', url: endpoint }
|
|
52
44
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
@@ -54,9 +46,7 @@ module Adyen
|
|
|
54
46
|
|
|
55
47
|
# Get all transaction rules for a balance account
|
|
56
48
|
def get_all_transaction_rules_for_balance_account(id, headers: {})
|
|
57
|
-
endpoint = '/balanceAccounts/{id}/transactionRules'
|
|
58
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
59
|
-
endpoint = format(endpoint, id)
|
|
49
|
+
endpoint = build_endpoint('/balanceAccounts/{id}/transactionRules', id)
|
|
60
50
|
|
|
61
51
|
action = { method: 'get', url: endpoint }
|
|
62
52
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
@@ -64,9 +54,7 @@ module Adyen
|
|
|
64
54
|
|
|
65
55
|
# Get a balance account
|
|
66
56
|
def get_balance_account(id, headers: {})
|
|
67
|
-
endpoint = '/balanceAccounts/{id}'
|
|
68
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
69
|
-
endpoint = format(endpoint, id)
|
|
57
|
+
endpoint = build_endpoint('/balanceAccounts/{id}', id)
|
|
70
58
|
|
|
71
59
|
action = { method: 'get', url: endpoint }
|
|
72
60
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
@@ -74,9 +62,7 @@ module Adyen
|
|
|
74
62
|
|
|
75
63
|
# Get payment instruments linked to a balance account
|
|
76
64
|
def get_payment_instruments_linked_to_balance_account(id, headers: {}, query_params: {})
|
|
77
|
-
endpoint = '/balanceAccounts/{id}/paymentInstruments'
|
|
78
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
79
|
-
endpoint = format(endpoint, id)
|
|
65
|
+
endpoint = build_endpoint('/balanceAccounts/{id}/paymentInstruments', id)
|
|
80
66
|
endpoint += create_query_string(query_params)
|
|
81
67
|
action = { method: 'get', url: endpoint }
|
|
82
68
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
@@ -84,9 +70,7 @@ module Adyen
|
|
|
84
70
|
|
|
85
71
|
# Get a sweep
|
|
86
72
|
def get_sweep(balance_account_id, sweep_id, headers: {})
|
|
87
|
-
endpoint = '/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}'
|
|
88
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
89
|
-
endpoint = format(endpoint, balance_account_id, sweep_id)
|
|
73
|
+
endpoint = build_endpoint('/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}', balance_account_id, sweep_id)
|
|
90
74
|
|
|
91
75
|
action = { method: 'get', url: endpoint }
|
|
92
76
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
@@ -94,9 +78,7 @@ module Adyen
|
|
|
94
78
|
|
|
95
79
|
# Update a balance account
|
|
96
80
|
def update_balance_account(request, id, headers: {})
|
|
97
|
-
endpoint = '/balanceAccounts/{id}'
|
|
98
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
99
|
-
endpoint = format(endpoint, id)
|
|
81
|
+
endpoint = build_endpoint('/balanceAccounts/{id}', id)
|
|
100
82
|
|
|
101
83
|
action = { method: 'patch', url: endpoint }
|
|
102
84
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
@@ -104,9 +86,7 @@ module Adyen
|
|
|
104
86
|
|
|
105
87
|
# Update a sweep
|
|
106
88
|
def update_sweep(request, balance_account_id, sweep_id, headers: {})
|
|
107
|
-
endpoint = '/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}'
|
|
108
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
109
|
-
endpoint = format(endpoint, balance_account_id, sweep_id)
|
|
89
|
+
endpoint = build_endpoint('/balanceAccounts/{balanceAccountId}/sweeps/{sweepId}', balance_account_id, sweep_id)
|
|
110
90
|
|
|
111
91
|
action = { method: 'patch', url: endpoint }
|
|
112
92
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
@@ -14,9 +14,7 @@ module Adyen
|
|
|
14
14
|
|
|
15
15
|
# Create a balance webhook setting
|
|
16
16
|
def create_webhook_setting(request, balance_platform_id, webhook_id, headers: {})
|
|
17
|
-
endpoint = '/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings'
|
|
18
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
19
|
-
endpoint = format(endpoint, balance_platform_id, webhook_id)
|
|
17
|
+
endpoint = build_endpoint('/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings', balance_platform_id, webhook_id)
|
|
20
18
|
|
|
21
19
|
action = { method: 'post', url: endpoint }
|
|
22
20
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
@@ -24,9 +22,7 @@ module Adyen
|
|
|
24
22
|
|
|
25
23
|
# Delete a balance webhook setting by id
|
|
26
24
|
def delete_webhook_setting(balance_platform_id, webhook_id, setting_id, headers: {})
|
|
27
|
-
endpoint = '/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings/{settingId}'
|
|
28
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
29
|
-
endpoint = format(endpoint, balance_platform_id, webhook_id, setting_id)
|
|
25
|
+
endpoint = build_endpoint('/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings/{settingId}', balance_platform_id, webhook_id, setting_id)
|
|
30
26
|
|
|
31
27
|
action = { method: 'delete', url: endpoint }
|
|
32
28
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
@@ -34,9 +30,7 @@ module Adyen
|
|
|
34
30
|
|
|
35
31
|
# Get all balance webhook settings
|
|
36
32
|
def get_all_webhook_settings(balance_platform_id, webhook_id, headers: {})
|
|
37
|
-
endpoint = '/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings'
|
|
38
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
39
|
-
endpoint = format(endpoint, balance_platform_id, webhook_id)
|
|
33
|
+
endpoint = build_endpoint('/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings', balance_platform_id, webhook_id)
|
|
40
34
|
|
|
41
35
|
action = { method: 'get', url: endpoint }
|
|
42
36
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
@@ -44,9 +38,7 @@ module Adyen
|
|
|
44
38
|
|
|
45
39
|
# Get a balance webhook setting by id
|
|
46
40
|
def get_webhook_setting(balance_platform_id, webhook_id, setting_id, headers: {})
|
|
47
|
-
endpoint = '/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings/{settingId}'
|
|
48
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
49
|
-
endpoint = format(endpoint, balance_platform_id, webhook_id, setting_id)
|
|
41
|
+
endpoint = build_endpoint('/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings/{settingId}', balance_platform_id, webhook_id, setting_id)
|
|
50
42
|
|
|
51
43
|
action = { method: 'get', url: endpoint }
|
|
52
44
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
@@ -54,9 +46,7 @@ module Adyen
|
|
|
54
46
|
|
|
55
47
|
# Update a balance webhook setting by id
|
|
56
48
|
def update_webhook_setting(request, balance_platform_id, webhook_id, setting_id, headers: {})
|
|
57
|
-
endpoint = '/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings/{settingId}'
|
|
58
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
59
|
-
endpoint = format(endpoint, balance_platform_id, webhook_id, setting_id)
|
|
49
|
+
endpoint = build_endpoint('/balancePlatforms/{balancePlatformId}/webhooks/{webhookId}/settings/{settingId}', balance_platform_id, webhook_id, setting_id)
|
|
60
50
|
|
|
61
51
|
action = { method: 'patch', url: endpoint }
|
|
62
52
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
@@ -14,9 +14,7 @@ module Adyen
|
|
|
14
14
|
|
|
15
15
|
# Validate a bank account
|
|
16
16
|
def validate_bank_account_identification(request, headers: {})
|
|
17
|
-
endpoint = '/validateBankAccountIdentification'
|
|
18
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
19
|
-
endpoint = format(endpoint)
|
|
17
|
+
endpoint = build_endpoint('/validateBankAccountIdentification')
|
|
20
18
|
|
|
21
19
|
action = { method: 'post', url: endpoint }
|
|
22
20
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
@@ -14,9 +14,7 @@ module Adyen
|
|
|
14
14
|
|
|
15
15
|
# Get card order items
|
|
16
16
|
def get_card_order_items(id, headers: {}, query_params: {})
|
|
17
|
-
endpoint = '/cardorders/{id}/items'
|
|
18
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
19
|
-
endpoint = format(endpoint, id)
|
|
17
|
+
endpoint = build_endpoint('/cardorders/{id}/items', id)
|
|
20
18
|
endpoint += create_query_string(query_params)
|
|
21
19
|
action = { method: 'get', url: endpoint }
|
|
22
20
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
@@ -24,9 +22,7 @@ module Adyen
|
|
|
24
22
|
|
|
25
23
|
# Get a list of card orders
|
|
26
24
|
def list_card_orders(headers: {}, query_params: {})
|
|
27
|
-
endpoint = '/cardorders'
|
|
28
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
29
|
-
endpoint = format(endpoint)
|
|
25
|
+
endpoint = build_endpoint('/cardorders')
|
|
30
26
|
endpoint += create_query_string(query_params)
|
|
31
27
|
action = { method: 'get', url: endpoint }
|
|
32
28
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
@@ -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 DirectDebitMandatesApi < Service
|
|
9
|
+
attr_accessor :service, :version
|
|
10
|
+
|
|
11
|
+
def initialize(client, version = DEFAULT_VERSION)
|
|
12
|
+
super(client, version, 'BalancePlatform')
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# Cancel a mandate
|
|
16
|
+
def cancel_mandate(mandate_id, headers: {})
|
|
17
|
+
endpoint = build_endpoint('/mandates/{mandateId}/cancel', mandate_id)
|
|
18
|
+
|
|
19
|
+
action = { method: 'post', url: endpoint }
|
|
20
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# Get a list of mandates
|
|
24
|
+
def get_list_of_mandates(headers: {}, query_params: {})
|
|
25
|
+
endpoint = build_endpoint('/mandates')
|
|
26
|
+
endpoint += create_query_string(query_params)
|
|
27
|
+
action = { method: 'get', url: endpoint }
|
|
28
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Get a specific mandate
|
|
32
|
+
def get_mandate_by_id(mandate_id, headers: {})
|
|
33
|
+
endpoint = build_endpoint('/mandates/{mandateId}', mandate_id)
|
|
34
|
+
|
|
35
|
+
action = { method: 'get', url: endpoint }
|
|
36
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Amend a mandate
|
|
40
|
+
def update_mandate(request, mandate_id, headers: {})
|
|
41
|
+
endpoint = build_endpoint('/mandates/{mandateId}', mandate_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
|
|
@@ -17,9 +17,7 @@ module Adyen
|
|
|
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
19
|
def get_grant_account(id, headers: {})
|
|
20
|
-
endpoint = '/grantAccounts/{id}'
|
|
21
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
22
|
-
endpoint = format(endpoint, id)
|
|
20
|
+
endpoint = build_endpoint('/grantAccounts/{id}', id)
|
|
23
21
|
|
|
24
22
|
action = { method: 'get', url: endpoint }
|
|
25
23
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
@@ -17,9 +17,7 @@ module Adyen
|
|
|
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
19
|
def get_all_available_grant_offers(headers: {}, query_params: {})
|
|
20
|
-
endpoint = '/grantOffers'
|
|
21
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
22
|
-
endpoint = format(endpoint)
|
|
20
|
+
endpoint = build_endpoint('/grantOffers')
|
|
23
21
|
endpoint += create_query_string(query_params)
|
|
24
22
|
action = { method: 'get', url: endpoint }
|
|
25
23
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
@@ -30,9 +28,7 @@ module Adyen
|
|
|
30
28
|
# Deprecated since Configuration API v2
|
|
31
29
|
# Use the `/grantOffers/{id}` endpoint from the [Capital API](https://docs.adyen.com/api-explorer/capital/latest/get/grantOffers/(id)) instead.
|
|
32
30
|
def get_grant_offer(grant_offer_id, headers: {})
|
|
33
|
-
endpoint = '/grantOffers/{grantOfferId}'
|
|
34
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
35
|
-
endpoint = format(endpoint, grant_offer_id)
|
|
31
|
+
endpoint = build_endpoint('/grantOffers/{grantOfferId}', grant_offer_id)
|
|
36
32
|
|
|
37
33
|
action = { method: 'get', url: endpoint }
|
|
38
34
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
@@ -14,9 +14,7 @@ module Adyen
|
|
|
14
14
|
|
|
15
15
|
# Change a card PIN
|
|
16
16
|
def change_card_pin(request, headers: {})
|
|
17
|
-
endpoint = '/pins/change'
|
|
18
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
19
|
-
endpoint = format(endpoint)
|
|
17
|
+
endpoint = build_endpoint('/pins/change')
|
|
20
18
|
|
|
21
19
|
action = { method: 'post', url: endpoint }
|
|
22
20
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
@@ -24,9 +22,7 @@ module Adyen
|
|
|
24
22
|
|
|
25
23
|
# Get an RSA public key
|
|
26
24
|
def public_key(headers: {}, query_params: {})
|
|
27
|
-
endpoint = '/publicKey'
|
|
28
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
29
|
-
endpoint = format(endpoint)
|
|
25
|
+
endpoint = build_endpoint('/publicKey')
|
|
30
26
|
endpoint += create_query_string(query_params)
|
|
31
27
|
action = { method: 'get', url: endpoint }
|
|
32
28
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
@@ -34,9 +30,7 @@ module Adyen
|
|
|
34
30
|
|
|
35
31
|
# Reveal a card PIN
|
|
36
32
|
def reveal_card_pin(request, headers: {})
|
|
37
|
-
endpoint = '/pins/reveal'
|
|
38
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
39
|
-
endpoint = format(endpoint)
|
|
33
|
+
endpoint = build_endpoint('/pins/reveal')
|
|
40
34
|
|
|
41
35
|
action = { method: 'post', url: endpoint }
|
|
42
36
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
@@ -14,9 +14,7 @@ module Adyen
|
|
|
14
14
|
|
|
15
15
|
# Complete an association between an SCA device and a resource
|
|
16
16
|
def complete_association_between_sca_device_and_resource(request, device_id, headers: {})
|
|
17
|
-
endpoint = '/registeredDevices/{deviceId}/associations'
|
|
18
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
19
|
-
endpoint = format(endpoint, device_id)
|
|
17
|
+
endpoint = build_endpoint('/registeredDevices/{deviceId}/associations', device_id)
|
|
20
18
|
|
|
21
19
|
action = { method: 'patch', url: endpoint }
|
|
22
20
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
@@ -24,9 +22,7 @@ module Adyen
|
|
|
24
22
|
|
|
25
23
|
# Complete the registration of an SCA device
|
|
26
24
|
def complete_registration_of_sca_device(request, id, headers: {})
|
|
27
|
-
endpoint = '/registeredDevices/{id}'
|
|
28
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
29
|
-
endpoint = format(endpoint, id)
|
|
25
|
+
endpoint = build_endpoint('/registeredDevices/{id}', id)
|
|
30
26
|
|
|
31
27
|
action = { method: 'patch', url: endpoint }
|
|
32
28
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
@@ -34,9 +30,7 @@ module Adyen
|
|
|
34
30
|
|
|
35
31
|
# Delete a registration of an SCA device
|
|
36
32
|
def delete_registration_of_sca_device(id, headers: {}, query_params: {})
|
|
37
|
-
endpoint = '/registeredDevices/{id}'
|
|
38
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
39
|
-
endpoint = format(endpoint, id)
|
|
33
|
+
endpoint = build_endpoint('/registeredDevices/{id}', id)
|
|
40
34
|
endpoint += create_query_string(query_params)
|
|
41
35
|
action = { method: 'delete', url: endpoint }
|
|
42
36
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
@@ -44,9 +38,7 @@ module Adyen
|
|
|
44
38
|
|
|
45
39
|
# Initiate an association between an SCA device and a resource
|
|
46
40
|
def initiate_association_between_sca_device_and_resource(request, device_id, headers: {})
|
|
47
|
-
endpoint = '/registeredDevices/{deviceId}/associations'
|
|
48
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
49
|
-
endpoint = format(endpoint, device_id)
|
|
41
|
+
endpoint = build_endpoint('/registeredDevices/{deviceId}/associations', device_id)
|
|
50
42
|
|
|
51
43
|
action = { method: 'post', url: endpoint }
|
|
52
44
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
@@ -54,9 +46,7 @@ module Adyen
|
|
|
54
46
|
|
|
55
47
|
# Initiate the registration of an SCA device
|
|
56
48
|
def initiate_registration_of_sca_device(request, headers: {})
|
|
57
|
-
endpoint = '/registeredDevices'
|
|
58
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
59
|
-
endpoint = format(endpoint)
|
|
49
|
+
endpoint = build_endpoint('/registeredDevices')
|
|
60
50
|
|
|
61
51
|
action = { method: 'post', url: endpoint }
|
|
62
52
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
@@ -64,9 +54,7 @@ module Adyen
|
|
|
64
54
|
|
|
65
55
|
# Get a list of registered SCA devices
|
|
66
56
|
def list_registered_sca_devices(headers: {}, query_params: {})
|
|
67
|
-
endpoint = '/registeredDevices'
|
|
68
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
69
|
-
endpoint = format(endpoint)
|
|
57
|
+
endpoint = build_endpoint('/registeredDevices')
|
|
70
58
|
endpoint += create_query_string(query_params)
|
|
71
59
|
action = { method: 'get', url: endpoint }
|
|
72
60
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|