Module: PaychexAPI::Client::Workers
- Defined in:
- lib/paychex_api/client/workers.rb
Instance Method Summary collapse
- #create_communication(worker_id, params = {}) ⇒ Object
- #delete_communication(worker_id, communication_id, params = {}) ⇒ Object
- #get_all_workers(company_id, params = {}) ⇒ Object
- #get_communication(worker_id, communication_id, params = {}) ⇒ Object
- #get_communications(worker_id, params = {}) ⇒ Object
- #get_worker(worker_id, params = {}) ⇒ Object
- #get_worker_user(worker_id, params = {}) ⇒ Object
- #update_communication(worker_id, communication_id, params = {}) ⇒ Object
Instance Method Details
#create_communication(worker_id, params = {}) ⇒ Object
21 22 23 |
# File 'lib/paychex_api/client/workers.rb', line 21 def create_communication(worker_id, params = {}) post("#{API_PATH}#{WORKERS_PATH}/#{worker_id}#{COMMUNICATIONS_PATH}", params) end |
#delete_communication(worker_id, communication_id, params = {}) ⇒ Object
29 30 31 |
# File 'lib/paychex_api/client/workers.rb', line 29 def delete_communication(worker_id, communication_id, params = {}) delete("#{API_PATH}#{WORKERS_PATH}/#{worker_id}#{COMMUNICATIONS_PATH}/#{communication_id}", params) end |
#get_all_workers(company_id, params = {}) ⇒ Object
4 5 6 |
# File 'lib/paychex_api/client/workers.rb', line 4 def get_all_workers(company_id, params = {}) get("#{API_PATH}#{COMPANIES_PATH}/#{company_id}#{WORKERS_PATH}", params) end |
#get_communication(worker_id, communication_id, params = {}) ⇒ Object
17 18 19 |
# File 'lib/paychex_api/client/workers.rb', line 17 def get_communication(worker_id, communication_id, params = {}) get("#{API_PATH}#{WORKERS_PATH}/#{worker_id}#{COMMUNICATIONS_PATH}/#{communication_id}", params) end |
#get_communications(worker_id, params = {}) ⇒ Object
13 14 15 |
# File 'lib/paychex_api/client/workers.rb', line 13 def get_communications(worker_id, params = {}) get("#{API_PATH}#{WORKERS_PATH}/#{worker_id}#{COMMUNICATIONS_PATH}", params) end |
#get_worker(worker_id, params = {}) ⇒ Object
8 9 10 11 |
# File 'lib/paychex_api/client/workers.rb', line 8 def get_worker(worker_id, params = {}) connection.headers[:accept] = 'http://api.paychex.com/profiles/worker/nonpii_communications/v1' get("#{API_PATH}#{WORKERS_PATH}/#{worker_id}", params) end |
#get_worker_user(worker_id, params = {}) ⇒ Object
33 34 35 36 |
# File 'lib/paychex_api/client/workers.rb', line 33 def get_worker_user(worker_id, params = {}) connection.headers[:accept] = "application/json;profile='http://api.paychex.com/profiles/users/v1'" get("#{API_PATH}#{WORKERS_PATH}/#{worker_id}/users", params) end |
#update_communication(worker_id, communication_id, params = {}) ⇒ Object
25 26 27 |
# File 'lib/paychex_api/client/workers.rb', line 25 def update_communication(worker_id, communication_id, params = {}) put("#{API_PATH}#{WORKERS_PATH}/#{worker_id}#{COMMUNICATIONS_PATH}/#{communication_id}", params) end |