bobhr 0.5.17 → 0.5.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bob/api/employee/employment_history.rb +28 -0
- data/lib/bob/api/employee/equity_grants.rb +5 -1
- data/lib/bob/api/employee/time_off.rb +2 -2
- data/lib/bob/api/employee/work_history.rb +8 -0
- data/lib/bob/api/employees.rb +1 -0
- data/lib/bob/models/employment_history.rb +6 -0
- data/lib/bob/models.rb +1 -0
- data/lib/bob/parsers/employment_history_parser.rb +7 -0
- data/lib/bob/parsers.rb +1 -0
- data/lib/bob/version.rb +1 -1
- metadata +4 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ba27fbf4804e19318ce9f39e7dfe5488955a19b68f337da4407ce52824b71db3
|
4
|
+
data.tar.gz: 82a0ce36154590d31b0ddbd605c20baf31432f94c996c6a0dd90e9b97cf85d60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c0a58de9a8c6c7cb8ea9df7baf40393dc49ae84c808573e080dba5a0ffb0f6e2a0cc59506d9845d8d7ab79b9657a38eb7e1427586cd563463f790dd88fbce40
|
7
|
+
data.tar.gz: 6181082e0b3f51da521f108f84735fed2c74cd6656629d1cdd356e69129a8aba279dca52db939720a4cdbbbf037854447dca800abad5158e78c97cfc4a35fc3f
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Bob
|
4
|
+
module Employee
|
5
|
+
class EmploymentHistory < API
|
6
|
+
def self.all(employee_id)
|
7
|
+
response = get("people/#{employee_id}/employment")
|
8
|
+
EmploymentHistoryParser.new(response).work_histories
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.create(employee_id, params)
|
12
|
+
post("people/#{employee_id}/employment", params)
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.update(employee_id, employment_entry_id, params)
|
16
|
+
put(
|
17
|
+
"people/#{employee_id}/employment/#{employment_entry_id}",
|
18
|
+
params,
|
19
|
+
use_api_key: true
|
20
|
+
)
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.remove(employee_id, employment_entry_id)
|
24
|
+
delete("people/#{employee_id}/employment/#{employment_entry_id}")
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -12,8 +12,12 @@ module Bob
|
|
12
12
|
post("people/#{employee_id}/equities", params)
|
13
13
|
end
|
14
14
|
|
15
|
+
def self.update(employee_id, entry_id, params)
|
16
|
+
put("people/#{employee_id}/equities/#{entry_id}", params)
|
17
|
+
end
|
18
|
+
|
15
19
|
def self.remove(employee_id, entry_id)
|
16
|
-
delete("people/#{employee_id}/
|
20
|
+
delete("people/#{employee_id}/equities/#{entry_id}")
|
17
21
|
end
|
18
22
|
end
|
19
23
|
end
|
@@ -3,8 +3,8 @@
|
|
3
3
|
module Bob
|
4
4
|
module Employee
|
5
5
|
class TimeOff < API
|
6
|
-
def self.balance(employee_id:, policy_type:, date:
|
7
|
-
response = get("timeoff/employees/#{employee_id}/balance", {policyType: policy_type, date: date})
|
6
|
+
def self.balance(employee_id:, policy_type:, date:)
|
7
|
+
response = get("timeoff/employees/#{employee_id}/balance", { policyType: policy_type, date: date })
|
8
8
|
BaseParser.new(response).fields
|
9
9
|
end
|
10
10
|
end
|
@@ -8,6 +8,10 @@ module Bob
|
|
8
8
|
WorkHistoryParser.new(response).work_histories
|
9
9
|
end
|
10
10
|
|
11
|
+
def self.create(employee_id, params)
|
12
|
+
post("people/#{employee_id}/work", params)
|
13
|
+
end
|
14
|
+
|
11
15
|
def self.update(employee_id, work_history_id, params)
|
12
16
|
put(
|
13
17
|
"people/#{employee_id}/work/#{work_history_id}",
|
@@ -15,6 +19,10 @@ module Bob
|
|
15
19
|
use_api_key: true
|
16
20
|
)
|
17
21
|
end
|
22
|
+
|
23
|
+
def self.remove(employee_id, work_history_id)
|
24
|
+
delete("people/#{employee_id}/work/#{work_history_id}")
|
25
|
+
end
|
18
26
|
end
|
19
27
|
end
|
20
28
|
end
|
data/lib/bob/api/employees.rb
CHANGED
@@ -9,6 +9,7 @@ require_relative 'employee/variable_payments'
|
|
9
9
|
require_relative 'employee/work_history'
|
10
10
|
require_relative 'employee/lifecycle_history'
|
11
11
|
require_relative 'employee/time_off'
|
12
|
+
require_relative 'employee/employment_history'
|
12
13
|
|
13
14
|
module Bob
|
14
15
|
class Employees < API
|
data/lib/bob/models.rb
CHANGED
data/lib/bob/parsers.rb
CHANGED
data/lib/bob/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bobhr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lien Van Den Steen
|
@@ -64,6 +64,7 @@ files:
|
|
64
64
|
- lib/bob.rb
|
65
65
|
- lib/bob/api/api.rb
|
66
66
|
- lib/bob/api/employee/documents.rb
|
67
|
+
- lib/bob/api/employee/employment_history.rb
|
67
68
|
- lib/bob/api/employee/equity_grants.rb
|
68
69
|
- lib/bob/api/employee/invites.rb
|
69
70
|
- lib/bob/api/employee/lifecycle_history.rb
|
@@ -85,6 +86,7 @@ files:
|
|
85
86
|
- lib/bob/models/company_field.rb
|
86
87
|
- lib/bob/models/company_list.rb
|
87
88
|
- lib/bob/models/employee.rb
|
89
|
+
- lib/bob/models/employment_history.rb
|
88
90
|
- lib/bob/models/equity_grant.rb
|
89
91
|
- lib/bob/models/lifecycle_history.rb
|
90
92
|
- lib/bob/models/onboarding_wizard.rb
|
@@ -98,6 +100,7 @@ files:
|
|
98
100
|
- lib/bob/parsers/company_field_parser.rb
|
99
101
|
- lib/bob/parsers/company_list_parser.rb
|
100
102
|
- lib/bob/parsers/employee_parser.rb
|
103
|
+
- lib/bob/parsers/employment_history_parser.rb
|
101
104
|
- lib/bob/parsers/equity_grant_parser.rb
|
102
105
|
- lib/bob/parsers/lifecycle_history_parser.rb
|
103
106
|
- lib/bob/parsers/onboarding_wizard_parser.rb
|