Class: Customerio::BaseClient

Inherits:
Object
  • Object
show all
Defined in:
lib/customerio/base_client.rb

Instance Method Summary collapse

Constructor Details

#initialize(auth, options = {}) ⇒ BaseClient

Returns a new instance of BaseClient.



21
22
23
24
25
# File 'lib/customerio/base_client.rb', line 21

def initialize(auth, options = {})
  @auth = auth
  @timeout = options[:timeout] || DEFAULT_TIMEOUT
  @base_uri = options[:url]
end

Instance Method Details

#request(method, path, body = nil, headers = {}) ⇒ Object



27
28
29
# File 'lib/customerio/base_client.rb', line 27

def request(method, path, body = nil, headers = {})
  execute(method, path, body, headers)
end

#request_and_verify_response(method, path, body = nil, headers = {}) ⇒ Object



31
32
33
# File 'lib/customerio/base_client.rb', line 31

def request_and_verify_response(method, path, body = nil, headers = {})
  verify_response(request(method, path, body, headers))
end