adyen-ruby-api-library 9.7.1 → 9.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 609202da12a0d8c2575ca56f58e5ef297558d73964a6bffd274f7f2513b348f7
4
- data.tar.gz: 7f20453a9afd7e59edd7fa45c6ce243a04bf49dc4b3259766f9be47740ce757c
3
+ metadata.gz: b3769b6e17c96fb7b05ba7f030f9f0554652b329334c6cf3522941bf5e2b36e6
4
+ data.tar.gz: 912816194d60876ece27bbd9ce526dbb221b8ca18d763e95a1c83cac901e0ef3
5
5
  SHA512:
6
- metadata.gz: c18e1d385f3732be2de589bf734e896494eca5db07afae72a12ca8fafc687c6eb49ca26bc5a8447d32e438a3ea853a9ded09bc244674675526eb16d4c4b57c8a
7
- data.tar.gz: e58aec5a1435767077904030766f128d15877ddfc3ae0f0c86bc126f4c15d63995f4898ce8d0d56328b27e0e664ed764fccbc705a337871584cc4aa7a1a70729
6
+ metadata.gz: ba50c5b4f621133105f98e21ce7e7f8632fbfbaf6166ab58798949abc78bc5cc11f027f62ecfb36d4b67a3573c3c85d34577d3e4c1b34776de091eb5e8cc4275
7
+ data.tar.gz: a0dc622effea182c37455e36f271d3be30eb961e3c3bc15859f09544e84cbdddc789cff138d90cf8079b16638efa4df21713719a804eb6e69b7e06816959fba6
data/.github/CODEOWNERS CHANGED
@@ -1 +1 @@
1
- * @Adyen/integration-tools-testing
1
+ * @Adyen/integration-tools-testing @Adyen/developer-relations
data/VERSION CHANGED
@@ -1,2 +1,2 @@
1
- 9.7.1
1
+ 9.8.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
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.8.0'.freeze
4
4
  end
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.8.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-07 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