Module: PaychexAPI::Client::Workers

Defined in:
lib/paychex_api/client/workers.rb

Instance Method Summary collapse

Instance Method Details

#create_communication(worker_id, params = {}) ⇒ Object



22
23
24
# File 'lib/paychex_api/client/workers.rb', line 22

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



30
31
32
# File 'lib/paychex_api/client/workers.rb', line 30

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
7
# File 'lib/paychex_api/client/workers.rb', line 4

def get_all_workers(company_id, params = {})
  connection.headers[:accept] = "application/json;profile='http://api.paychex.com/profiles/workers_users/nonpii/v1'"
  get("#{API_PATH}#{COMPANIES_PATH}/#{company_id}#{WORKERS_PATH}", params)
end

#get_communication(worker_id, communication_id, params = {}) ⇒ Object



18
19
20
# File 'lib/paychex_api/client/workers.rb', line 18

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



14
15
16
# File 'lib/paychex_api/client/workers.rb', line 14

def get_communications(worker_id, params = {})
  get("#{API_PATH}#{WORKERS_PATH}/#{worker_id}#{COMMUNICATIONS_PATH}", params)
end

#get_worker(worker_id, params = {}) ⇒ Object



9
10
11
12
# File 'lib/paychex_api/client/workers.rb', line 9

def get_worker(worker_id, params = {})
  connection.headers[:accept] = "application/json;profile='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



34
35
36
37
# File 'lib/paychex_api/client/workers.rb', line 34

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



26
27
28
# File 'lib/paychex_api/client/workers.rb', line 26

def update_communication(worker_id, communication_id, params = {})
  put("#{API_PATH}#{WORKERS_PATH}/#{worker_id}#{COMMUNICATIONS_PATH}/#{communication_id}", params)
end