Class: Tenios::API::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/tenios/api/client.rb

Constant Summary collapse

URL =
"https://api.tenios.com"

Instance Method Summary collapse

Constructor Details

#initialize(access_key:, url: URL) ⇒ Client

Returns a new instance of Client.



13
14
15
16
# File 'lib/tenios/api/client.rb', line 13

def initialize(access_key:, url: URL)
  @access_key = access_key
  @http_client = build_http_client(url)
end

Instance Method Details

#post(path, **payload) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



43
44
45
# File 'lib/tenios/api/client.rb', line 43

def post(path, **payload)
  @http_client.post(path, payload.merge(access_key: @access_key)).body
end

#transfer_callObject



37
38
39
40
# File 'lib/tenios/api/client.rb', line 37

def transfer_call(...)
  @transfer_call ||= Tenios::API::TransferCall.new(self)
  @transfer_call.transfer_call(...)
end