adyen-ruby-api-library 11.2.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/CODEOWNERS +1 -1
- data/.github/workflows/codeql.yml +4 -4
- data/.github/workflows/release.yml +1 -1
- data/.github/workflows/ruby.yml +3 -3
- data/.github/workflows/rubygems_release.yml +1 -1
- data/.github/workflows/stale.yml +1 -1
- 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 +10 -16
- data/lib/adyen/deprecation.rb +34 -0
- data/lib/adyen/services/balanceControl/balance_control_api.rb +3 -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 +5 -65
- 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/custom_payout_schedules_sweeps_api.rb +56 -0
- data/lib/adyen/services/balancePlatform/direct_debit_mandates_api.rb +48 -0
- data/lib/adyen/services/balancePlatform/grant_accounts_api.rb +3 -3
- data/lib/adyen/services/balancePlatform/grant_offers_api.rb +6 -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/managed_payout_schedules_api.rb +80 -0
- 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/recurring_top_ups_api.rb +48 -0
- data/lib/adyen/services/balancePlatform/sca_association_management_api.rb +3 -9
- data/lib/adyen/services/balancePlatform/sca_device_management_api.rb +11 -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 +20 -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 +14 -18
- data/lib/adyen/services/checkout/recurring_api.rb +4 -12
- data/lib/adyen/services/checkout/utility_api.rb +6 -12
- data/lib/adyen/services/checkout.rb +1 -1
- 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/donation_campaigns_api.rb +64 -0
- 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/management.rb +5 -0
- data/lib/adyen/services/payment/modifications_api.rb +10 -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 +6 -3
- data/lib/adyen/services/posTerminalManagement.rb +10 -0
- data/lib/adyen/services/recurring/recurring_api.rb +10 -18
- data/lib/adyen/services/service.rb +12 -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 +9 -9
- data/lib/adyen/services/transfers/cash_out_api.rb +24 -0
- data/lib/adyen/services/transfers/transactions_api.rb +2 -6
- data/lib/adyen/services/transfers/transfers_api.rb +6 -18
- data/lib/adyen/services/transfers.rb +5 -0
- data/lib/adyen/utils/hmac_validator.rb +15 -18
- 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_control_spec.rb +41 -0
- data/spec/balance_platform_spec.rb +609 -4
- data/spec/capital_spec.rb +82 -0
- data/spec/checkout-oauth_spec.rb +220 -10
- data/spec/checkout_spec.rb +245 -10
- data/spec/client_spec.rb +23 -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_mandate.json +14 -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_list_of_mandates.json +19 -0
- data/spec/mocks/responses/BalancePlatform/get_mandate_by_id.json +14 -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/get_tax_form_summary.json +17 -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/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/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/service_spec.rb +40 -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 -4
- data/templates/api.mustache +4 -4
- metadata +84 -2
|
@@ -14,9 +14,7 @@ module Adyen
|
|
|
14
14
|
|
|
15
15
|
# Create a transaction rule
|
|
16
16
|
def create_transaction_rule(request, headers: {})
|
|
17
|
-
endpoint = '/transactionRules'
|
|
18
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
19
|
-
endpoint = format(endpoint)
|
|
17
|
+
endpoint = build_endpoint('/transactionRules')
|
|
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 transaction rule
|
|
26
24
|
def delete_transaction_rule(transaction_rule_id, headers: {})
|
|
27
|
-
endpoint = '/transactionRules/{transactionRuleId}'
|
|
28
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
29
|
-
endpoint = format(endpoint, transaction_rule_id)
|
|
25
|
+
endpoint = build_endpoint('/transactionRules/{transactionRuleId}', transaction_rule_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 a transaction rule
|
|
36
32
|
def get_transaction_rule(transaction_rule_id, headers: {})
|
|
37
|
-
endpoint = '/transactionRules/{transactionRuleId}'
|
|
38
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
39
|
-
endpoint = format(endpoint, transaction_rule_id)
|
|
33
|
+
endpoint = build_endpoint('/transactionRules/{transactionRuleId}', transaction_rule_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 a transaction rule
|
|
46
40
|
def update_transaction_rule(request, transaction_rule_id, headers: {})
|
|
47
|
-
endpoint = '/transactionRules/{transactionRuleId}'
|
|
48
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
49
|
-
endpoint = format(endpoint, transaction_rule_id)
|
|
41
|
+
endpoint = build_endpoint('/transactionRules/{transactionRuleId}', transaction_rule_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
|
# Approve pending transfer limits
|
|
16
16
|
def approve_pending_transfer_limits(request, id, headers: {})
|
|
17
|
-
endpoint = '/balanceAccounts/{id}/transferLimits/approve'
|
|
18
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
19
|
-
endpoint = format(endpoint, id)
|
|
17
|
+
endpoint = build_endpoint('/balanceAccounts/{id}/transferLimits/approve', 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
|
# Create a transfer limit
|
|
26
24
|
def create_transfer_limit(request, id, headers: {})
|
|
27
|
-
endpoint = '/balanceAccounts/{id}/transferLimits'
|
|
28
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
29
|
-
endpoint = format(endpoint, id)
|
|
25
|
+
endpoint = build_endpoint('/balanceAccounts/{id}/transferLimits', 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 scheduled or pending transfer limit
|
|
36
32
|
def delete_pending_transfer_limit(id, transfer_limit_id, headers: {})
|
|
37
|
-
endpoint = '/balanceAccounts/{id}/transferLimits/{transferLimitId}'
|
|
38
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
39
|
-
endpoint = format(endpoint, id, transfer_limit_id)
|
|
33
|
+
endpoint = build_endpoint('/balanceAccounts/{id}/transferLimits/{transferLimitId}', id, transfer_limit_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 current transfer limits
|
|
46
40
|
def get_current_transfer_limits(id, headers: {}, query_params: {})
|
|
47
|
-
endpoint = '/balanceAccounts/{id}/transferLimits/current'
|
|
48
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
49
|
-
endpoint = format(endpoint, id)
|
|
41
|
+
endpoint = build_endpoint('/balanceAccounts/{id}/transferLimits/current', 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 the details of a transfer limit
|
|
56
48
|
def get_specific_transfer_limit(id, transfer_limit_id, headers: {})
|
|
57
|
-
endpoint = '/balanceAccounts/{id}/transferLimits/{transferLimitId}'
|
|
58
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
59
|
-
endpoint = format(endpoint, id, transfer_limit_id)
|
|
49
|
+
endpoint = build_endpoint('/balanceAccounts/{id}/transferLimits/{transferLimitId}', id, transfer_limit_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
|
# Filter and view the transfer limits
|
|
66
56
|
def get_transfer_limits(id, headers: {}, query_params: {})
|
|
67
|
-
endpoint = '/balanceAccounts/{id}/transferLimits'
|
|
68
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
69
|
-
endpoint = format(endpoint, id)
|
|
57
|
+
endpoint = build_endpoint('/balanceAccounts/{id}/transferLimits', id)
|
|
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)
|
|
@@ -14,9 +14,7 @@ module Adyen
|
|
|
14
14
|
|
|
15
15
|
# Create a transfer limit
|
|
16
16
|
def create_transfer_limit(request, id, headers: {})
|
|
17
|
-
endpoint = '/balancePlatforms/{id}/transferLimits'
|
|
18
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
19
|
-
endpoint = format(endpoint, id)
|
|
17
|
+
endpoint = build_endpoint('/balancePlatforms/{id}/transferLimits', 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 scheduled or pending transfer limit
|
|
26
24
|
def delete_pending_transfer_limit(id, transfer_limit_id, headers: {})
|
|
27
|
-
endpoint = '/balancePlatforms/{id}/transferLimits/{transferLimitId}'
|
|
28
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
29
|
-
endpoint = format(endpoint, id, transfer_limit_id)
|
|
25
|
+
endpoint = build_endpoint('/balancePlatforms/{id}/transferLimits/{transferLimitId}', id, transfer_limit_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 the details of a transfer limit
|
|
36
32
|
def get_specific_transfer_limit(id, transfer_limit_id, headers: {})
|
|
37
|
-
endpoint = '/balancePlatforms/{id}/transferLimits/{transferLimitId}'
|
|
38
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
39
|
-
endpoint = format(endpoint, id, transfer_limit_id)
|
|
33
|
+
endpoint = build_endpoint('/balancePlatforms/{id}/transferLimits/{transferLimitId}', id, transfer_limit_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
|
# Filter and view the transfer limits
|
|
46
40
|
def get_transfer_limits(id, headers: {}, query_params: {})
|
|
47
|
-
endpoint = '/balancePlatforms/{id}/transferLimits'
|
|
48
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
49
|
-
endpoint = format(endpoint, id)
|
|
41
|
+
endpoint = build_endpoint('/balancePlatforms/{id}/transferLimits', 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)
|
|
@@ -14,9 +14,7 @@ module Adyen
|
|
|
14
14
|
|
|
15
15
|
# Calculate transfer routes
|
|
16
16
|
def calculate_transfer_routes(request, headers: {})
|
|
17
|
-
endpoint = '/transferRoutes/calculate'
|
|
18
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
19
|
-
endpoint = format(endpoint)
|
|
17
|
+
endpoint = build_endpoint('/transferRoutes/calculate')
|
|
20
18
|
|
|
21
19
|
action = { method: 'post', url: endpoint }
|
|
22
20
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
@@ -4,14 +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'
|
|
8
|
+
require_relative 'balancePlatform/direct_debit_mandates_api'
|
|
7
9
|
require_relative 'balancePlatform/grant_accounts_api'
|
|
8
10
|
require_relative 'balancePlatform/grant_offers_api'
|
|
9
11
|
require_relative 'balancePlatform/manage_card_pin_api'
|
|
10
12
|
require_relative 'balancePlatform/manage_sca_devices_api'
|
|
13
|
+
require_relative 'balancePlatform/managed_payout_schedules_api'
|
|
11
14
|
require_relative 'balancePlatform/network_tokens_api'
|
|
12
15
|
require_relative 'balancePlatform/payment_instrument_groups_api'
|
|
13
16
|
require_relative 'balancePlatform/payment_instruments_api'
|
|
14
17
|
require_relative 'balancePlatform/platform_api'
|
|
18
|
+
require_relative 'balancePlatform/recurring_top_ups_api'
|
|
15
19
|
require_relative 'balancePlatform/sca_association_management_api'
|
|
16
20
|
require_relative 'balancePlatform/sca_device_management_api'
|
|
17
21
|
require_relative 'balancePlatform/transaction_rules_api'
|
|
@@ -59,6 +63,14 @@ module Adyen
|
|
|
59
63
|
@card_orders_api ||= Adyen::CardOrdersApi.new(@client, @version)
|
|
60
64
|
end
|
|
61
65
|
|
|
66
|
+
def custom_payout_schedules_sweeps_api
|
|
67
|
+
@custom_payout_schedules_sweeps_api ||= Adyen::CustomPayoutSchedulesSweepsApi.new(@client, @version)
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
def direct_debit_mandates_api
|
|
71
|
+
@direct_debit_mandates_api ||= Adyen::DirectDebitMandatesApi.new(@client, @version)
|
|
72
|
+
end
|
|
73
|
+
|
|
62
74
|
def grant_accounts_api
|
|
63
75
|
@grant_accounts_api ||= Adyen::GrantAccountsApi.new(@client, @version)
|
|
64
76
|
end
|
|
@@ -75,6 +87,10 @@ module Adyen
|
|
|
75
87
|
@manage_sca_devices_api ||= Adyen::ManageSCADevicesApi.new(@client, @version)
|
|
76
88
|
end
|
|
77
89
|
|
|
90
|
+
def managed_payout_schedules_api
|
|
91
|
+
@managed_payout_schedules_api ||= Adyen::ManagedPayoutSchedulesApi.new(@client, @version)
|
|
92
|
+
end
|
|
93
|
+
|
|
78
94
|
def network_tokens_api
|
|
79
95
|
@network_tokens_api ||= Adyen::NetworkTokensApi.new(@client, @version)
|
|
80
96
|
end
|
|
@@ -91,6 +107,10 @@ module Adyen
|
|
|
91
107
|
@platform_api ||= Adyen::PlatformApi.new(@client, @version)
|
|
92
108
|
end
|
|
93
109
|
|
|
110
|
+
def recurring_top_ups_api
|
|
111
|
+
@recurring_top_ups_api ||= Adyen::RecurringTopUpsApi.new(@client, @version)
|
|
112
|
+
end
|
|
113
|
+
|
|
94
114
|
def sca_association_management_api
|
|
95
115
|
@sca_association_management_api ||= Adyen::SCAAssociationManagementApi.new(@client, @version)
|
|
96
116
|
end
|
|
@@ -14,9 +14,7 @@ module Adyen
|
|
|
14
14
|
|
|
15
15
|
# Check if 3D Secure is available
|
|
16
16
|
def get3ds_availability(request, headers: {})
|
|
17
|
-
endpoint = '/get3dsAvailability'
|
|
18
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
19
|
-
endpoint = format(endpoint)
|
|
17
|
+
endpoint = build_endpoint('/get3dsAvailability')
|
|
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 a fees cost estimate
|
|
26
24
|
def get_cost_estimate(request, headers: {})
|
|
27
|
-
endpoint = '/getCostEstimate'
|
|
28
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
29
|
-
endpoint = format(endpoint)
|
|
25
|
+
endpoint = build_endpoint('/getCostEstimate')
|
|
30
26
|
|
|
31
27
|
action = { method: 'post', url: endpoint }
|
|
32
28
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
@@ -0,0 +1,40 @@
|
|
|
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 DynamicOffersApi < Service
|
|
9
|
+
attr_accessor :service, :version
|
|
10
|
+
|
|
11
|
+
def initialize(client, version = DEFAULT_VERSION)
|
|
12
|
+
super(client, version, 'Capital')
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# Calculate a preliminary offer for a selected financing amount
|
|
16
|
+
def calculate_preliminary_offer_from_dynamic_offer(request, id, headers: {})
|
|
17
|
+
endpoint = build_endpoint('/dynamicOffers/{id}/calculate', id)
|
|
18
|
+
|
|
19
|
+
action = { method: 'post', url: endpoint }
|
|
20
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
# Create a static offer for a selected financing amount
|
|
24
|
+
def create_static_offer_from_dynamic_offer(request, id, headers: {})
|
|
25
|
+
endpoint = build_endpoint('/dynamicOffers/{id}/grantOffer', id)
|
|
26
|
+
|
|
27
|
+
action = { method: 'post', url: endpoint }
|
|
28
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Get all available dynamic offers
|
|
32
|
+
def get_all_dynamic_offers(headers: {}, query_params: {})
|
|
33
|
+
endpoint = build_endpoint('/dynamicOffers')
|
|
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
|
+
end
|
|
40
|
+
end
|
|
@@ -14,9 +14,7 @@ module Adyen
|
|
|
14
14
|
|
|
15
15
|
# Get the information of your grant account
|
|
16
16
|
def get_grant_account_information(id, headers: {})
|
|
17
|
-
endpoint = '/grantAccounts/{id}'
|
|
18
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
19
|
-
endpoint = format(endpoint, id)
|
|
17
|
+
endpoint = build_endpoint('/grantAccounts/{id}', id)
|
|
20
18
|
|
|
21
19
|
action = { method: 'get', url: endpoint }
|
|
22
20
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
@@ -12,21 +12,17 @@ module Adyen
|
|
|
12
12
|
super(client, version, 'Capital')
|
|
13
13
|
end
|
|
14
14
|
|
|
15
|
-
# Get all available
|
|
15
|
+
# Get all available static offers
|
|
16
16
|
def get_all_grant_offers(headers: {}, query_params: {})
|
|
17
|
-
endpoint = '/grantOffers'
|
|
18
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
19
|
-
endpoint = format(endpoint)
|
|
17
|
+
endpoint = build_endpoint('/grantOffers')
|
|
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)
|
|
23
21
|
end
|
|
24
22
|
|
|
25
|
-
# Get the details of a
|
|
23
|
+
# Get the details of a static offer
|
|
26
24
|
def get_grant_offer(id, headers: {})
|
|
27
|
-
endpoint = '/grantOffers/{id}'
|
|
28
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
29
|
-
endpoint = format(endpoint, id)
|
|
25
|
+
endpoint = build_endpoint('/grantOffers/{id}', id)
|
|
30
26
|
|
|
31
27
|
action = { method: 'get', url: endpoint }
|
|
32
28
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
@@ -14,9 +14,7 @@ module Adyen
|
|
|
14
14
|
|
|
15
15
|
# Get all the disbursements of a grant
|
|
16
16
|
def get_all_grant_disbursements(grant_id, headers: {})
|
|
17
|
-
endpoint = '/grants/{grantId}/disbursements'
|
|
18
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
19
|
-
endpoint = format(endpoint, grant_id)
|
|
17
|
+
endpoint = build_endpoint('/grants/{grantId}/disbursements', grant_id)
|
|
20
18
|
|
|
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 all the grants of an account holder
|
|
26
24
|
def get_all_grants(headers: {}, query_params: {})
|
|
27
|
-
endpoint = '/grants'
|
|
28
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
29
|
-
endpoint = format(endpoint)
|
|
25
|
+
endpoint = build_endpoint('/grants')
|
|
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
|
# Get the details of a grant
|
|
36
32
|
def get_grant(grant_id, headers: {})
|
|
37
|
-
endpoint = '/grants/{grantId}'
|
|
38
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
39
|
-
endpoint = format(endpoint, grant_id)
|
|
33
|
+
endpoint = build_endpoint('/grants/{grantId}', grant_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 disbursement details
|
|
46
40
|
def get_grant_disbursement(grant_id, disbursement_id, headers: {})
|
|
47
|
-
endpoint = '/grants/{grantId}/disbursements/{disbursementId}'
|
|
48
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
49
|
-
endpoint = format(endpoint, grant_id, disbursement_id)
|
|
41
|
+
endpoint = build_endpoint('/grants/{grantId}/disbursements/{disbursementId}', grant_id, disbursement_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
|
# Make a request for a grant
|
|
56
48
|
def request_grant(request, headers: {})
|
|
57
|
-
endpoint = '/grants'
|
|
58
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
59
|
-
endpoint = format(endpoint)
|
|
49
|
+
endpoint = build_endpoint('/grants')
|
|
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
|
# Update the repayment configuration of a disbursement
|
|
66
56
|
def update_grant_disbursement(request, grant_id, disbursement_id, headers: {})
|
|
67
|
-
endpoint = '/grants/{grantId}/disbursements/{disbursementId}'
|
|
68
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
69
|
-
endpoint = format(endpoint, grant_id, disbursement_id)
|
|
57
|
+
endpoint = build_endpoint('/grants/{grantId}/disbursements/{disbursementId}', grant_id, disbursement_id)
|
|
70
58
|
|
|
71
59
|
action = { method: 'patch', url: endpoint }
|
|
72
60
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
require_relative 'capital/dynamic_offers_api'
|
|
1
2
|
require_relative 'capital/grant_accounts_api'
|
|
2
3
|
require_relative 'capital/grant_offers_api'
|
|
3
4
|
require_relative 'capital/grants_api'
|
|
@@ -18,6 +19,10 @@ module Adyen
|
|
|
18
19
|
@version = version
|
|
19
20
|
end
|
|
20
21
|
|
|
22
|
+
def dynamic_offers_api
|
|
23
|
+
@dynamic_offers_api ||= Adyen::DynamicOffersApi.new(@client, @version)
|
|
24
|
+
end
|
|
25
|
+
|
|
21
26
|
def grant_accounts_api
|
|
22
27
|
@grant_accounts_api ||= Adyen::GrantAccountsApi.new(@client, @version)
|
|
23
28
|
end
|
|
@@ -14,9 +14,7 @@ module Adyen
|
|
|
14
14
|
|
|
15
15
|
# Get a list of donation campaigns.
|
|
16
16
|
def donation_campaigns(request, headers: {})
|
|
17
|
-
endpoint = '/donationCampaigns'
|
|
18
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
19
|
-
endpoint = format(endpoint)
|
|
17
|
+
endpoint = build_endpoint('/donationCampaigns')
|
|
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
|
# Make a donation
|
|
26
24
|
def donations(request, headers: {})
|
|
27
|
-
endpoint = '/donations'
|
|
28
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
29
|
-
endpoint = format(endpoint)
|
|
25
|
+
endpoint = build_endpoint('/donations')
|
|
30
26
|
|
|
31
27
|
action = { method: 'post', url: endpoint }
|
|
32
28
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
@@ -14,9 +14,7 @@ module Adyen
|
|
|
14
14
|
|
|
15
15
|
# Cancel an authorised payment
|
|
16
16
|
def cancel_authorised_payment(request, headers: {})
|
|
17
|
-
endpoint = '/cancels'
|
|
18
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
19
|
-
endpoint = format(endpoint)
|
|
17
|
+
endpoint = build_endpoint('/cancels')
|
|
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
|
# Cancel an authorised payment
|
|
26
24
|
def cancel_authorised_payment_by_psp_reference(request, payment_psp_reference, headers: {})
|
|
27
|
-
endpoint = '/payments/{paymentPspReference}/cancels'
|
|
28
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
29
|
-
endpoint = format(endpoint, payment_psp_reference)
|
|
25
|
+
endpoint = build_endpoint('/payments/{paymentPspReference}/cancels', payment_psp_reference)
|
|
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
|
# Capture an authorised payment
|
|
36
32
|
def capture_authorised_payment(request, payment_psp_reference, headers: {})
|
|
37
|
-
endpoint = '/payments/{paymentPspReference}/captures'
|
|
38
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
39
|
-
endpoint = format(endpoint, payment_psp_reference)
|
|
33
|
+
endpoint = build_endpoint('/payments/{paymentPspReference}/captures', payment_psp_reference)
|
|
40
34
|
|
|
41
35
|
action = { method: 'post', url: endpoint }
|
|
42
36
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
@@ -44,9 +38,7 @@ module Adyen
|
|
|
44
38
|
|
|
45
39
|
# Refund a captured payment
|
|
46
40
|
def refund_captured_payment(request, payment_psp_reference, headers: {})
|
|
47
|
-
endpoint = '/payments/{paymentPspReference}/refunds'
|
|
48
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
49
|
-
endpoint = format(endpoint, payment_psp_reference)
|
|
41
|
+
endpoint = build_endpoint('/payments/{paymentPspReference}/refunds', payment_psp_reference)
|
|
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
|
# Refund or cancel a payment
|
|
56
48
|
def refund_or_cancel_payment(request, payment_psp_reference, headers: {})
|
|
57
|
-
endpoint = '/payments/{paymentPspReference}/reversals'
|
|
58
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
59
|
-
endpoint = format(endpoint, payment_psp_reference)
|
|
49
|
+
endpoint = build_endpoint('/payments/{paymentPspReference}/reversals', payment_psp_reference)
|
|
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
|
# Update an authorised amount
|
|
66
56
|
def update_authorised_amount(request, payment_psp_reference, headers: {})
|
|
67
|
-
endpoint = '/payments/{paymentPspReference}/amountUpdates'
|
|
68
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
69
|
-
endpoint = format(endpoint, payment_psp_reference)
|
|
57
|
+
endpoint = build_endpoint('/payments/{paymentPspReference}/amountUpdates', payment_psp_reference)
|
|
70
58
|
|
|
71
59
|
action = { method: 'post', url: endpoint }
|
|
72
60
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
@@ -14,9 +14,7 @@ module Adyen
|
|
|
14
14
|
|
|
15
15
|
# Cancel an order
|
|
16
16
|
def cancel_order(request, headers: {})
|
|
17
|
-
endpoint = '/orders/cancel'
|
|
18
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
19
|
-
endpoint = format(endpoint)
|
|
17
|
+
endpoint = build_endpoint('/orders/cancel')
|
|
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 the balance of a gift card
|
|
26
24
|
def get_balance_of_gift_card(request, headers: {})
|
|
27
|
-
endpoint = '/paymentMethods/balance'
|
|
28
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
29
|
-
endpoint = format(endpoint)
|
|
25
|
+
endpoint = build_endpoint('/paymentMethods/balance')
|
|
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
|
# Create an order
|
|
36
32
|
def orders(request, headers: {})
|
|
37
|
-
endpoint = '/orders'
|
|
38
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
39
|
-
endpoint = format(endpoint)
|
|
33
|
+
endpoint = build_endpoint('/orders')
|
|
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
|
# Get a payment link
|
|
16
16
|
def get_payment_link(link_id, headers: {})
|
|
17
|
-
endpoint = '/paymentLinks/{linkId}'
|
|
18
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
19
|
-
endpoint = format(endpoint, link_id)
|
|
17
|
+
endpoint = build_endpoint('/paymentLinks/{linkId}', link_id)
|
|
20
18
|
|
|
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
|
# Create a payment link
|
|
26
24
|
def payment_links(request, headers: {})
|
|
27
|
-
endpoint = '/paymentLinks'
|
|
28
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
29
|
-
endpoint = format(endpoint)
|
|
25
|
+
endpoint = build_endpoint('/paymentLinks')
|
|
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
|
# Update the status of a payment link
|
|
36
32
|
def update_payment_link(request, link_id, headers: {})
|
|
37
|
-
endpoint = '/paymentLinks/{linkId}'
|
|
38
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
39
|
-
endpoint = format(endpoint, link_id)
|
|
33
|
+
endpoint = build_endpoint('/paymentLinks/{linkId}', link_id)
|
|
40
34
|
|
|
41
35
|
action = { method: 'patch', url: endpoint }
|
|
42
36
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
@@ -14,9 +14,7 @@ module Adyen
|
|
|
14
14
|
|
|
15
15
|
# Get the brands and other details of a card
|
|
16
16
|
def card_details(request, headers: {})
|
|
17
|
-
endpoint = '/cardDetails'
|
|
18
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
19
|
-
endpoint = format(endpoint)
|
|
17
|
+
endpoint = build_endpoint('/cardDetails')
|
|
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 the result of a payment session
|
|
26
24
|
def get_result_of_payment_session(session_id, headers: {}, query_params: {})
|
|
27
|
-
endpoint = '/sessions/{sessionId}'
|
|
28
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
29
|
-
endpoint = format(endpoint, session_id)
|
|
25
|
+
endpoint = build_endpoint('/sessions/{sessionId}', session_id)
|
|
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
|
# Get a list of available payment methods
|
|
36
32
|
def payment_methods(request, headers: {})
|
|
37
|
-
endpoint = '/paymentMethods'
|
|
38
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
39
|
-
endpoint = format(endpoint)
|
|
33
|
+
endpoint = build_endpoint('/paymentMethods')
|
|
40
34
|
|
|
41
35
|
action = { method: 'post', url: endpoint }
|
|
42
36
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
@@ -44,9 +38,7 @@ module Adyen
|
|
|
44
38
|
|
|
45
39
|
# Start a transaction
|
|
46
40
|
def payments(request, headers: {})
|
|
47
|
-
endpoint = '/payments'
|
|
48
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
49
|
-
endpoint = format(endpoint)
|
|
41
|
+
endpoint = build_endpoint('/payments')
|
|
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
|
# Submit details for a payment
|
|
56
48
|
def payments_details(request, headers: {})
|
|
57
|
-
endpoint = '/payments/details'
|
|
58
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
59
|
-
endpoint = format(endpoint)
|
|
49
|
+
endpoint = build_endpoint('/payments/details')
|
|
60
50
|
|
|
61
51
|
action = { method: 'post', url: endpoint }
|
|
62
52
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
@@ -64,13 +54,19 @@ module Adyen
|
|
|
64
54
|
|
|
65
55
|
# Create a payment session
|
|
66
56
|
def sessions(request, headers: {})
|
|
67
|
-
endpoint = '/sessions'
|
|
68
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
69
|
-
endpoint = format(endpoint)
|
|
57
|
+
endpoint = build_endpoint('/sessions')
|
|
70
58
|
|
|
71
59
|
action = { method: 'post', url: endpoint }
|
|
72
60
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
73
61
|
end
|
|
74
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
|
+
|
|
75
71
|
end
|
|
76
72
|
end
|