adyen-ruby-api-library 6.0.0 → 10.1.2
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/release.yml +18 -0
- data/.github/workflows/codeql.yml +37 -0
- data/.github/workflows/label_new_issues.yml +15 -0
- data/.github/workflows/release.yml +40 -0
- data/.github/workflows/ruby.yml +2 -2
- data/.github/workflows/rubygems_release.yml +18 -0
- data/.github/workflows/stale.yml +26 -0
- data/.gitignore +3 -0
- data/.rubocop.yml +8 -0
- data/CONTRIBUTING.md +1 -1
- data/Gemfile +7 -7
- data/Makefile +79 -0
- data/README.md +158 -20
- data/Rakefile +3 -3
- data/VERSION +2 -0
- data/adyen-ruby-api-library.gemspec +6 -3
- data/bin/console +2 -2
- data/lib/adyen/client.rb +213 -99
- data/lib/adyen/errors.rb +30 -22
- data/lib/adyen/hash_with_accessors.rb +12 -7
- data/lib/adyen/services/balanceControlService.rb +27 -0
- data/lib/adyen/services/balancePlatform/account_holders_api.rb +76 -0
- data/lib/adyen/services/balancePlatform/balance_accounts_api.rb +116 -0
- data/lib/adyen/services/balancePlatform/bank_account_validation_api.rb +26 -0
- data/lib/adyen/services/balancePlatform/card_orders_api.rb +36 -0
- data/lib/adyen/services/balancePlatform/grant_accounts_api.rb +26 -0
- data/lib/adyen/services/balancePlatform/grant_offers_api.rb +36 -0
- data/lib/adyen/services/balancePlatform/manage_card_pin_api.rb +46 -0
- data/lib/adyen/services/balancePlatform/manage_sca_devices_api.rb +56 -0
- data/lib/adyen/services/balancePlatform/network_tokens_api.rb +36 -0
- data/lib/adyen/services/balancePlatform/payment_instrument_groups_api.rb +46 -0
- data/lib/adyen/services/balancePlatform/payment_instruments_api.rb +86 -0
- data/lib/adyen/services/balancePlatform/platform_api.rb +46 -0
- data/lib/adyen/services/balancePlatform/transaction_rules_api.rb +56 -0
- data/lib/adyen/services/balancePlatform/transfer_routes_api.rb +26 -0
- data/lib/adyen/services/balancePlatform.rb +89 -0
- data/lib/adyen/services/binLookup.rb +37 -0
- data/lib/adyen/services/checkout/donations_api.rb +36 -0
- data/lib/adyen/services/checkout/modifications_api.rb +76 -0
- data/lib/adyen/services/checkout/orders_api.rb +46 -0
- data/lib/adyen/services/checkout/payment_links_api.rb +46 -0
- data/lib/adyen/services/checkout/payments_api.rb +76 -0
- data/lib/adyen/services/checkout/recurring_api.rb +46 -0
- data/lib/adyen/services/checkout/utility_api.rb +48 -0
- data/lib/adyen/services/checkout.rb +29 -108
- data/lib/adyen/services/dataProtection.rb +27 -0
- data/lib/adyen/services/disputes.rb +67 -0
- data/lib/adyen/services/legalEntityManagement/business_lines_api.rb +56 -0
- data/lib/adyen/services/legalEntityManagement/documents_api.rb +56 -0
- data/lib/adyen/services/legalEntityManagement/hosted_onboarding_api.rb +46 -0
- data/lib/adyen/services/legalEntityManagement/legal_entities_api.rb +76 -0
- data/lib/adyen/services/legalEntityManagement/pci_questionnaires_api.rb +66 -0
- data/lib/adyen/services/legalEntityManagement/tax_e_delivery_consent_api.rb +36 -0
- data/lib/adyen/services/legalEntityManagement/terms_of_service_api.rb +66 -0
- data/lib/adyen/services/legalEntityManagement/transfer_instruments_api.rb +56 -0
- data/lib/adyen/services/legalEntityManagement.rb +59 -0
- data/lib/adyen/services/management/account_company_level_api.rb +46 -0
- data/lib/adyen/services/management/account_merchant_level_api.rb +56 -0
- data/lib/adyen/services/management/account_store_level_api.rb +96 -0
- data/lib/adyen/services/management/allowed_origins_company_level_api.rb +56 -0
- data/lib/adyen/services/management/allowed_origins_merchant_level_api.rb +56 -0
- data/lib/adyen/services/management/android_files_company_level_api.rb +76 -0
- data/lib/adyen/services/management/api_credentials_company_level_api.rb +56 -0
- data/lib/adyen/services/management/api_credentials_merchant_level_api.rb +56 -0
- data/lib/adyen/services/management/api_key_company_level_api.rb +26 -0
- data/lib/adyen/services/management/api_key_merchant_level_api.rb +26 -0
- data/lib/adyen/services/management/client_key_company_level_api.rb +26 -0
- data/lib/adyen/services/management/client_key_merchant_level_api.rb +26 -0
- data/lib/adyen/services/management/my_api_credential_api.rb +76 -0
- data/lib/adyen/services/management/payment_methods_merchant_level_api.rb +76 -0
- data/lib/adyen/services/management/payout_settings_merchant_level_api.rb +66 -0
- data/lib/adyen/services/management/split_configuration_merchant_level_api.rb +106 -0
- data/lib/adyen/services/management/terminal_actions_company_level_api.rb +36 -0
- data/lib/adyen/services/management/terminal_actions_terminal_level_api.rb +26 -0
- data/lib/adyen/services/management/terminal_orders_company_level_api.rb +116 -0
- data/lib/adyen/services/management/terminal_orders_merchant_level_api.rb +116 -0
- data/lib/adyen/services/management/terminal_settings_company_level_api.rb +56 -0
- data/lib/adyen/services/management/terminal_settings_merchant_level_api.rb +56 -0
- data/lib/adyen/services/management/terminal_settings_store_level_api.rb +96 -0
- data/lib/adyen/services/management/terminal_settings_terminal_level_api.rb +56 -0
- data/lib/adyen/services/management/terminals_terminal_level_api.rb +36 -0
- data/lib/adyen/services/management/users_company_level_api.rb +56 -0
- data/lib/adyen/services/management/users_merchant_level_api.rb +56 -0
- data/lib/adyen/services/management/webhooks_company_level_api.rb +86 -0
- data/lib/adyen/services/management/webhooks_merchant_level_api.rb +86 -0
- data/lib/adyen/services/management.rb +164 -0
- data/lib/adyen/services/marketpay.rb +42 -36
- data/lib/adyen/services/payment.rb +149 -0
- data/lib/adyen/services/paymentsApp.rb +67 -0
- data/lib/adyen/services/payout/initialization_api.rb +46 -0
- data/lib/adyen/services/payout/instant_payouts_api.rb +26 -0
- data/lib/adyen/services/payout/reviewing_api.rb +36 -0
- data/lib/adyen/services/payout.rb +34 -0
- data/lib/adyen/services/posMobile.rb +27 -0
- data/lib/adyen/services/posTerminalManagement.rb +82 -0
- data/lib/adyen/services/recurring.rb +70 -13
- data/lib/adyen/services/service.rb +8 -2
- data/lib/adyen/services/storedValue.rb +77 -0
- data/lib/adyen/services/terminalCloudAPI.rb +38 -0
- data/lib/adyen/services/transfers/capital_api.rb +55 -0
- data/lib/adyen/services/transfers/transactions_api.rb +36 -0
- data/lib/adyen/services/transfers/transfers_api.rb +76 -0
- data/lib/adyen/services/transfers.rb +34 -0
- data/lib/adyen/utils/hmac_validator.rb +52 -22
- data/lib/adyen/version.rb +2 -2
- data/lib/adyen-ruby-api-library.rb +23 -15
- data/renovate.json +3 -3
- data/spec/account_spec.rb +20 -20
- data/spec/balance_control_spec.rb +43 -0
- data/spec/balance_platform_spec.rb +129 -0
- data/spec/bin_lookup_spec.rb +69 -11
- data/spec/checkout-oauth_spec.rb +588 -0
- data/spec/checkout_spec.rb +591 -314
- data/spec/client_spec.rb +240 -45
- data/spec/data_protection_spec.rb +4 -4
- data/spec/disputes_spec.rb +45 -0
- data/spec/errors_spec.rb +44 -15
- 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 +63 -0
- data/spec/management-oauth_spec.rb +62 -0
- data/spec/management_spec.rb +66 -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/Checkout/amount_updates.json +22 -0
- data/spec/mocks/requests/Checkout/apple_pay_sessions.json +5 -0
- data/spec/mocks/requests/Checkout/capture.json +34 -0
- data/spec/mocks/requests/Checkout/generic_cancel.json +5 -0
- data/spec/mocks/requests/Checkout/modifications_request.json +0 -0
- data/spec/mocks/requests/Checkout/psp_cancel.json +4 -0
- data/spec/mocks/requests/Checkout/refund.json +34 -0
- data/spec/mocks/requests/DisputesService/retrieve_applicable_defense_reasons.json +4 -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/TerminalCloudAPI/connected_terminals.json +3 -0
- data/spec/mocks/requests/TerminalCloudAPI/sync_payment.json +29 -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/Checkout/amount_updates.json +24 -0
- data/spec/mocks/responses/Checkout/apple_pay_sessions.json +3 -0
- data/spec/mocks/responses/Checkout/capture.json +37 -0
- data/spec/mocks/responses/Checkout/generic_cancel.json +7 -0
- data/spec/mocks/responses/Checkout/modifications.json +0 -0
- data/spec/mocks/responses/Checkout/psp_cancel.json +7 -0
- data/spec/mocks/responses/Checkout/refund.json +37 -0
- data/spec/mocks/responses/Checkout/stored_payment_methods.json +1 -0
- data/spec/mocks/responses/DisputesService/retrieve_applicable_defense_reasons.json +71 -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/TerminalCloudAPI/connected_terminals.json +5 -0
- data/spec/mocks/responses/TerminalCloudAPI/sync_payment.json +18 -0
- data/spec/mocks/responses/Transfers/get_transactions.json +82 -0
- data/spec/mocks/responses/Transfers/make_transfer.json +36 -0
- data/spec/mocks/responses/Webhooks/backslash_webhook.json +41 -0
- data/spec/mocks/responses/Webhooks/colon_webhook.json +41 -0
- data/spec/mocks/responses/Webhooks/forwardslash_webhook.json +41 -0
- data/spec/mocks/responses/Webhooks/mixed_webhook.json +41 -0
- data/spec/notification_spec.rb +9 -9
- data/spec/payments_spec.rb +39 -22
- data/spec/payouts_spec.rb +39 -15
- data/spec/pos_terminal_management_spec.rb +44 -0
- data/spec/recurring_spec.rb +8 -8
- data/spec/service_spec.rb +4 -0
- data/spec/spec_helper.rb +42 -46
- data/spec/stored_value_spec.rb +44 -0
- data/spec/terminal_cloud_api_spec.rb +91 -0
- data/spec/transfers_spec.rb +64 -0
- data/spec/utils/hmac_validator_spec.rb +53 -23
- data/templates/api-single.mustache +32 -0
- data/templates/api-small.mustache +39 -0
- data/templates/api.mustache +38 -0
- data/templates/config.yaml +10 -0
- metadata +160 -47
- data/.github/dependabot.yml +0 -8
- data/docs/checkout.html +0 -128
- data/docs/index.html +0 -50
- data/docs/install-library.html +0 -61
- data/docs/javascripts/prism.js +0 -5
- data/docs/javascripts/scale.fix.js +0 -17
- data/docs/marketpay.html +0 -171
- data/docs/params.json +0 -1
- data/docs/payment.html +0 -106
- data/docs/payout.html +0 -135
- data/docs/recurring.html +0 -113
- data/docs/stylesheets/github-light.css +0 -115
- data/docs/stylesheets/prism.css +0 -140
- data/docs/stylesheets/styles.css +0 -324
- data/docs/using-library.html +0 -67
- data/lib/adyen/services/bin_lookup.rb +0 -18
- data/lib/adyen/services/data_protection.rb +0 -17
- data/lib/adyen/services/dispute.rb +0 -20
- 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/dispute_spec.rb +0 -17
- data/spec/mocks/requests/DisputeService/defend_dispute.json +0 -5
- data/spec/mocks/requests/DisputeService/delete_dispute_defense_document.json +0 -5
- data/spec/mocks/requests/DisputeService/retrieve_applicable_defense_reasons.json +0 -4
- data/spec/mocks/requests/DisputeService/supply_defense_document.json +0 -11
- data/spec/mocks/requests/Recurring/store_token.json +0 -15
- data/spec/mocks/responses/DisputeService/defend_dispute.json +0 -5
- data/spec/mocks/responses/DisputeService/delete_dispute_defense_document.json +0 -5
- data/spec/mocks/responses/DisputeService/retrieve_applicable_defense_reasons.json +0 -28
- data/spec/mocks/responses/DisputeService/supply_defense_document.json +0 -5
- data/spec/mocks/responses/Recurring/store_token.json +0 -7
- data/spec/postfmapi_spec.rb +0 -16
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
# rubocop:disable Metrics/MethodLength
|
|
2
|
+
|
|
1
3
|
require_relative 'service'
|
|
2
4
|
|
|
3
5
|
module Adyen
|
|
@@ -7,7 +9,7 @@ module Adyen
|
|
|
7
9
|
|
|
8
10
|
def initialize(client)
|
|
9
11
|
@client = client
|
|
10
|
-
@service =
|
|
12
|
+
@service = ''
|
|
11
13
|
end
|
|
12
14
|
|
|
13
15
|
def account
|
|
@@ -29,28 +31,29 @@ module Adyen
|
|
|
29
31
|
|
|
30
32
|
class Account < Service
|
|
31
33
|
attr_accessor :version
|
|
34
|
+
|
|
32
35
|
DEFAULT_VERSION = 6
|
|
33
36
|
|
|
34
37
|
def initialize(client, version = DEFAULT_VERSION)
|
|
35
38
|
service = 'Account'
|
|
36
|
-
method_names = [
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
39
|
+
method_names = %i[
|
|
40
|
+
create_account_holder
|
|
41
|
+
update_account_holder
|
|
42
|
+
create_account
|
|
43
|
+
update_account
|
|
44
|
+
upload_document
|
|
45
|
+
get_uploaded_documents
|
|
46
|
+
get_account_holder
|
|
47
|
+
update_account_holder_state
|
|
48
|
+
delete_bank_accounts
|
|
49
|
+
delete_shareholders
|
|
50
|
+
delete_signatories
|
|
51
|
+
close_account
|
|
52
|
+
close_account_holder
|
|
53
|
+
suspend_account_holder
|
|
54
|
+
un_suspend_account_holder
|
|
55
|
+
delete_payout_methods
|
|
56
|
+
check_account_holder
|
|
54
57
|
]
|
|
55
58
|
|
|
56
59
|
super(client, version, service, method_names)
|
|
@@ -59,37 +62,38 @@ module Adyen
|
|
|
59
62
|
|
|
60
63
|
class Fund < Service
|
|
61
64
|
attr_accessor :version
|
|
65
|
+
|
|
62
66
|
DEFAULT_VERSION = 6
|
|
63
67
|
|
|
64
68
|
def initialize(client, version = DEFAULT_VERSION)
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
:refund_funds_transfer
|
|
69
|
+
method_names = %i[
|
|
70
|
+
payout_account_holder
|
|
71
|
+
account_holder_balance
|
|
72
|
+
account_holder_transaction_list
|
|
73
|
+
refund_not_paid_out_transfers
|
|
74
|
+
setup_beneficiary
|
|
75
|
+
transfer_funds
|
|
76
|
+
refund_funds_transfer
|
|
74
77
|
]
|
|
75
78
|
|
|
76
|
-
super(client, version,
|
|
79
|
+
super(client, version, 'Fund', method_names)
|
|
77
80
|
end
|
|
78
81
|
end
|
|
79
82
|
|
|
80
83
|
class Notification < Service
|
|
81
84
|
attr_accessor :version
|
|
85
|
+
|
|
82
86
|
DEFAULT_VERSION = 6
|
|
83
87
|
|
|
84
88
|
def initialize(client, version = DEFAULT_VERSION)
|
|
85
89
|
service = 'Notification'
|
|
86
|
-
method_names = [
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
90
|
+
method_names = %i[
|
|
91
|
+
create_notification_configuration
|
|
92
|
+
update_notification_configuration
|
|
93
|
+
get_notification_configuration
|
|
94
|
+
delete_notification_configurations
|
|
95
|
+
get_notification_configuration_list
|
|
96
|
+
test_notification_configuration
|
|
93
97
|
]
|
|
94
98
|
|
|
95
99
|
super(client, version, service, method_names)
|
|
@@ -98,6 +102,7 @@ module Adyen
|
|
|
98
102
|
|
|
99
103
|
class Hop < Service
|
|
100
104
|
attr_accessor :version
|
|
105
|
+
|
|
101
106
|
DEFAULT_VERSION = 6
|
|
102
107
|
|
|
103
108
|
def initialize(client, version = DEFAULT_VERSION)
|
|
@@ -111,3 +116,4 @@ module Adyen
|
|
|
111
116
|
end
|
|
112
117
|
end
|
|
113
118
|
end
|
|
119
|
+
# rubocop:enable Metrics/MethodLength
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
require_relative './service'
|
|
2
|
+
module Adyen
|
|
3
|
+
|
|
4
|
+
# NOTE: This class is auto generated by OpenAPI Generator
|
|
5
|
+
# Ref: https://openapi-generator.tech
|
|
6
|
+
#
|
|
7
|
+
# Do not edit the class manually.
|
|
8
|
+
class Payment < Service
|
|
9
|
+
attr_accessor :service, :version
|
|
10
|
+
|
|
11
|
+
DEFAULT_VERSION = 68
|
|
12
|
+
def initialize(client, version = DEFAULT_VERSION)
|
|
13
|
+
super(client, version, 'Payment')
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
# Change the authorised amount
|
|
17
|
+
def adjust_authorisation(request, headers: {})
|
|
18
|
+
endpoint = '/adjustAuthorisation'.gsub(/{.+?}/, '%s')
|
|
19
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
20
|
+
endpoint = format(endpoint)
|
|
21
|
+
|
|
22
|
+
action = { method: 'post', url: endpoint }
|
|
23
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Create an authorisation
|
|
27
|
+
def authorise(request, headers: {})
|
|
28
|
+
endpoint = '/authorise'.gsub(/{.+?}/, '%s')
|
|
29
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
30
|
+
endpoint = format(endpoint)
|
|
31
|
+
|
|
32
|
+
action = { method: 'post', url: endpoint }
|
|
33
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Complete a 3DS authorisation
|
|
37
|
+
def authorise3d(request, headers: {})
|
|
38
|
+
endpoint = '/authorise3d'.gsub(/{.+?}/, '%s')
|
|
39
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
40
|
+
endpoint = format(endpoint)
|
|
41
|
+
|
|
42
|
+
action = { method: 'post', url: endpoint }
|
|
43
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Complete a 3DS2 authorisation
|
|
47
|
+
def authorise3ds2(request, headers: {})
|
|
48
|
+
endpoint = '/authorise3ds2'.gsub(/{.+?}/, '%s')
|
|
49
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
50
|
+
endpoint = format(endpoint)
|
|
51
|
+
|
|
52
|
+
action = { method: 'post', url: endpoint }
|
|
53
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Cancel an authorisation
|
|
57
|
+
def cancel(request, headers: {})
|
|
58
|
+
endpoint = '/cancel'.gsub(/{.+?}/, '%s')
|
|
59
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
60
|
+
endpoint = format(endpoint)
|
|
61
|
+
|
|
62
|
+
action = { method: 'post', url: endpoint }
|
|
63
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Cancel or refund a payment
|
|
67
|
+
def cancel_or_refund(request, headers: {})
|
|
68
|
+
endpoint = '/cancelOrRefund'.gsub(/{.+?}/, '%s')
|
|
69
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
70
|
+
endpoint = format(endpoint)
|
|
71
|
+
|
|
72
|
+
action = { method: 'post', url: endpoint }
|
|
73
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Capture an authorisation
|
|
77
|
+
def capture(request, headers: {})
|
|
78
|
+
endpoint = '/capture'.gsub(/{.+?}/, '%s')
|
|
79
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
80
|
+
endpoint = format(endpoint)
|
|
81
|
+
|
|
82
|
+
action = { method: 'post', url: endpoint }
|
|
83
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Create a donation
|
|
87
|
+
#
|
|
88
|
+
# Deprecated
|
|
89
|
+
def donate(request, headers: {})
|
|
90
|
+
endpoint = '/donate'.gsub(/{.+?}/, '%s')
|
|
91
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
92
|
+
endpoint = format(endpoint)
|
|
93
|
+
|
|
94
|
+
action = { method: 'post', url: endpoint }
|
|
95
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
# Get the 3DS authentication result
|
|
99
|
+
def get_authentication_result(request, headers: {})
|
|
100
|
+
endpoint = '/getAuthenticationResult'.gsub(/{.+?}/, '%s')
|
|
101
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
102
|
+
endpoint = format(endpoint)
|
|
103
|
+
|
|
104
|
+
action = { method: 'post', url: endpoint }
|
|
105
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
# Refund a captured payment
|
|
109
|
+
def refund(request, headers: {})
|
|
110
|
+
endpoint = '/refund'.gsub(/{.+?}/, '%s')
|
|
111
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
112
|
+
endpoint = format(endpoint)
|
|
113
|
+
|
|
114
|
+
action = { method: 'post', url: endpoint }
|
|
115
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Get the 3DS2 authentication result
|
|
119
|
+
def retrieve3ds2_result(request, headers: {})
|
|
120
|
+
endpoint = '/retrieve3ds2Result'.gsub(/{.+?}/, '%s')
|
|
121
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
122
|
+
endpoint = format(endpoint)
|
|
123
|
+
|
|
124
|
+
action = { method: 'post', url: endpoint }
|
|
125
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
# Cancel an authorisation using your reference
|
|
129
|
+
def technical_cancel(request, headers: {})
|
|
130
|
+
endpoint = '/technicalCancel'.gsub(/{.+?}/, '%s')
|
|
131
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
132
|
+
endpoint = format(endpoint)
|
|
133
|
+
|
|
134
|
+
action = { method: 'post', url: endpoint }
|
|
135
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
# Cancel an in-person refund
|
|
139
|
+
def void_pending_refund(request, headers: {})
|
|
140
|
+
endpoint = '/voidPendingRefund'.gsub(/{.+?}/, '%s')
|
|
141
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
142
|
+
endpoint = format(endpoint)
|
|
143
|
+
|
|
144
|
+
action = { method: 'post', url: endpoint }
|
|
145
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
end
|
|
149
|
+
end
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
require_relative './service'
|
|
2
|
+
module Adyen
|
|
3
|
+
|
|
4
|
+
# NOTE: This class is auto generated by OpenAPI Generator
|
|
5
|
+
# Ref: https://openapi-generator.tech
|
|
6
|
+
#
|
|
7
|
+
# Do not edit the class manually.
|
|
8
|
+
class PaymentsApp < Service
|
|
9
|
+
attr_accessor :service, :version
|
|
10
|
+
|
|
11
|
+
DEFAULT_VERSION = 1
|
|
12
|
+
def initialize(client, version = DEFAULT_VERSION)
|
|
13
|
+
super(client, version, 'PaymentsApp')
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
# Create a boarding token - merchant level
|
|
17
|
+
def generate_payments_app_boarding_token_for_merchant(request, merchant_id, boarding_token_request, headers: {})
|
|
18
|
+
endpoint = '/merchants/{merchantId}/generatePaymentsAppBoardingToken'.gsub(/{.+?}/, '%s')
|
|
19
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
20
|
+
endpoint = format(endpoint,_merchant_id)
|
|
21
|
+
|
|
22
|
+
action = { method: 'post', url: endpoint }
|
|
23
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# Create a boarding token - store level
|
|
27
|
+
def generate_payments_app_boarding_token_for_store(request, merchant_id, store_id, boarding_token_request, headers: {})
|
|
28
|
+
endpoint = '/merchants/{merchantId}/stores/{storeId}/generatePaymentsAppBoardingToken'.gsub(/{.+?}/, '%s')
|
|
29
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
30
|
+
endpoint = format(endpoint,_merchant_id,_store_id)
|
|
31
|
+
|
|
32
|
+
action = { method: 'post', url: endpoint }
|
|
33
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
# Get a list of Payments Apps - merchant level
|
|
37
|
+
def list_payments_app_for_merchant(merchant_id, headers: {}, query_params: {})
|
|
38
|
+
endpoint = '/merchants/{merchantId}/paymentsApps'.gsub(/{.+?}/, '%s')
|
|
39
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
40
|
+
endpoint = format(endpoint,_merchant_id)
|
|
41
|
+
endpoint += create_query_string(query_params)
|
|
42
|
+
action = { method: 'get', url: endpoint }
|
|
43
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# Get a list of Payments Apps - store level
|
|
47
|
+
def list_payments_app_for_store(merchant_id, store_id, headers: {}, query_params: {})
|
|
48
|
+
endpoint = '/merchants/{merchantId}/stores/{storeId}/paymentsApps'.gsub(/{.+?}/, '%s')
|
|
49
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
50
|
+
endpoint = format(endpoint,_merchant_id,_store_id)
|
|
51
|
+
endpoint += create_query_string(query_params)
|
|
52
|
+
action = { method: 'get', url: endpoint }
|
|
53
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Revoke Payments App instance authentication
|
|
57
|
+
def revoke_payments_app(merchant_id, installation_id, headers: {})
|
|
58
|
+
endpoint = '/merchants/{merchantId}/paymentsApps/{installationId}/revoke'.gsub(/{.+?}/, '%s')
|
|
59
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
60
|
+
endpoint = format(endpoint,_merchant_id,_installation_id)
|
|
61
|
+
|
|
62
|
+
action = { method: 'post', url: endpoint }
|
|
63
|
+
@client.call_adyen_api(@service, action, {}, headers, @version)
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
end
|
|
67
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
require_relative '../service'
|
|
2
|
+
module Adyen
|
|
3
|
+
|
|
4
|
+
# NOTE: This class is auto generated by OpenAPI Generator
|
|
5
|
+
# Ref: https://openapi-generator.tech
|
|
6
|
+
#
|
|
7
|
+
# Do not edit the class manually.
|
|
8
|
+
class InitializationApi < Service
|
|
9
|
+
attr_accessor :service, :version
|
|
10
|
+
|
|
11
|
+
def initialize(client, version = DEFAULT_VERSION)
|
|
12
|
+
super(client, version, 'Payout')
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# Store payout details
|
|
16
|
+
def store_detail(request, headers: {})
|
|
17
|
+
endpoint = '/storeDetail'.gsub(/{.+?}/, '%s')
|
|
18
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
19
|
+
endpoint = format(endpoint)
|
|
20
|
+
|
|
21
|
+
action = { method: 'post', url: endpoint }
|
|
22
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# Store details and submit a payout
|
|
26
|
+
def store_detail_and_submit_third_party(request, headers: {})
|
|
27
|
+
endpoint = '/storeDetailAndSubmitThirdParty'.gsub(/{.+?}/, '%s')
|
|
28
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
29
|
+
endpoint = format(endpoint)
|
|
30
|
+
|
|
31
|
+
action = { method: 'post', url: endpoint }
|
|
32
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# Submit a payout
|
|
36
|
+
def submit_third_party(request, headers: {})
|
|
37
|
+
endpoint = '/submitThirdParty'.gsub(/{.+?}/, '%s')
|
|
38
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
39
|
+
endpoint = format(endpoint)
|
|
40
|
+
|
|
41
|
+
action = { method: 'post', url: endpoint }
|
|
42
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
require_relative '../service'
|
|
2
|
+
module Adyen
|
|
3
|
+
|
|
4
|
+
# NOTE: This class is auto generated by OpenAPI Generator
|
|
5
|
+
# Ref: https://openapi-generator.tech
|
|
6
|
+
#
|
|
7
|
+
# Do not edit the class manually.
|
|
8
|
+
class InstantPayoutsApi < Service
|
|
9
|
+
attr_accessor :service, :version
|
|
10
|
+
|
|
11
|
+
def initialize(client, version = DEFAULT_VERSION)
|
|
12
|
+
super(client, version, 'Payout')
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# Make an instant card payout
|
|
16
|
+
def payout(request, headers: {})
|
|
17
|
+
endpoint = '/payout'.gsub(/{.+?}/, '%s')
|
|
18
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
19
|
+
endpoint = format(endpoint)
|
|
20
|
+
|
|
21
|
+
action = { method: 'post', url: endpoint }
|
|
22
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
require_relative '../service'
|
|
2
|
+
module Adyen
|
|
3
|
+
|
|
4
|
+
# NOTE: This class is auto generated by OpenAPI Generator
|
|
5
|
+
# Ref: https://openapi-generator.tech
|
|
6
|
+
#
|
|
7
|
+
# Do not edit the class manually.
|
|
8
|
+
class ReviewingApi < Service
|
|
9
|
+
attr_accessor :service, :version
|
|
10
|
+
|
|
11
|
+
def initialize(client, version = DEFAULT_VERSION)
|
|
12
|
+
super(client, version, 'Payout')
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# Confirm a payout
|
|
16
|
+
def confirm_third_party(request, headers: {})
|
|
17
|
+
endpoint = '/confirmThirdParty'.gsub(/{.+?}/, '%s')
|
|
18
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
19
|
+
endpoint = format(endpoint)
|
|
20
|
+
|
|
21
|
+
action = { method: 'post', url: endpoint }
|
|
22
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
# Cancel a payout
|
|
26
|
+
def decline_third_party(request, headers: {})
|
|
27
|
+
endpoint = '/declineThirdParty'.gsub(/{.+?}/, '%s')
|
|
28
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
29
|
+
endpoint = format(endpoint)
|
|
30
|
+
|
|
31
|
+
action = { method: 'post', url: endpoint }
|
|
32
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
end
|
|
36
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
require_relative 'payout/initialization_api'
|
|
2
|
+
require_relative 'payout/instant_payouts_api'
|
|
3
|
+
require_relative 'payout/reviewing_api'
|
|
4
|
+
|
|
5
|
+
module Adyen
|
|
6
|
+
|
|
7
|
+
# NOTE: This class is auto generated by OpenAPI Generator
|
|
8
|
+
# Ref: https://openapi-generator.tech
|
|
9
|
+
#
|
|
10
|
+
# Do not edit the class manually.
|
|
11
|
+
class Payout
|
|
12
|
+
attr_accessor :service, :version
|
|
13
|
+
|
|
14
|
+
DEFAULT_VERSION = 68
|
|
15
|
+
def initialize(client, version = DEFAULT_VERSION)
|
|
16
|
+
@service = 'Payout'
|
|
17
|
+
@client = client
|
|
18
|
+
@version = version
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def initialization_api
|
|
22
|
+
@initialization_api ||= Adyen::InitializationApi.new(@client, @version)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def instant_payouts_api
|
|
26
|
+
@instant_payouts_api ||= Adyen::InstantPayoutsApi.new(@client, @version)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def reviewing_api
|
|
30
|
+
@reviewing_api ||= Adyen::ReviewingApi.new(@client, @version)
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
require_relative './service'
|
|
2
|
+
module Adyen
|
|
3
|
+
|
|
4
|
+
# NOTE: This class is auto generated by OpenAPI Generator
|
|
5
|
+
# Ref: https://openapi-generator.tech
|
|
6
|
+
#
|
|
7
|
+
# Do not edit the class manually.
|
|
8
|
+
class PosMobile < Service
|
|
9
|
+
attr_accessor :service, :version
|
|
10
|
+
|
|
11
|
+
DEFAULT_VERSION = 68
|
|
12
|
+
def initialize(client, version = DEFAULT_VERSION)
|
|
13
|
+
super(client, version, 'PosMobile')
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
# Create a communication session
|
|
17
|
+
def create_communication_session(request, headers: {})
|
|
18
|
+
endpoint = '/sessions'.gsub(/{.+?}/, '%s')
|
|
19
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
20
|
+
endpoint = format(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,82 @@
|
|
|
1
|
+
require_relative './service'
|
|
2
|
+
module Adyen
|
|
3
|
+
|
|
4
|
+
# NOTE: This class is auto generated by OpenAPI Generator
|
|
5
|
+
# Ref: https://openapi-generator.tech
|
|
6
|
+
#
|
|
7
|
+
# Do not edit the class manually.
|
|
8
|
+
class PosTerminalManagement < Service
|
|
9
|
+
attr_accessor :service, :version
|
|
10
|
+
|
|
11
|
+
DEFAULT_VERSION = 1
|
|
12
|
+
def initialize(client, version = DEFAULT_VERSION)
|
|
13
|
+
super(client, version, 'PosTerminalManagement')
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
# Assign terminals
|
|
17
|
+
#
|
|
18
|
+
# Deprecated since POS Terminal Management API v1
|
|
19
|
+
# Use [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview).
|
|
20
|
+
def assign_terminals(request, headers: {})
|
|
21
|
+
endpoint = '/assignTerminals'.gsub(/{.+?}/, '%s')
|
|
22
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
23
|
+
endpoint = format(endpoint)
|
|
24
|
+
|
|
25
|
+
action = { method: 'post', url: endpoint }
|
|
26
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
# Get the account or store of a terminal
|
|
30
|
+
#
|
|
31
|
+
# Deprecated since POS Terminal Management API v1
|
|
32
|
+
# Use [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview).
|
|
33
|
+
def find_terminal(request, headers: {})
|
|
34
|
+
endpoint = '/findTerminal'.gsub(/{.+?}/, '%s')
|
|
35
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
36
|
+
endpoint = format(endpoint)
|
|
37
|
+
|
|
38
|
+
action = { method: 'post', url: endpoint }
|
|
39
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
# Get the stores of an account
|
|
43
|
+
#
|
|
44
|
+
# Deprecated since POS Terminal Management API v1
|
|
45
|
+
# Use [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview).
|
|
46
|
+
def get_stores_under_account(request, headers: {})
|
|
47
|
+
endpoint = '/getStoresUnderAccount'.gsub(/{.+?}/, '%s')
|
|
48
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
49
|
+
endpoint = format(endpoint)
|
|
50
|
+
|
|
51
|
+
action = { method: 'post', url: endpoint }
|
|
52
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Get the details of a terminal
|
|
56
|
+
#
|
|
57
|
+
# Deprecated since POS Terminal Management API v1
|
|
58
|
+
# Use [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview).
|
|
59
|
+
def get_terminal_details(request, headers: {})
|
|
60
|
+
endpoint = '/getTerminalDetails'.gsub(/{.+?}/, '%s')
|
|
61
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
62
|
+
endpoint = format(endpoint)
|
|
63
|
+
|
|
64
|
+
action = { method: 'post', url: endpoint }
|
|
65
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Get the list of terminals
|
|
69
|
+
#
|
|
70
|
+
# Deprecated since POS Terminal Management API v1
|
|
71
|
+
# Use [Management API](https://docs.adyen.com/api-explorer/Management/latest/overview).
|
|
72
|
+
def get_terminals_under_account(request, headers: {})
|
|
73
|
+
endpoint = '/getTerminalsUnderAccount'.gsub(/{.+?}/, '%s')
|
|
74
|
+
endpoint = endpoint.gsub(%r{^/}, '')
|
|
75
|
+
endpoint = format(endpoint)
|
|
76
|
+
|
|
77
|
+
action = { method: 'post', url: endpoint }
|
|
78
|
+
@client.call_adyen_api(@service, action, request, headers, @version)
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
end
|
|
82
|
+
end
|