Skip to content

Commit 5f31693

Browse files
AdyenAutomationBotDjoykeAbyah
authored andcommitted
false[adyen-sdk-automation] automated change (#269)
1 parent c8e0c46 commit 5f31693

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed

lib/adyen/services/legalEntityManagement.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
require_relative 'legalEntityManagement/hosted_onboarding_api'
44
require_relative 'legalEntityManagement/legal_entities_api'
55
require_relative 'legalEntityManagement/pci_questionnaires_api'
6+
require_relative 'legalEntityManagement/tax_e_delivery_consent_api'
67
require_relative 'legalEntityManagement/terms_of_service_api'
78
require_relative 'legalEntityManagement/transfer_instruments_api'
89

@@ -37,6 +38,10 @@ def pci_questionnaires_api
3738
@pci_questionnaires_api ||= Adyen::PCIQuestionnairesApi.new(@client, @version)
3839
end
3940

41+
def tax_e_delivery_consent_api
42+
@tax_e_delivery_consent_api ||= Adyen::TaxEDeliveryConsentApi.new(@client, @version)
43+
end
44+
4045
def terms_of_service_api
4146
@terms_of_service_api ||= Adyen::TermsOfServiceApi.new(@client, @version)
4247
end
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

0 commit comments

Comments
 (0)