bobhr 0.5.18 → 0.5.20
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/metadata/time_off_policies.rb +20 -0
- data/lib/bob/api/metadata.rb +1 -0
- data/lib/bob/models/base.rb +2 -0
- data/lib/bob/models/employee.rb +1 -1
- data/lib/bob/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b8c2dbce2a29b1cbea28d746c699bdebedf1975662c8a5560e068a5e13a41fb2
|
4
|
+
data.tar.gz: 4baffb042fa6fae3be5af2380a34b2ca09a740c6e43e384e2cf615690055d1aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ec8d5741876e58f7587e70f9c872a4c238c4de0e3544c16592a43dcb5e5d67e82348d3d652ac960aa05e4d8031d528856dc5b1451de09500ab7450e8442f6078
|
7
|
+
data.tar.gz: 92585569a52c715a290dbb8a19b299fc79a647ec33cd3b4a413a86f296b25d232f55d3cf4c728a9b68b785f16426f4cd3d2360994d6e70ac0e130addd2828a37
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Bob
|
4
|
+
module MetaData
|
5
|
+
class TimeOffPolicies < API
|
6
|
+
def self.all
|
7
|
+
get('timeoff/policy-types')['policyTypes']
|
8
|
+
end
|
9
|
+
|
10
|
+
def self.find(policy_name)
|
11
|
+
response = get("timeoff/policies", { policyName: policy_name })
|
12
|
+
BaseParser.new(response).fields
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.names_for(policy_name)
|
16
|
+
get("timeoff/policies/names", { policyTypeName: policy_name })['policies']
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
data/lib/bob/api/metadata.rb
CHANGED
data/lib/bob/models/base.rb
CHANGED
@@ -10,6 +10,8 @@ module Models
|
|
10
10
|
instance_variable_set("@#{k}", v.is_a?(Hash) ? Models::Base.new(v) : v)
|
11
11
|
self.class.send(:define_method, k, proc { instance_variable_get("@#{k}") })
|
12
12
|
self.class.send(:define_method, "#{k}=", proc { |val| instance_variable_set("@#{k}", val) })
|
13
|
+
rescue NameError
|
14
|
+
next
|
13
15
|
end
|
14
16
|
end
|
15
17
|
end
|
data/lib/bob/models/employee.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.5.
|
4
|
+
version: 0.5.20
|
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: 2022-
|
11
|
+
date: 2022-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -77,6 +77,7 @@ files:
|
|
77
77
|
- lib/bob/api/metadata.rb
|
78
78
|
- lib/bob/api/metadata/company_fields.rb
|
79
79
|
- lib/bob/api/metadata/company_lists.rb
|
80
|
+
- lib/bob/api/metadata/time_off_policies.rb
|
80
81
|
- lib/bob/api/onboarding_wizards.rb
|
81
82
|
- lib/bob/api/reports.rb
|
82
83
|
- lib/bob/api/time_off.rb
|