bobhr 0.1.2 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bob/employees.rb +7 -1
- data/lib/bob/metadata.rb +1 -0
- data/lib/bob/reports.rb +13 -0
- data/lib/bob/time_off.rb +5 -1
- data/lib/bob/version.rb +1 -1
- data/lib/bob.rb +1 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6122504e4286621796c2d41792db07c90fc0796412d519f3bc928b64cc11b84
|
4
|
+
data.tar.gz: c1afdd126a7c552d9a63a82b50711746f038721593d920bf50e8852ca515a08d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 96d3120c6a4a060c88e4f09b2594385e3f97367d89ef4564719ed2f442b53ed5d507b973740b3d48245701987d9d8da0149e599d55c73124c103277d00b4c69a
|
7
|
+
data.tar.gz: 6d3cff522342f7f0edd116c500f5e7941fcf2249596409503200266aa0a80535198ab689e8b4ddf8cc3339a917dfcc35a6ee930fd9b6587d8eca38655582e9df
|
data/lib/bob/employees.rb
CHANGED
@@ -9,13 +9,19 @@ require_relative 'employee/documents'
|
|
9
9
|
module Bob
|
10
10
|
class Employees < API
|
11
11
|
def self.all(params = {})
|
12
|
-
get('people', params)
|
12
|
+
get('people', params)['employees']
|
13
13
|
end
|
14
14
|
|
15
15
|
def self.find(employee_id_or_email)
|
16
16
|
get("people/#{employee_id_or_email}")
|
17
17
|
end
|
18
18
|
|
19
|
+
def self.find_by(field:, value:)
|
20
|
+
all.find do |employee|
|
21
|
+
employee[field] == value
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
19
25
|
# start date needs to be in ISO format
|
20
26
|
def self.update_start_date(employee_id, start_date)
|
21
27
|
post("employees/#{employee_id}", { startDate: start_date })
|
data/lib/bob/metadata.rb
CHANGED
data/lib/bob/reports.rb
ADDED
data/lib/bob/time_off.rb
CHANGED
@@ -3,11 +3,15 @@
|
|
3
3
|
module Bob
|
4
4
|
class TimeOff < API
|
5
5
|
def self.all_changed_since(since)
|
6
|
-
get('timeoff/requests/changes', { since: since })
|
6
|
+
get('timeoff/requests/changes', { since: since })['changes']
|
7
7
|
end
|
8
8
|
|
9
9
|
def self.today
|
10
10
|
get('timeoff/outtoday')
|
11
11
|
end
|
12
|
+
|
13
|
+
def self.find_for_employee(employee_id, request_id)
|
14
|
+
get("timeoff/employees/#{employee_id}/requests/#{request_id}")
|
15
|
+
end
|
12
16
|
end
|
13
17
|
end
|
data/lib/bob/version.rb
CHANGED
data/lib/bob.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bobhr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lien Van Den Steen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -61,6 +61,7 @@ files:
|
|
61
61
|
- lib/bob/metadata/company_fields.rb
|
62
62
|
- lib/bob/metadata/company_lists.rb
|
63
63
|
- lib/bob/onboarding_wizards.rb
|
64
|
+
- lib/bob/reports.rb
|
64
65
|
- lib/bob/time_off.rb
|
65
66
|
- lib/bob/version.rb
|
66
67
|
- lib/bobhr.rb
|
@@ -84,7 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
84
85
|
- !ruby/object:Gem::Version
|
85
86
|
version: '0'
|
86
87
|
requirements: []
|
87
|
-
rubygems_version: 3.2.
|
88
|
+
rubygems_version: 3.2.32
|
88
89
|
signing_key:
|
89
90
|
specification_version: 4
|
90
91
|
summary: Ruby gem for Bob API
|