Skip to content

Commit

Permalink
false[adyen-sdk-automation] automated change (#269)
Browse files Browse the repository at this point in the history
  • Loading branch information
AdyenAutomationBot authored Oct 7, 2024
1 parent 671519a commit 03bc153
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/adyen/services/legalEntityManagement.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
require_relative 'legalEntityManagement/hosted_onboarding_api'
require_relative 'legalEntityManagement/legal_entities_api'
require_relative 'legalEntityManagement/pci_questionnaires_api'
require_relative 'legalEntityManagement/tax_e_delivery_consent_api'
require_relative 'legalEntityManagement/terms_of_service_api'
require_relative 'legalEntityManagement/transfer_instruments_api'

Expand Down Expand Up @@ -37,6 +38,10 @@ def pci_questionnaires_api
@pci_questionnaires_api ||= Adyen::PCIQuestionnairesApi.new(@client, @version)
end

def tax_e_delivery_consent_api
@tax_e_delivery_consent_api ||= Adyen::TaxEDeliveryConsentApi.new(@client, @version)
end

def terms_of_service_api
@terms_of_service_api ||= Adyen::TermsOfServiceApi.new(@client, @version)
end
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
require_relative '../service'
module Adyen
class TaxEDeliveryConsentApi < Service
attr_accessor :service, :version

def initialize(client, version = DEFAULT_VERSION)
super(client, version, 'LegalEntityManagement')
end

def check_status_of_consent_for_electronic_delivery_of_tax_forms(id, headers: {})
endpoint = '/legalEntities/{id}/checkTaxElectronicDeliveryConsent'.gsub(/{.+?}/, '%s')
endpoint = endpoint.gsub(%r{^/}, '')
endpoint = format(endpoint, id)

action = { method: 'post', url: endpoint }
@client.call_adyen_api(@service, action, {}, headers, @version)
end

def set_consent_status_for_electronic_delivery_of_tax_forms(request, id, headers: {})
endpoint = '/legalEntities/{id}/setTaxElectronicDeliveryConsent'.gsub(/{.+?}/, '%s')
endpoint = endpoint.gsub(%r{^/}, '')
endpoint = format(endpoint, id)

action = { method: 'post', url: endpoint }
@client.call_adyen_api(@service, action, request, headers, @version)
end

end
end

0 comments on commit 03bc153

Please sign in to comment.