Module: Paychex::Request
- Included in:
- API
- Defined in:
- lib/paychex/request.rb
Overview
Defines HTTP request methods
Instance Method Summary collapse
- #auth(path, options = {}) ⇒ Object
-
#delete(path, options = {}) ⇒ Object
HTTP DELETE request.
-
#get(path, options = {}) ⇒ Object
HTTP GET request.
-
#post(path, options = {}) ⇒ Object
HTTP POST request.
-
#put(path, options = {}) ⇒ Object
HTTP PUT request.
Instance Method Details
#auth(path, options = {}) ⇒ Object
28 29 30 31 |
# File 'lib/paychex/request.rb', line 28 def auth(path, = {}) ['Content-Type'] = 'application/x-www-form-urlencoded' request(:post, path, ) end |
#delete(path, options = {}) ⇒ Object
HTTP DELETE request
24 25 26 |
# File 'lib/paychex/request.rb', line 24 def delete(path, = {}) request(:delete, path, ) end |
#get(path, options = {}) ⇒ Object
HTTP GET request
9 10 11 |
# File 'lib/paychex/request.rb', line 9 def get(path, = {}) request(:get, path, ) end |
#post(path, options = {}) ⇒ Object
HTTP POST request
14 15 16 |
# File 'lib/paychex/request.rb', line 14 def post(path, = {}) request(:post, path, ) end |
#put(path, options = {}) ⇒ Object
HTTP PUT request
19 20 21 |
# File 'lib/paychex/request.rb', line 19 def put(path, = {}) request(:put, path, ) end |