Sha256: 3e9c41f1042f32c7674234905a17893ea44d8b357a4e32a210bd3dfd79afcc9a
Contents?: true
Size: 1.72 KB
Versions: 13
Compression:
Stored size: 1.72 KB
Contents
require_relative '../service' module Adyen class TermsOfServiceApi < Service attr_accessor :service, :version def initialize(client, version = DEFAULT_VERSION) super(client, version, 'LegalEntityManagement') end def accept_terms_of_service(request, id, termsofservicedocumentid, headers: {}) endpoint = '/legalEntities/{id}/termsOfService/{termsofservicedocumentid}'.gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(%r{^/}, '') endpoint = format(endpoint, id, termsofservicedocumentid) action = { method: 'patch', url: endpoint } @client.call_adyen_api(@service, action, request, headers, @version) end def get_terms_of_service_document(request, id, headers: {}) endpoint = '/legalEntities/{id}/termsOfService'.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 def get_terms_of_service_information_for_legal_entity(id, headers: {}) endpoint = '/legalEntities/{id}/termsOfServiceAcceptanceInfos'.gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(%r{^/}, '') endpoint = format(endpoint, id) action = { method: 'get', url: endpoint } @client.call_adyen_api(@service, action, {}, headers, @version) end def get_terms_of_service_status(id, headers: {}) endpoint = '/legalEntities/{id}/termsOfServiceStatus'.gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(%r{^/}, '') endpoint = format(endpoint, id) action = { method: 'get', url: endpoint } @client.call_adyen_api(@service, action, {}, headers, @version) end end end
Version data entries
13 entries across 13 versions & 1 rubygems