Module: Paychex::Request

Included in:
API
Defined in:
lib/paychex/request.rb

Overview

Defines HTTP request methods

Instance Method Summary collapse

Instance Method Details

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



28
29
30
31
# File 'lib/paychex/request.rb', line 28

def auth(path, options = {})
  options['Content-Type'] = 'application/x-www-form-urlencoded'
  request(:post, path, options)
end

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

HTTP DELETE request



24
25
26
# File 'lib/paychex/request.rb', line 24

def delete(path, options = {})
  request(:delete, path, options)
end

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

HTTP GET request



9
10
11
# File 'lib/paychex/request.rb', line 9

def get(path, options = {})
  request(:get, path, options)
end

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

HTTP POST request



14
15
16
# File 'lib/paychex/request.rb', line 14

def post(path, options = {})
  request(:post, path, options)
end

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

HTTP PUT request



19
20
21
# File 'lib/paychex/request.rb', line 19

def put(path, options = {})
  request(:put, path, options)
end