adyen-ruby-api-library 9.7.1 → 9.9.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 609202da12a0d8c2575ca56f58e5ef297558d73964a6bffd274f7f2513b348f7
4
- data.tar.gz: 7f20453a9afd7e59edd7fa45c6ce243a04bf49dc4b3259766f9be47740ce757c
3
+ metadata.gz: 1ef3a90aa8ea0a335d165930451be4eb77cfd6514391883420bae5d1ba3a8ff6
4
+ data.tar.gz: 8fe108f6f5937d50971a446cbebeab82f867ed97318453534891d962930d7d33
5
5
  SHA512:
6
- metadata.gz: c18e1d385f3732be2de589bf734e896494eca5db07afae72a12ca8fafc687c6eb49ca26bc5a8447d32e438a3ea853a9ded09bc244674675526eb16d4c4b57c8a
7
- data.tar.gz: e58aec5a1435767077904030766f128d15877ddfc3ae0f0c86bc126f4c15d63995f4898ce8d0d56328b27e0e664ed764fccbc705a337871584cc4aa7a1a70729
6
+ metadata.gz: 44565077d05a1836a79b608a74dbf1de8c348e629b68d6c7001415fc1257a03ac9f24d5b982f9434f511695524557345b73b7a35391f733f01e997a30483d112
7
+ data.tar.gz: ccd923da598991c3d3fbbb1bd6ca639173b5e5e342b63d7137dbb579315f08cdaac92be53328ba08031cafbf7297c028c5ff7f420a8039e4cec76811cf926325
data/.github/CODEOWNERS CHANGED
@@ -1 +1 @@
1
- * @Adyen/integration-tools-testing
1
+ * @Adyen/developer-relations
data/VERSION CHANGED
@@ -1,2 +1,2 @@
1
- 9.7.1
1
+ 9.9.0
2
2
 
data/lib/adyen/client.rb CHANGED
@@ -91,6 +91,9 @@ module Adyen
91
91
  "https://terminal-api-#{@env}.adyen.com"
92
92
  end
93
93
  supports_live_url_prefix = false
94
+ when 'PosMobile'
95
+ url = "https://checkout-#{@env}.adyen.com/checkout/possdk"
96
+ supports_live_url_prefix = false
94
97
  else
95
98
  raise ArgumentError, 'Invalid service specified'
96
99
  end
@@ -284,6 +287,10 @@ module Adyen
284
287
  @terminal_cloud_api ||= Adyen::TerminalCloudAPI.new(self)
285
288
  end
286
289
 
290
+ def pos_mobile
291
+ @pos_mobile ||= Adyen::PosMobile.new(self)
292
+ end
293
+
287
294
  private
288
295
 
289
296
  def auth_header(auth_type, faraday)
@@ -0,0 +1,29 @@
1
+ require_relative '../service'
2
+ module Adyen
3
+ class TaxEDeliveryConsentApi < Service
4
+ attr_accessor :service, :version
5
+
6
+ def initialize(client, version = DEFAULT_VERSION)
7
+ super(client, version, 'LegalEntityManagement')
8
+ end
9
+
10
+ def check_status_of_consent_for_electronic_delivery_of_tax_forms(id, headers: {})
11
+ endpoint = '/legalEntities/{id}/checkTaxElectronicDeliveryConsent'.gsub(/{.+?}/, '%s')
12
+ endpoint = endpoint.gsub(%r{^/}, '')
13
+ endpoint = format(endpoint, id)
14
+
15
+ action = { method: 'post', url: endpoint }
16
+ @client.call_adyen_api(@service, action, {}, headers, @version)
17
+ end
18
+
19
+ def set_consent_status_for_electronic_delivery_of_tax_forms(request, id, headers: {})
20
+ endpoint = '/legalEntities/{id}/setTaxElectronicDeliveryConsent'.gsub(/{.+?}/, '%s')
21
+ endpoint = endpoint.gsub(%r{^/}, '')
22
+ endpoint = format(endpoint, id)
23
+
24
+ action = { method: 'post', url: endpoint }
25
+ @client.call_adyen_api(@service, action, request, headers, @version)
26
+ end
27
+
28
+ end
29
+ end
@@ -3,6 +3,7 @@ require_relative 'legalEntityManagement/documents_api'
3
3
  require_relative 'legalEntityManagement/hosted_onboarding_api'
4
4
  require_relative 'legalEntityManagement/legal_entities_api'
5
5
  require_relative 'legalEntityManagement/pci_questionnaires_api'
6
+ require_relative 'legalEntityManagement/tax_e_delivery_consent_api'
6
7
  require_relative 'legalEntityManagement/terms_of_service_api'
7
8
  require_relative 'legalEntityManagement/transfer_instruments_api'
8
9
 
@@ -37,6 +38,10 @@ module Adyen
37
38
  @pci_questionnaires_api ||= Adyen::PCIQuestionnairesApi.new(@client, @version)
38
39
  end
39
40
 
41
+ def tax_e_delivery_consent_api
42
+ @tax_e_delivery_consent_api ||= Adyen::TaxEDeliveryConsentApi.new(@client, @version)
43
+ end
44
+
40
45
  def terms_of_service_api
41
46
  @terms_of_service_api ||= Adyen::TermsOfServiceApi.new(@client, @version)
42
47
  end
@@ -7,6 +7,24 @@ module Adyen
7
7
  super(client, version, 'Transfers')
8
8
  end
9
9
 
10
+ def approve_initiated_transfers(request, headers: {})
11
+ endpoint = '/transfers/approve'.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 cancel_initiated_transfers(request, headers: {})
20
+ endpoint = '/transfers/cancel'.gsub(/{.+?}/, '%s')
21
+ endpoint = endpoint.gsub(%r{^/}, '')
22
+ endpoint = format(endpoint)
23
+
24
+ action = { method: 'post', url: endpoint }
25
+ @client.call_adyen_api(@service, action, request, headers, @version)
26
+ end
27
+
10
28
  def get_all_transfers(headers: {}, query_params: {})
11
29
  endpoint = '/transfers'.gsub(/{.+?}/, '%s')
12
30
  endpoint = endpoint.gsub(%r{^/}, '')
data/lib/adyen/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Adyen
2
2
  NAME = 'adyen-ruby-api-library'.freeze
3
- VERSION = '9.7.1'.freeze
3
+ VERSION = '9.9.0'.freeze
4
4
  end
@@ -20,3 +20,4 @@ require_relative 'adyen/services/management'
20
20
  require_relative 'adyen/services/storedValue'
21
21
  require_relative 'adyen/services/balanceControlService'
22
22
  require_relative 'adyen/services/terminalCloudAPI'
23
+ require_relative 'adyen/services/posMobile'
data/spec/client_spec.rb CHANGED
@@ -260,4 +260,22 @@ RSpec.describe Adyen do
260
260
  .to eq('https://terminal-api-test.adyen.com/connectedTerminals')
261
261
 
262
262
  end
263
+
264
+ it 'checks the initialization of the terminal region' do
265
+ client = Adyen::Client.new(api_key: 'api_key', env: :test, terminal_region: 'eu')
266
+ expect(client.service_url('TerminalCloudAPI', 'connectedTerminals', nil))
267
+ .to eq('https://terminal-api-test-eu.adyen.com/connectedTerminals')
268
+ end
269
+
270
+ it 'checks the initialization of the terminal region set to nil per default' do
271
+ client = Adyen::Client.new(api_key: 'api_key', env: :test)
272
+ expect(client.service_url('TerminalCloudAPI', 'connectedTerminals', nil))
273
+ .to eq('https://terminal-api-test.adyen.com/connectedTerminals')
274
+ end
275
+
276
+ it 'checks the creation of PosMobile sessions url' do
277
+ client = Adyen::Client.new(api_key: 'api_key', env: :test)
278
+ expect(client.service_url('PosMobile', 'sessions', nil))
279
+ .to eq('https://checkout-test.adyen.com/checkout/possdk/sessions')
280
+ end
263
281
  end
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: 9.7.1
4
+ version: 9.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adyen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-29 00:00:00.000000000 Z
11
+ date: 2024-10-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -140,6 +140,7 @@ files:
140
140
  - lib/adyen/services/legalEntityManagement/hosted_onboarding_api.rb
141
141
  - lib/adyen/services/legalEntityManagement/legal_entities_api.rb
142
142
  - lib/adyen/services/legalEntityManagement/pci_questionnaires_api.rb
143
+ - lib/adyen/services/legalEntityManagement/tax_e_delivery_consent_api.rb
143
144
  - lib/adyen/services/legalEntityManagement/terms_of_service_api.rb
144
145
  - lib/adyen/services/legalEntityManagement/transfer_instruments_api.rb
145
146
  - lib/adyen/services/management.rb
@@ -434,7 +435,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
434
435
  - !ruby/object:Gem::Version
435
436
  version: '0'
436
437
  requirements: []
437
- rubygems_version: 3.5.11
438
+ rubygems_version: 3.5.16
438
439
  signing_key:
439
440
  specification_version: 4
440
441
  summary: Official Adyen Ruby API Library