bobhr 0.1.2 → 0.2.0
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/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d48ea76f624d83c68b49953dcb9a5329250bf404e7936d7c8ab99a4ca349165d
|
4
|
+
data.tar.gz: 3cbd7409788e5ba53e5714c2d52979695b8e566d1ca8b63713f2a9a329dde012
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e234bf17c1997741a47490b3d70cb5a55b160b1435c13b21f89ec6dc0766a3d37569df2db74937b794af260f8a94655d3028910b7da28e367515e2bb3aed6be
|
7
|
+
data.tar.gz: 64d73f5a829cdb79eba59b20e2bd651d29487e88fcaea30effceeac0cf7a15e8b16eb093a77374236f531de3773fb59036ee1748b8c9975ed4f10ab9a875e388
|
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/version.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.2.0
|
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: 2021-12-
|
11
|
+
date: 2021-12-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|