-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
false[adyen-sdk-automation] automated change (#269)
- Loading branch information
1 parent
671519a
commit 03bc153
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
lib/adyen/services/legalEntityManagement/tax_e_delivery_consent_api.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |