lib/adyen/services/posTerminalManagement.rb
require_relative './service'
module Adyen
class PosTerminalManagement < Service
attr_accessor :service, :version
DEFAULT_VERSION = 1
def initialize(client, version = DEFAULT_VERSION)
super(client, version, 'PosTerminalManagement')
end
def assign_terminals(request, headers: {})
endpoint = '/assignTerminals'.gsub(/{.+?}/, '%s')
endpoint = endpoint.gsub(%r{^/}, '')
endpoint = format(endpoint)
action = { method: 'post', url: endpoint }
@client.call_adyen_api(@service, action, request, headers, @version)
end
def find_terminal(request, headers: {})
endpoint = '/findTerminal'.gsub(/{.+?}/, '%s')
endpoint = endpoint.gsub(%r{^/}, '')
endpoint = format(endpoint)
action = { method: 'post', url: endpoint }
@client.call_adyen_api(@service, action, request, headers, @version)
end
def get_stores_under_account(request, headers: {})
endpoint = '/getStoresUnderAccount'.gsub(/{.+?}/, '%s')
endpoint = endpoint.gsub(%r{^/}, '')
endpoint = format(endpoint)
action = { method: 'post', url: endpoint }
@client.call_adyen_api(@service, action, request, headers, @version)
end
def get_terminal_details(request, headers: {})
endpoint = '/getTerminalDetails'.gsub(/{.+?}/, '%s')
endpoint = endpoint.gsub(%r{^/}, '')
endpoint = format(endpoint)
action = { method: 'post', url: endpoint }
@client.call_adyen_api(@service, action, request, headers, @version)
end
def get_terminals_under_account(request, headers: {})
endpoint = '/getTerminalsUnderAccount'.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