Class: Fortenet::Request
- Inherits:
-
Object
- Object
- Fortenet::Request
- Includes:
- HTTParty
- Defined in:
- lib/fortenet/request.rb
Direct Known Subclasses
Instance Method Summary collapse
- #delete(path, options = {}) ⇒ Object
- #get(path, options = {}) ⇒ Object
- #parsed_response ⇒ Object
- #post(path, options = {}) ⇒ Object
- #put(path, options = {}) ⇒ Object
- #response ⇒ Object
Instance Method Details
#delete(path, options = {}) ⇒ Object
25 26 27 28 |
# File 'lib/fortenet/request.rb', line 25 def delete(path, ={}) set_auth() @response = self.class.delete(Fortenet.endpoint + path, ) end |
#get(path, options = {}) ⇒ Object
10 11 12 13 |
# File 'lib/fortenet/request.rb', line 10 def get(path, ={}) set_auth() @response = self.class.get(Fortenet.endpoint + path, ) end |
#parsed_response ⇒ Object
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, ={}) set_auth() @response = self.class.post(Fortenet.endpoint + path, ) end |
#put(path, options = {}) ⇒ Object
20 21 22 23 |
# File 'lib/fortenet/request.rb', line 20 def put(path, ={}) set_auth() @response = self.class.put(Fortenet.endpoint + path, ) end |
#response ⇒ Object
30 31 32 |
# File 'lib/fortenet/request.rb', line 30 def response @response end |