adyen-ruby-api-library 6.3.0 → 7.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -0
- data/Makefile +72 -0
- data/README.md +20 -18
- data/lib/adyen/client.rb +68 -36
- data/lib/adyen/services/balanceControlService.rb +28 -0
- data/lib/adyen/services/balancePlatform/account_holders_api.rb +63 -0
- data/lib/adyen/services/balancePlatform/balance_accounts_api.rb +123 -0
- data/lib/adyen/services/balancePlatform/bank_account_validation_api.rb +27 -0
- data/lib/adyen/services/balancePlatform/grant_accounts_api.rb +27 -0
- data/lib/adyen/services/balancePlatform/grant_offers_api.rb +39 -0
- data/lib/adyen/services/balancePlatform/payment_instrument_groups_api.rb +51 -0
- data/lib/adyen/services/balancePlatform/payment_instruments_api.rb +75 -0
- data/lib/adyen/services/balancePlatform/platform_api.rb +39 -0
- data/lib/adyen/services/balancePlatform/transaction_rules_api.rb +63 -0
- data/lib/adyen/services/balancePlatform.rb +61 -0
- data/lib/adyen/services/binLookup.rb +40 -0
- data/lib/adyen/services/checkout/classic_checkout_sdk_api.rb +39 -0
- data/lib/adyen/services/checkout/modifications_api.rb +87 -0
- data/lib/adyen/services/checkout/orders_api.rb +51 -0
- data/lib/adyen/services/checkout/payment_links_api.rb +51 -0
- data/lib/adyen/services/checkout/payments_api.rb +87 -0
- data/lib/adyen/services/checkout/recurring_api.rb +39 -0
- data/lib/adyen/services/checkout/utility_api.rb +39 -0
- data/lib/adyen/services/checkout.rb +38 -211
- data/lib/adyen/services/dataProtection.rb +28 -0
- data/lib/adyen/services/legalEntityManagement/business_lines_api.rb +63 -0
- data/lib/adyen/services/legalEntityManagement/documents_api.rb +63 -0
- data/lib/adyen/services/legalEntityManagement/hosted_onboarding_api.rb +51 -0
- data/lib/adyen/services/legalEntityManagement/legal_entities_api.rb +75 -0
- data/lib/adyen/services/legalEntityManagement/pci_questionnaires_api.rb +63 -0
- data/lib/adyen/services/legalEntityManagement/terms_of_service_api.rb +51 -0
- data/lib/adyen/services/legalEntityManagement/transfer_instruments_api.rb +63 -0
- data/lib/adyen/services/legalEntityManagement.rb +51 -0
- data/lib/adyen/services/management/account_company_level_api.rb +51 -0
- data/lib/adyen/services/management/account_merchant_level_api.rb +63 -0
- data/lib/adyen/services/management/account_store_level_api.rb +111 -0
- data/lib/adyen/services/management/allowed_origins_company_level_api.rb +63 -0
- data/lib/adyen/services/management/allowed_origins_merchant_level_api.rb +63 -0
- data/lib/adyen/services/management/api_credentials_company_level_api.rb +63 -0
- data/lib/adyen/services/management/api_credentials_merchant_level_api.rb +63 -0
- data/lib/adyen/services/management/api_key_company_level_api.rb +27 -0
- data/lib/adyen/services/management/api_key_merchant_level_api.rb +27 -0
- data/lib/adyen/services/management/client_key_company_level_api.rb +27 -0
- data/lib/adyen/services/management/client_key_merchant_level_api.rb +27 -0
- data/lib/adyen/services/management/my_api_credential_api.rb +75 -0
- data/lib/adyen/services/management/payment_methods_merchant_level_api.rb +87 -0
- data/lib/adyen/services/management/payout_settings_merchant_level_api.rb +75 -0
- data/lib/adyen/services/management/terminal_actions_company_level_api.rb +63 -0
- data/lib/adyen/services/management/terminal_actions_terminal_level_api.rb +27 -0
- data/lib/adyen/services/management/terminal_orders_company_level_api.rb +135 -0
- data/lib/adyen/services/management/terminal_orders_merchant_level_api.rb +135 -0
- data/lib/adyen/services/management/terminal_settings_company_level_api.rb +63 -0
- data/lib/adyen/services/management/terminal_settings_merchant_level_api.rb +63 -0
- data/lib/adyen/services/management/terminal_settings_store_level_api.rb +111 -0
- data/lib/adyen/services/management/terminal_settings_terminal_level_api.rb +63 -0
- data/lib/adyen/services/management/terminals_terminal_level_api.rb +27 -0
- data/lib/adyen/services/management/users_company_level_api.rb +63 -0
- data/lib/adyen/services/management/users_merchant_level_api.rb +63 -0
- data/lib/adyen/services/management/webhooks_company_level_api.rb +99 -0
- data/lib/adyen/services/management/webhooks_merchant_level_api.rb +99 -0
- data/lib/adyen/services/management.rb +151 -0
- data/lib/adyen/services/payment.rb +172 -0
- data/lib/adyen/services/payout/initialization_api.rb +51 -0
- data/lib/adyen/services/payout/instant_payouts_api.rb +27 -0
- data/lib/adyen/services/payout/reviewing_api.rb +39 -0
- data/lib/adyen/services/payout.rb +31 -0
- data/lib/adyen/services/posTerminalManagement.rb +76 -0
- data/lib/adyen/services/recurring.rb +81 -13
- data/lib/adyen/services/service.rb +2 -2
- data/lib/adyen/services/storedValue.rb +88 -0
- data/lib/adyen/services/transfers/transactions_api.rb +39 -0
- data/lib/adyen/services/transfers/transfers_api.rb +27 -0
- data/lib/adyen/services/transfers.rb +26 -0
- data/lib/adyen/version.rb +1 -1
- data/lib/adyen-ruby-api-library.rb +11 -5
- data/spec/account_spec.rb +1 -1
- data/spec/balance_control_spec.rb +44 -0
- data/spec/balance_platform_spec.rb +123 -0
- data/spec/bin_lookup_spec.rb +68 -10
- data/spec/checkout_spec.rb +56 -66
- data/spec/client_spec.rb +88 -9
- data/spec/fund_spec.rb +1 -1
- data/spec/hop_spec.rb +1 -1
- data/spec/lem_spec.rb +68 -0
- data/spec/management_spec.rb +68 -0
- data/spec/mocks/requests/BalanceControl/balance_transfer.json +10 -0
- data/spec/mocks/requests/BalancePlatform/create_account_holder.json +5 -0
- data/spec/mocks/requests/BalancePlatform/update_account_holder.json +10 -0
- data/spec/mocks/requests/LegalEntityManagement/create_business_line.json +15 -0
- data/spec/mocks/requests/Management/create_store.json +15 -0
- data/spec/mocks/requests/Recurring/create_permit.json +6 -0
- data/spec/mocks/requests/StoredValue/issue_giftcard.json +12 -0
- data/spec/mocks/requests/Transfers/get_transactions.json +82 -0
- data/spec/mocks/requests/Transfers/make_transfer.json +32 -0
- data/spec/mocks/responses/BalanceControl/balance_transfer.json +14 -0
- data/spec/mocks/responses/BalancePlatform/create_account_holder.json +41 -0
- data/spec/mocks/responses/BalancePlatform/get_balance_account.json +15 -0
- data/spec/mocks/responses/BalancePlatform/update_account_holder.json +16 -0
- data/spec/mocks/responses/LegalEntityManagement/create_business_line.json +17 -0
- data/spec/mocks/responses/Management/create_store.json +23 -0
- data/spec/mocks/responses/Management/get_companies.json +42 -0
- data/spec/mocks/responses/Recurring/create_permit.json +4 -0
- data/spec/mocks/responses/StoredValue/issue_giftcard.json +13 -0
- data/spec/mocks/responses/Transfers/get_transactions.json +82 -0
- data/spec/mocks/responses/Transfers/make_transfer.json +36 -0
- data/spec/notification_spec.rb +1 -1
- data/spec/payments_spec.rb +41 -23
- data/spec/payouts_spec.rb +43 -16
- data/spec/pos_terminal_management_spec.rb +46 -0
- data/spec/recurring_spec.rb +2 -2
- data/spec/spec_helper.rb +0 -10
- data/spec/stored_value_spec.rb +43 -0
- data/spec/transfers_spec.rb +63 -0
- data/templates/api-single.mustache +29 -0
- data/templates/api-small.mustache +37 -0
- data/templates/api.mustache +36 -0
- data/templates/config.yaml +10 -0
- metadata +101 -11
- data/lib/adyen/services/bin_lookup.rb +0 -18
- data/lib/adyen/services/data_protection.rb +0 -17
- data/lib/adyen/services/payments.rb +0 -34
- data/lib/adyen/services/payouts.rb +0 -22
- data/lib/adyen/services/postfmapi.rb +0 -19
- data/spec/mocks/requests/Recurring/store_token.json +0 -15
- data/spec/mocks/responses/Recurring/store_token.json +0 -7
- data/spec/postfmapi_spec.rb +0 -16
@@ -0,0 +1,27 @@
|
|
1
|
+
require_relative '../service'
|
2
|
+
module Adyen
|
3
|
+
|
4
|
+
|
5
|
+
class APIKeyMerchantLevelApi < Service
|
6
|
+
attr_accessor :service, :version
|
7
|
+
|
8
|
+
def initialize(client, version = DEFAULT_VERSION)
|
9
|
+
@service = "Management"
|
10
|
+
@client = client
|
11
|
+
@version = version
|
12
|
+
end
|
13
|
+
|
14
|
+
def generate_new_api_key(merchantId, apiCredentialId, headers: {} )
|
15
|
+
"""
|
16
|
+
Generate new API key
|
17
|
+
"""
|
18
|
+
endpoint = "/merchants/{merchantId}/apiCredentials/{apiCredentialId}/generateApiKey".gsub(/{.+?}/, '%s')
|
19
|
+
endpoint = endpoint.gsub(/^\//, "")
|
20
|
+
endpoint = endpoint % [merchantId,apiCredentialId]
|
21
|
+
|
22
|
+
action = { method: "post", url: endpoint}
|
23
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require_relative '../service'
|
2
|
+
module Adyen
|
3
|
+
|
4
|
+
|
5
|
+
class ClientKeyCompanyLevelApi < Service
|
6
|
+
attr_accessor :service, :version
|
7
|
+
|
8
|
+
def initialize(client, version = DEFAULT_VERSION)
|
9
|
+
@service = "Management"
|
10
|
+
@client = client
|
11
|
+
@version = version
|
12
|
+
end
|
13
|
+
|
14
|
+
def generate_new_client_key(companyId, apiCredentialId, headers: {} )
|
15
|
+
"""
|
16
|
+
Generate new client key
|
17
|
+
"""
|
18
|
+
endpoint = "/companies/{companyId}/apiCredentials/{apiCredentialId}/generateClientKey".gsub(/{.+?}/, '%s')
|
19
|
+
endpoint = endpoint.gsub(/^\//, "")
|
20
|
+
endpoint = endpoint % [companyId,apiCredentialId]
|
21
|
+
|
22
|
+
action = { method: "post", url: endpoint}
|
23
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require_relative '../service'
|
2
|
+
module Adyen
|
3
|
+
|
4
|
+
|
5
|
+
class ClientKeyMerchantLevelApi < Service
|
6
|
+
attr_accessor :service, :version
|
7
|
+
|
8
|
+
def initialize(client, version = DEFAULT_VERSION)
|
9
|
+
@service = "Management"
|
10
|
+
@client = client
|
11
|
+
@version = version
|
12
|
+
end
|
13
|
+
|
14
|
+
def generate_new_client_key(merchantId, apiCredentialId, headers: {} )
|
15
|
+
"""
|
16
|
+
Generate new client key
|
17
|
+
"""
|
18
|
+
endpoint = "/merchants/{merchantId}/apiCredentials/{apiCredentialId}/generateClientKey".gsub(/{.+?}/, '%s')
|
19
|
+
endpoint = endpoint.gsub(/^\//, "")
|
20
|
+
endpoint = endpoint % [merchantId,apiCredentialId]
|
21
|
+
|
22
|
+
action = { method: "post", url: endpoint}
|
23
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
require_relative '../service'
|
2
|
+
module Adyen
|
3
|
+
|
4
|
+
|
5
|
+
class MyAPICredentialApi < Service
|
6
|
+
attr_accessor :service, :version
|
7
|
+
|
8
|
+
def initialize(client, version = DEFAULT_VERSION)
|
9
|
+
@service = "Management"
|
10
|
+
@client = client
|
11
|
+
@version = version
|
12
|
+
end
|
13
|
+
|
14
|
+
def remove_allowed_origin(originId, headers: {} )
|
15
|
+
"""
|
16
|
+
Remove allowed origin
|
17
|
+
"""
|
18
|
+
endpoint = "/me/allowedOrigins/{originId}".gsub(/{.+?}/, '%s')
|
19
|
+
endpoint = endpoint.gsub(/^\//, "")
|
20
|
+
endpoint = endpoint % [originId]
|
21
|
+
|
22
|
+
action = { method: "delete", url: endpoint}
|
23
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
24
|
+
end
|
25
|
+
|
26
|
+
def get_api_credential_details(headers: {} )
|
27
|
+
"""
|
28
|
+
Get API credential details
|
29
|
+
"""
|
30
|
+
endpoint = "/me".gsub(/{.+?}/, '%s')
|
31
|
+
endpoint = endpoint.gsub(/^\//, "")
|
32
|
+
endpoint = endpoint % []
|
33
|
+
|
34
|
+
action = { method: "get", url: endpoint}
|
35
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
36
|
+
end
|
37
|
+
|
38
|
+
def get_allowed_origins(headers: {} )
|
39
|
+
"""
|
40
|
+
Get allowed origins
|
41
|
+
"""
|
42
|
+
endpoint = "/me/allowedOrigins".gsub(/{.+?}/, '%s')
|
43
|
+
endpoint = endpoint.gsub(/^\//, "")
|
44
|
+
endpoint = endpoint % []
|
45
|
+
|
46
|
+
action = { method: "get", url: endpoint}
|
47
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
48
|
+
end
|
49
|
+
|
50
|
+
def get_allowed_origin_details(originId, headers: {} )
|
51
|
+
"""
|
52
|
+
Get allowed origin details
|
53
|
+
"""
|
54
|
+
endpoint = "/me/allowedOrigins/{originId}".gsub(/{.+?}/, '%s')
|
55
|
+
endpoint = endpoint.gsub(/^\//, "")
|
56
|
+
endpoint = endpoint % [originId]
|
57
|
+
|
58
|
+
action = { method: "get", url: endpoint}
|
59
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
60
|
+
end
|
61
|
+
|
62
|
+
def add_allowed_origin(request, headers: {} )
|
63
|
+
"""
|
64
|
+
Add allowed origin
|
65
|
+
"""
|
66
|
+
endpoint = "/me/allowedOrigins".gsub(/{.+?}/, '%s')
|
67
|
+
endpoint = endpoint.gsub(/^\//, "")
|
68
|
+
endpoint = endpoint % []
|
69
|
+
|
70
|
+
action = { method: "post", url: endpoint}
|
71
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
72
|
+
end
|
73
|
+
|
74
|
+
end
|
75
|
+
end
|
@@ -0,0 +1,87 @@
|
|
1
|
+
require_relative '../service'
|
2
|
+
module Adyen
|
3
|
+
|
4
|
+
|
5
|
+
class PaymentMethodsMerchantLevelApi < Service
|
6
|
+
attr_accessor :service, :version
|
7
|
+
|
8
|
+
def initialize(client, version = DEFAULT_VERSION)
|
9
|
+
@service = "Management"
|
10
|
+
@client = client
|
11
|
+
@version = version
|
12
|
+
end
|
13
|
+
|
14
|
+
def get_all_payment_methods(merchantId, headers: {} , queryParams: {})
|
15
|
+
"""
|
16
|
+
Get all payment methods
|
17
|
+
"""
|
18
|
+
endpoint = "/merchants/{merchantId}/paymentMethodSettings".gsub(/{.+?}/, '%s')
|
19
|
+
endpoint = endpoint.gsub(/^\//, "")
|
20
|
+
endpoint = endpoint % [merchantId]
|
21
|
+
endpoint = endpoint + create_query_string(queryParams)
|
22
|
+
action = { method: "get", url: endpoint}
|
23
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
24
|
+
end
|
25
|
+
|
26
|
+
def get_payment_method_details(merchantId, paymentMethodId, headers: {} )
|
27
|
+
"""
|
28
|
+
Get payment method details
|
29
|
+
"""
|
30
|
+
endpoint = "/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}".gsub(/{.+?}/, '%s')
|
31
|
+
endpoint = endpoint.gsub(/^\//, "")
|
32
|
+
endpoint = endpoint % [merchantId,paymentMethodId]
|
33
|
+
|
34
|
+
action = { method: "get", url: endpoint}
|
35
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
36
|
+
end
|
37
|
+
|
38
|
+
def get_apple_pay_domains(merchantId, paymentMethodId, headers: {} )
|
39
|
+
"""
|
40
|
+
Get Apple Pay domains
|
41
|
+
"""
|
42
|
+
endpoint = "/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}/getApplePayDomains".gsub(/{.+?}/, '%s')
|
43
|
+
endpoint = endpoint.gsub(/^\//, "")
|
44
|
+
endpoint = endpoint % [merchantId,paymentMethodId]
|
45
|
+
|
46
|
+
action = { method: "get", url: endpoint}
|
47
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
48
|
+
end
|
49
|
+
|
50
|
+
def update_payment_method(request, merchantId, paymentMethodId, headers: {} )
|
51
|
+
"""
|
52
|
+
Update a payment method
|
53
|
+
"""
|
54
|
+
endpoint = "/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}".gsub(/{.+?}/, '%s')
|
55
|
+
endpoint = endpoint.gsub(/^\//, "")
|
56
|
+
endpoint = endpoint % [merchantId,paymentMethodId]
|
57
|
+
|
58
|
+
action = { method: "patch", url: endpoint}
|
59
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
60
|
+
end
|
61
|
+
|
62
|
+
def request_payment_method(request, merchantId, headers: {} )
|
63
|
+
"""
|
64
|
+
Request a payment method
|
65
|
+
"""
|
66
|
+
endpoint = "/merchants/{merchantId}/paymentMethodSettings".gsub(/{.+?}/, '%s')
|
67
|
+
endpoint = endpoint.gsub(/^\//, "")
|
68
|
+
endpoint = endpoint % [merchantId]
|
69
|
+
|
70
|
+
action = { method: "post", url: endpoint}
|
71
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
72
|
+
end
|
73
|
+
|
74
|
+
def add_apple_pay_domain(request, merchantId, paymentMethodId, headers: {} )
|
75
|
+
"""
|
76
|
+
Add an Apple Pay domain
|
77
|
+
"""
|
78
|
+
endpoint = "/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}/addApplePayDomains".gsub(/{.+?}/, '%s')
|
79
|
+
endpoint = endpoint.gsub(/^\//, "")
|
80
|
+
endpoint = endpoint % [merchantId,paymentMethodId]
|
81
|
+
|
82
|
+
action = { method: "post", url: endpoint}
|
83
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
84
|
+
end
|
85
|
+
|
86
|
+
end
|
87
|
+
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
require_relative '../service'
|
2
|
+
module Adyen
|
3
|
+
|
4
|
+
|
5
|
+
class PayoutSettingsMerchantLevelApi < Service
|
6
|
+
attr_accessor :service, :version
|
7
|
+
|
8
|
+
def initialize(client, version = DEFAULT_VERSION)
|
9
|
+
@service = "Management"
|
10
|
+
@client = client
|
11
|
+
@version = version
|
12
|
+
end
|
13
|
+
|
14
|
+
def delete_payout_setting(merchantId, payoutSettingsId, headers: {} )
|
15
|
+
"""
|
16
|
+
Delete a payout setting
|
17
|
+
"""
|
18
|
+
endpoint = "/merchants/{merchantId}/payoutSettings/{payoutSettingsId}".gsub(/{.+?}/, '%s')
|
19
|
+
endpoint = endpoint.gsub(/^\//, "")
|
20
|
+
endpoint = endpoint % [merchantId,payoutSettingsId]
|
21
|
+
|
22
|
+
action = { method: "delete", url: endpoint}
|
23
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
24
|
+
end
|
25
|
+
|
26
|
+
def list_payout_settings(merchantId, headers: {} )
|
27
|
+
"""
|
28
|
+
Get a list of payout settings
|
29
|
+
"""
|
30
|
+
endpoint = "/merchants/{merchantId}/payoutSettings".gsub(/{.+?}/, '%s')
|
31
|
+
endpoint = endpoint.gsub(/^\//, "")
|
32
|
+
endpoint = endpoint % [merchantId]
|
33
|
+
|
34
|
+
action = { method: "get", url: endpoint}
|
35
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
36
|
+
end
|
37
|
+
|
38
|
+
def get_payout_setting(merchantId, payoutSettingsId, headers: {} )
|
39
|
+
"""
|
40
|
+
Get a payout setting
|
41
|
+
"""
|
42
|
+
endpoint = "/merchants/{merchantId}/payoutSettings/{payoutSettingsId}".gsub(/{.+?}/, '%s')
|
43
|
+
endpoint = endpoint.gsub(/^\//, "")
|
44
|
+
endpoint = endpoint % [merchantId,payoutSettingsId]
|
45
|
+
|
46
|
+
action = { method: "get", url: endpoint}
|
47
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
48
|
+
end
|
49
|
+
|
50
|
+
def update_payout_setting(request, merchantId, payoutSettingsId, headers: {} )
|
51
|
+
"""
|
52
|
+
Update a payout setting
|
53
|
+
"""
|
54
|
+
endpoint = "/merchants/{merchantId}/payoutSettings/{payoutSettingsId}".gsub(/{.+?}/, '%s')
|
55
|
+
endpoint = endpoint.gsub(/^\//, "")
|
56
|
+
endpoint = endpoint % [merchantId,payoutSettingsId]
|
57
|
+
|
58
|
+
action = { method: "patch", url: endpoint}
|
59
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
60
|
+
end
|
61
|
+
|
62
|
+
def add_payout_setting(request, merchantId, headers: {} )
|
63
|
+
"""
|
64
|
+
Add a payout setting
|
65
|
+
"""
|
66
|
+
endpoint = "/merchants/{merchantId}/payoutSettings".gsub(/{.+?}/, '%s')
|
67
|
+
endpoint = endpoint.gsub(/^\//, "")
|
68
|
+
endpoint = endpoint % [merchantId]
|
69
|
+
|
70
|
+
action = { method: "post", url: endpoint}
|
71
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
72
|
+
end
|
73
|
+
|
74
|
+
end
|
75
|
+
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
require_relative '../service'
|
2
|
+
module Adyen
|
3
|
+
|
4
|
+
|
5
|
+
class TerminalActionsCompanyLevelApi < Service
|
6
|
+
attr_accessor :service, :version
|
7
|
+
|
8
|
+
def initialize(client, version = DEFAULT_VERSION)
|
9
|
+
@service = "Management"
|
10
|
+
@client = client
|
11
|
+
@version = version
|
12
|
+
end
|
13
|
+
|
14
|
+
def list_android_apps(companyId, headers: {} , queryParams: {})
|
15
|
+
"""
|
16
|
+
Get a list of Android apps
|
17
|
+
"""
|
18
|
+
endpoint = "/companies/{companyId}/androidApps".gsub(/{.+?}/, '%s')
|
19
|
+
endpoint = endpoint.gsub(/^\//, "")
|
20
|
+
endpoint = endpoint % [companyId]
|
21
|
+
endpoint = endpoint + create_query_string(queryParams)
|
22
|
+
action = { method: "get", url: endpoint}
|
23
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
24
|
+
end
|
25
|
+
|
26
|
+
def list_android_certificates(companyId, headers: {} , queryParams: {})
|
27
|
+
"""
|
28
|
+
Get a list of Android certificates
|
29
|
+
"""
|
30
|
+
endpoint = "/companies/{companyId}/androidCertificates".gsub(/{.+?}/, '%s')
|
31
|
+
endpoint = endpoint.gsub(/^\//, "")
|
32
|
+
endpoint = endpoint % [companyId]
|
33
|
+
endpoint = endpoint + create_query_string(queryParams)
|
34
|
+
action = { method: "get", url: endpoint}
|
35
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
36
|
+
end
|
37
|
+
|
38
|
+
def list_terminal_actions(companyId, headers: {} , queryParams: {})
|
39
|
+
"""
|
40
|
+
Get a list of terminal actions
|
41
|
+
"""
|
42
|
+
endpoint = "/companies/{companyId}/terminalActions".gsub(/{.+?}/, '%s')
|
43
|
+
endpoint = endpoint.gsub(/^\//, "")
|
44
|
+
endpoint = endpoint % [companyId]
|
45
|
+
endpoint = endpoint + create_query_string(queryParams)
|
46
|
+
action = { method: "get", url: endpoint}
|
47
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
48
|
+
end
|
49
|
+
|
50
|
+
def get_terminal_action(companyId, actionId, headers: {} )
|
51
|
+
"""
|
52
|
+
Get terminal action
|
53
|
+
"""
|
54
|
+
endpoint = "/companies/{companyId}/terminalActions/{actionId}".gsub(/{.+?}/, '%s')
|
55
|
+
endpoint = endpoint.gsub(/^\//, "")
|
56
|
+
endpoint = endpoint % [companyId,actionId]
|
57
|
+
|
58
|
+
action = { method: "get", url: endpoint}
|
59
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
60
|
+
end
|
61
|
+
|
62
|
+
end
|
63
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require_relative '../service'
|
2
|
+
module Adyen
|
3
|
+
|
4
|
+
|
5
|
+
class TerminalActionsTerminalLevelApi < Service
|
6
|
+
attr_accessor :service, :version
|
7
|
+
|
8
|
+
def initialize(client, version = DEFAULT_VERSION)
|
9
|
+
@service = "Management"
|
10
|
+
@client = client
|
11
|
+
@version = version
|
12
|
+
end
|
13
|
+
|
14
|
+
def create_terminal_action(request, headers: {} )
|
15
|
+
"""
|
16
|
+
Create a terminal action
|
17
|
+
"""
|
18
|
+
endpoint = "/terminals/scheduleActions".gsub(/{.+?}/, '%s')
|
19
|
+
endpoint = endpoint.gsub(/^\//, "")
|
20
|
+
endpoint = endpoint % []
|
21
|
+
|
22
|
+
action = { method: "post", url: endpoint}
|
23
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,135 @@
|
|
1
|
+
require_relative '../service'
|
2
|
+
module Adyen
|
3
|
+
|
4
|
+
|
5
|
+
class TerminalOrdersCompanyLevelApi < Service
|
6
|
+
attr_accessor :service, :version
|
7
|
+
|
8
|
+
def initialize(client, version = DEFAULT_VERSION)
|
9
|
+
@service = "Management"
|
10
|
+
@client = client
|
11
|
+
@version = version
|
12
|
+
end
|
13
|
+
|
14
|
+
def list_billing_entities(companyId, headers: {} , queryParams: {})
|
15
|
+
"""
|
16
|
+
Get a list of billing entities
|
17
|
+
"""
|
18
|
+
endpoint = "/companies/{companyId}/billingEntities".gsub(/{.+?}/, '%s')
|
19
|
+
endpoint = endpoint.gsub(/^\//, "")
|
20
|
+
endpoint = endpoint % [companyId]
|
21
|
+
endpoint = endpoint + create_query_string(queryParams)
|
22
|
+
action = { method: "get", url: endpoint}
|
23
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
24
|
+
end
|
25
|
+
|
26
|
+
def list_shipping_locations(companyId, headers: {} , queryParams: {})
|
27
|
+
"""
|
28
|
+
Get a list of shipping locations
|
29
|
+
"""
|
30
|
+
endpoint = "/companies/{companyId}/shippingLocations".gsub(/{.+?}/, '%s')
|
31
|
+
endpoint = endpoint.gsub(/^\//, "")
|
32
|
+
endpoint = endpoint % [companyId]
|
33
|
+
endpoint = endpoint + create_query_string(queryParams)
|
34
|
+
action = { method: "get", url: endpoint}
|
35
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
36
|
+
end
|
37
|
+
|
38
|
+
def list_terminal_models(companyId, headers: {} )
|
39
|
+
"""
|
40
|
+
Get a list of terminal models
|
41
|
+
"""
|
42
|
+
endpoint = "/companies/{companyId}/terminalModels".gsub(/{.+?}/, '%s')
|
43
|
+
endpoint = endpoint.gsub(/^\//, "")
|
44
|
+
endpoint = endpoint % [companyId]
|
45
|
+
|
46
|
+
action = { method: "get", url: endpoint}
|
47
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
48
|
+
end
|
49
|
+
|
50
|
+
def list_orders(companyId, headers: {} , queryParams: {})
|
51
|
+
"""
|
52
|
+
Get a list of orders
|
53
|
+
"""
|
54
|
+
endpoint = "/companies/{companyId}/terminalOrders".gsub(/{.+?}/, '%s')
|
55
|
+
endpoint = endpoint.gsub(/^\//, "")
|
56
|
+
endpoint = endpoint % [companyId]
|
57
|
+
endpoint = endpoint + create_query_string(queryParams)
|
58
|
+
action = { method: "get", url: endpoint}
|
59
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
60
|
+
end
|
61
|
+
|
62
|
+
def get_order(companyId, orderId, headers: {} )
|
63
|
+
"""
|
64
|
+
Get an order
|
65
|
+
"""
|
66
|
+
endpoint = "/companies/{companyId}/terminalOrders/{orderId}".gsub(/{.+?}/, '%s')
|
67
|
+
endpoint = endpoint.gsub(/^\//, "")
|
68
|
+
endpoint = endpoint % [companyId,orderId]
|
69
|
+
|
70
|
+
action = { method: "get", url: endpoint}
|
71
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
72
|
+
end
|
73
|
+
|
74
|
+
def list_terminal_products(companyId, headers: {} , queryParams: {})
|
75
|
+
"""
|
76
|
+
Get a list of terminal products
|
77
|
+
"""
|
78
|
+
endpoint = "/companies/{companyId}/terminalProducts".gsub(/{.+?}/, '%s')
|
79
|
+
endpoint = endpoint.gsub(/^\//, "")
|
80
|
+
endpoint = endpoint % [companyId]
|
81
|
+
endpoint = endpoint + create_query_string(queryParams)
|
82
|
+
action = { method: "get", url: endpoint}
|
83
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
84
|
+
end
|
85
|
+
|
86
|
+
def update_order(request, companyId, orderId, headers: {} )
|
87
|
+
"""
|
88
|
+
Update an order
|
89
|
+
"""
|
90
|
+
endpoint = "/companies/{companyId}/terminalOrders/{orderId}".gsub(/{.+?}/, '%s')
|
91
|
+
endpoint = endpoint.gsub(/^\//, "")
|
92
|
+
endpoint = endpoint % [companyId,orderId]
|
93
|
+
|
94
|
+
action = { method: "patch", url: endpoint}
|
95
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
96
|
+
end
|
97
|
+
|
98
|
+
def create_shipping_location(request, companyId, headers: {} )
|
99
|
+
"""
|
100
|
+
Create a shipping location
|
101
|
+
"""
|
102
|
+
endpoint = "/companies/{companyId}/shippingLocations".gsub(/{.+?}/, '%s')
|
103
|
+
endpoint = endpoint.gsub(/^\//, "")
|
104
|
+
endpoint = endpoint % [companyId]
|
105
|
+
|
106
|
+
action = { method: "post", url: endpoint}
|
107
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
108
|
+
end
|
109
|
+
|
110
|
+
def create_order(request, companyId, headers: {} )
|
111
|
+
"""
|
112
|
+
Create an order
|
113
|
+
"""
|
114
|
+
endpoint = "/companies/{companyId}/terminalOrders".gsub(/{.+?}/, '%s')
|
115
|
+
endpoint = endpoint.gsub(/^\//, "")
|
116
|
+
endpoint = endpoint % [companyId]
|
117
|
+
|
118
|
+
action = { method: "post", url: endpoint}
|
119
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
120
|
+
end
|
121
|
+
|
122
|
+
def cancel_order(companyId, orderId, headers: {} )
|
123
|
+
"""
|
124
|
+
Cancel an order
|
125
|
+
"""
|
126
|
+
endpoint = "/companies/{companyId}/terminalOrders/{orderId}/cancel".gsub(/{.+?}/, '%s')
|
127
|
+
endpoint = endpoint.gsub(/^\//, "")
|
128
|
+
endpoint = endpoint % [companyId,orderId]
|
129
|
+
|
130
|
+
action = { method: "post", url: endpoint}
|
131
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
132
|
+
end
|
133
|
+
|
134
|
+
end
|
135
|
+
end
|
@@ -0,0 +1,135 @@
|
|
1
|
+
require_relative '../service'
|
2
|
+
module Adyen
|
3
|
+
|
4
|
+
|
5
|
+
class TerminalOrdersMerchantLevelApi < Service
|
6
|
+
attr_accessor :service, :version
|
7
|
+
|
8
|
+
def initialize(client, version = DEFAULT_VERSION)
|
9
|
+
@service = "Management"
|
10
|
+
@client = client
|
11
|
+
@version = version
|
12
|
+
end
|
13
|
+
|
14
|
+
def list_billing_entities(merchantId, headers: {} , queryParams: {})
|
15
|
+
"""
|
16
|
+
Get a list of billing entities
|
17
|
+
"""
|
18
|
+
endpoint = "/merchants/{merchantId}/billingEntities".gsub(/{.+?}/, '%s')
|
19
|
+
endpoint = endpoint.gsub(/^\//, "")
|
20
|
+
endpoint = endpoint % [merchantId]
|
21
|
+
endpoint = endpoint + create_query_string(queryParams)
|
22
|
+
action = { method: "get", url: endpoint}
|
23
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
24
|
+
end
|
25
|
+
|
26
|
+
def list_shipping_locations(merchantId, headers: {} , queryParams: {})
|
27
|
+
"""
|
28
|
+
Get a list of shipping locations
|
29
|
+
"""
|
30
|
+
endpoint = "/merchants/{merchantId}/shippingLocations".gsub(/{.+?}/, '%s')
|
31
|
+
endpoint = endpoint.gsub(/^\//, "")
|
32
|
+
endpoint = endpoint % [merchantId]
|
33
|
+
endpoint = endpoint + create_query_string(queryParams)
|
34
|
+
action = { method: "get", url: endpoint}
|
35
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
36
|
+
end
|
37
|
+
|
38
|
+
def list_terminal_models(merchantId, headers: {} )
|
39
|
+
"""
|
40
|
+
Get a list of terminal models
|
41
|
+
"""
|
42
|
+
endpoint = "/merchants/{merchantId}/terminalModels".gsub(/{.+?}/, '%s')
|
43
|
+
endpoint = endpoint.gsub(/^\//, "")
|
44
|
+
endpoint = endpoint % [merchantId]
|
45
|
+
|
46
|
+
action = { method: "get", url: endpoint}
|
47
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
48
|
+
end
|
49
|
+
|
50
|
+
def list_orders(merchantId, headers: {} , queryParams: {})
|
51
|
+
"""
|
52
|
+
Get a list of orders
|
53
|
+
"""
|
54
|
+
endpoint = "/merchants/{merchantId}/terminalOrders".gsub(/{.+?}/, '%s')
|
55
|
+
endpoint = endpoint.gsub(/^\//, "")
|
56
|
+
endpoint = endpoint % [merchantId]
|
57
|
+
endpoint = endpoint + create_query_string(queryParams)
|
58
|
+
action = { method: "get", url: endpoint}
|
59
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
60
|
+
end
|
61
|
+
|
62
|
+
def get_order(merchantId, orderId, headers: {} )
|
63
|
+
"""
|
64
|
+
Get an order
|
65
|
+
"""
|
66
|
+
endpoint = "/merchants/{merchantId}/terminalOrders/{orderId}".gsub(/{.+?}/, '%s')
|
67
|
+
endpoint = endpoint.gsub(/^\//, "")
|
68
|
+
endpoint = endpoint % [merchantId,orderId]
|
69
|
+
|
70
|
+
action = { method: "get", url: endpoint}
|
71
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
72
|
+
end
|
73
|
+
|
74
|
+
def list_terminal_products(merchantId, headers: {} , queryParams: {})
|
75
|
+
"""
|
76
|
+
Get a list of terminal products
|
77
|
+
"""
|
78
|
+
endpoint = "/merchants/{merchantId}/terminalProducts".gsub(/{.+?}/, '%s')
|
79
|
+
endpoint = endpoint.gsub(/^\//, "")
|
80
|
+
endpoint = endpoint % [merchantId]
|
81
|
+
endpoint = endpoint + create_query_string(queryParams)
|
82
|
+
action = { method: "get", url: endpoint}
|
83
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
84
|
+
end
|
85
|
+
|
86
|
+
def update_order(request, merchantId, orderId, headers: {} )
|
87
|
+
"""
|
88
|
+
Update an order
|
89
|
+
"""
|
90
|
+
endpoint = "/merchants/{merchantId}/terminalOrders/{orderId}".gsub(/{.+?}/, '%s')
|
91
|
+
endpoint = endpoint.gsub(/^\//, "")
|
92
|
+
endpoint = endpoint % [merchantId,orderId]
|
93
|
+
|
94
|
+
action = { method: "patch", url: endpoint}
|
95
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
96
|
+
end
|
97
|
+
|
98
|
+
def create_shipping_location(request, merchantId, headers: {} )
|
99
|
+
"""
|
100
|
+
Create a shipping location
|
101
|
+
"""
|
102
|
+
endpoint = "/merchants/{merchantId}/shippingLocations".gsub(/{.+?}/, '%s')
|
103
|
+
endpoint = endpoint.gsub(/^\//, "")
|
104
|
+
endpoint = endpoint % [merchantId]
|
105
|
+
|
106
|
+
action = { method: "post", url: endpoint}
|
107
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
108
|
+
end
|
109
|
+
|
110
|
+
def create_order(request, merchantId, headers: {} )
|
111
|
+
"""
|
112
|
+
Create an order
|
113
|
+
"""
|
114
|
+
endpoint = "/merchants/{merchantId}/terminalOrders".gsub(/{.+?}/, '%s')
|
115
|
+
endpoint = endpoint.gsub(/^\//, "")
|
116
|
+
endpoint = endpoint % [merchantId]
|
117
|
+
|
118
|
+
action = { method: "post", url: endpoint}
|
119
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
120
|
+
end
|
121
|
+
|
122
|
+
def cancel_order(merchantId, orderId, headers: {} )
|
123
|
+
"""
|
124
|
+
Cancel an order
|
125
|
+
"""
|
126
|
+
endpoint = "/merchants/{merchantId}/terminalOrders/{orderId}/cancel".gsub(/{.+?}/, '%s')
|
127
|
+
endpoint = endpoint.gsub(/^\//, "")
|
128
|
+
endpoint = endpoint % [merchantId,orderId]
|
129
|
+
|
130
|
+
action = { method: "post", url: endpoint}
|
131
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
132
|
+
end
|
133
|
+
|
134
|
+
end
|
135
|
+
end
|