adyen-ruby-api-library 7.0.0 → 7.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/CODEOWNERS +1 -1
- data/.github/release.yml +18 -0
- data/.github/workflows/gh_release.yml +16 -0
- data/.github/workflows/release_request.yml +15 -0
- data/.github/workflows/ruby.yml +1 -1
- data/.github/workflows/services.yml +28 -0
- data/.rubocop.yml +8 -0
- data/Gemfile +7 -7
- data/Makefile +14 -10
- data/README.md +13 -10
- data/Rakefile +3 -3
- data/adyen-ruby-api-library.gemspec +6 -3
- data/bin/console +2 -2
- data/lib/adyen/client.rb +96 -76
- data/lib/adyen/errors.rb +23 -18
- data/lib/adyen/hash_with_accessors.rb +12 -7
- data/lib/adyen/services/balanceControlService.rb +7 -14
- data/lib/adyen/services/balancePlatform/account_holders_api.rb +22 -38
- data/lib/adyen/services/balancePlatform/balance_accounts_api.rb +48 -79
- data/lib/adyen/services/balancePlatform/bank_account_validation_api.rb +6 -13
- data/lib/adyen/services/balancePlatform/grant_accounts_api.rb +6 -13
- data/lib/adyen/services/balancePlatform/grant_offers_api.rb +12 -22
- data/lib/adyen/services/balancePlatform/payment_instrument_groups_api.rb +16 -29
- data/lib/adyen/services/balancePlatform/payment_instruments_api.rb +26 -45
- data/lib/adyen/services/balancePlatform/platform_api.rb +12 -22
- data/lib/adyen/services/balancePlatform/transaction_rules_api.rb +21 -37
- data/lib/adyen/services/balancePlatform.rb +38 -40
- data/lib/adyen/services/binLookup.rb +12 -22
- data/lib/adyen/services/checkout/classic_checkout_sdk_api.rb +11 -21
- data/lib/adyen/services/checkout/modifications_api.rb +31 -53
- data/lib/adyen/services/checkout/orders_api.rb +16 -29
- data/lib/adyen/services/checkout/payment_links_api.rb +16 -29
- data/lib/adyen/services/checkout/payments_api.rb +40 -53
- data/lib/adyen/services/checkout/recurring_api.rb +13 -23
- data/lib/adyen/services/checkout/utility_api.rb +11 -21
- data/lib/adyen/services/checkout.rb +32 -34
- data/lib/adyen/services/dataProtection.rb +7 -14
- data/lib/adyen/services/dispute.rb +6 -5
- data/lib/adyen/services/legalEntityManagement/business_lines_api.rb +21 -37
- data/lib/adyen/services/legalEntityManagement/documents_api.rb +21 -37
- data/lib/adyen/services/legalEntityManagement/hosted_onboarding_api.rb +16 -29
- data/lib/adyen/services/legalEntityManagement/legal_entities_api.rb +26 -45
- data/lib/adyen/services/legalEntityManagement/pci_questionnaires_api.rb +21 -37
- data/lib/adyen/services/legalEntityManagement/terms_of_service_api.rb +25 -29
- data/lib/adyen/services/legalEntityManagement/transfer_instruments_api.rb +21 -37
- data/lib/adyen/services/legalEntityManagement.rb +32 -34
- data/lib/adyen/services/management/account_company_level_api.rb +18 -31
- data/lib/adyen/services/management/account_merchant_level_api.rb +22 -38
- data/lib/adyen/services/management/account_store_level_api.rb +43 -71
- data/lib/adyen/services/management/allowed_origins_company_level_api.rb +21 -37
- data/lib/adyen/services/management/allowed_origins_merchant_level_api.rb +21 -37
- data/lib/adyen/services/management/api_credentials_company_level_api.rb +22 -38
- data/lib/adyen/services/management/api_credentials_merchant_level_api.rb +22 -38
- data/lib/adyen/services/management/api_key_company_level_api.rb +6 -13
- data/lib/adyen/services/management/api_key_merchant_level_api.rb +6 -13
- data/lib/adyen/services/management/client_key_company_level_api.rb +6 -13
- data/lib/adyen/services/management/client_key_merchant_level_api.rb +6 -13
- data/lib/adyen/services/management/my_api_credential_api.rb +26 -45
- data/lib/adyen/services/management/payment_methods_merchant_level_api.rb +32 -54
- data/lib/adyen/services/management/payout_settings_merchant_level_api.rb +26 -45
- data/lib/adyen/services/management/split_configuration_merchant_level_api.rb +92 -0
- data/lib/adyen/services/management/terminal_actions_company_level_api.rb +24 -40
- data/lib/adyen/services/management/terminal_actions_terminal_level_api.rb +6 -13
- data/lib/adyen/services/management/terminal_orders_company_level_api.rb +55 -89
- data/lib/adyen/services/management/terminal_orders_merchant_level_api.rb +55 -89
- data/lib/adyen/services/management/terminal_settings_company_level_api.rb +23 -39
- data/lib/adyen/services/management/terminal_settings_merchant_level_api.rb +23 -39
- data/lib/adyen/services/management/terminal_settings_store_level_api.rb +45 -73
- data/lib/adyen/services/management/terminal_settings_terminal_level_api.rb +21 -37
- data/lib/adyen/services/management/terminals_terminal_level_api.rb +7 -14
- data/lib/adyen/services/management/users_company_level_api.rb +22 -38
- data/lib/adyen/services/management/users_merchant_level_api.rb +22 -38
- data/lib/adyen/services/management/webhooks_company_level_api.rb +37 -62
- data/lib/adyen/services/management/webhooks_merchant_level_api.rb +37 -62
- data/lib/adyen/services/management.rb +99 -96
- data/lib/adyen/services/marketpay.rb +42 -36
- data/lib/adyen/services/payment/general_api.rb +56 -0
- data/lib/adyen/services/payment/modifications_api.rb +83 -0
- data/lib/adyen/services/payment.rb +10 -158
- data/lib/adyen/services/payout/initialization_api.rb +16 -29
- data/lib/adyen/services/payout/instant_payouts_api.rb +6 -13
- data/lib/adyen/services/payout/reviewing_api.rb +11 -21
- data/lib/adyen/services/payout.rb +19 -21
- data/lib/adyen/services/posTerminalManagement.rb +27 -46
- data/lib/adyen/services/recurring.rb +32 -54
- data/lib/adyen/services/service.rb +5 -4
- data/lib/adyen/services/storedValue.rb +32 -54
- data/lib/adyen/services/transfers/capital_api.rb +38 -0
- data/lib/adyen/services/transfers/transactions_api.rb +12 -22
- data/lib/adyen/services/transfers/transfers_api.rb +6 -13
- data/lib/adyen/services/transfers.rb +20 -17
- data/lib/adyen/utils/hmac_validator.rb +9 -9
- data/lib/adyen/version.rb +3 -3
- data/lib/adyen-ruby-api-library.rb +21 -21
- data/spec/account_spec.rb +20 -20
- data/spec/balance_control_spec.rb +28 -29
- data/spec/balance_platform_spec.rb +108 -102
- data/spec/bin_lookup_spec.rb +50 -50
- data/spec/checkout_spec.rb +581 -515
- data/spec/client_spec.rb +118 -71
- data/spec/data_protection_spec.rb +4 -4
- data/spec/dispute_spec.rb +7 -7
- data/spec/errors_spec.rb +37 -17
- data/spec/fund_spec.rb +10 -10
- data/spec/hash_with_accessors_spec.rb +18 -8
- data/spec/hop_spec.rb +4 -4
- data/spec/lem_spec.rb +44 -49
- data/spec/management_spec.rb +46 -48
- data/spec/notification_spec.rb +9 -9
- data/spec/payments_spec.rb +31 -32
- data/spec/payouts_spec.rb +29 -32
- data/spec/pos_terminal_management_spec.rb +30 -32
- data/spec/recurring_spec.rb +8 -8
- data/spec/service_spec.rb +4 -0
- data/spec/spec_helper.rb +37 -35
- data/spec/stored_value_spec.rb +28 -27
- data/spec/transfers_spec.rb +48 -47
- data/spec/utils/hmac_validator_spec.rb +15 -14
- data/templates/api-single.mustache +13 -15
- data/templates/api-small.mustache +8 -15
- data/templates/api.mustache +7 -14
- metadata +27 -18
- data/.github/dependabot.yml +0 -8
- /data/spec/mocks/responses/Webhooks/{backslash_notification.json → backslash_webhook.json} +0 -0
- /data/spec/mocks/responses/Webhooks/{colon_notification.json → colon_webhook.json} +0 -0
- /data/spec/mocks/responses/Webhooks/{forwardslash_notification.json → forwardslash_webhook.json} +0 -0
- /data/spec/mocks/responses/Webhooks/{mixed_notification.json → mixed_webhook.json} +0 -0
@@ -1,73 +1,54 @@
|
|
1
1
|
require_relative '../service'
|
2
2
|
module Adyen
|
3
|
-
|
4
|
-
|
5
3
|
class MyAPICredentialApi < Service
|
6
4
|
attr_accessor :service, :version
|
7
5
|
|
8
6
|
def initialize(client, version = DEFAULT_VERSION)
|
9
|
-
|
10
|
-
@client = client
|
11
|
-
@version = version
|
7
|
+
super(client, version, 'Management')
|
12
8
|
end
|
13
9
|
|
14
|
-
def remove_allowed_origin(
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
endpoint = "/me/allowedOrigins/{originId}".gsub(/{.+?}/, '%s')
|
19
|
-
endpoint = endpoint.gsub(/^\//, "")
|
20
|
-
endpoint = endpoint % [originId]
|
10
|
+
def remove_allowed_origin(origin_id, headers: {})
|
11
|
+
endpoint = '/me/allowedOrigins/{originId}'.gsub(/{.+?}/, '%s')
|
12
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
13
|
+
endpoint = format(endpoint, origin_id)
|
21
14
|
|
22
|
-
action = { method:
|
15
|
+
action = { method: 'delete', url: endpoint }
|
23
16
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
24
17
|
end
|
25
18
|
|
26
|
-
def get_api_credential_details(headers: {}
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
endpoint = "/me".gsub(/{.+?}/, '%s')
|
31
|
-
endpoint = endpoint.gsub(/^\//, "")
|
32
|
-
endpoint = endpoint % []
|
19
|
+
def get_api_credential_details(headers: {})
|
20
|
+
endpoint = '/me'.gsub(/{.+?}/, '%s')
|
21
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
22
|
+
endpoint = format(endpoint)
|
33
23
|
|
34
|
-
action = { method:
|
24
|
+
action = { method: 'get', url: endpoint }
|
35
25
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
36
26
|
end
|
37
27
|
|
38
|
-
def get_allowed_origins(headers: {}
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
endpoint = "/me/allowedOrigins".gsub(/{.+?}/, '%s')
|
43
|
-
endpoint = endpoint.gsub(/^\//, "")
|
44
|
-
endpoint = endpoint % []
|
28
|
+
def get_allowed_origins(headers: {})
|
29
|
+
endpoint = '/me/allowedOrigins'.gsub(/{.+?}/, '%s')
|
30
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
31
|
+
endpoint = format(endpoint)
|
45
32
|
|
46
|
-
action = { method:
|
33
|
+
action = { method: 'get', url: endpoint }
|
47
34
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
48
35
|
end
|
49
36
|
|
50
|
-
def get_allowed_origin_details(
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
endpoint = "/me/allowedOrigins/{originId}".gsub(/{.+?}/, '%s')
|
55
|
-
endpoint = endpoint.gsub(/^\//, "")
|
56
|
-
endpoint = endpoint % [originId]
|
37
|
+
def get_allowed_origin_details(origin_id, headers: {})
|
38
|
+
endpoint = '/me/allowedOrigins/{originId}'.gsub(/{.+?}/, '%s')
|
39
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
40
|
+
endpoint = format(endpoint, origin_id)
|
57
41
|
|
58
|
-
action = { method:
|
42
|
+
action = { method: 'get', url: endpoint }
|
59
43
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
60
44
|
end
|
61
45
|
|
62
|
-
def add_allowed_origin(request, headers: {}
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
endpoint = "/me/allowedOrigins".gsub(/{.+?}/, '%s')
|
67
|
-
endpoint = endpoint.gsub(/^\//, "")
|
68
|
-
endpoint = endpoint % []
|
46
|
+
def add_allowed_origin(request, headers: {})
|
47
|
+
endpoint = '/me/allowedOrigins'.gsub(/{.+?}/, '%s')
|
48
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
49
|
+
endpoint = format(endpoint)
|
69
50
|
|
70
|
-
action = { method:
|
51
|
+
action = { method: 'post', url: endpoint }
|
71
52
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
72
53
|
end
|
73
54
|
|
@@ -1,85 +1,63 @@
|
|
1
1
|
require_relative '../service'
|
2
2
|
module Adyen
|
3
|
-
|
4
|
-
|
5
3
|
class PaymentMethodsMerchantLevelApi < Service
|
6
4
|
attr_accessor :service, :version
|
7
5
|
|
8
6
|
def initialize(client, version = DEFAULT_VERSION)
|
9
|
-
|
10
|
-
@client = client
|
11
|
-
@version = version
|
7
|
+
super(client, version, 'Management')
|
12
8
|
end
|
13
9
|
|
14
|
-
def get_all_payment_methods(
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
endpoint
|
19
|
-
|
20
|
-
endpoint = endpoint % [merchantId]
|
21
|
-
endpoint = endpoint + create_query_string(queryParams)
|
22
|
-
action = { method: "get", url: endpoint}
|
10
|
+
def get_all_payment_methods(merchant_id, headers: {}, query_params: {})
|
11
|
+
endpoint = '/merchants/{merchantId}/paymentMethodSettings'.gsub(/{.+?}/, '%s')
|
12
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
13
|
+
endpoint = format(endpoint, merchant_id)
|
14
|
+
endpoint += create_query_string(query_params)
|
15
|
+
action = { method: 'get', url: endpoint }
|
23
16
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
24
17
|
end
|
25
18
|
|
26
|
-
def get_payment_method_details(
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
endpoint = "/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}".gsub(/{.+?}/, '%s')
|
31
|
-
endpoint = endpoint.gsub(/^\//, "")
|
32
|
-
endpoint = endpoint % [merchantId,paymentMethodId]
|
19
|
+
def get_payment_method_details(merchant_id, payment_method_id, headers: {})
|
20
|
+
endpoint = '/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}'.gsub(/{.+?}/, '%s')
|
21
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
22
|
+
endpoint = format(endpoint, merchant_id, payment_method_id)
|
33
23
|
|
34
|
-
action = { method:
|
24
|
+
action = { method: 'get', url: endpoint }
|
35
25
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
36
26
|
end
|
37
27
|
|
38
|
-
def get_apple_pay_domains(
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
endpoint = "/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}/getApplePayDomains".gsub(/{.+?}/, '%s')
|
43
|
-
endpoint = endpoint.gsub(/^\//, "")
|
44
|
-
endpoint = endpoint % [merchantId,paymentMethodId]
|
28
|
+
def get_apple_pay_domains(merchant_id, payment_method_id, headers: {})
|
29
|
+
endpoint = '/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}/getApplePayDomains'.gsub(/{.+?}/, '%s')
|
30
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
31
|
+
endpoint = format(endpoint, merchant_id, payment_method_id)
|
45
32
|
|
46
|
-
action = { method:
|
33
|
+
action = { method: 'get', url: endpoint }
|
47
34
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
48
35
|
end
|
49
36
|
|
50
|
-
def update_payment_method(request,
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
endpoint = "/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}".gsub(/{.+?}/, '%s')
|
55
|
-
endpoint = endpoint.gsub(/^\//, "")
|
56
|
-
endpoint = endpoint % [merchantId,paymentMethodId]
|
37
|
+
def update_payment_method(request, merchant_id, payment_method_id, headers: {})
|
38
|
+
endpoint = '/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}'.gsub(/{.+?}/, '%s')
|
39
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
40
|
+
endpoint = format(endpoint, merchant_id, payment_method_id)
|
57
41
|
|
58
|
-
action = { method:
|
42
|
+
action = { method: 'patch', url: endpoint }
|
59
43
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
60
44
|
end
|
61
45
|
|
62
|
-
def request_payment_method(request,
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
endpoint = "/merchants/{merchantId}/paymentMethodSettings".gsub(/{.+?}/, '%s')
|
67
|
-
endpoint = endpoint.gsub(/^\//, "")
|
68
|
-
endpoint = endpoint % [merchantId]
|
46
|
+
def request_payment_method(request, merchant_id, headers: {})
|
47
|
+
endpoint = '/merchants/{merchantId}/paymentMethodSettings'.gsub(/{.+?}/, '%s')
|
48
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
49
|
+
endpoint = format(endpoint, merchant_id)
|
69
50
|
|
70
|
-
action = { method:
|
51
|
+
action = { method: 'post', url: endpoint }
|
71
52
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
72
53
|
end
|
73
54
|
|
74
|
-
def add_apple_pay_domain(request,
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
endpoint = "/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}/addApplePayDomains".gsub(/{.+?}/, '%s')
|
79
|
-
endpoint = endpoint.gsub(/^\//, "")
|
80
|
-
endpoint = endpoint % [merchantId,paymentMethodId]
|
55
|
+
def add_apple_pay_domain(request, merchant_id, payment_method_id, headers: {})
|
56
|
+
endpoint = '/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}/addApplePayDomains'.gsub(/{.+?}/, '%s')
|
57
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
58
|
+
endpoint = format(endpoint, merchant_id, payment_method_id)
|
81
59
|
|
82
|
-
action = { method:
|
60
|
+
action = { method: 'post', url: endpoint }
|
83
61
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
84
62
|
end
|
85
63
|
|
@@ -1,73 +1,54 @@
|
|
1
1
|
require_relative '../service'
|
2
2
|
module Adyen
|
3
|
-
|
4
|
-
|
5
3
|
class PayoutSettingsMerchantLevelApi < Service
|
6
4
|
attr_accessor :service, :version
|
7
5
|
|
8
6
|
def initialize(client, version = DEFAULT_VERSION)
|
9
|
-
|
10
|
-
@client = client
|
11
|
-
@version = version
|
7
|
+
super(client, version, 'Management')
|
12
8
|
end
|
13
9
|
|
14
|
-
def delete_payout_setting(
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
endpoint = "/merchants/{merchantId}/payoutSettings/{payoutSettingsId}".gsub(/{.+?}/, '%s')
|
19
|
-
endpoint = endpoint.gsub(/^\//, "")
|
20
|
-
endpoint = endpoint % [merchantId,payoutSettingsId]
|
10
|
+
def delete_payout_setting(merchant_id, payout_settings_id, headers: {})
|
11
|
+
endpoint = '/merchants/{merchantId}/payoutSettings/{payoutSettingsId}'.gsub(/{.+?}/, '%s')
|
12
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
13
|
+
endpoint = format(endpoint, merchant_id, payout_settings_id)
|
21
14
|
|
22
|
-
action = { method:
|
15
|
+
action = { method: 'delete', url: endpoint }
|
23
16
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
24
17
|
end
|
25
18
|
|
26
|
-
def list_payout_settings(
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
endpoint = "/merchants/{merchantId}/payoutSettings".gsub(/{.+?}/, '%s')
|
31
|
-
endpoint = endpoint.gsub(/^\//, "")
|
32
|
-
endpoint = endpoint % [merchantId]
|
19
|
+
def list_payout_settings(merchant_id, headers: {})
|
20
|
+
endpoint = '/merchants/{merchantId}/payoutSettings'.gsub(/{.+?}/, '%s')
|
21
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
22
|
+
endpoint = format(endpoint, merchant_id)
|
33
23
|
|
34
|
-
action = { method:
|
24
|
+
action = { method: 'get', url: endpoint }
|
35
25
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
36
26
|
end
|
37
27
|
|
38
|
-
def get_payout_setting(
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
endpoint = "/merchants/{merchantId}/payoutSettings/{payoutSettingsId}".gsub(/{.+?}/, '%s')
|
43
|
-
endpoint = endpoint.gsub(/^\//, "")
|
44
|
-
endpoint = endpoint % [merchantId,payoutSettingsId]
|
28
|
+
def get_payout_setting(merchant_id, payout_settings_id, headers: {})
|
29
|
+
endpoint = '/merchants/{merchantId}/payoutSettings/{payoutSettingsId}'.gsub(/{.+?}/, '%s')
|
30
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
31
|
+
endpoint = format(endpoint, merchant_id, payout_settings_id)
|
45
32
|
|
46
|
-
action = { method:
|
33
|
+
action = { method: 'get', url: endpoint }
|
47
34
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
48
35
|
end
|
49
36
|
|
50
|
-
def update_payout_setting(request,
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
endpoint = "/merchants/{merchantId}/payoutSettings/{payoutSettingsId}".gsub(/{.+?}/, '%s')
|
55
|
-
endpoint = endpoint.gsub(/^\//, "")
|
56
|
-
endpoint = endpoint % [merchantId,payoutSettingsId]
|
37
|
+
def update_payout_setting(request, merchant_id, payout_settings_id, headers: {})
|
38
|
+
endpoint = '/merchants/{merchantId}/payoutSettings/{payoutSettingsId}'.gsub(/{.+?}/, '%s')
|
39
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
40
|
+
endpoint = format(endpoint, merchant_id, payout_settings_id)
|
57
41
|
|
58
|
-
action = { method:
|
42
|
+
action = { method: 'patch', url: endpoint }
|
59
43
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
60
44
|
end
|
61
45
|
|
62
|
-
def add_payout_setting(request,
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
endpoint = "/merchants/{merchantId}/payoutSettings".gsub(/{.+?}/, '%s')
|
67
|
-
endpoint = endpoint.gsub(/^\//, "")
|
68
|
-
endpoint = endpoint % [merchantId]
|
46
|
+
def add_payout_setting(request, merchant_id, headers: {})
|
47
|
+
endpoint = '/merchants/{merchantId}/payoutSettings'.gsub(/{.+?}/, '%s')
|
48
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
49
|
+
endpoint = format(endpoint, merchant_id)
|
69
50
|
|
70
|
-
action = { method:
|
51
|
+
action = { method: 'post', url: endpoint }
|
71
52
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
72
53
|
end
|
73
54
|
|
@@ -0,0 +1,92 @@
|
|
1
|
+
require_relative '../service'
|
2
|
+
module Adyen
|
3
|
+
class SplitConfigurationMerchantLevelApi < Service
|
4
|
+
attr_accessor :service, :version
|
5
|
+
|
6
|
+
def initialize(client, version = DEFAULT_VERSION)
|
7
|
+
super(client, version, 'Management')
|
8
|
+
end
|
9
|
+
|
10
|
+
def delete_split_configuration(merchant_id, split_configuration_id, headers: {})
|
11
|
+
endpoint = '/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}'.gsub(/{.+?}/, '%s')
|
12
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
13
|
+
endpoint = format(endpoint, merchant_id, split_configuration_id)
|
14
|
+
|
15
|
+
action = { method: 'delete', url: endpoint }
|
16
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
17
|
+
end
|
18
|
+
|
19
|
+
def delete_split_configuration_rule(merchant_id, split_configuration_id, rule_id, headers: {})
|
20
|
+
endpoint = '/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}/rules/{ruleId}'.gsub(/{.+?}/, '%s')
|
21
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
22
|
+
endpoint = format(endpoint, merchant_id, split_configuration_id, rule_id)
|
23
|
+
|
24
|
+
action = { method: 'delete', url: endpoint }
|
25
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
26
|
+
end
|
27
|
+
|
28
|
+
def list_split_configurations(merchant_id, headers: {})
|
29
|
+
endpoint = '/merchants/{merchantId}/splitConfigurations'.gsub(/{.+?}/, '%s')
|
30
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
31
|
+
endpoint = format(endpoint, merchant_id)
|
32
|
+
|
33
|
+
action = { method: 'get', url: endpoint }
|
34
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
35
|
+
end
|
36
|
+
|
37
|
+
def get_split_configuration(merchant_id, split_configuration_id, headers: {})
|
38
|
+
endpoint = '/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}'.gsub(/{.+?}/, '%s')
|
39
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
40
|
+
endpoint = format(endpoint, merchant_id, split_configuration_id)
|
41
|
+
|
42
|
+
action = { method: 'get', url: endpoint }
|
43
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
44
|
+
end
|
45
|
+
|
46
|
+
def update_split_configuration_description(request, merchant_id, split_configuration_id, headers: {})
|
47
|
+
endpoint = '/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}'.gsub(/{.+?}/, '%s')
|
48
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
49
|
+
endpoint = format(endpoint, merchant_id, split_configuration_id)
|
50
|
+
|
51
|
+
action = { method: 'patch', url: endpoint }
|
52
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
53
|
+
end
|
54
|
+
|
55
|
+
def update_split_conditions(request, merchant_id, split_configuration_id, rule_id, headers: {})
|
56
|
+
endpoint = '/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}/rules/{ruleId}'.gsub(/{.+?}/, '%s')
|
57
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
58
|
+
endpoint = format(endpoint, merchant_id, split_configuration_id, rule_id)
|
59
|
+
|
60
|
+
action = { method: 'patch', url: endpoint }
|
61
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
62
|
+
end
|
63
|
+
|
64
|
+
def update_split_logic(request, merchant_id, split_configuration_id, rule_id, split_logic_id, headers: {})
|
65
|
+
endpoint = '/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}/rules/{ruleId}/splitLogic/{splitLogicId}'.gsub(/{.+?}/, '%s')
|
66
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
67
|
+
endpoint = format(endpoint, merchant_id, split_configuration_id, rule_id, split_logic_id)
|
68
|
+
|
69
|
+
action = { method: 'patch', url: endpoint }
|
70
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
71
|
+
end
|
72
|
+
|
73
|
+
def create_split_configuration(request, merchant_id, headers: {})
|
74
|
+
endpoint = '/merchants/{merchantId}/splitConfigurations'.gsub(/{.+?}/, '%s')
|
75
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
76
|
+
endpoint = format(endpoint, merchant_id)
|
77
|
+
|
78
|
+
action = { method: 'post', url: endpoint }
|
79
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
80
|
+
end
|
81
|
+
|
82
|
+
def create_rule(request, merchant_id, split_configuration_id, headers: {})
|
83
|
+
endpoint = '/merchants/{merchantId}/splitConfigurations/{splitConfigurationId}'.gsub(/{.+?}/, '%s')
|
84
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
85
|
+
endpoint = format(endpoint, merchant_id, split_configuration_id)
|
86
|
+
|
87
|
+
action = { method: 'post', url: endpoint }
|
88
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
89
|
+
end
|
90
|
+
|
91
|
+
end
|
92
|
+
end
|
@@ -1,61 +1,45 @@
|
|
1
1
|
require_relative '../service'
|
2
2
|
module Adyen
|
3
|
-
|
4
|
-
|
5
3
|
class TerminalActionsCompanyLevelApi < Service
|
6
4
|
attr_accessor :service, :version
|
7
5
|
|
8
6
|
def initialize(client, version = DEFAULT_VERSION)
|
9
|
-
|
10
|
-
@client = client
|
11
|
-
@version = version
|
7
|
+
super(client, version, 'Management')
|
12
8
|
end
|
13
9
|
|
14
|
-
def list_android_apps(
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
endpoint
|
19
|
-
|
20
|
-
endpoint = endpoint % [companyId]
|
21
|
-
endpoint = endpoint + create_query_string(queryParams)
|
22
|
-
action = { method: "get", url: endpoint}
|
10
|
+
def list_android_apps(company_id, headers: {}, query_params: {})
|
11
|
+
endpoint = '/companies/{companyId}/androidApps'.gsub(/{.+?}/, '%s')
|
12
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
13
|
+
endpoint = format(endpoint, company_id)
|
14
|
+
endpoint += create_query_string(query_params)
|
15
|
+
action = { method: 'get', url: endpoint }
|
23
16
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
24
17
|
end
|
25
18
|
|
26
|
-
def list_android_certificates(
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
endpoint
|
31
|
-
|
32
|
-
endpoint = endpoint % [companyId]
|
33
|
-
endpoint = endpoint + create_query_string(queryParams)
|
34
|
-
action = { method: "get", url: endpoint}
|
19
|
+
def list_android_certificates(company_id, headers: {}, query_params: {})
|
20
|
+
endpoint = '/companies/{companyId}/androidCertificates'.gsub(/{.+?}/, '%s')
|
21
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
22
|
+
endpoint = format(endpoint, company_id)
|
23
|
+
endpoint += create_query_string(query_params)
|
24
|
+
action = { method: 'get', url: endpoint }
|
35
25
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
36
26
|
end
|
37
27
|
|
38
|
-
def list_terminal_actions(
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
endpoint
|
43
|
-
|
44
|
-
endpoint = endpoint % [companyId]
|
45
|
-
endpoint = endpoint + create_query_string(queryParams)
|
46
|
-
action = { method: "get", url: endpoint}
|
28
|
+
def list_terminal_actions(company_id, headers: {}, query_params: {})
|
29
|
+
endpoint = '/companies/{companyId}/terminalActions'.gsub(/{.+?}/, '%s')
|
30
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
31
|
+
endpoint = format(endpoint, company_id)
|
32
|
+
endpoint += create_query_string(query_params)
|
33
|
+
action = { method: 'get', url: endpoint }
|
47
34
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
48
35
|
end
|
49
36
|
|
50
|
-
def get_terminal_action(
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
endpoint = "/companies/{companyId}/terminalActions/{actionId}".gsub(/{.+?}/, '%s')
|
55
|
-
endpoint = endpoint.gsub(/^\//, "")
|
56
|
-
endpoint = endpoint % [companyId,actionId]
|
37
|
+
def get_terminal_action(company_id, action_id, headers: {})
|
38
|
+
endpoint = '/companies/{companyId}/terminalActions/{actionId}'.gsub(/{.+?}/, '%s')
|
39
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
40
|
+
endpoint = format(endpoint, company_id, action_id)
|
57
41
|
|
58
|
-
action = { method:
|
42
|
+
action = { method: 'get', url: endpoint }
|
59
43
|
@client.call_adyen_api(@service, action, {}, headers, @version)
|
60
44
|
end
|
61
45
|
|
@@ -1,25 +1,18 @@
|
|
1
1
|
require_relative '../service'
|
2
2
|
module Adyen
|
3
|
-
|
4
|
-
|
5
3
|
class TerminalActionsTerminalLevelApi < Service
|
6
4
|
attr_accessor :service, :version
|
7
5
|
|
8
6
|
def initialize(client, version = DEFAULT_VERSION)
|
9
|
-
|
10
|
-
@client = client
|
11
|
-
@version = version
|
7
|
+
super(client, version, 'Management')
|
12
8
|
end
|
13
9
|
|
14
|
-
def create_terminal_action(request, headers: {}
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
endpoint = "/terminals/scheduleActions".gsub(/{.+?}/, '%s')
|
19
|
-
endpoint = endpoint.gsub(/^\//, "")
|
20
|
-
endpoint = endpoint % []
|
10
|
+
def create_terminal_action(request, headers: {})
|
11
|
+
endpoint = '/terminals/scheduleActions'.gsub(/{.+?}/, '%s')
|
12
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
13
|
+
endpoint = format(endpoint)
|
21
14
|
|
22
|
-
action = { method:
|
15
|
+
action = { method: 'post', url: endpoint }
|
23
16
|
@client.call_adyen_api(@service, action, request, headers, @version)
|
24
17
|
end
|
25
18
|
|