adyen-ruby-api-library 8.0.0 → 8.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/codeql.yml +2 -2
  3. data/.github/workflows/rubygems_release.yml +1 -4
  4. data/CONTRIBUTING.md +1 -1
  5. data/README.md +1 -1
  6. data/VERSION +1 -1
  7. data/lib/adyen/services/balancePlatform/account_holders_api.rb +9 -9
  8. data/lib/adyen/services/balancePlatform/balance_accounts_api.rb +32 -32
  9. data/lib/adyen/services/balancePlatform/payment_instrument_groups_api.rb +10 -10
  10. data/lib/adyen/services/balancePlatform/payment_instruments_api.rb +17 -17
  11. data/lib/adyen/services/balancePlatform/platform_api.rb +6 -6
  12. data/lib/adyen/services/balancePlatform/transaction_rules_api.rb +9 -9
  13. data/lib/adyen/services/checkout/modifications_api.rb +9 -9
  14. data/lib/adyen/services/checkout/orders_api.rb +6 -6
  15. data/lib/adyen/services/checkout/payment_links_api.rb +8 -8
  16. data/lib/adyen/services/checkout/payments_api.rb +9 -9
  17. data/lib/adyen/services/dataProtection.rb +1 -1
  18. data/lib/adyen/services/legalEntityManagement/business_lines_api.rb +9 -9
  19. data/lib/adyen/services/legalEntityManagement/hosted_onboarding_api.rb +10 -10
  20. data/lib/adyen/services/legalEntityManagement/legal_entities_api.rb +27 -18
  21. data/lib/adyen/services/legalEntityManagement/pci_questionnaires_api.rb +8 -8
  22. data/lib/adyen/services/legalEntityManagement/terms_of_service_api.rb +18 -18
  23. data/lib/adyen/services/legalEntityManagement/transfer_instruments_api.rb +9 -9
  24. data/lib/adyen/services/management/account_company_level_api.rb +8 -8
  25. data/lib/adyen/services/management/account_merchant_level_api.rb +8 -8
  26. data/lib/adyen/services/management/account_store_level_api.rb +26 -26
  27. data/lib/adyen/services/management/allowed_origins_company_level_api.rb +12 -12
  28. data/lib/adyen/services/management/allowed_origins_merchant_level_api.rb +12 -12
  29. data/lib/adyen/services/management/android_files_company_level_api.rb +8 -8
  30. data/lib/adyen/services/management/api_credentials_company_level_api.rb +13 -13
  31. data/lib/adyen/services/management/api_credentials_merchant_level_api.rb +13 -13
  32. data/lib/adyen/services/management/my_api_credential_api.rb +22 -22
  33. data/lib/adyen/services/management/payment_methods_merchant_level_api.rb +15 -15
  34. data/lib/adyen/services/management/payout_settings_merchant_level_api.rb +15 -15
  35. data/lib/adyen/services/management/split_configuration_merchant_level_api.rb +30 -30
  36. data/lib/adyen/services/management/terminal_actions_company_level_api.rb +8 -8
  37. data/lib/adyen/services/management/terminal_orders_company_level_api.rb +40 -40
  38. data/lib/adyen/services/management/terminal_orders_merchant_level_api.rb +40 -40
  39. data/lib/adyen/services/management/terminal_settings_store_level_api.rb +16 -16
  40. data/lib/adyen/services/management/users_company_level_api.rb +13 -13
  41. data/lib/adyen/services/management/users_merchant_level_api.rb +13 -13
  42. data/lib/adyen/services/management/webhooks_company_level_api.rb +19 -19
  43. data/lib/adyen/services/management/webhooks_merchant_level_api.rb +19 -19
  44. data/lib/adyen/services/transfers/transfers_api.rb +6 -6
  45. data/lib/adyen/version.rb +1 -1
  46. metadata +2 -2
@@ -7,13 +7,13 @@ module Adyen
7
7
  super(client, version, 'LegalEntityManagement')
8
8
  end
9
9
 
10
- def get_pci_questionnaire_details(id, headers: {})
11
- endpoint = '/legalEntities/{id}/pciQuestionnaires'.gsub(/{.+?}/, '%s')
10
+ def generate_pci_questionnaire(request, id, headers: {})
11
+ endpoint = '/legalEntities/{id}/pciQuestionnaires/generatePciTemplates'.gsub(/{.+?}/, '%s')
12
12
  endpoint = endpoint.gsub(%r{^/}, '')
13
13
  endpoint = format(endpoint, id)
14
14
 
15
- action = { method: 'get', url: endpoint }
16
- @client.call_adyen_api(@service, action, {}, headers, @version)
15
+ action = { method: 'post', url: endpoint }
16
+ @client.call_adyen_api(@service, action, request, headers, @version)
17
17
  end
18
18
 
19
19
  def get_pci_questionnaire(id, pciid, headers: {})
@@ -25,13 +25,13 @@ module Adyen
25
25
  @client.call_adyen_api(@service, action, {}, headers, @version)
26
26
  end
27
27
 
28
- def generate_pci_questionnaire(request, id, headers: {})
29
- endpoint = '/legalEntities/{id}/pciQuestionnaires/generatePciTemplates'.gsub(/{.+?}/, '%s')
28
+ def get_pci_questionnaire_details(id, headers: {})
29
+ endpoint = '/legalEntities/{id}/pciQuestionnaires'.gsub(/{.+?}/, '%s')
30
30
  endpoint = endpoint.gsub(%r{^/}, '')
31
31
  endpoint = format(endpoint, id)
32
32
 
33
- action = { method: 'post', url: endpoint }
34
- @client.call_adyen_api(@service, action, request, headers, @version)
33
+ action = { method: 'get', url: endpoint }
34
+ @client.call_adyen_api(@service, action, {}, headers, @version)
35
35
  end
36
36
 
37
37
  def sign_pci_questionnaire(request, id, headers: {})
@@ -7,24 +7,6 @@ module Adyen
7
7
  super(client, version, 'LegalEntityManagement')
8
8
  end
9
9
 
10
- def get_terms_of_service_information_for_legal_entity(id, headers: {})
11
- endpoint = '/legalEntities/{id}/termsOfServiceAcceptanceInfos'.gsub(/{.+?}/, '%s')
12
- endpoint = endpoint.gsub(%r{^/}, '')
13
- endpoint = format(endpoint, id)
14
-
15
- action = { method: 'get', url: endpoint }
16
- @client.call_adyen_api(@service, action, {}, headers, @version)
17
- end
18
-
19
- def get_terms_of_service_status(id, headers: {})
20
- endpoint = '/legalEntities/{id}/termsOfServiceStatus'.gsub(/{.+?}/, '%s')
21
- endpoint = endpoint.gsub(%r{^/}, '')
22
- endpoint = format(endpoint, id)
23
-
24
- action = { method: 'get', url: endpoint }
25
- @client.call_adyen_api(@service, action, {}, headers, @version)
26
- end
27
-
28
10
  def accept_terms_of_service(request, id, termsofservicedocumentid, headers: {})
29
11
  endpoint = '/legalEntities/{id}/termsOfService/{termsofservicedocumentid}'.gsub(/{.+?}/, '%s')
30
12
  endpoint = endpoint.gsub(%r{^/}, '')
@@ -43,5 +25,23 @@ module Adyen
43
25
  @client.call_adyen_api(@service, action, request, headers, @version)
44
26
  end
45
27
 
28
+ def get_terms_of_service_information_for_legal_entity(id, headers: {})
29
+ endpoint = '/legalEntities/{id}/termsOfServiceAcceptanceInfos'.gsub(/{.+?}/, '%s')
30
+ endpoint = endpoint.gsub(%r{^/}, '')
31
+ endpoint = format(endpoint, id)
32
+
33
+ action = { method: 'get', url: endpoint }
34
+ @client.call_adyen_api(@service, action, {}, headers, @version)
35
+ end
36
+
37
+ def get_terms_of_service_status(id, headers: {})
38
+ endpoint = '/legalEntities/{id}/termsOfServiceStatus'.gsub(/{.+?}/, '%s')
39
+ endpoint = endpoint.gsub(%r{^/}, '')
40
+ endpoint = format(endpoint, id)
41
+
42
+ action = { method: 'get', url: endpoint }
43
+ @client.call_adyen_api(@service, action, {}, headers, @version)
44
+ end
45
+
46
46
  end
47
47
  end
@@ -7,6 +7,15 @@ module Adyen
7
7
  super(client, version, 'LegalEntityManagement')
8
8
  end
9
9
 
10
+ def create_transfer_instrument(request, headers: {})
11
+ endpoint = '/transferInstruments'.gsub(/{.+?}/, '%s')
12
+ endpoint = endpoint.gsub(%r{^/}, '')
13
+ endpoint = format(endpoint)
14
+
15
+ action = { method: 'post', url: endpoint }
16
+ @client.call_adyen_api(@service, action, request, headers, @version)
17
+ end
18
+
10
19
  def delete_transfer_instrument(id, headers: {})
11
20
  endpoint = '/transferInstruments/{id}'.gsub(/{.+?}/, '%s')
12
21
  endpoint = endpoint.gsub(%r{^/}, '')
@@ -34,14 +43,5 @@ module Adyen
34
43
  @client.call_adyen_api(@service, action, request, headers, @version)
35
44
  end
36
45
 
37
- def create_transfer_instrument(request, headers: {})
38
- endpoint = '/transferInstruments'.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
46
  end
47
47
  end
@@ -7,20 +7,20 @@ module Adyen
7
7
  super(client, version, 'Management')
8
8
  end
9
9
 
10
- def list_company_accounts(headers: {}, query_params: {})
11
- endpoint = '/companies'.gsub(/{.+?}/, '%s')
10
+ def get_company_account(company_id, headers: {})
11
+ endpoint = '/companies/{companyId}'.gsub(/{.+?}/, '%s')
12
12
  endpoint = endpoint.gsub(%r{^/}, '')
13
- endpoint = format(endpoint)
14
- endpoint += create_query_string(query_params)
13
+ endpoint = format(endpoint, company_id)
14
+
15
15
  action = { method: 'get', url: endpoint }
16
16
  @client.call_adyen_api(@service, action, {}, headers, @version)
17
17
  end
18
18
 
19
- def get_company_account(company_id, headers: {})
20
- endpoint = '/companies/{companyId}'.gsub(/{.+?}/, '%s')
19
+ def list_company_accounts(headers: {}, query_params: {})
20
+ endpoint = '/companies'.gsub(/{.+?}/, '%s')
21
21
  endpoint = endpoint.gsub(%r{^/}, '')
22
- endpoint = format(endpoint, company_id)
23
-
22
+ endpoint = format(endpoint)
23
+ endpoint += create_query_string(query_params)
24
24
  action = { method: 'get', url: endpoint }
25
25
  @client.call_adyen_api(@service, action, {}, headers, @version)
26
26
  end
@@ -7,13 +7,13 @@ module Adyen
7
7
  super(client, version, 'Management')
8
8
  end
9
9
 
10
- def list_merchant_accounts(headers: {}, query_params: {})
10
+ def create_merchant_account(request, headers: {})
11
11
  endpoint = '/merchants'.gsub(/{.+?}/, '%s')
12
12
  endpoint = endpoint.gsub(%r{^/}, '')
13
13
  endpoint = format(endpoint)
14
- endpoint += create_query_string(query_params)
15
- action = { method: 'get', url: endpoint }
16
- @client.call_adyen_api(@service, action, {}, headers, @version)
14
+
15
+ action = { method: 'post', url: endpoint }
16
+ @client.call_adyen_api(@service, action, request, headers, @version)
17
17
  end
18
18
 
19
19
  def get_merchant_account(merchant_id, headers: {})
@@ -25,13 +25,13 @@ module Adyen
25
25
  @client.call_adyen_api(@service, action, {}, headers, @version)
26
26
  end
27
27
 
28
- def create_merchant_account(request, headers: {})
28
+ def list_merchant_accounts(headers: {}, query_params: {})
29
29
  endpoint = '/merchants'.gsub(/{.+?}/, '%s')
30
30
  endpoint = endpoint.gsub(%r{^/}, '')
31
31
  endpoint = format(endpoint)
32
-
33
- action = { method: 'post', url: endpoint }
34
- @client.call_adyen_api(@service, action, request, headers, @version)
32
+ endpoint += create_query_string(query_params)
33
+ action = { method: 'get', url: endpoint }
34
+ @client.call_adyen_api(@service, action, {}, headers, @version)
35
35
  end
36
36
 
37
37
  def request_to_activate_merchant_account(merchant_id, headers: {})
@@ -7,13 +7,22 @@ module Adyen
7
7
  super(client, version, 'Management')
8
8
  end
9
9
 
10
- def list_stores_by_merchant_id(merchant_id, headers: {}, query_params: {})
10
+ def create_store(request, headers: {})
11
+ endpoint = '/stores'.gsub(/{.+?}/, '%s')
12
+ endpoint = endpoint.gsub(%r{^/}, '')
13
+ endpoint = format(endpoint)
14
+
15
+ action = { method: 'post', url: endpoint }
16
+ @client.call_adyen_api(@service, action, request, headers, @version)
17
+ end
18
+
19
+ def create_store_by_merchant_id(request, merchant_id, headers: {})
11
20
  endpoint = '/merchants/{merchantId}/stores'.gsub(/{.+?}/, '%s')
12
21
  endpoint = endpoint.gsub(%r{^/}, '')
13
22
  endpoint = format(endpoint, merchant_id)
14
- endpoint += create_query_string(query_params)
15
- action = { method: 'get', url: endpoint }
16
- @client.call_adyen_api(@service, action, {}, headers, @version)
23
+
24
+ action = { method: 'post', url: endpoint }
25
+ @client.call_adyen_api(@service, action, request, headers, @version)
17
26
  end
18
27
 
19
28
  def get_store(merchant_id, store_id, headers: {})
@@ -25,6 +34,15 @@ module Adyen
25
34
  @client.call_adyen_api(@service, action, {}, headers, @version)
26
35
  end
27
36
 
37
+ def get_store_by_id(store_id, headers: {})
38
+ endpoint = '/stores/{storeId}'.gsub(/{.+?}/, '%s')
39
+ endpoint = endpoint.gsub(%r{^/}, '')
40
+ endpoint = format(endpoint, store_id)
41
+
42
+ action = { method: 'get', url: endpoint }
43
+ @client.call_adyen_api(@service, action, {}, headers, @version)
44
+ end
45
+
28
46
  def list_stores(headers: {}, query_params: {})
29
47
  endpoint = '/stores'.gsub(/{.+?}/, '%s')
30
48
  endpoint = endpoint.gsub(%r{^/}, '')
@@ -34,11 +52,11 @@ module Adyen
34
52
  @client.call_adyen_api(@service, action, {}, headers, @version)
35
53
  end
36
54
 
37
- def get_store_by_id(store_id, headers: {})
38
- endpoint = '/stores/{storeId}'.gsub(/{.+?}/, '%s')
55
+ def list_stores_by_merchant_id(merchant_id, headers: {}, query_params: {})
56
+ endpoint = '/merchants/{merchantId}/stores'.gsub(/{.+?}/, '%s')
39
57
  endpoint = endpoint.gsub(%r{^/}, '')
40
- endpoint = format(endpoint, store_id)
41
-
58
+ endpoint = format(endpoint, merchant_id)
59
+ endpoint += create_query_string(query_params)
42
60
  action = { method: 'get', url: endpoint }
43
61
  @client.call_adyen_api(@service, action, {}, headers, @version)
44
62
  end
@@ -61,23 +79,5 @@ module Adyen
61
79
  @client.call_adyen_api(@service, action, request, headers, @version)
62
80
  end
63
81
 
64
- def create_store_by_merchant_id(request, merchant_id, headers: {})
65
- endpoint = '/merchants/{merchantId}/stores'.gsub(/{.+?}/, '%s')
66
- endpoint = endpoint.gsub(%r{^/}, '')
67
- endpoint = format(endpoint, merchant_id)
68
-
69
- action = { method: 'post', url: endpoint }
70
- @client.call_adyen_api(@service, action, request, headers, @version)
71
- end
72
-
73
- def create_store(request, headers: {})
74
- endpoint = '/stores'.gsub(/{.+?}/, '%s')
75
- endpoint = endpoint.gsub(%r{^/}, '')
76
- endpoint = format(endpoint)
77
-
78
- action = { method: 'post', url: endpoint }
79
- @client.call_adyen_api(@service, action, request, headers, @version)
80
- end
81
-
82
82
  end
83
83
  end
@@ -7,21 +7,21 @@ module Adyen
7
7
  super(client, version, 'Management')
8
8
  end
9
9
 
10
- def delete_allowed_origin(company_id, api_credential_id, origin_id, headers: {})
11
- endpoint = '/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}'.gsub(/{.+?}/, '%s')
10
+ def create_allowed_origin(request, company_id, api_credential_id, headers: {})
11
+ endpoint = '/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins'.gsub(/{.+?}/, '%s')
12
12
  endpoint = endpoint.gsub(%r{^/}, '')
13
- endpoint = format(endpoint, company_id, api_credential_id, origin_id)
13
+ endpoint = format(endpoint, company_id, api_credential_id)
14
14
 
15
- action = { method: 'delete', url: endpoint }
16
- @client.call_adyen_api(@service, action, {}, headers, @version)
15
+ action = { method: 'post', url: endpoint }
16
+ @client.call_adyen_api(@service, action, request, headers, @version)
17
17
  end
18
18
 
19
- def list_allowed_origins(company_id, api_credential_id, headers: {})
20
- endpoint = '/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins'.gsub(/{.+?}/, '%s')
19
+ def delete_allowed_origin(company_id, api_credential_id, origin_id, headers: {})
20
+ endpoint = '/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}'.gsub(/{.+?}/, '%s')
21
21
  endpoint = endpoint.gsub(%r{^/}, '')
22
- endpoint = format(endpoint, company_id, api_credential_id)
22
+ endpoint = format(endpoint, company_id, api_credential_id, origin_id)
23
23
 
24
- action = { method: 'get', url: endpoint }
24
+ action = { method: 'delete', url: endpoint }
25
25
  @client.call_adyen_api(@service, action, {}, headers, @version)
26
26
  end
27
27
 
@@ -34,13 +34,13 @@ module Adyen
34
34
  @client.call_adyen_api(@service, action, {}, headers, @version)
35
35
  end
36
36
 
37
- def create_allowed_origin(request, company_id, api_credential_id, headers: {})
37
+ def list_allowed_origins(company_id, api_credential_id, headers: {})
38
38
  endpoint = '/companies/{companyId}/apiCredentials/{apiCredentialId}/allowedOrigins'.gsub(/{.+?}/, '%s')
39
39
  endpoint = endpoint.gsub(%r{^/}, '')
40
40
  endpoint = format(endpoint, company_id, api_credential_id)
41
41
 
42
- action = { method: 'post', url: endpoint }
43
- @client.call_adyen_api(@service, action, request, headers, @version)
42
+ action = { method: 'get', url: endpoint }
43
+ @client.call_adyen_api(@service, action, {}, headers, @version)
44
44
  end
45
45
 
46
46
  end
@@ -7,21 +7,21 @@ module Adyen
7
7
  super(client, version, 'Management')
8
8
  end
9
9
 
10
- def delete_allowed_origin(merchant_id, api_credential_id, origin_id, headers: {})
11
- endpoint = '/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}'.gsub(/{.+?}/, '%s')
10
+ def create_allowed_origin(request, merchant_id, api_credential_id, headers: {})
11
+ endpoint = '/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins'.gsub(/{.+?}/, '%s')
12
12
  endpoint = endpoint.gsub(%r{^/}, '')
13
- endpoint = format(endpoint, merchant_id, api_credential_id, origin_id)
13
+ endpoint = format(endpoint, merchant_id, api_credential_id)
14
14
 
15
- action = { method: 'delete', url: endpoint }
16
- @client.call_adyen_api(@service, action, {}, headers, @version)
15
+ action = { method: 'post', url: endpoint }
16
+ @client.call_adyen_api(@service, action, request, headers, @version)
17
17
  end
18
18
 
19
- def list_allowed_origins(merchant_id, api_credential_id, headers: {})
20
- endpoint = '/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins'.gsub(/{.+?}/, '%s')
19
+ def delete_allowed_origin(merchant_id, api_credential_id, origin_id, headers: {})
20
+ endpoint = '/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins/{originId}'.gsub(/{.+?}/, '%s')
21
21
  endpoint = endpoint.gsub(%r{^/}, '')
22
- endpoint = format(endpoint, merchant_id, api_credential_id)
22
+ endpoint = format(endpoint, merchant_id, api_credential_id, origin_id)
23
23
 
24
- action = { method: 'get', url: endpoint }
24
+ action = { method: 'delete', url: endpoint }
25
25
  @client.call_adyen_api(@service, action, {}, headers, @version)
26
26
  end
27
27
 
@@ -34,13 +34,13 @@ module Adyen
34
34
  @client.call_adyen_api(@service, action, {}, headers, @version)
35
35
  end
36
36
 
37
- def create_allowed_origin(request, merchant_id, api_credential_id, headers: {})
37
+ def list_allowed_origins(merchant_id, api_credential_id, headers: {})
38
38
  endpoint = '/merchants/{merchantId}/apiCredentials/{apiCredentialId}/allowedOrigins'.gsub(/{.+?}/, '%s')
39
39
  endpoint = endpoint.gsub(%r{^/}, '')
40
40
  endpoint = format(endpoint, merchant_id, api_credential_id)
41
41
 
42
- action = { method: 'post', url: endpoint }
43
- @client.call_adyen_api(@service, action, request, headers, @version)
42
+ action = { method: 'get', url: endpoint }
43
+ @client.call_adyen_api(@service, action, {}, headers, @version)
44
44
  end
45
45
 
46
46
  end
@@ -7,20 +7,20 @@ module Adyen
7
7
  super(client, version, 'Management')
8
8
  end
9
9
 
10
- def list_android_apps(company_id, headers: {}, query_params: {})
11
- endpoint = '/companies/{companyId}/androidApps'.gsub(/{.+?}/, '%s')
10
+ def get_android_app(company_id, id, headers: {})
11
+ endpoint = '/companies/{companyId}/androidApps/{id}'.gsub(/{.+?}/, '%s')
12
12
  endpoint = endpoint.gsub(%r{^/}, '')
13
- endpoint = format(endpoint, company_id)
14
- endpoint += create_query_string(query_params)
13
+ endpoint = format(endpoint, company_id, id)
14
+
15
15
  action = { method: 'get', url: endpoint }
16
16
  @client.call_adyen_api(@service, action, {}, headers, @version)
17
17
  end
18
18
 
19
- def get_android_app(company_id, id, headers: {})
20
- endpoint = '/companies/{companyId}/androidApps/{id}'.gsub(/{.+?}/, '%s')
19
+ def list_android_apps(company_id, headers: {}, query_params: {})
20
+ endpoint = '/companies/{companyId}/androidApps'.gsub(/{.+?}/, '%s')
21
21
  endpoint = endpoint.gsub(%r{^/}, '')
22
- endpoint = format(endpoint, company_id, id)
23
-
22
+ endpoint = format(endpoint, company_id)
23
+ endpoint += create_query_string(query_params)
24
24
  action = { method: 'get', url: endpoint }
25
25
  @client.call_adyen_api(@service, action, {}, headers, @version)
26
26
  end
@@ -7,13 +7,13 @@ module Adyen
7
7
  super(client, version, 'Management')
8
8
  end
9
9
 
10
- def list_api_credentials(company_id, headers: {}, query_params: {})
10
+ def create_api_credential(request, company_id, headers: {})
11
11
  endpoint = '/companies/{companyId}/apiCredentials'.gsub(/{.+?}/, '%s')
12
12
  endpoint = endpoint.gsub(%r{^/}, '')
13
13
  endpoint = format(endpoint, company_id)
14
- endpoint += create_query_string(query_params)
15
- action = { method: 'get', url: endpoint }
16
- @client.call_adyen_api(@service, action, {}, headers, @version)
14
+
15
+ action = { method: 'post', url: endpoint }
16
+ @client.call_adyen_api(@service, action, request, headers, @version)
17
17
  end
18
18
 
19
19
  def get_api_credential(company_id, api_credential_id, headers: {})
@@ -25,6 +25,15 @@ module Adyen
25
25
  @client.call_adyen_api(@service, action, {}, headers, @version)
26
26
  end
27
27
 
28
+ def list_api_credentials(company_id, headers: {}, query_params: {})
29
+ endpoint = '/companies/{companyId}/apiCredentials'.gsub(/{.+?}/, '%s')
30
+ endpoint = endpoint.gsub(%r{^/}, '')
31
+ endpoint = format(endpoint, company_id)
32
+ endpoint += create_query_string(query_params)
33
+ action = { method: 'get', url: endpoint }
34
+ @client.call_adyen_api(@service, action, {}, headers, @version)
35
+ end
36
+
28
37
  def update_api_credential(request, company_id, api_credential_id, headers: {})
29
38
  endpoint = '/companies/{companyId}/apiCredentials/{apiCredentialId}'.gsub(/{.+?}/, '%s')
30
39
  endpoint = endpoint.gsub(%r{^/}, '')
@@ -34,14 +43,5 @@ module Adyen
34
43
  @client.call_adyen_api(@service, action, request, headers, @version)
35
44
  end
36
45
 
37
- def create_api_credential(request, company_id, headers: {})
38
- endpoint = '/companies/{companyId}/apiCredentials'.gsub(/{.+?}/, '%s')
39
- endpoint = endpoint.gsub(%r{^/}, '')
40
- endpoint = format(endpoint, company_id)
41
-
42
- action = { method: 'post', url: endpoint }
43
- @client.call_adyen_api(@service, action, request, headers, @version)
44
- end
45
-
46
46
  end
47
47
  end
@@ -7,13 +7,13 @@ module Adyen
7
7
  super(client, version, 'Management')
8
8
  end
9
9
 
10
- def list_api_credentials(merchant_id, headers: {}, query_params: {})
10
+ def create_api_credential(request, merchant_id, headers: {})
11
11
  endpoint = '/merchants/{merchantId}/apiCredentials'.gsub(/{.+?}/, '%s')
12
12
  endpoint = endpoint.gsub(%r{^/}, '')
13
13
  endpoint = format(endpoint, merchant_id)
14
- endpoint += create_query_string(query_params)
15
- action = { method: 'get', url: endpoint }
16
- @client.call_adyen_api(@service, action, {}, headers, @version)
14
+
15
+ action = { method: 'post', url: endpoint }
16
+ @client.call_adyen_api(@service, action, request, headers, @version)
17
17
  end
18
18
 
19
19
  def get_api_credential(merchant_id, api_credential_id, headers: {})
@@ -25,6 +25,15 @@ module Adyen
25
25
  @client.call_adyen_api(@service, action, {}, headers, @version)
26
26
  end
27
27
 
28
+ def list_api_credentials(merchant_id, headers: {}, query_params: {})
29
+ endpoint = '/merchants/{merchantId}/apiCredentials'.gsub(/{.+?}/, '%s')
30
+ endpoint = endpoint.gsub(%r{^/}, '')
31
+ endpoint = format(endpoint, merchant_id)
32
+ endpoint += create_query_string(query_params)
33
+ action = { method: 'get', url: endpoint }
34
+ @client.call_adyen_api(@service, action, {}, headers, @version)
35
+ end
36
+
28
37
  def update_api_credential(request, merchant_id, api_credential_id, headers: {})
29
38
  endpoint = '/merchants/{merchantId}/apiCredentials/{apiCredentialId}'.gsub(/{.+?}/, '%s')
30
39
  endpoint = endpoint.gsub(%r{^/}, '')
@@ -34,14 +43,5 @@ module Adyen
34
43
  @client.call_adyen_api(@service, action, request, headers, @version)
35
44
  end
36
45
 
37
- def create_api_credential(request, merchant_id, headers: {})
38
- endpoint = '/merchants/{merchantId}/apiCredentials'.gsub(/{.+?}/, '%s')
39
- endpoint = endpoint.gsub(%r{^/}, '')
40
- endpoint = format(endpoint, merchant_id)
41
-
42
- action = { method: 'post', url: endpoint }
43
- @client.call_adyen_api(@service, action, request, headers, @version)
44
- end
45
-
46
46
  end
47
47
  end
@@ -7,30 +7,21 @@ module Adyen
7
7
  super(client, version, 'Management')
8
8
  end
9
9
 
10
- def remove_allowed_origin(origin_id, headers: {})
11
- endpoint = '/me/allowedOrigins/{originId}'.gsub(/{.+?}/, '%s')
12
- endpoint = endpoint.gsub(%r{^/}, '')
13
- endpoint = format(endpoint, origin_id)
14
-
15
- action = { method: 'delete', url: endpoint }
16
- @client.call_adyen_api(@service, action, {}, headers, @version)
17
- end
18
-
19
- def get_api_credential_details(headers: {})
20
- endpoint = '/me'.gsub(/{.+?}/, '%s')
10
+ def add_allowed_origin(request, headers: {})
11
+ endpoint = '/me/allowedOrigins'.gsub(/{.+?}/, '%s')
21
12
  endpoint = endpoint.gsub(%r{^/}, '')
22
13
  endpoint = format(endpoint)
23
14
 
24
- action = { method: 'get', url: endpoint }
25
- @client.call_adyen_api(@service, action, {}, headers, @version)
15
+ action = { method: 'post', url: endpoint }
16
+ @client.call_adyen_api(@service, action, request, headers, @version)
26
17
  end
27
18
 
28
- def get_allowed_origins(headers: {})
29
- endpoint = '/me/allowedOrigins'.gsub(/{.+?}/, '%s')
19
+ def generate_client_key(headers: {})
20
+ endpoint = '/me/generateClientKey'.gsub(/{.+?}/, '%s')
30
21
  endpoint = endpoint.gsub(%r{^/}, '')
31
22
  endpoint = format(endpoint)
32
23
 
33
- action = { method: 'get', url: endpoint }
24
+ action = { method: 'post', url: endpoint }
34
25
  @client.call_adyen_api(@service, action, {}, headers, @version)
35
26
  end
36
27
 
@@ -43,21 +34,30 @@ module Adyen
43
34
  @client.call_adyen_api(@service, action, {}, headers, @version)
44
35
  end
45
36
 
46
- def add_allowed_origin(request, headers: {})
37
+ def get_allowed_origins(headers: {})
47
38
  endpoint = '/me/allowedOrigins'.gsub(/{.+?}/, '%s')
48
39
  endpoint = endpoint.gsub(%r{^/}, '')
49
40
  endpoint = format(endpoint)
50
41
 
51
- action = { method: 'post', url: endpoint }
52
- @client.call_adyen_api(@service, action, request, headers, @version)
42
+ action = { method: 'get', url: endpoint }
43
+ @client.call_adyen_api(@service, action, {}, headers, @version)
53
44
  end
54
45
 
55
- def generate_client_key(headers: {})
56
- endpoint = '/me/generateClientKey'.gsub(/{.+?}/, '%s')
46
+ def get_api_credential_details(headers: {})
47
+ endpoint = '/me'.gsub(/{.+?}/, '%s')
57
48
  endpoint = endpoint.gsub(%r{^/}, '')
58
49
  endpoint = format(endpoint)
59
50
 
60
- action = { method: 'post', url: endpoint }
51
+ action = { method: 'get', url: endpoint }
52
+ @client.call_adyen_api(@service, action, {}, headers, @version)
53
+ end
54
+
55
+ def remove_allowed_origin(origin_id, headers: {})
56
+ endpoint = '/me/allowedOrigins/{originId}'.gsub(/{.+?}/, '%s')
57
+ endpoint = endpoint.gsub(%r{^/}, '')
58
+ endpoint = format(endpoint, origin_id)
59
+
60
+ action = { method: 'delete', url: endpoint }
61
61
  @client.call_adyen_api(@service, action, {}, headers, @version)
62
62
  end
63
63
 
@@ -7,6 +7,15 @@ module Adyen
7
7
  super(client, version, 'Management')
8
8
  end
9
9
 
10
+ def add_apple_pay_domain(request, merchant_id, payment_method_id, headers: {})
11
+ endpoint = '/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}/addApplePayDomains'.gsub(/{.+?}/, '%s')
12
+ endpoint = endpoint.gsub(%r{^/}, '')
13
+ endpoint = format(endpoint, merchant_id, payment_method_id)
14
+
15
+ action = { method: 'post', url: endpoint }
16
+ @client.call_adyen_api(@service, action, request, headers, @version)
17
+ end
18
+
10
19
  def get_all_payment_methods(merchant_id, headers: {}, query_params: {})
11
20
  endpoint = '/merchants/{merchantId}/paymentMethodSettings'.gsub(/{.+?}/, '%s')
12
21
  endpoint = endpoint.gsub(%r{^/}, '')
@@ -16,15 +25,6 @@ module Adyen
16
25
  @client.call_adyen_api(@service, action, {}, headers, @version)
17
26
  end
18
27
 
19
- def get_payment_method_details(merchant_id, payment_method_id, headers: {})
20
- endpoint = '/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}'.gsub(/{.+?}/, '%s')
21
- endpoint = endpoint.gsub(%r{^/}, '')
22
- endpoint = format(endpoint, merchant_id, payment_method_id)
23
-
24
- action = { method: 'get', url: endpoint }
25
- @client.call_adyen_api(@service, action, {}, headers, @version)
26
- end
27
-
28
28
  def get_apple_pay_domains(merchant_id, payment_method_id, headers: {})
29
29
  endpoint = '/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}/getApplePayDomains'.gsub(/{.+?}/, '%s')
30
30
  endpoint = endpoint.gsub(%r{^/}, '')
@@ -34,13 +34,13 @@ module Adyen
34
34
  @client.call_adyen_api(@service, action, {}, headers, @version)
35
35
  end
36
36
 
37
- def update_payment_method(request, merchant_id, payment_method_id, headers: {})
37
+ def get_payment_method_details(merchant_id, payment_method_id, headers: {})
38
38
  endpoint = '/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}'.gsub(/{.+?}/, '%s')
39
39
  endpoint = endpoint.gsub(%r{^/}, '')
40
40
  endpoint = format(endpoint, merchant_id, payment_method_id)
41
41
 
42
- action = { method: 'patch', url: endpoint }
43
- @client.call_adyen_api(@service, action, request, headers, @version)
42
+ action = { method: 'get', url: endpoint }
43
+ @client.call_adyen_api(@service, action, {}, headers, @version)
44
44
  end
45
45
 
46
46
  def request_payment_method(request, merchant_id, headers: {})
@@ -52,12 +52,12 @@ module Adyen
52
52
  @client.call_adyen_api(@service, action, request, headers, @version)
53
53
  end
54
54
 
55
- def add_apple_pay_domain(request, merchant_id, payment_method_id, headers: {})
56
- endpoint = '/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}/addApplePayDomains'.gsub(/{.+?}/, '%s')
55
+ def update_payment_method(request, merchant_id, payment_method_id, headers: {})
56
+ endpoint = '/merchants/{merchantId}/paymentMethodSettings/{paymentMethodId}'.gsub(/{.+?}/, '%s')
57
57
  endpoint = endpoint.gsub(%r{^/}, '')
58
58
  endpoint = format(endpoint, merchant_id, payment_method_id)
59
59
 
60
- action = { method: 'post', url: endpoint }
60
+ action = { method: 'patch', url: endpoint }
61
61
  @client.call_adyen_api(@service, action, request, headers, @version)
62
62
  end
63
63