Sha256: 39aff9ea7a6555ebee51bb10f7d74d8158f597a8b9a5735359ef647e262494d9
Contents?: true
Size: 1.49 KB
Versions: 11
Compression:
Stored size: 1.49 KB
Contents
require_relative '../service' module Adyen class DocumentsApi < Service attr_accessor :service, :version def initialize(client, version = DEFAULT_VERSION) super(client, version, 'LegalEntityManagement') end def delete_document(id, headers: {}) endpoint = '/documents/{id}'.gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(%r{^/}, '') endpoint = format(endpoint, id) action = { method: 'delete', url: endpoint } @client.call_adyen_api(@service, action, {}, headers, @version) end def get_document(id, headers: {}) endpoint = '/documents/{id}'.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 update_document(request, id, headers: {}) endpoint = '/documents/{id}'.gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(%r{^/}, '') endpoint = format(endpoint, id) action = { method: 'patch', url: endpoint } @client.call_adyen_api(@service, action, request, headers, @version) end def upload_document_for_verification_checks(request, headers: {}) endpoint = '/documents'.gsub(/{.+?}/, '%s') endpoint = endpoint.gsub(%r{^/}, '') endpoint = format(endpoint) action = { method: 'post', url: endpoint } @client.call_adyen_api(@service, action, request, headers, @version) end end end
Version data entries
11 entries across 11 versions & 1 rubygems