adyen-ruby-api-library 7.0.1 → 7.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. checksums.yaml +4 -4
  2. data/.github/CODEOWNERS +1 -1
  3. data/.github/release.yml +18 -0
  4. data/.github/workflows/gh_release.yml +16 -0
  5. data/.github/workflows/release_request.yml +15 -0
  6. data/.github/workflows/ruby.yml +1 -1
  7. data/.github/workflows/services.yml +28 -0
  8. data/.rubocop.yml +8 -0
  9. data/Gemfile +7 -7
  10. data/Makefile +16 -10
  11. data/README.md +13 -10
  12. data/Rakefile +3 -3
  13. data/adyen-ruby-api-library.gemspec +6 -3
  14. data/bin/console +2 -2
  15. data/lib/adyen/client.rb +91 -75
  16. data/lib/adyen/errors.rb +23 -18
  17. data/lib/adyen/hash_with_accessors.rb +12 -7
  18. data/lib/adyen/services/balanceControlService.rb +7 -14
  19. data/lib/adyen/services/balancePlatform/account_holders_api.rb +22 -38
  20. data/lib/adyen/services/balancePlatform/balance_accounts_api.rb +48 -79
  21. data/lib/adyen/services/balancePlatform/bank_account_validation_api.rb +6 -13
  22. data/lib/adyen/services/balancePlatform/grant_accounts_api.rb +6 -13
  23. data/lib/adyen/services/balancePlatform/grant_offers_api.rb +12 -22
  24. data/lib/adyen/services/balancePlatform/payment_instrument_groups_api.rb +16 -29
  25. data/lib/adyen/services/balancePlatform/payment_instruments_api.rb +26 -45
  26. data/lib/adyen/services/balancePlatform/platform_api.rb +12 -22
  27. data/lib/adyen/services/balancePlatform/transaction_rules_api.rb +21 -37
  28. data/lib/adyen/services/balancePlatform.rb +38 -40
  29. data/lib/adyen/services/binLookup.rb +12 -22
  30. data/lib/adyen/services/checkout/classic_checkout_sdk_api.rb +11 -21
  31. data/lib/adyen/services/checkout/modifications_api.rb +31 -53
  32. data/lib/adyen/services/checkout/orders_api.rb +16 -29
  33. data/lib/adyen/services/checkout/payment_links_api.rb +16 -29
  34. data/lib/adyen/services/checkout/payments_api.rb +40 -53
  35. data/lib/adyen/services/checkout/recurring_api.rb +13 -23
  36. data/lib/adyen/services/checkout/utility_api.rb +11 -21
  37. data/lib/adyen/services/checkout.rb +32 -34
  38. data/lib/adyen/services/dataProtection.rb +7 -14
  39. data/lib/adyen/services/dispute.rb +6 -5
  40. data/lib/adyen/services/legalEntityManagement/business_lines_api.rb +21 -37
  41. data/lib/adyen/services/legalEntityManagement/documents_api.rb +21 -37
  42. data/lib/adyen/services/legalEntityManagement/hosted_onboarding_api.rb +16 -29
  43. data/lib/adyen/services/legalEntityManagement/legal_entities_api.rb +26 -45
  44. data/lib/adyen/services/legalEntityManagement/pci_questionnaires_api.rb +21 -37
  45. data/lib/adyen/services/legalEntityManagement/terms_of_service_api.rb +25 -29
  46. data/lib/adyen/services/legalEntityManagement/transfer_instruments_api.rb +21 -37
  47. data/lib/adyen/services/legalEntityManagement.rb +32 -34
  48. data/lib/adyen/services/management/account_company_level_api.rb +18 -31
  49. data/lib/adyen/services/management/account_merchant_level_api.rb +22 -38
  50. data/lib/adyen/services/management/account_store_level_api.rb +43 -71
  51. data/lib/adyen/services/management/allowed_origins_company_level_api.rb +21 -37
  52. data/lib/adyen/services/management/allowed_origins_merchant_level_api.rb +21 -37
  53. data/lib/adyen/services/management/api_credentials_company_level_api.rb +22 -38
  54. data/lib/adyen/services/management/api_credentials_merchant_level_api.rb +22 -38
  55. data/lib/adyen/services/management/api_key_company_level_api.rb +6 -13
  56. data/lib/adyen/services/management/api_key_merchant_level_api.rb +6 -13
  57. data/lib/adyen/services/management/client_key_company_level_api.rb +6 -13
  58. data/lib/adyen/services/management/client_key_merchant_level_api.rb +6 -13
  59. data/lib/adyen/services/management/my_api_credential_api.rb +26 -45
  60. data/lib/adyen/services/management/payment_methods_merchant_level_api.rb +32 -54
  61. data/lib/adyen/services/management/payout_settings_merchant_level_api.rb +26 -45
  62. data/lib/adyen/services/management/split_configuration_merchant_level_api.rb +92 -0
  63. data/lib/adyen/services/management/terminal_actions_company_level_api.rb +24 -40
  64. data/lib/adyen/services/management/terminal_actions_terminal_level_api.rb +6 -13
  65. data/lib/adyen/services/management/terminal_orders_company_level_api.rb +55 -89
  66. data/lib/adyen/services/management/terminal_orders_merchant_level_api.rb +55 -89
  67. data/lib/adyen/services/management/terminal_settings_company_level_api.rb +23 -39
  68. data/lib/adyen/services/management/terminal_settings_merchant_level_api.rb +23 -39
  69. data/lib/adyen/services/management/terminal_settings_store_level_api.rb +45 -73
  70. data/lib/adyen/services/management/terminal_settings_terminal_level_api.rb +21 -37
  71. data/lib/adyen/services/management/terminals_terminal_level_api.rb +7 -14
  72. data/lib/adyen/services/management/users_company_level_api.rb +22 -38
  73. data/lib/adyen/services/management/users_merchant_level_api.rb +22 -38
  74. data/lib/adyen/services/management/webhooks_company_level_api.rb +37 -62
  75. data/lib/adyen/services/management/webhooks_merchant_level_api.rb +37 -62
  76. data/lib/adyen/services/management.rb +99 -96
  77. data/lib/adyen/services/marketpay.rb +42 -36
  78. data/lib/adyen/services/payment.rb +67 -110
  79. data/lib/adyen/services/payout/initialization_api.rb +16 -29
  80. data/lib/adyen/services/payout/instant_payouts_api.rb +6 -13
  81. data/lib/adyen/services/payout/reviewing_api.rb +11 -21
  82. data/lib/adyen/services/payout.rb +19 -21
  83. data/lib/adyen/services/posTerminalManagement.rb +27 -46
  84. data/lib/adyen/services/recurring.rb +32 -54
  85. data/lib/adyen/services/service.rb +5 -4
  86. data/lib/adyen/services/storedValue.rb +32 -54
  87. data/lib/adyen/services/transfers/capital_api.rb +38 -0
  88. data/lib/adyen/services/transfers/transactions_api.rb +12 -22
  89. data/lib/adyen/services/transfers/transfers_api.rb +6 -13
  90. data/lib/adyen/services/transfers.rb +20 -17
  91. data/lib/adyen/utils/hmac_validator.rb +18 -7
  92. data/lib/adyen/version.rb +3 -3
  93. data/lib/adyen-ruby-api-library.rb +21 -21
  94. data/spec/account_spec.rb +20 -20
  95. data/spec/balance_control_spec.rb +28 -29
  96. data/spec/balance_platform_spec.rb +108 -102
  97. data/spec/bin_lookup_spec.rb +50 -50
  98. data/spec/checkout_spec.rb +573 -524
  99. data/spec/client_spec.rb +117 -70
  100. data/spec/data_protection_spec.rb +4 -4
  101. data/spec/dispute_spec.rb +7 -7
  102. data/spec/errors_spec.rb +37 -17
  103. data/spec/fund_spec.rb +10 -10
  104. data/spec/hash_with_accessors_spec.rb +18 -8
  105. data/spec/hop_spec.rb +4 -4
  106. data/spec/lem_spec.rb +44 -49
  107. data/spec/management_spec.rb +46 -48
  108. data/spec/notification_spec.rb +9 -9
  109. data/spec/payments_spec.rb +29 -30
  110. data/spec/payouts_spec.rb +29 -32
  111. data/spec/pos_terminal_management_spec.rb +30 -32
  112. data/spec/recurring_spec.rb +8 -8
  113. data/spec/service_spec.rb +4 -0
  114. data/spec/spec_helper.rb +37 -35
  115. data/spec/stored_value_spec.rb +28 -27
  116. data/spec/transfers_spec.rb +48 -47
  117. data/spec/utils/hmac_validator_spec.rb +15 -14
  118. data/templates/api-single.mustache +13 -15
  119. data/templates/api-small.mustache +8 -15
  120. data/templates/api.mustache +7 -14
  121. metadata +25 -18
  122. data/.github/dependabot.yml +0 -8
  123. /data/spec/mocks/responses/Webhooks/{backslash_notification.json → backslash_webhook.json} +0 -0
  124. /data/spec/mocks/responses/Webhooks/{colon_notification.json → colon_webhook.json} +0 -0
  125. /data/spec/mocks/responses/Webhooks/{forwardslash_notification.json → forwardslash_webhook.json} +0 -0
  126. /data/spec/mocks/responses/Webhooks/{mixed_notification.json → mixed_webhook.json} +0 -0
@@ -1,63 +1,64 @@
1
- require "spec_helper"
2
- require "json"
1
+ require 'spec_helper'
2
+ require 'json'
3
3
 
4
- # rubocop:disable Metrics/BlockLength
5
-
6
- RSpec.describe Adyen::Transfers, service: "transfers" do
4
+ RSpec.describe Adyen::Transfers, service: 'transfers' do
7
5
  before(:all) do
8
6
  @shared_values = {
9
7
  client: create_client(:api_key),
10
- service: "Transfers",
8
+ service: 'Transfers'
11
9
  }
12
10
  end
13
11
 
14
- it "makes a transfers POST call" do
15
-
16
- request_body = JSON.parse(json_from_file("mocks/requests/Transfers/make_transfer.json"))
12
+ it 'makes a transfers POST call' do
13
+ request_body = JSON.parse(json_from_file('mocks/requests/Transfers/make_transfer.json'))
17
14
 
18
- response_body = json_from_file("mocks/responses/Transfers/make_transfer.json")
15
+ response_body = json_from_file('mocks/responses/Transfers/make_transfer.json')
19
16
 
20
- url = @shared_values[:client].service_url(@shared_values[:service], "transfers", @shared_values[:client].transfers.version)
21
- WebMock.stub_request(:post, url).
22
- with(
23
- body: request_body,
24
- headers: {
25
- "x-api-key" => @shared_values[:client].api_key
26
- }
27
- ).
28
- to_return(
29
- body: response_body
30
- )
17
+ url = @shared_values[:client].service_url(@shared_values[:service], 'transfers',
18
+ @shared_values[:client].transfers.version)
19
+ WebMock.stub_request(:post, url)
20
+ .with(
21
+ body: request_body,
22
+ headers: {
23
+ 'x-api-key' => @shared_values[:client].api_key
24
+ }
25
+ )
26
+ .to_return(
27
+ body: response_body
28
+ )
31
29
 
32
30
  result = @shared_values[:client].transfers.transfers_api.transfer_funds(request_body)
33
- response_hash = result.response
34
31
 
35
- expect(result.status).
36
- to eq(200)
32
+ expect(result.status)
33
+ .to eq(200)
37
34
  end
38
35
 
39
- it "makes a transactions GET call" do
40
-
41
- response_body = json_from_file("mocks/responses/Transfers/make_transfer.json")
42
-
43
- url = @shared_values[:client].service_url(@shared_values[:service], "transactions?createdUntil=2021-05-30T15%3A07%3A40Z&createdSince=2021-05-30T15%3A07%3A40Z", @shared_values[:client].transfers.version)
44
- WebMock.stub_request(:get, url).
45
- with(
46
- headers: {
47
- "x-api-key" => @shared_values[:client].api_key
48
- }
49
- ).
50
- to_return(
51
- body: response_body
52
- )
53
-
54
- result = @shared_values[:client].transfers.transactions_api.get_all_transactions(queryParams:{"createdUntil" => "2021-05-30T15:07:40Z", "createdSince" => "2021-05-30T15:07:40Z"})
55
- response_hash = result.response
56
-
57
- expect(result.status).
58
- to eq(200)
36
+ it 'makes a transactions GET call' do
37
+ response_body = json_from_file('mocks/responses/Transfers/make_transfer.json')
38
+
39
+ url = @shared_values[:client].service_url(
40
+ @shared_values[:service],
41
+ 'transactions?createdUntil=2021-05-30T15%3A07%3A40Z&createdSince=2021-05-30T15%3A07%3A40Z',
42
+ @shared_values[:client].transfers.version
43
+ )
44
+ WebMock.stub_request(:get, url)
45
+ .with(
46
+ headers: {
47
+ 'x-api-key' => @shared_values[:client].api_key
48
+ }
49
+ )
50
+ .to_return(
51
+ body: response_body
52
+ )
53
+
54
+ result = @shared_values[:client].transfers.transactions_api.get_all_transactions(
55
+ query_params: {
56
+ 'createdUntil' => '2021-05-30T15:07:40Z', 'createdSince' => '2021-05-30T15:07:40Z'
57
+ }
58
+ )
59
+
60
+ expect(result.status)
61
+ .to eq(200)
59
62
  end
60
-
61
-
62
63
  end
63
-
64
+ # rubocop:enable Metrics/BlockLength
@@ -4,7 +4,7 @@ RSpec.describe Adyen::Utils::HmacValidator do
4
4
  let(:validator) { described_class.new }
5
5
  let(:key) { '44782DEF547AAA06C910C43932B1EB0C71FC68D9D0C057550C48EC2ACF6BA056' }
6
6
  let(:expected_sign) { 'coqCmt/IZ4E3CzPvMY8zTjQVL5hYJUiBRg8UU+iCWo0=' }
7
- let(:notification_request_item) do
7
+ let(:webhook_request_item) do
8
8
  {
9
9
  additionalData: {
10
10
  hmacSignature: expected_sign
@@ -24,43 +24,44 @@ RSpec.describe Adyen::Utils::HmacValidator do
24
24
 
25
25
  describe 'HMAC Validator' do
26
26
  it 'should get correct data' do
27
- data_to_sign = validator.data_to_sign(notification_request_item)
27
+ data_to_sign = validator.data_to_sign(webhook_request_item)
28
28
  expect(data_to_sign).to eq '7914073381342284::TestMerchant:TestPayment-1407325143704:1130:EUR:AUTHORISATION:true'
29
29
  end
30
30
 
31
31
  it 'should encrypt properly' do
32
- encrypted = validator.calculate_notification_hmac(notification_request_item, key)
32
+ encrypted = validator.calculate_webhook_hmac(webhook_request_item, key)
33
33
  expect(encrypted).to eq expected_sign
34
34
  end
35
35
 
36
36
  it 'should have a valid hmac' do
37
- expect(validator.valid_notification_hmac?(notification_request_item, key)).to be true
37
+ expect(validator.valid_webhook_hmac?(webhook_request_item, key)).to be true
38
38
  end
39
39
 
40
40
  it 'should have an invalid hmac' do
41
- notification_request_item['additionalData'] = { 'hmacSignature' => 'invalidHMACsign' }
41
+ webhook_request_item['additionalData'] = { 'hmacSignature' => 'invalidHMACsign' }
42
42
 
43
- expect(validator.valid_notification_hmac?(notification_request_item, key)).to be false
43
+ expect(validator.valid_webhook_hmac?(webhook_request_item, key)).to be false
44
44
  end
45
45
 
46
46
  it 'should validate backslashes correctly' do
47
- webhook = JSON.parse(json_from_file("mocks/responses/Webhooks/backslash_notification.json"))
48
- expect(validator.valid_notification_hmac?(webhook, '74F490DD33F7327BAECC88B2947C011FC02D014A473AAA33A8EC93E4DC069174')).to be true
47
+ webhook = JSON.parse(json_from_file("mocks/responses/Webhooks/backslash_webhook.json"))
48
+ expect(validator.valid_webhook_hmac?(webhook, '74F490DD33F7327BAECC88B2947C011FC02D014A473AAA33A8EC93E4DC069174')).to be true
49
49
  end
50
50
 
51
51
  it 'should validate colons correctly' do
52
- webhook = JSON.parse(json_from_file("mocks/responses/Webhooks/colon_notification.json"))
53
- expect(validator.valid_notification_hmac?(webhook, '74F490DD33F7327BAECC88B2947C011FC02D014A473AAA33A8EC93E4DC069174')).to be true
52
+ webhook = JSON.parse(json_from_file("mocks/responses/Webhooks/colon_webhook.json"))
53
+ expect(validator.valid_webhook_hmac?(webhook, '74F490DD33F7327BAECC88B2947C011FC02D014A473AAA33A8EC93E4DC069174')).to be true
54
54
  end
55
55
 
56
56
  it 'should validate forward slashes correctly' do
57
- webhook = JSON.parse(json_from_file("mocks/responses/Webhooks/forwardslash_notification.json"))
58
- expect(validator.valid_notification_hmac?(webhook, '74F490DD33F7327BAECC88B2947C011FC02D014A473AAA33A8EC93E4DC069174')).to be true
57
+ webhook = JSON.parse(json_from_file("mocks/responses/Webhooks/forwardslash_webhook.json"))
58
+ expect(validator.valid_webhook_hmac?(webhook, '74F490DD33F7327BAECC88B2947C011FC02D014A473AAA33A8EC93E4DC069174')).to be true
59
59
  end
60
60
 
61
61
  it 'should validate mix of slashes and colon correctly' do
62
- webhook = JSON.parse(json_from_file("mocks/responses/Webhooks/mixed_notification.json"))
63
- expect(validator.valid_notification_hmac?(webhook, '74F490DD33F7327BAECC88B2947C011FC02D014A473AAA33A8EC93E4DC069174')).to be true
62
+ webhook = JSON.parse(json_from_file("mocks/responses/Webhooks/mixed_webhook.json"))
63
+ expect(validator.valid_webhook_hmac?(webhook, '74F490DD33F7327BAECC88B2947C011FC02D014A473AAA33A8EC93E4DC069174')).to be true
64
64
  end
65
65
  end
66
66
  end
67
+ # rubocop:enable Metrics/BlockLength
@@ -5,25 +5,23 @@ require_relative '{{serviceName}}/{{#lambda.snakecase}}{{classname}}{{/lambda.sn
5
5
  {{/apiInfo}}
6
6
 
7
7
  module Adyen
8
-
8
+ class {{#lambda.titlecase}}{{serviceName}}{{/lambda.titlecase}}
9
+ attr_accessor :service, :version
9
10
 
10
- class {{#lambda.titlecase}}{{serviceName}}{{/lambda.titlecase}}
11
- attr_accessor :service, :version
12
-
13
- DEFAULT_VERSION = {{version}}
14
- def initialize(client, version = DEFAULT_VERSION)
15
- @service = "{{#lambda.titlecase}}{{serviceName}}{{/lambda.titlecase}}"
16
- @client = client
17
- @version = version
18
- end
11
+ DEFAULT_VERSION = {{version}}
12
+ def initialize(client, version = DEFAULT_VERSION)
13
+ @service = '{{#lambda.titlecase}}{{serviceName}}{{/lambda.titlecase}}'
14
+ @client = client
15
+ @version = version
16
+ end
19
17
 
20
18
  {{#apiInfo}}
21
19
  {{#apis}}
22
- def {{classFilename}}
23
- @{{classFilename}} ||= Adyen::{{classname}}.new(@client, @version)
24
- end
20
+ def {{classFilename}}
21
+ @{{classFilename}} ||= Adyen::{{classname}}.new(@client, @version)
22
+ end
25
23
 
26
24
  {{/apis}}
27
25
  {{/apiInfo}}
28
- end
29
- end
26
+ end
27
+ end
@@ -1,28 +1,21 @@
1
1
  require_relative './service'
2
2
  module Adyen
3
3
  {{#operations}}
4
-
5
-
6
4
  class {{#lambda.titlecase}}{{serviceName}}{{/lambda.titlecase}} < Service
7
5
  attr_accessor :service, :version
8
- DEFAULT_VERSION = {{version}}
9
6
 
7
+ DEFAULT_VERSION = {{version}}
10
8
  def initialize(client, version = DEFAULT_VERSION)
11
- @service = "{{#lambda.titlecase}}{{serviceName}}{{/lambda.titlecase}}"
12
- @client = client
13
- @version = version
9
+ super(client, version, '{{#lambda.titlecase}}{{serviceName}}{{/lambda.titlecase}}')
14
10
  end
15
11
 
16
12
  {{#operation}}
17
- def {{#lambda.snakecase}}{{#vendorExtensions.x-methodName}}{{.}}{{/vendorExtensions.x-methodName}}{{^vendorExtensions.x-methodName}}{{nickname}}{{/vendorExtensions.x-methodName}}{{/lambda.snakecase}}({{#bodyParams}}request, {{/bodyParams}}{{#requiredParams}}{{^isQueryParam}}{{#lambda.camelcase}}{{paramName}}{{/lambda.camelcase}}, {{/isQueryParam}}{{/requiredParams}}headers: {} {{#queryParams}}{{#-first}}, queryParams: {}{{/-first}}{{/queryParams}})
18
- """
19
- {{{summary}}}{{^summary}}{{operationId}}{{/summary}}
20
- """
21
- endpoint = "{{path}}".gsub(/{.+?}/, '%s')
22
- endpoint = endpoint.gsub(/^\//, "")
23
- endpoint = endpoint % [{{#pathParams}}{{#lambda.camelcase}}{{paramName}}{{/lambda.camelcase}}{{^-last}},{{/-last}}{{/pathParams}}]
24
- {{#queryParams}}{{#-first}}endpoint = endpoint + create_query_string(queryParams){{/-first}}{{/queryParams}}
25
- action = { method: "{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}", url: endpoint}
13
+ def {{#lambda.snakecase}}{{#vendorExtensions.x-methodName}}{{.}}{{/vendorExtensions.x-methodName}}{{^vendorExtensions.x-methodName}}{{nickname}}{{/vendorExtensions.x-methodName}}{{/lambda.snakecase}}({{#bodyParams}}request, {{/bodyParams}}{{#requiredParams}}{{^isQueryParam}}{{#lambda.snakecase}}{{paramName}}{{/lambda.snakecase}}, {{/isQueryParam}}{{/requiredParams}}headers: {}{{#queryParams}}{{#-first}}, query_params: {}{{/-first}}{{/queryParams}})
14
+ endpoint = '{{path}}'.gsub(/{.+?}/, '%s')
15
+ endpoint = endpoint.gsub(%r{^/}, '')
16
+ endpoint = format(endpoint{{#pathParams}}{{#lambda.snakecase}}, {{paramName}}{{/lambda.snakecase}}{{/pathParams}})
17
+ {{#queryParams}}{{#-first}}endpoint += create_query_string(query_params){{/-first}}{{/queryParams}}
18
+ action = { method: '{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}', url: endpoint }
26
19
  {{#bodyParams}}
27
20
  @client.call_adyen_api(@service, action, request, headers, @version)
28
21
  {{/bodyParams}}
@@ -1,27 +1,20 @@
1
1
  require_relative '../service'
2
2
  module Adyen
3
3
  {{#operations}}
4
-
5
-
6
4
  class {{classname}} < Service
7
5
  attr_accessor :service, :version
8
6
 
9
7
  def initialize(client, version = DEFAULT_VERSION)
10
- @service = "{{#lambda.titlecase}}{{serviceName}}{{/lambda.titlecase}}"
11
- @client = client
12
- @version = version
8
+ super(client, version, '{{#lambda.titlecase}}{{serviceName}}{{/lambda.titlecase}}')
13
9
  end
14
10
 
15
11
  {{#operation}}
16
- def {{#lambda.snakecase}}{{#vendorExtensions.x-methodName}}{{.}}{{/vendorExtensions.x-methodName}}{{^vendorExtensions.x-methodName}}{{nickname}}{{/vendorExtensions.x-methodName}}{{/lambda.snakecase}}({{#bodyParams}}request, {{/bodyParams}}{{#requiredParams}}{{^isQueryParam}}{{#lambda.camelcase}}{{paramName}}{{/lambda.camelcase}}, {{/isQueryParam}}{{/requiredParams}}headers: {} {{#queryParams}}{{#-first}}, queryParams: {}{{/-first}}{{/queryParams}})
17
- """
18
- {{{summary}}}{{^summary}}{{operationId}}{{/summary}}
19
- """
20
- endpoint = "{{path}}".gsub(/{.+?}/, '%s')
21
- endpoint = endpoint.gsub(/^\//, "")
22
- endpoint = endpoint % [{{#pathParams}}{{#lambda.camelcase}}{{paramName}}{{/lambda.camelcase}}{{^-last}},{{/-last}}{{/pathParams}}]
23
- {{#queryParams}}{{#-first}}endpoint = endpoint + create_query_string(queryParams){{/-first}}{{/queryParams}}
24
- action = { method: "{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}", url: endpoint}
12
+ def {{#lambda.snakecase}}{{#vendorExtensions.x-methodName}}{{.}}{{/vendorExtensions.x-methodName}}{{^vendorExtensions.x-methodName}}{{nickname}}{{/vendorExtensions.x-methodName}}{{/lambda.snakecase}}({{#bodyParams}}request, {{/bodyParams}}{{#requiredParams}}{{^isQueryParam}}{{#lambda.snakecase}}{{paramName}}{{/lambda.snakecase}}, {{/isQueryParam}}{{/requiredParams}}headers: {}{{#queryParams}}{{#-first}}, query_params: {}{{/-first}}{{/queryParams}})
13
+ endpoint = '{{path}}'.gsub(/{.+?}/, '%s')
14
+ endpoint = endpoint.gsub(%r{^/}, '')
15
+ endpoint = format(endpoint{{#pathParams}}, {{#lambda.snakecase}}{{paramName}}{{/lambda.snakecase}}{{/pathParams}})
16
+ {{#queryParams}}{{#-first}}endpoint += create_query_string(query_params){{/-first}}{{/queryParams}}
17
+ action = { method: '{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}}', url: endpoint }
25
18
  {{#bodyParams}}
26
19
  @client.call_adyen_api(@service, action, request, headers, @version)
27
20
  {{/bodyParams}}
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adyen-ruby-api-library
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.1
4
+ version: 7.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adyen
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-08 00:00:00.000000000 Z
11
+ date: 2023-08-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -25,7 +25,7 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: bundler
28
+ name: activesupport
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
@@ -39,7 +39,7 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: webmock
42
+ name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
@@ -53,7 +53,7 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: activesupport
56
+ name: webmock
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ">="
@@ -66,10 +66,11 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
- description: Official Adyen API Library for Ruby. Simplifies integrating with the
70
- Adyen API, including Checkout, Marketpay, payments, recurring, and payouts. For
71
- support please reach out to support@adyen.com. If you would like to contribute
72
- please submit a comment or pull request at https://github.com/Adyen/adyen-ruby-api-library.
69
+ description: |-
70
+ Official Adyen API Library for Ruby. Simplifies integrating with the Adyen API,\
71
+ including Checkout, Marketpay, payments, recurring, and payouts. For support please reach out to \
72
+ support@adyen.com. If you would like to contribute please submit \
73
+ a comment or pull request at https://github.com/Adyen/adyen-ruby-api-library.
73
74
  email:
74
75
  - support@adyen.com
75
76
  executables: []
@@ -80,11 +81,15 @@ files:
80
81
  - ".github/ISSUE_TEMPLATE/bug_report.md"
81
82
  - ".github/ISSUE_TEMPLATE/feature_request.md"
82
83
  - ".github/PULL_REQUEST_TEMPLATE.md"
83
- - ".github/dependabot.yml"
84
+ - ".github/release.yml"
84
85
  - ".github/workflows/codeql.yml"
86
+ - ".github/workflows/gh_release.yml"
87
+ - ".github/workflows/release_request.yml"
85
88
  - ".github/workflows/ruby.yml"
86
89
  - ".github/workflows/rubygems_release.yml"
90
+ - ".github/workflows/services.yml"
87
91
  - ".gitignore"
92
+ - ".rubocop.yml"
88
93
  - CODE_OF_CONDUCT.md
89
94
  - CONTRIBUTING.md
90
95
  - Gemfile
@@ -159,6 +164,7 @@ files:
159
164
  - lib/adyen/services/management/my_api_credential_api.rb
160
165
  - lib/adyen/services/management/payment_methods_merchant_level_api.rb
161
166
  - lib/adyen/services/management/payout_settings_merchant_level_api.rb
167
+ - lib/adyen/services/management/split_configuration_merchant_level_api.rb
162
168
  - lib/adyen/services/management/terminal_actions_company_level_api.rb
163
169
  - lib/adyen/services/management/terminal_actions_terminal_level_api.rb
164
170
  - lib/adyen/services/management/terminal_orders_company_level_api.rb
@@ -183,6 +189,7 @@ files:
183
189
  - lib/adyen/services/service.rb
184
190
  - lib/adyen/services/storedValue.rb
185
191
  - lib/adyen/services/transfers.rb
192
+ - lib/adyen/services/transfers/capital_api.rb
186
193
  - lib/adyen/services/transfers/transactions_api.rb
187
194
  - lib/adyen/services/transfers/transfers_api.rb
188
195
  - lib/adyen/utils/hmac_validator.rb
@@ -389,10 +396,10 @@ files:
389
396
  - spec/mocks/responses/Terminal/get_terminals_under_account.json
390
397
  - spec/mocks/responses/Transfers/get_transactions.json
391
398
  - spec/mocks/responses/Transfers/make_transfer.json
392
- - spec/mocks/responses/Webhooks/backslash_notification.json
393
- - spec/mocks/responses/Webhooks/colon_notification.json
394
- - spec/mocks/responses/Webhooks/forwardslash_notification.json
395
- - spec/mocks/responses/Webhooks/mixed_notification.json
399
+ - spec/mocks/responses/Webhooks/backslash_webhook.json
400
+ - spec/mocks/responses/Webhooks/colon_webhook.json
401
+ - spec/mocks/responses/Webhooks/forwardslash_webhook.json
402
+ - spec/mocks/responses/Webhooks/mixed_webhook.json
396
403
  - spec/notification_spec.rb
397
404
  - spec/payments_spec.rb
398
405
  - spec/payouts_spec.rb
@@ -414,7 +421,7 @@ metadata:
414
421
  documentation_uri: https://docs.adyen.com/developers/development-resources/libraries
415
422
  homepage_uri: https://www.adyen.com
416
423
  source_code_uri: https://github.com/Adyen/adyen-ruby-api-library
417
- post_install_message:
424
+ post_install_message:
418
425
  rdoc_options: []
419
426
  require_paths:
420
427
  - lib
@@ -422,7 +429,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
422
429
  requirements:
423
430
  - - ">="
424
431
  - !ruby/object:Gem::Version
425
- version: 2.1.0
432
+ version: 2.7.0
426
433
  required_rubygems_version: !ruby/object:Gem::Requirement
427
434
  requirements:
428
435
  - - ">="
@@ -430,7 +437,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
430
437
  version: '0'
431
438
  requirements: []
432
439
  rubygems_version: 3.4.10
433
- signing_key:
440
+ signing_key:
434
441
  specification_version: 4
435
442
  summary: Official Adyen Ruby API Library
436
443
  test_files: []
@@ -1,8 +0,0 @@
1
- version: 2
2
- updates:
3
- - package-ecosystem: bundler
4
- directory: "/"
5
- schedule:
6
- interval: daily
7
- time: "04:00"
8
- open-pull-requests-limit: 10