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 rule
|
|
16
16
|
def create_rule(request, merchant_id, split_configuration_id, headers: {})
|
|
17
|
-
endpoint = '/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}'
|
|
18
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
19
|
-
endpoint = format(endpoint, merchant_id, split_configuration_id)
|
|
17
|
+
endpoint = build_endpoint('/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}', merchant_id, split_configuration_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 split configuration profile
|
|
26
24
|
def create_split_configuration(request, merchant_id, headers: {})
|
|
27
|
-
endpoint = '/merchants/{merchantId}/splitConfigurations'
|
|
28
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
29
|
-
endpoint = format(endpoint, merchant_id)
|
|
25
|
+
endpoint = build_endpoint('/merchants/{merchantId}/splitConfigurations', merchant_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 split configuration profile
|
|
36
32
|
def delete_split_configuration(merchant_id, split_configuration_id, headers: {})
|
|
37
|
-
endpoint = '/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}'
|
|
38
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
39
|
-
endpoint = format(endpoint, merchant_id, split_configuration_id)
|
|
33
|
+
endpoint = build_endpoint('/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}', merchant_id, split_configuration_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
|
# Delete a rule
|
|
46
40
|
def delete_split_configuration_rule(merchant_id, split_configuration_id, rule_id, headers: {})
|
|
47
|
-
endpoint = '/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}/rules/{ruleId}'
|
|
48
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
49
|
-
endpoint = format(endpoint, merchant_id, split_configuration_id, rule_id)
|
|
41
|
+
endpoint = build_endpoint('/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}/rules/{ruleId}', merchant_id, split_configuration_id, rule_id)
|
|
50
42
|
|
|
51
43
|
action = { method: 'delete', url: endpoint }
|
|
52
44
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
@@ -54,9 +46,7 @@ module Adyen
|
|
|
54
46
|
|
|
55
47
|
# Get a split configuration profile
|
|
56
48
|
def get_split_configuration(merchant_id, split_configuration_id, headers: {})
|
|
57
|
-
endpoint = '/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}'
|
|
58
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
59
|
-
endpoint = format(endpoint, merchant_id, split_configuration_id)
|
|
49
|
+
endpoint = build_endpoint('/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}', merchant_id, split_configuration_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 list of split configuration profiles
|
|
66
56
|
def list_split_configurations(merchant_id, headers: {})
|
|
67
|
-
endpoint = '/merchants/{merchantId}/splitConfigurations'
|
|
68
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
69
|
-
endpoint = format(endpoint, merchant_id)
|
|
57
|
+
endpoint = build_endpoint('/merchants/{merchantId}/splitConfigurations', merchant_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
|
# Update the split conditions
|
|
76
64
|
def update_split_conditions(request, merchant_id, split_configuration_id, rule_id, headers: {})
|
|
77
|
-
endpoint = '/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}/rules/{ruleId}'
|
|
78
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
79
|
-
endpoint = format(endpoint, merchant_id, split_configuration_id, rule_id)
|
|
65
|
+
endpoint = build_endpoint('/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}/rules/{ruleId}', merchant_id, split_configuration_id, rule_id)
|
|
80
66
|
|
|
81
67
|
action = { method: 'patch', url: endpoint }
|
|
82
68
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
@@ -84,9 +70,7 @@ module Adyen
|
|
|
84
70
|
|
|
85
71
|
# Update the description of the split configuration profile
|
|
86
72
|
def update_split_configuration_description(request, merchant_id, split_configuration_id, headers: {})
|
|
87
|
-
endpoint = '/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}'
|
|
88
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
89
|
-
endpoint = format(endpoint, merchant_id, split_configuration_id)
|
|
73
|
+
endpoint = build_endpoint('/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}', merchant_id, split_configuration_id)
|
|
90
74
|
|
|
91
75
|
action = { method: 'patch', url: endpoint }
|
|
92
76
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
@@ -94,9 +78,7 @@ module Adyen
|
|
|
94
78
|
|
|
95
79
|
# Update the split logic
|
|
96
80
|
def update_split_logic(request, merchant_id, split_configuration_id, rule_id, split_logic_id, headers: {})
|
|
97
|
-
endpoint = '/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}/rules/{ruleId}/splitLogic/{splitLogicId}'
|
|
98
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
99
|
-
endpoint = format(endpoint, merchant_id, split_configuration_id, rule_id, split_logic_id)
|
|
81
|
+
endpoint = build_endpoint('/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}/rules/{ruleId}/splitLogic/{splitLogicId}', merchant_id, split_configuration_id, rule_id, split_logic_id)
|
|
100
82
|
|
|
101
83
|
action = { method: 'patch', url: endpoint }
|
|
102
84
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
@@ -14,9 +14,7 @@ module Adyen
|
|
|
14
14
|
|
|
15
15
|
# Get terminal action
|
|
16
16
|
def get_terminal_action(company_id, action_id, headers: {})
|
|
17
|
-
endpoint = '/companies/{companyId}/terminalActions/{actionId}'
|
|
18
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
19
|
-
endpoint = format(endpoint, company_id, action_id)
|
|
17
|
+
endpoint = build_endpoint('/companies/{companyId}/terminalActions/{actionId}', company_id, action_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 a list of terminal actions
|
|
26
24
|
def list_terminal_actions(company_id, headers: {}, query_params: {})
|
|
27
|
-
endpoint = '/companies/{companyId}/terminalActions'
|
|
28
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
29
|
-
endpoint = format(endpoint, company_id)
|
|
25
|
+
endpoint = build_endpoint('/companies/{companyId}/terminalActions', company_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)
|
|
@@ -14,9 +14,7 @@ module Adyen
|
|
|
14
14
|
|
|
15
15
|
# Create a terminal action
|
|
16
16
|
def create_terminal_action(request, headers: {})
|
|
17
|
-
endpoint = '/terminals/scheduleActions'
|
|
18
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
19
|
-
endpoint = format(endpoint)
|
|
17
|
+
endpoint = build_endpoint('/terminals/scheduleActions')
|
|
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
|
# Cancel an order
|
|
16
16
|
def cancel_order(company_id, order_id, headers: {})
|
|
17
|
-
endpoint = '/companies/{companyId}/terminalOrders/{orderId}/cancel'
|
|
18
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
19
|
-
endpoint = format(endpoint, company_id, order_id)
|
|
17
|
+
endpoint = build_endpoint('/companies/{companyId}/terminalOrders/{orderId}/cancel', company_id, order_id)
|
|
20
18
|
|
|
21
19
|
action = { method: 'post', url: endpoint }
|
|
22
20
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
@@ -24,9 +22,7 @@ module Adyen
|
|
|
24
22
|
|
|
25
23
|
# Create an order
|
|
26
24
|
def create_order(request, company_id, headers: {})
|
|
27
|
-
endpoint = '/companies/{companyId}/terminalOrders'
|
|
28
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
29
|
-
endpoint = format(endpoint, company_id)
|
|
25
|
+
endpoint = build_endpoint('/companies/{companyId}/terminalOrders', company_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
|
# Create a shipping location
|
|
36
32
|
def create_shipping_location(request, company_id, headers: {})
|
|
37
|
-
endpoint = '/companies/{companyId}/shippingLocations'
|
|
38
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
39
|
-
endpoint = format(endpoint, company_id)
|
|
33
|
+
endpoint = build_endpoint('/companies/{companyId}/shippingLocations', company_id)
|
|
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
|
# Get an order
|
|
46
40
|
def get_order(company_id, order_id, headers: {})
|
|
47
|
-
endpoint = '/companies/{companyId}/terminalOrders/{orderId}'
|
|
48
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
49
|
-
endpoint = format(endpoint, company_id, order_id)
|
|
41
|
+
endpoint = build_endpoint('/companies/{companyId}/terminalOrders/{orderId}', company_id, order_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
|
# Get a list of billing entities
|
|
56
48
|
def list_billing_entities(company_id, headers: {}, query_params: {})
|
|
57
|
-
endpoint = '/companies/{companyId}/billingEntities'
|
|
58
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
59
|
-
endpoint = format(endpoint, company_id)
|
|
49
|
+
endpoint = build_endpoint('/companies/{companyId}/billingEntities', company_id)
|
|
60
50
|
endpoint += create_query_string(query_params)
|
|
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 list of orders
|
|
66
56
|
def list_orders(company_id, headers: {}, query_params: {})
|
|
67
|
-
endpoint = '/companies/{companyId}/terminalOrders'
|
|
68
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
69
|
-
endpoint = format(endpoint, company_id)
|
|
57
|
+
endpoint = build_endpoint('/companies/{companyId}/terminalOrders', company_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)
|
|
@@ -74,9 +62,7 @@ module Adyen
|
|
|
74
62
|
|
|
75
63
|
# Get a list of shipping locations
|
|
76
64
|
def list_shipping_locations(company_id, headers: {}, query_params: {})
|
|
77
|
-
endpoint = '/companies/{companyId}/shippingLocations'
|
|
78
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
79
|
-
endpoint = format(endpoint, company_id)
|
|
65
|
+
endpoint = build_endpoint('/companies/{companyId}/shippingLocations', company_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 list of terminal models
|
|
86
72
|
def list_terminal_models(company_id, headers: {})
|
|
87
|
-
endpoint = '/companies/{companyId}/terminalModels'
|
|
88
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
89
|
-
endpoint = format(endpoint, company_id)
|
|
73
|
+
endpoint = build_endpoint('/companies/{companyId}/terminalModels', company_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
|
# Get a list of terminal products
|
|
96
80
|
def list_terminal_products(company_id, headers: {}, query_params: {})
|
|
97
|
-
endpoint = '/companies/{companyId}/terminalProducts'
|
|
98
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
99
|
-
endpoint = format(endpoint, company_id)
|
|
81
|
+
endpoint = build_endpoint('/companies/{companyId}/terminalProducts', company_id)
|
|
100
82
|
endpoint += create_query_string(query_params)
|
|
101
83
|
action = { method: 'get', url: endpoint }
|
|
102
84
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
@@ -104,9 +86,7 @@ module Adyen
|
|
|
104
86
|
|
|
105
87
|
# Update an order
|
|
106
88
|
def update_order(request, company_id, order_id, headers: {})
|
|
107
|
-
endpoint = '/companies/{companyId}/terminalOrders/{orderId}'
|
|
108
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
109
|
-
endpoint = format(endpoint, company_id, order_id)
|
|
89
|
+
endpoint = build_endpoint('/companies/{companyId}/terminalOrders/{orderId}', company_id, order_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
|
# Cancel an order
|
|
16
16
|
def cancel_order(merchant_id, order_id, headers: {})
|
|
17
|
-
endpoint = '/merchants/{merchantId}/terminalOrders/{orderId}/cancel'
|
|
18
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
19
|
-
endpoint = format(endpoint, merchant_id, order_id)
|
|
17
|
+
endpoint = build_endpoint('/merchants/{merchantId}/terminalOrders/{orderId}/cancel', merchant_id, order_id)
|
|
20
18
|
|
|
21
19
|
action = { method: 'post', url: endpoint }
|
|
22
20
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
@@ -24,9 +22,7 @@ module Adyen
|
|
|
24
22
|
|
|
25
23
|
# Create an order
|
|
26
24
|
def create_order(request, merchant_id, headers: {})
|
|
27
|
-
endpoint = '/merchants/{merchantId}/terminalOrders'
|
|
28
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
29
|
-
endpoint = format(endpoint, merchant_id)
|
|
25
|
+
endpoint = build_endpoint('/merchants/{merchantId}/terminalOrders', merchant_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
|
# Create a shipping location
|
|
36
32
|
def create_shipping_location(request, merchant_id, headers: {})
|
|
37
|
-
endpoint = '/merchants/{merchantId}/shippingLocations'
|
|
38
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
39
|
-
endpoint = format(endpoint, merchant_id)
|
|
33
|
+
endpoint = build_endpoint('/merchants/{merchantId}/shippingLocations', merchant_id)
|
|
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
|
# Get an order
|
|
46
40
|
def get_order(merchant_id, order_id, headers: {})
|
|
47
|
-
endpoint = '/merchants/{merchantId}/terminalOrders/{orderId}'
|
|
48
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
49
|
-
endpoint = format(endpoint, merchant_id, order_id)
|
|
41
|
+
endpoint = build_endpoint('/merchants/{merchantId}/terminalOrders/{orderId}', merchant_id, order_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
|
# Get a list of billing entities
|
|
56
48
|
def list_billing_entities(merchant_id, headers: {}, query_params: {})
|
|
57
|
-
endpoint = '/merchants/{merchantId}/billingEntities'
|
|
58
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
59
|
-
endpoint = format(endpoint, merchant_id)
|
|
49
|
+
endpoint = build_endpoint('/merchants/{merchantId}/billingEntities', merchant_id)
|
|
60
50
|
endpoint += create_query_string(query_params)
|
|
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 list of orders
|
|
66
56
|
def list_orders(merchant_id, headers: {}, query_params: {})
|
|
67
|
-
endpoint = '/merchants/{merchantId}/terminalOrders'
|
|
68
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
69
|
-
endpoint = format(endpoint, merchant_id)
|
|
57
|
+
endpoint = build_endpoint('/merchants/{merchantId}/terminalOrders', merchant_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)
|
|
@@ -74,9 +62,7 @@ module Adyen
|
|
|
74
62
|
|
|
75
63
|
# Get a list of shipping locations
|
|
76
64
|
def list_shipping_locations(merchant_id, headers: {}, query_params: {})
|
|
77
|
-
endpoint = '/merchants/{merchantId}/shippingLocations'
|
|
78
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
79
|
-
endpoint = format(endpoint, merchant_id)
|
|
65
|
+
endpoint = build_endpoint('/merchants/{merchantId}/shippingLocations', merchant_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 list of terminal models
|
|
86
72
|
def list_terminal_models(merchant_id, headers: {})
|
|
87
|
-
endpoint = '/merchants/{merchantId}/terminalModels'
|
|
88
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
89
|
-
endpoint = format(endpoint, merchant_id)
|
|
73
|
+
endpoint = build_endpoint('/merchants/{merchantId}/terminalModels', merchant_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
|
# Get a list of terminal products
|
|
96
80
|
def list_terminal_products(merchant_id, headers: {}, query_params: {})
|
|
97
|
-
endpoint = '/merchants/{merchantId}/terminalProducts'
|
|
98
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
99
|
-
endpoint = format(endpoint, merchant_id)
|
|
81
|
+
endpoint = build_endpoint('/merchants/{merchantId}/terminalProducts', merchant_id)
|
|
100
82
|
endpoint += create_query_string(query_params)
|
|
101
83
|
action = { method: 'get', url: endpoint }
|
|
102
84
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
@@ -104,9 +86,7 @@ module Adyen
|
|
|
104
86
|
|
|
105
87
|
# Update an order
|
|
106
88
|
def update_order(request, merchant_id, order_id, headers: {})
|
|
107
|
-
endpoint = '/merchants/{merchantId}/terminalOrders/{orderId}'
|
|
108
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
109
|
-
endpoint = format(endpoint, merchant_id, order_id)
|
|
89
|
+
endpoint = build_endpoint('/merchants/{merchantId}/terminalOrders/{orderId}', merchant_id, order_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
|
# Get the terminal logo
|
|
16
16
|
def get_terminal_logo(company_id, headers: {}, query_params: {})
|
|
17
|
-
endpoint = '/companies/{companyId}/terminalLogos'
|
|
18
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
19
|
-
endpoint = format(endpoint, company_id)
|
|
17
|
+
endpoint = build_endpoint('/companies/{companyId}/terminalLogos', company_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 terminal settings
|
|
26
24
|
def get_terminal_settings(company_id, headers: {})
|
|
27
|
-
endpoint = '/companies/{companyId}/terminalSettings'
|
|
28
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
29
|
-
endpoint = format(endpoint, company_id)
|
|
25
|
+
endpoint = build_endpoint('/companies/{companyId}/terminalSettings', company_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
|
# Update the terminal logo
|
|
36
32
|
def update_terminal_logo(request, company_id, headers: {}, query_params: {})
|
|
37
|
-
endpoint = '/companies/{companyId}/terminalLogos'
|
|
38
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
39
|
-
endpoint = format(endpoint, company_id)
|
|
33
|
+
endpoint = build_endpoint('/companies/{companyId}/terminalLogos', company_id)
|
|
40
34
|
endpoint += create_query_string(query_params)
|
|
41
35
|
action = { method: 'patch', url: endpoint }
|
|
42
36
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
@@ -44,9 +38,7 @@ module Adyen
|
|
|
44
38
|
|
|
45
39
|
# Update terminal settings
|
|
46
40
|
def update_terminal_settings(request, company_id, headers: {})
|
|
47
|
-
endpoint = '/companies/{companyId}/terminalSettings'
|
|
48
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
49
|
-
endpoint = format(endpoint, company_id)
|
|
41
|
+
endpoint = build_endpoint('/companies/{companyId}/terminalSettings', company_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
|
# Get the terminal logo
|
|
16
16
|
def get_terminal_logo(merchant_id, headers: {}, query_params: {})
|
|
17
|
-
endpoint = '/merchants/{merchantId}/terminalLogos'
|
|
18
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
19
|
-
endpoint = format(endpoint, merchant_id)
|
|
17
|
+
endpoint = build_endpoint('/merchants/{merchantId}/terminalLogos', merchant_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 terminal settings
|
|
26
24
|
def get_terminal_settings(merchant_id, headers: {})
|
|
27
|
-
endpoint = '/merchants/{merchantId}/terminalSettings'
|
|
28
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
29
|
-
endpoint = format(endpoint, merchant_id)
|
|
25
|
+
endpoint = build_endpoint('/merchants/{merchantId}/terminalSettings', merchant_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
|
# Update the terminal logo
|
|
36
32
|
def update_terminal_logo(request, merchant_id, headers: {}, query_params: {})
|
|
37
|
-
endpoint = '/merchants/{merchantId}/terminalLogos'
|
|
38
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
39
|
-
endpoint = format(endpoint, merchant_id)
|
|
33
|
+
endpoint = build_endpoint('/merchants/{merchantId}/terminalLogos', merchant_id)
|
|
40
34
|
endpoint += create_query_string(query_params)
|
|
41
35
|
action = { method: 'patch', url: endpoint }
|
|
42
36
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
@@ -44,9 +38,7 @@ module Adyen
|
|
|
44
38
|
|
|
45
39
|
# Update terminal settings
|
|
46
40
|
def update_terminal_settings(request, merchant_id, headers: {})
|
|
47
|
-
endpoint = '/merchants/{merchantId}/terminalSettings'
|
|
48
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
49
|
-
endpoint = format(endpoint, merchant_id)
|
|
41
|
+
endpoint = build_endpoint('/merchants/{merchantId}/terminalSettings', merchant_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
|
# Get the terminal logo
|
|
16
16
|
def get_terminal_logo(merchant_id, reference, headers: {}, query_params: {})
|
|
17
|
-
endpoint = '/merchants/{merchantId}/stores/{reference}/terminalLogos'
|
|
18
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
19
|
-
endpoint = format(endpoint, merchant_id, reference)
|
|
17
|
+
endpoint = build_endpoint('/merchants/{merchantId}/stores/{reference}/terminalLogos', merchant_id, reference)
|
|
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 the terminal logo
|
|
26
24
|
def get_terminal_logo_by_store_id(store_id, headers: {}, query_params: {})
|
|
27
|
-
endpoint = '/stores/{storeId}/terminalLogos'
|
|
28
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
29
|
-
endpoint = format(endpoint, store_id)
|
|
25
|
+
endpoint = build_endpoint('/stores/{storeId}/terminalLogos', store_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 terminal settings
|
|
36
32
|
def get_terminal_settings(merchant_id, reference, headers: {})
|
|
37
|
-
endpoint = '/merchants/{merchantId}/stores/{reference}/terminalSettings'
|
|
38
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
39
|
-
endpoint = format(endpoint, merchant_id, reference)
|
|
33
|
+
endpoint = build_endpoint('/merchants/{merchantId}/stores/{reference}/terminalSettings', merchant_id, reference)
|
|
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 terminal settings
|
|
46
40
|
def get_terminal_settings_by_store_id(store_id, headers: {})
|
|
47
|
-
endpoint = '/stores/{storeId}/terminalSettings'
|
|
48
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
49
|
-
endpoint = format(endpoint, store_id)
|
|
41
|
+
endpoint = build_endpoint('/stores/{storeId}/terminalSettings', store_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 the terminal logo
|
|
56
48
|
def update_terminal_logo(request, merchant_id, reference, headers: {}, query_params: {})
|
|
57
|
-
endpoint = '/merchants/{merchantId}/stores/{reference}/terminalLogos'
|
|
58
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
59
|
-
endpoint = format(endpoint, merchant_id, reference)
|
|
49
|
+
endpoint = build_endpoint('/merchants/{merchantId}/stores/{reference}/terminalLogos', merchant_id, reference)
|
|
60
50
|
endpoint += create_query_string(query_params)
|
|
61
51
|
action = { method: 'patch', 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 terminal logo
|
|
66
56
|
def update_terminal_logo_by_store_id(request, store_id, headers: {}, query_params: {})
|
|
67
|
-
endpoint = '/stores/{storeId}/terminalLogos'
|
|
68
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
69
|
-
endpoint = format(endpoint, store_id)
|
|
57
|
+
endpoint = build_endpoint('/stores/{storeId}/terminalLogos', store_id)
|
|
70
58
|
endpoint += create_query_string(query_params)
|
|
71
59
|
action = { method: 'patch', url: endpoint }
|
|
72
60
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
@@ -74,9 +62,7 @@ module Adyen
|
|
|
74
62
|
|
|
75
63
|
# Update terminal settings
|
|
76
64
|
def update_terminal_settings(request, merchant_id, reference, headers: {})
|
|
77
|
-
endpoint = '/merchants/{merchantId}/stores/{reference}/terminalSettings'
|
|
78
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
79
|
-
endpoint = format(endpoint, merchant_id, reference)
|
|
65
|
+
endpoint = build_endpoint('/merchants/{merchantId}/stores/{reference}/terminalSettings', merchant_id, reference)
|
|
80
66
|
|
|
81
67
|
action = { method: 'patch', url: endpoint }
|
|
82
68
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
@@ -84,9 +70,7 @@ module Adyen
|
|
|
84
70
|
|
|
85
71
|
# Update terminal settings
|
|
86
72
|
def update_terminal_settings_by_store_id(request, store_id, headers: {})
|
|
87
|
-
endpoint = '/stores/{storeId}/terminalSettings'
|
|
88
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
89
|
-
endpoint = format(endpoint, store_id)
|
|
73
|
+
endpoint = build_endpoint('/stores/{storeId}/terminalSettings', store_id)
|
|
90
74
|
|
|
91
75
|
action = { method: 'patch', url: endpoint }
|
|
92
76
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
@@ -14,9 +14,7 @@ module Adyen
|
|
|
14
14
|
|
|
15
15
|
# Get the terminal logo
|
|
16
16
|
def get_terminal_logo(terminal_id, headers: {})
|
|
17
|
-
endpoint = '/terminals/{terminalId}/terminalLogos'
|
|
18
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
19
|
-
endpoint = format(endpoint, terminal_id)
|
|
17
|
+
endpoint = build_endpoint('/terminals/{terminalId}/terminalLogos', terminal_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 terminal settings
|
|
26
24
|
def get_terminal_settings(terminal_id, headers: {})
|
|
27
|
-
endpoint = '/terminals/{terminalId}/terminalSettings'
|
|
28
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
29
|
-
endpoint = format(endpoint, terminal_id)
|
|
25
|
+
endpoint = build_endpoint('/terminals/{terminalId}/terminalSettings', terminal_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
|
# Update the logo
|
|
36
32
|
def update_logo(request, terminal_id, headers: {})
|
|
37
|
-
endpoint = '/terminals/{terminalId}/terminalLogos'
|
|
38
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
39
|
-
endpoint = format(endpoint, terminal_id)
|
|
33
|
+
endpoint = build_endpoint('/terminals/{terminalId}/terminalLogos', terminal_id)
|
|
40
34
|
|
|
41
35
|
action = { method: 'patch', url: endpoint }
|
|
42
36
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
@@ -44,9 +38,7 @@ module Adyen
|
|
|
44
38
|
|
|
45
39
|
# Update terminal settings
|
|
46
40
|
def update_terminal_settings(request, terminal_id, headers: {})
|
|
47
|
-
endpoint = '/terminals/{terminalId}/terminalSettings'
|
|
48
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
49
|
-
endpoint = format(endpoint, terminal_id)
|
|
41
|
+
endpoint = build_endpoint('/terminals/{terminalId}/terminalSettings', terminal_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
|
# Get a list of terminals
|
|
16
16
|
def list_terminals(headers: {}, query_params: {})
|
|
17
|
-
endpoint = '/terminals'
|
|
18
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
19
|
-
endpoint = format(endpoint)
|
|
17
|
+
endpoint = build_endpoint('/terminals')
|
|
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
|
# Reassign a terminal
|
|
26
24
|
def reassign_terminal(request, terminal_id, headers: {})
|
|
27
|
-
endpoint = '/terminals/{terminalId}/reassign'
|
|
28
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
29
|
-
endpoint = format(endpoint, terminal_id)
|
|
25
|
+
endpoint = build_endpoint('/terminals/{terminalId}/reassign', terminal_id)
|
|
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
|
# Create a new user
|
|
16
16
|
def create_new_user(request, company_id, headers: {})
|
|
17
|
-
endpoint = '/companies/{companyId}/users'
|
|
18
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
19
|
-
endpoint = format(endpoint, company_id)
|
|
17
|
+
endpoint = build_endpoint('/companies/{companyId}/users', company_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
|
# Get user details
|
|
26
24
|
def get_user_details(company_id, user_id, headers: {})
|
|
27
|
-
endpoint = '/companies/{companyId}/users/{userId}'
|
|
28
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
29
|
-
endpoint = format(endpoint, company_id, user_id)
|
|
25
|
+
endpoint = build_endpoint('/companies/{companyId}/users/{userId}', company_id, user_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 a list of users
|
|
36
32
|
def list_users(company_id, headers: {}, query_params: {})
|
|
37
|
-
endpoint = '/companies/{companyId}/users'
|
|
38
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
39
|
-
endpoint = format(endpoint, company_id)
|
|
33
|
+
endpoint = build_endpoint('/companies/{companyId}/users', company_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
|
# Update user details
|
|
46
40
|
def update_user_details(request, company_id, user_id, headers: {})
|
|
47
|
-
endpoint = '/companies/{companyId}/users/{userId}'
|
|
48
|
-
endpoint = endpoint.gsub(%r{^/}, '')
|
|
49
|
-
endpoint = format(endpoint, company_id, user_id)
|
|
41
|
+
endpoint = build_endpoint('/companies/{companyId}/users/{userId}', company_id, user_id)
|
|
50
42
|
|
|
51
43
|
action = { method: 'patch', url: endpoint }
|
|
52
44
|
@client.call_adyen_api(@service, action, request, headers, @version)
|