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.
Files changed (219) hide show
  1. checksums.yaml +4 -4
  2. data/.github/CODEOWNERS +1 -1
  3. data/.github/release.yml +18 -0
  4. data/.github/workflows/codeql.yml +37 -0
  5. data/.github/workflows/label_new_issues.yml +15 -0
  6. data/.github/workflows/release.yml +40 -0
  7. data/.github/workflows/ruby.yml +2 -2
  8. data/.github/workflows/rubygems_release.yml +18 -0
  9. data/.github/workflows/stale.yml +26 -0
  10. data/.gitignore +3 -0
  11. data/.rubocop.yml +8 -0
  12. data/CONTRIBUTING.md +1 -1
  13. data/Gemfile +7 -7
  14. data/Makefile +79 -0
  15. data/README.md +158 -20
  16. data/Rakefile +3 -3
  17. data/VERSION +2 -0
  18. data/adyen-ruby-api-library.gemspec +6 -3
  19. data/bin/console +2 -2
  20. data/lib/adyen/client.rb +213 -99
  21. data/lib/adyen/errors.rb +30 -22
  22. data/lib/adyen/hash_with_accessors.rb +12 -7
  23. data/lib/adyen/services/balanceControlService.rb +27 -0
  24. data/lib/adyen/services/balancePlatform/account_holders_api.rb +76 -0
  25. data/lib/adyen/services/balancePlatform/balance_accounts_api.rb +116 -0
  26. data/lib/adyen/services/balancePlatform/bank_account_validation_api.rb +26 -0
  27. data/lib/adyen/services/balancePlatform/card_orders_api.rb +36 -0
  28. data/lib/adyen/services/balancePlatform/grant_accounts_api.rb +26 -0
  29. data/lib/adyen/services/balancePlatform/grant_offers_api.rb +36 -0
  30. data/lib/adyen/services/balancePlatform/manage_card_pin_api.rb +46 -0
  31. data/lib/adyen/services/balancePlatform/manage_sca_devices_api.rb +56 -0
  32. data/lib/adyen/services/balancePlatform/network_tokens_api.rb +36 -0
  33. data/lib/adyen/services/balancePlatform/payment_instrument_groups_api.rb +46 -0
  34. data/lib/adyen/services/balancePlatform/payment_instruments_api.rb +86 -0
  35. data/lib/adyen/services/balancePlatform/platform_api.rb +46 -0
  36. data/lib/adyen/services/balancePlatform/transaction_rules_api.rb +56 -0
  37. data/lib/adyen/services/balancePlatform/transfer_routes_api.rb +26 -0
  38. data/lib/adyen/services/balancePlatform.rb +89 -0
  39. data/lib/adyen/services/binLookup.rb +37 -0
  40. data/lib/adyen/services/checkout/donations_api.rb +36 -0
  41. data/lib/adyen/services/checkout/modifications_api.rb +76 -0
  42. data/lib/adyen/services/checkout/orders_api.rb +46 -0
  43. data/lib/adyen/services/checkout/payment_links_api.rb +46 -0
  44. data/lib/adyen/services/checkout/payments_api.rb +76 -0
  45. data/lib/adyen/services/checkout/recurring_api.rb +46 -0
  46. data/lib/adyen/services/checkout/utility_api.rb +48 -0
  47. data/lib/adyen/services/checkout.rb +29 -108
  48. data/lib/adyen/services/dataProtection.rb +27 -0
  49. data/lib/adyen/services/disputes.rb +67 -0
  50. data/lib/adyen/services/legalEntityManagement/business_lines_api.rb +56 -0
  51. data/lib/adyen/services/legalEntityManagement/documents_api.rb +56 -0
  52. data/lib/adyen/services/legalEntityManagement/hosted_onboarding_api.rb +46 -0
  53. data/lib/adyen/services/legalEntityManagement/legal_entities_api.rb +76 -0
  54. data/lib/adyen/services/legalEntityManagement/pci_questionnaires_api.rb +66 -0
  55. data/lib/adyen/services/legalEntityManagement/tax_e_delivery_consent_api.rb +36 -0
  56. data/lib/adyen/services/legalEntityManagement/terms_of_service_api.rb +66 -0
  57. data/lib/adyen/services/legalEntityManagement/transfer_instruments_api.rb +56 -0
  58. data/lib/adyen/services/legalEntityManagement.rb +59 -0
  59. data/lib/adyen/services/management/account_company_level_api.rb +46 -0
  60. data/lib/adyen/services/management/account_merchant_level_api.rb +56 -0
  61. data/lib/adyen/services/management/account_store_level_api.rb +96 -0
  62. data/lib/adyen/services/management/allowed_origins_company_level_api.rb +56 -0
  63. data/lib/adyen/services/management/allowed_origins_merchant_level_api.rb +56 -0
  64. data/lib/adyen/services/management/android_files_company_level_api.rb +76 -0
  65. data/lib/adyen/services/management/api_credentials_company_level_api.rb +56 -0
  66. data/lib/adyen/services/management/api_credentials_merchant_level_api.rb +56 -0
  67. data/lib/adyen/services/management/api_key_company_level_api.rb +26 -0
  68. data/lib/adyen/services/management/api_key_merchant_level_api.rb +26 -0
  69. data/lib/adyen/services/management/client_key_company_level_api.rb +26 -0
  70. data/lib/adyen/services/management/client_key_merchant_level_api.rb +26 -0
  71. data/lib/adyen/services/management/my_api_credential_api.rb +76 -0
  72. data/lib/adyen/services/management/payment_methods_merchant_level_api.rb +76 -0
  73. data/lib/adyen/services/management/payout_settings_merchant_level_api.rb +66 -0
  74. data/lib/adyen/services/management/split_configuration_merchant_level_api.rb +106 -0
  75. data/lib/adyen/services/management/terminal_actions_company_level_api.rb +36 -0
  76. data/lib/adyen/services/management/terminal_actions_terminal_level_api.rb +26 -0
  77. data/lib/adyen/services/management/terminal_orders_company_level_api.rb +116 -0
  78. data/lib/adyen/services/management/terminal_orders_merchant_level_api.rb +116 -0
  79. data/lib/adyen/services/management/terminal_settings_company_level_api.rb +56 -0
  80. data/lib/adyen/services/management/terminal_settings_merchant_level_api.rb +56 -0
  81. data/lib/adyen/services/management/terminal_settings_store_level_api.rb +96 -0
  82. data/lib/adyen/services/management/terminal_settings_terminal_level_api.rb +56 -0
  83. data/lib/adyen/services/management/terminals_terminal_level_api.rb +36 -0
  84. data/lib/adyen/services/management/users_company_level_api.rb +56 -0
  85. data/lib/adyen/services/management/users_merchant_level_api.rb +56 -0
  86. data/lib/adyen/services/management/webhooks_company_level_api.rb +86 -0
  87. data/lib/adyen/services/management/webhooks_merchant_level_api.rb +86 -0
  88. data/lib/adyen/services/management.rb +164 -0
  89. data/lib/adyen/services/marketpay.rb +42 -36
  90. data/lib/adyen/services/payment.rb +149 -0
  91. data/lib/adyen/services/paymentsApp.rb +67 -0
  92. data/lib/adyen/services/payout/initialization_api.rb +46 -0
  93. data/lib/adyen/services/payout/instant_payouts_api.rb +26 -0
  94. data/lib/adyen/services/payout/reviewing_api.rb +36 -0
  95. data/lib/adyen/services/payout.rb +34 -0
  96. data/lib/adyen/services/posMobile.rb +27 -0
  97. data/lib/adyen/services/posTerminalManagement.rb +82 -0
  98. data/lib/adyen/services/recurring.rb +70 -13
  99. data/lib/adyen/services/service.rb +8 -2
  100. data/lib/adyen/services/storedValue.rb +77 -0
  101. data/lib/adyen/services/terminalCloudAPI.rb +38 -0
  102. data/lib/adyen/services/transfers/capital_api.rb +55 -0
  103. data/lib/adyen/services/transfers/transactions_api.rb +36 -0
  104. data/lib/adyen/services/transfers/transfers_api.rb +76 -0
  105. data/lib/adyen/services/transfers.rb +34 -0
  106. data/lib/adyen/utils/hmac_validator.rb +52 -22
  107. data/lib/adyen/version.rb +2 -2
  108. data/lib/adyen-ruby-api-library.rb +23 -15
  109. data/renovate.json +3 -3
  110. data/spec/account_spec.rb +20 -20
  111. data/spec/balance_control_spec.rb +43 -0
  112. data/spec/balance_platform_spec.rb +129 -0
  113. data/spec/bin_lookup_spec.rb +69 -11
  114. data/spec/checkout-oauth_spec.rb +588 -0
  115. data/spec/checkout_spec.rb +591 -314
  116. data/spec/client_spec.rb +240 -45
  117. data/spec/data_protection_spec.rb +4 -4
  118. data/spec/disputes_spec.rb +45 -0
  119. data/spec/errors_spec.rb +44 -15
  120. data/spec/fund_spec.rb +10 -10
  121. data/spec/hash_with_accessors_spec.rb +18 -8
  122. data/spec/hop_spec.rb +4 -4
  123. data/spec/lem_spec.rb +63 -0
  124. data/spec/management-oauth_spec.rb +62 -0
  125. data/spec/management_spec.rb +66 -0
  126. data/spec/mocks/requests/BalanceControl/balance_transfer.json +10 -0
  127. data/spec/mocks/requests/BalancePlatform/create_account_holder.json +5 -0
  128. data/spec/mocks/requests/BalancePlatform/update_account_holder.json +10 -0
  129. data/spec/mocks/requests/Checkout/amount_updates.json +22 -0
  130. data/spec/mocks/requests/Checkout/apple_pay_sessions.json +5 -0
  131. data/spec/mocks/requests/Checkout/capture.json +34 -0
  132. data/spec/mocks/requests/Checkout/generic_cancel.json +5 -0
  133. data/spec/mocks/requests/Checkout/modifications_request.json +0 -0
  134. data/spec/mocks/requests/Checkout/psp_cancel.json +4 -0
  135. data/spec/mocks/requests/Checkout/refund.json +34 -0
  136. data/spec/mocks/requests/DisputesService/retrieve_applicable_defense_reasons.json +4 -0
  137. data/spec/mocks/requests/LegalEntityManagement/create_business_line.json +15 -0
  138. data/spec/mocks/requests/Management/create_store.json +15 -0
  139. data/spec/mocks/requests/Recurring/create_permit.json +6 -0
  140. data/spec/mocks/requests/StoredValue/issue_giftcard.json +12 -0
  141. data/spec/mocks/requests/TerminalCloudAPI/connected_terminals.json +3 -0
  142. data/spec/mocks/requests/TerminalCloudAPI/sync_payment.json +29 -0
  143. data/spec/mocks/requests/Transfers/get_transactions.json +82 -0
  144. data/spec/mocks/requests/Transfers/make_transfer.json +32 -0
  145. data/spec/mocks/responses/BalanceControl/balance_transfer.json +14 -0
  146. data/spec/mocks/responses/BalancePlatform/create_account_holder.json +41 -0
  147. data/spec/mocks/responses/BalancePlatform/get_balance_account.json +15 -0
  148. data/spec/mocks/responses/BalancePlatform/update_account_holder.json +16 -0
  149. data/spec/mocks/responses/Checkout/amount_updates.json +24 -0
  150. data/spec/mocks/responses/Checkout/apple_pay_sessions.json +3 -0
  151. data/spec/mocks/responses/Checkout/capture.json +37 -0
  152. data/spec/mocks/responses/Checkout/generic_cancel.json +7 -0
  153. data/spec/mocks/responses/Checkout/modifications.json +0 -0
  154. data/spec/mocks/responses/Checkout/psp_cancel.json +7 -0
  155. data/spec/mocks/responses/Checkout/refund.json +37 -0
  156. data/spec/mocks/responses/Checkout/stored_payment_methods.json +1 -0
  157. data/spec/mocks/responses/DisputesService/retrieve_applicable_defense_reasons.json +71 -0
  158. data/spec/mocks/responses/LegalEntityManagement/create_business_line.json +17 -0
  159. data/spec/mocks/responses/Management/create_store.json +23 -0
  160. data/spec/mocks/responses/Management/get_companies.json +42 -0
  161. data/spec/mocks/responses/Recurring/create_permit.json +4 -0
  162. data/spec/mocks/responses/StoredValue/issue_giftcard.json +13 -0
  163. data/spec/mocks/responses/TerminalCloudAPI/connected_terminals.json +5 -0
  164. data/spec/mocks/responses/TerminalCloudAPI/sync_payment.json +18 -0
  165. data/spec/mocks/responses/Transfers/get_transactions.json +82 -0
  166. data/spec/mocks/responses/Transfers/make_transfer.json +36 -0
  167. data/spec/mocks/responses/Webhooks/backslash_webhook.json +41 -0
  168. data/spec/mocks/responses/Webhooks/colon_webhook.json +41 -0
  169. data/spec/mocks/responses/Webhooks/forwardslash_webhook.json +41 -0
  170. data/spec/mocks/responses/Webhooks/mixed_webhook.json +41 -0
  171. data/spec/notification_spec.rb +9 -9
  172. data/spec/payments_spec.rb +39 -22
  173. data/spec/payouts_spec.rb +39 -15
  174. data/spec/pos_terminal_management_spec.rb +44 -0
  175. data/spec/recurring_spec.rb +8 -8
  176. data/spec/service_spec.rb +4 -0
  177. data/spec/spec_helper.rb +42 -46
  178. data/spec/stored_value_spec.rb +44 -0
  179. data/spec/terminal_cloud_api_spec.rb +91 -0
  180. data/spec/transfers_spec.rb +64 -0
  181. data/spec/utils/hmac_validator_spec.rb +53 -23
  182. data/templates/api-single.mustache +32 -0
  183. data/templates/api-small.mustache +39 -0
  184. data/templates/api.mustache +38 -0
  185. data/templates/config.yaml +10 -0
  186. metadata +160 -47
  187. data/.github/dependabot.yml +0 -8
  188. data/docs/checkout.html +0 -128
  189. data/docs/index.html +0 -50
  190. data/docs/install-library.html +0 -61
  191. data/docs/javascripts/prism.js +0 -5
  192. data/docs/javascripts/scale.fix.js +0 -17
  193. data/docs/marketpay.html +0 -171
  194. data/docs/params.json +0 -1
  195. data/docs/payment.html +0 -106
  196. data/docs/payout.html +0 -135
  197. data/docs/recurring.html +0 -113
  198. data/docs/stylesheets/github-light.css +0 -115
  199. data/docs/stylesheets/prism.css +0 -140
  200. data/docs/stylesheets/styles.css +0 -324
  201. data/docs/using-library.html +0 -67
  202. data/lib/adyen/services/bin_lookup.rb +0 -18
  203. data/lib/adyen/services/data_protection.rb +0 -17
  204. data/lib/adyen/services/dispute.rb +0 -20
  205. data/lib/adyen/services/payments.rb +0 -34
  206. data/lib/adyen/services/payouts.rb +0 -22
  207. data/lib/adyen/services/postfmapi.rb +0 -19
  208. data/spec/dispute_spec.rb +0 -17
  209. data/spec/mocks/requests/DisputeService/defend_dispute.json +0 -5
  210. data/spec/mocks/requests/DisputeService/delete_dispute_defense_document.json +0 -5
  211. data/spec/mocks/requests/DisputeService/retrieve_applicable_defense_reasons.json +0 -4
  212. data/spec/mocks/requests/DisputeService/supply_defense_document.json +0 -11
  213. data/spec/mocks/requests/Recurring/store_token.json +0 -15
  214. data/spec/mocks/responses/DisputeService/defend_dispute.json +0 -5
  215. data/spec/mocks/responses/DisputeService/delete_dispute_defense_document.json +0 -5
  216. data/spec/mocks/responses/DisputeService/retrieve_applicable_defense_reasons.json +0 -28
  217. data/spec/mocks/responses/DisputeService/supply_defense_document.json +0 -5
  218. data/spec/mocks/responses/Recurring/store_token.json +0 -7
  219. data/spec/postfmapi_spec.rb +0 -16
@@ -0,0 +1,56 @@
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 AccountMerchantLevelApi < Service
9
+ attr_accessor :service, :version
10
+
11
+ def initialize(client, version = DEFAULT_VERSION)
12
+ super(client, version, 'Management')
13
+ end
14
+
15
+ # Create a merchant account
16
+ def create_merchant_account(request, headers: {})
17
+ endpoint = '/merchants'.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
+ # Get a merchant account
26
+ def get_merchant_account(merchant_id, headers: {})
27
+ endpoint = '/merchants/{merchantId}'.gsub(/{.+?}/, '%s')
28
+ endpoint = endpoint.gsub(%r{^/}, '')
29
+ endpoint = format(endpoint, merchant_id)
30
+
31
+ action = { method: 'get', url: endpoint }
32
+ @client.call_adyen_api(@service, action, {}, headers, @version)
33
+ end
34
+
35
+ # Get a list of merchant accounts
36
+ def list_merchant_accounts(headers: {}, query_params: {})
37
+ endpoint = '/merchants'.gsub(/{.+?}/, '%s')
38
+ endpoint = endpoint.gsub(%r{^/}, '')
39
+ endpoint = format(endpoint)
40
+ endpoint += create_query_string(query_params)
41
+ action = { method: 'get', url: endpoint }
42
+ @client.call_adyen_api(@service, action, {}, headers, @version)
43
+ end
44
+
45
+ # Request to activate a merchant account
46
+ def request_to_activate_merchant_account(merchant_id, headers: {})
47
+ endpoint = '/merchants/{merchantId}/activate'.gsub(/{.+?}/, '%s')
48
+ endpoint = endpoint.gsub(%r{^/}, '')
49
+ endpoint = format(endpoint, merchant_id)
50
+
51
+ action = { method: 'post', url: endpoint }
52
+ @client.call_adyen_api(@service, action, {}, headers, @version)
53
+ end
54
+
55
+ end
56
+ end
@@ -0,0 +1,96 @@
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 AccountStoreLevelApi < Service
9
+ attr_accessor :service, :version
10
+
11
+ def initialize(client, version = DEFAULT_VERSION)
12
+ super(client, version, 'Management')
13
+ end
14
+
15
+ # Create a store
16
+ def create_store(request, headers: {})
17
+ endpoint = '/stores'.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
+ # Create a store
26
+ def create_store_by_merchant_id(request, merchant_id, headers: {})
27
+ endpoint = '/merchants/{merchantId}/stores'.gsub(/{.+?}/, '%s')
28
+ endpoint = endpoint.gsub(%r{^/}, '')
29
+ endpoint = format(endpoint, merchant_id)
30
+
31
+ action = { method: 'post', url: endpoint }
32
+ @client.call_adyen_api(@service, action, request, headers, @version)
33
+ end
34
+
35
+ # Get a store
36
+ def get_store(merchant_id, store_id, headers: {})
37
+ endpoint = '/merchants/{merchantId}/stores/{storeId}'.gsub(/{.+?}/, '%s')
38
+ endpoint = endpoint.gsub(%r{^/}, '')
39
+ endpoint = format(endpoint, merchant_id, store_id)
40
+
41
+ action = { method: 'get', url: endpoint }
42
+ @client.call_adyen_api(@service, action, {}, headers, @version)
43
+ end
44
+
45
+ # Get a store
46
+ def get_store_by_id(store_id, headers: {})
47
+ endpoint = '/stores/{storeId}'.gsub(/{.+?}/, '%s')
48
+ endpoint = endpoint.gsub(%r{^/}, '')
49
+ endpoint = format(endpoint, store_id)
50
+
51
+ action = { method: 'get', url: endpoint }
52
+ @client.call_adyen_api(@service, action, {}, headers, @version)
53
+ end
54
+
55
+ # Get a list of stores
56
+ def list_stores(headers: {}, query_params: {})
57
+ endpoint = '/stores'.gsub(/{.+?}/, '%s')
58
+ endpoint = endpoint.gsub(%r{^/}, '')
59
+ endpoint = format(endpoint)
60
+ endpoint += create_query_string(query_params)
61
+ action = { method: 'get', url: endpoint }
62
+ @client.call_adyen_api(@service, action, {}, headers, @version)
63
+ end
64
+
65
+ # Get a list of stores
66
+ def list_stores_by_merchant_id(merchant_id, headers: {}, query_params: {})
67
+ endpoint = '/merchants/{merchantId}/stores'.gsub(/{.+?}/, '%s')
68
+ endpoint = endpoint.gsub(%r{^/}, '')
69
+ endpoint = format(endpoint, merchant_id)
70
+ endpoint += create_query_string(query_params)
71
+ action = { method: 'get', url: endpoint }
72
+ @client.call_adyen_api(@service, action, {}, headers, @version)
73
+ end
74
+
75
+ # Update a store
76
+ def update_store(request, merchant_id, store_id, headers: {})
77
+ endpoint = '/merchants/{merchantId}/stores/{storeId}'.gsub(/{.+?}/, '%s')
78
+ endpoint = endpoint.gsub(%r{^/}, '')
79
+ endpoint = format(endpoint, merchant_id, store_id)
80
+
81
+ action = { method: 'patch', url: endpoint }
82
+ @client.call_adyen_api(@service, action, request, headers, @version)
83
+ end
84
+
85
+ # Update a store
86
+ def update_store_by_id(request, store_id, headers: {})
87
+ endpoint = '/stores/{storeId}'.gsub(/{.+?}/, '%s')
88
+ endpoint = endpoint.gsub(%r{^/}, '')
89
+ endpoint = format(endpoint, store_id)
90
+
91
+ action = { method: 'patch', url: endpoint }
92
+ @client.call_adyen_api(@service, action, request, headers, @version)
93
+ end
94
+
95
+ end
96
+ end
@@ -0,0 +1,56 @@
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 AllowedOriginsCompanyLevelApi < Service
9
+ attr_accessor :service, :version
10
+
11
+ def initialize(client, version = DEFAULT_VERSION)
12
+ super(client, version, 'Management')
13
+ end
14
+
15
+ # Create an allowed origin
16
+ def create_allowed_origin(request, company_id, api_credential_id, headers: {})
17
+ endpoint = '/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins'.gsub(/{.+?}/, '%s')
18
+ endpoint = endpoint.gsub(%r{^/}, '')
19
+ endpoint = format(endpoint, company_id, api_credential_id)
20
+
21
+ action = { method: 'post', url: endpoint }
22
+ @client.call_adyen_api(@service, action, request, headers, @version)
23
+ end
24
+
25
+ # Delete an allowed origin
26
+ def delete_allowed_origin(company_id, api_credential_id, origin_id, headers: {})
27
+ endpoint = '/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}'.gsub(/{.+?}/, '%s')
28
+ endpoint = endpoint.gsub(%r{^/}, '')
29
+ endpoint = format(endpoint, company_id, api_credential_id, origin_id)
30
+
31
+ action = { method: 'delete', url: endpoint }
32
+ @client.call_adyen_api(@service, action, {}, headers, @version)
33
+ end
34
+
35
+ # Get an allowed origin
36
+ def get_allowed_origin(company_id, api_credential_id, origin_id, headers: {})
37
+ endpoint = '/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}'.gsub(/{.+?}/, '%s')
38
+ endpoint = endpoint.gsub(%r{^/}, '')
39
+ endpoint = format(endpoint, company_id, api_credential_id, origin_id)
40
+
41
+ action = { method: 'get', url: endpoint }
42
+ @client.call_adyen_api(@service, action, {}, headers, @version)
43
+ end
44
+
45
+ # Get a list of allowed origins
46
+ def list_allowed_origins(company_id, api_credential_id, headers: {})
47
+ endpoint = '/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins'.gsub(/{.+?}/, '%s')
48
+ endpoint = endpoint.gsub(%r{^/}, '')
49
+ endpoint = format(endpoint, company_id, api_credential_id)
50
+
51
+ action = { method: 'get', url: endpoint }
52
+ @client.call_adyen_api(@service, action, {}, headers, @version)
53
+ end
54
+
55
+ end
56
+ end
@@ -0,0 +1,56 @@
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 AllowedOriginsMerchantLevelApi < Service
9
+ attr_accessor :service, :version
10
+
11
+ def initialize(client, version = DEFAULT_VERSION)
12
+ super(client, version, 'Management')
13
+ end
14
+
15
+ # Create an allowed origin
16
+ def create_allowed_origin(request, merchant_id, api_credential_id, headers: {})
17
+ endpoint = '/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins'.gsub(/{.+?}/, '%s')
18
+ endpoint = endpoint.gsub(%r{^/}, '')
19
+ endpoint = format(endpoint, merchant_id, api_credential_id)
20
+
21
+ action = { method: 'post', url: endpoint }
22
+ @client.call_adyen_api(@service, action, request, headers, @version)
23
+ end
24
+
25
+ # Delete an allowed origin
26
+ def delete_allowed_origin(merchant_id, api_credential_id, origin_id, headers: {})
27
+ endpoint = '/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}'.gsub(/{.+?}/, '%s')
28
+ endpoint = endpoint.gsub(%r{^/}, '')
29
+ endpoint = format(endpoint, merchant_id, api_credential_id, origin_id)
30
+
31
+ action = { method: 'delete', url: endpoint }
32
+ @client.call_adyen_api(@service, action, {}, headers, @version)
33
+ end
34
+
35
+ # Get an allowed origin
36
+ def get_allowed_origin(merchant_id, api_credential_id, origin_id, headers: {})
37
+ endpoint = '/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}'.gsub(/{.+?}/, '%s')
38
+ endpoint = endpoint.gsub(%r{^/}, '')
39
+ endpoint = format(endpoint, merchant_id, api_credential_id, origin_id)
40
+
41
+ action = { method: 'get', url: endpoint }
42
+ @client.call_adyen_api(@service, action, {}, headers, @version)
43
+ end
44
+
45
+ # Get a list of allowed origins
46
+ def list_allowed_origins(merchant_id, api_credential_id, headers: {})
47
+ endpoint = '/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins'.gsub(/{.+?}/, '%s')
48
+ endpoint = endpoint.gsub(%r{^/}, '')
49
+ endpoint = format(endpoint, merchant_id, api_credential_id)
50
+
51
+ action = { method: 'get', url: endpoint }
52
+ @client.call_adyen_api(@service, action, {}, headers, @version)
53
+ end
54
+
55
+ end
56
+ end
@@ -0,0 +1,76 @@
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 AndroidFilesCompanyLevelApi < Service
9
+ attr_accessor :service, :version
10
+
11
+ def initialize(client, version = DEFAULT_VERSION)
12
+ super(client, version, 'Management')
13
+ end
14
+
15
+ # Get Android app
16
+ def get_android_app(company_id, id, headers: {})
17
+ endpoint = '/companies/{companyId}/androidApps/{id}'.gsub(/{.+?}/, '%s')
18
+ endpoint = endpoint.gsub(%r{^/}, '')
19
+ endpoint = format(endpoint, company_id, id)
20
+
21
+ action = { method: 'get', url: endpoint }
22
+ @client.call_adyen_api(@service, action, {}, headers, @version)
23
+ end
24
+
25
+ # Get a list of Android apps
26
+ def list_android_apps(company_id, headers: {}, query_params: {})
27
+ endpoint = '/companies/{companyId}/androidApps'.gsub(/{.+?}/, '%s')
28
+ endpoint = endpoint.gsub(%r{^/}, '')
29
+ endpoint = format(endpoint, company_id)
30
+ endpoint += create_query_string(query_params)
31
+ action = { method: 'get', url: endpoint }
32
+ @client.call_adyen_api(@service, action, {}, headers, @version)
33
+ end
34
+
35
+ # Get a list of Android certificates
36
+ def list_android_certificates(company_id, headers: {}, query_params: {})
37
+ endpoint = '/companies/{companyId}/androidCertificates'.gsub(/{.+?}/, '%s')
38
+ endpoint = endpoint.gsub(%r{^/}, '')
39
+ endpoint = format(endpoint, company_id)
40
+ endpoint += create_query_string(query_params)
41
+ action = { method: 'get', url: endpoint }
42
+ @client.call_adyen_api(@service, action, {}, headers, @version)
43
+ end
44
+
45
+ # Reprocess Android App
46
+ def reprocess_android_app(company_id, id, headers: {})
47
+ endpoint = '/companies/{companyId}/androidApps/{id}'.gsub(/{.+?}/, '%s')
48
+ endpoint = endpoint.gsub(%r{^/}, '')
49
+ endpoint = format(endpoint, company_id, id)
50
+
51
+ action = { method: 'patch', url: endpoint }
52
+ @client.call_adyen_api(@service, action, {}, headers, @version)
53
+ end
54
+
55
+ # Upload Android App
56
+ def upload_android_app(company_id, headers: {})
57
+ endpoint = '/companies/{companyId}/androidApps'.gsub(/{.+?}/, '%s')
58
+ endpoint = endpoint.gsub(%r{^/}, '')
59
+ endpoint = format(endpoint, company_id)
60
+
61
+ action = { method: 'post', url: endpoint }
62
+ @client.call_adyen_api(@service, action, {}, headers, @version)
63
+ end
64
+
65
+ # Upload Android Certificate
66
+ def upload_android_certificate(company_id, headers: {})
67
+ endpoint = '/companies/{companyId}/androidCertificates'.gsub(/{.+?}/, '%s')
68
+ endpoint = endpoint.gsub(%r{^/}, '')
69
+ endpoint = format(endpoint, company_id)
70
+
71
+ action = { method: 'post', url: endpoint }
72
+ @client.call_adyen_api(@service, action, {}, headers, @version)
73
+ end
74
+
75
+ end
76
+ end
@@ -0,0 +1,56 @@
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 APICredentialsCompanyLevelApi < Service
9
+ attr_accessor :service, :version
10
+
11
+ def initialize(client, version = DEFAULT_VERSION)
12
+ super(client, version, 'Management')
13
+ end
14
+
15
+ # Create an API credential.
16
+ def create_api_credential(request, company_id, headers: {})
17
+ endpoint = '/companies/{companyId}/apiCredentials'.gsub(/{.+?}/, '%s')
18
+ endpoint = endpoint.gsub(%r{^/}, '')
19
+ endpoint = format(endpoint, company_id)
20
+
21
+ action = { method: 'post', url: endpoint }
22
+ @client.call_adyen_api(@service, action, request, headers, @version)
23
+ end
24
+
25
+ # Get an API credential
26
+ def get_api_credential(company_id, api_credential_id, headers: {})
27
+ endpoint = '/companies/{companyId}/apiCredentials/{apiCredentialId}'.gsub(/{.+?}/, '%s')
28
+ endpoint = endpoint.gsub(%r{^/}, '')
29
+ endpoint = format(endpoint, company_id, api_credential_id)
30
+
31
+ action = { method: 'get', url: endpoint }
32
+ @client.call_adyen_api(@service, action, {}, headers, @version)
33
+ end
34
+
35
+ # Get a list of API credentials
36
+ def list_api_credentials(company_id, headers: {}, query_params: {})
37
+ endpoint = '/companies/{companyId}/apiCredentials'.gsub(/{.+?}/, '%s')
38
+ endpoint = endpoint.gsub(%r{^/}, '')
39
+ endpoint = format(endpoint, company_id)
40
+ endpoint += create_query_string(query_params)
41
+ action = { method: 'get', url: endpoint }
42
+ @client.call_adyen_api(@service, action, {}, headers, @version)
43
+ end
44
+
45
+ # Update an API credential.
46
+ def update_api_credential(request, company_id, api_credential_id, headers: {})
47
+ endpoint = '/companies/{companyId}/apiCredentials/{apiCredentialId}'.gsub(/{.+?}/, '%s')
48
+ endpoint = endpoint.gsub(%r{^/}, '')
49
+ endpoint = format(endpoint, company_id, api_credential_id)
50
+
51
+ action = { method: 'patch', url: endpoint }
52
+ @client.call_adyen_api(@service, action, request, headers, @version)
53
+ end
54
+
55
+ end
56
+ end
@@ -0,0 +1,56 @@
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 APICredentialsMerchantLevelApi < Service
9
+ attr_accessor :service, :version
10
+
11
+ def initialize(client, version = DEFAULT_VERSION)
12
+ super(client, version, 'Management')
13
+ end
14
+
15
+ # Create an API credential
16
+ def create_api_credential(request, merchant_id, headers: {})
17
+ endpoint = '/merchants/{merchantId}/apiCredentials'.gsub(/{.+?}/, '%s')
18
+ endpoint = endpoint.gsub(%r{^/}, '')
19
+ endpoint = format(endpoint, merchant_id)
20
+
21
+ action = { method: 'post', url: endpoint }
22
+ @client.call_adyen_api(@service, action, request, headers, @version)
23
+ end
24
+
25
+ # Get an API credential
26
+ def get_api_credential(merchant_id, api_credential_id, headers: {})
27
+ endpoint = '/merchants/{merchantId}/apiCredentials/{apiCredentialId}'.gsub(/{.+?}/, '%s')
28
+ endpoint = endpoint.gsub(%r{^/}, '')
29
+ endpoint = format(endpoint, merchant_id, api_credential_id)
30
+
31
+ action = { method: 'get', url: endpoint }
32
+ @client.call_adyen_api(@service, action, {}, headers, @version)
33
+ end
34
+
35
+ # Get a list of API credentials
36
+ def list_api_credentials(merchant_id, headers: {}, query_params: {})
37
+ endpoint = '/merchants/{merchantId}/apiCredentials'.gsub(/{.+?}/, '%s')
38
+ endpoint = endpoint.gsub(%r{^/}, '')
39
+ endpoint = format(endpoint, merchant_id)
40
+ endpoint += create_query_string(query_params)
41
+ action = { method: 'get', url: endpoint }
42
+ @client.call_adyen_api(@service, action, {}, headers, @version)
43
+ end
44
+
45
+ # Update an API credential
46
+ def update_api_credential(request, merchant_id, api_credential_id, headers: {})
47
+ endpoint = '/merchants/{merchantId}/apiCredentials/{apiCredentialId}'.gsub(/{.+?}/, '%s')
48
+ endpoint = endpoint.gsub(%r{^/}, '')
49
+ endpoint = format(endpoint, merchant_id, api_credential_id)
50
+
51
+ action = { method: 'patch', url: endpoint }
52
+ @client.call_adyen_api(@service, action, request, headers, @version)
53
+ end
54
+
55
+ end
56
+ 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 APIKeyCompanyLevelApi < Service
9
+ attr_accessor :service, :version
10
+
11
+ def initialize(client, version = DEFAULT_VERSION)
12
+ super(client, version, 'Management')
13
+ end
14
+
15
+ # Generate new API key
16
+ def generate_new_api_key(company_id, api_credential_id, headers: {})
17
+ endpoint = '/companies/{companyId}/apiCredentials/{apiCredentialId}/generateApiKey'.gsub(/{.+?}/, '%s')
18
+ endpoint = endpoint.gsub(%r{^/}, '')
19
+ endpoint = format(endpoint, company_id, api_credential_id)
20
+
21
+ action = { method: 'post', url: endpoint }
22
+ @client.call_adyen_api(@service, action, {}, headers, @version)
23
+ end
24
+
25
+ end
26
+ 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 APIKeyMerchantLevelApi < Service
9
+ attr_accessor :service, :version
10
+
11
+ def initialize(client, version = DEFAULT_VERSION)
12
+ super(client, version, 'Management')
13
+ end
14
+
15
+ # Generate new API key
16
+ def generate_new_api_key(merchant_id, api_credential_id, headers: {})
17
+ endpoint = '/merchants/{merchantId}/apiCredentials/{apiCredentialId}/generateApiKey'.gsub(/{.+?}/, '%s')
18
+ endpoint = endpoint.gsub(%r{^/}, '')
19
+ endpoint = format(endpoint, merchant_id, api_credential_id)
20
+
21
+ action = { method: 'post', url: endpoint }
22
+ @client.call_adyen_api(@service, action, {}, headers, @version)
23
+ end
24
+
25
+ end
26
+ 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 ClientKeyCompanyLevelApi < Service
9
+ attr_accessor :service, :version
10
+
11
+ def initialize(client, version = DEFAULT_VERSION)
12
+ super(client, version, 'Management')
13
+ end
14
+
15
+ # Generate new client key
16
+ def generate_new_client_key(company_id, api_credential_id, headers: {})
17
+ endpoint = '/companies/{companyId}/apiCredentials/{apiCredentialId}/generateClientKey'.gsub(/{.+?}/, '%s')
18
+ endpoint = endpoint.gsub(%r{^/}, '')
19
+ endpoint = format(endpoint, company_id, api_credential_id)
20
+
21
+ action = { method: 'post', url: endpoint }
22
+ @client.call_adyen_api(@service, action, {}, headers, @version)
23
+ end
24
+
25
+ end
26
+ 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 ClientKeyMerchantLevelApi < Service
9
+ attr_accessor :service, :version
10
+
11
+ def initialize(client, version = DEFAULT_VERSION)
12
+ super(client, version, 'Management')
13
+ end
14
+
15
+ # Generate new client key
16
+ def generate_new_client_key(merchant_id, api_credential_id, headers: {})
17
+ endpoint = '/merchants/{merchantId}/apiCredentials/{apiCredentialId}/generateClientKey'.gsub(/{.+?}/, '%s')
18
+ endpoint = endpoint.gsub(%r{^/}, '')
19
+ endpoint = format(endpoint, merchant_id, api_credential_id)
20
+
21
+ action = { method: 'post', url: endpoint }
22
+ @client.call_adyen_api(@service, action, {}, headers, @version)
23
+ end
24
+
25
+ end
26
+ end
@@ -0,0 +1,76 @@
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 MyAPICredentialApi < Service
9
+ attr_accessor :service, :version
10
+
11
+ def initialize(client, version = DEFAULT_VERSION)
12
+ super(client, version, 'Management')
13
+ end
14
+
15
+ # Add allowed origin
16
+ def add_allowed_origin(request, headers: {})
17
+ endpoint = '/me/allowedOrigins'.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
+ # Generate a client key
26
+ def generate_client_key(headers: {})
27
+ endpoint = '/me/generateClientKey'.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, {}, headers, @version)
33
+ end
34
+
35
+ # Get allowed origin details
36
+ def get_allowed_origin_details(origin_id, headers: {})
37
+ endpoint = '/me/allowedOrigins/{originId}'.gsub(/{.+?}/, '%s')
38
+ endpoint = endpoint.gsub(%r{^/}, '')
39
+ endpoint = format(endpoint, origin_id)
40
+
41
+ action = { method: 'get', url: endpoint }
42
+ @client.call_adyen_api(@service, action, {}, headers, @version)
43
+ end
44
+
45
+ # Get allowed origins
46
+ def get_allowed_origins(headers: {})
47
+ endpoint = '/me/allowedOrigins'.gsub(/{.+?}/, '%s')
48
+ endpoint = endpoint.gsub(%r{^/}, '')
49
+ endpoint = format(endpoint)
50
+
51
+ action = { method: 'get', url: endpoint }
52
+ @client.call_adyen_api(@service, action, {}, headers, @version)
53
+ end
54
+
55
+ # Get API credential details
56
+ def get_api_credential_details(headers: {})
57
+ endpoint = '/me'.gsub(/{.+?}/, '%s')
58
+ endpoint = endpoint.gsub(%r{^/}, '')
59
+ endpoint = format(endpoint)
60
+
61
+ action = { method: 'get', url: endpoint }
62
+ @client.call_adyen_api(@service, action, {}, headers, @version)
63
+ end
64
+
65
+ # Remove allowed origin
66
+ def remove_allowed_origin(origin_id, headers: {})
67
+ endpoint = '/me/allowedOrigins/{originId}'.gsub(/{.+?}/, '%s')
68
+ endpoint = endpoint.gsub(%r{^/}, '')
69
+ endpoint = format(endpoint, origin_id)
70
+
71
+ action = { method: 'delete', url: endpoint }
72
+ @client.call_adyen_api(@service, action, {}, headers, @version)
73
+ end
74
+
75
+ end
76
+ end