Class: Bob::Employee::EmploymentHistory
- Inherits:
-
API
- Object
- API
- Bob::Employee::EmploymentHistory
show all
- Defined in:
- lib/bob/api/employee/employment_history.rb
Constant Summary
Constants inherited
from API
API::BASE_URL, API::SANDBOX_URL
Class Method Summary
collapse
Methods inherited from API
build_url, create_csv, delete, get, headers, post, post_file, post_media, put
Class Method Details
.all(employee_id) ⇒ Object
6
7
8
9
|
# File 'lib/bob/api/employee/employment_history.rb', line 6
def self.all(employee_id)
response = get("people/#{employee_id}/employment")
EmploymentHistoryParser.new(response).employment_histories
end
|
.create(employee_id, params) ⇒ Object
11
12
13
|
# File 'lib/bob/api/employee/employment_history.rb', line 11
def self.create(employee_id, params)
post("people/#{employee_id}/employment", params)
end
|
.remove(employee_id, employment_entry_id) ⇒ Object
22
23
24
|
# File 'lib/bob/api/employee/employment_history.rb', line 22
def self.remove(employee_id, employment_entry_id)
delete("people/#{employee_id}/employment/#{employment_entry_id}")
end
|
.update(employee_id, employment_entry_id, params) ⇒ Object
15
16
17
18
19
20
|
# File 'lib/bob/api/employee/employment_history.rb', line 15
def self.update(employee_id, employment_entry_id, params)
put(
"people/#{employee_id}/employment/#{employment_entry_id}",
params
)
end
|