Class: Bob::Employee::WorkHistory

Inherits:
API
  • Object
show all
Defined in:
lib/bob/api/employee/work_history.rb

Constant Summary

Constants inherited from API

API::BASE_URL

Class Method Summary collapse

Methods inherited from API

authorization_header, build_url, content_headers, create_csv, delete, get, post, post_file, post_media, put

Class Method Details

.all(employee_id) ⇒ Object



6
7
8
9
# File 'lib/bob/api/employee/work_history.rb', line 6

def self.all(employee_id)
  response = get("people/#{employee_id}/work")
  WorkHistoryParser.new(response).work_histories
end

.update(employee_id, work_history_id, params) ⇒ Object



11
12
13
14
15
16
17
# File 'lib/bob/api/employee/work_history.rb', line 11

def self.update(employee_id, work_history_id, params)
  put(
    "people/#{employee_id}/work/#{work_history_id}",
    params,
    use_api_key: true
  )
end