Class: Fortenet::Request

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/fortenet/request.rb

Direct Known Subclasses

Client

Instance Method Summary collapse

Instance Method Details

#delete(path, options = {}) ⇒ Object



25
26
27
28
# File 'lib/fortenet/request.rb', line 25

def delete(path, options={})
  set_auth(options)
  @response = self.class.delete(Fortenet.endpoint + path, options)
end

#get(path, options = {}) ⇒ Object



10
11
12
13
# File 'lib/fortenet/request.rb', line 10

def get(path, options={})
  set_auth(options)
  @response = self.class.get(Fortenet.endpoint + path, options)
end

#parsed_responseObject



34
35
36
# File 'lib/fortenet/request.rb', line 34

def parsed_response
  self.response.parsed_response if self.response.present?
end

#post(path, options = {}) ⇒ Object



15
16
17
18
# File 'lib/fortenet/request.rb', line 15

def post(path, options={})
  set_auth(options)
  @response = self.class.post(Fortenet.endpoint + path, options)
end

#put(path, options = {}) ⇒ Object



20
21
22
23
# File 'lib/fortenet/request.rb', line 20

def put(path, options={})
  set_auth(options)
  @response = self.class.put(Fortenet.endpoint + path, options)
end

#responseObject



30
31
32
# File 'lib/fortenet/request.rb', line 30

def response
  @response
end