adyen-ruby-api-library 9.7.1 → 9.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/CODEOWNERS +1 -1
- data/VERSION +1 -1
- data/lib/adyen/client.rb +7 -0
- data/lib/adyen/services/legalEntityManagement/tax_e_delivery_consent_api.rb +29 -0
- data/lib/adyen/services/legalEntityManagement.rb +5 -0
- data/lib/adyen/version.rb +1 -1
- data/spec/client_spec.rb +18 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b3769b6e17c96fb7b05ba7f030f9f0554652b329334c6cf3522941bf5e2b36e6
|
4
|
+
data.tar.gz: 912816194d60876ece27bbd9ce526dbb221b8ca18d763e95a1c83cac901e0ef3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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
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.
|
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-
|
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.
|
438
|
+
rubygems_version: 3.5.16
|
438
439
|
signing_key:
|
439
440
|
specification_version: 4
|
440
441
|
summary: Official Adyen Ruby API Library
|