bobhr 0.5.18 → 0.5.19
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/version.rb +1 -1
- 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: 9ea22a54b23deffef8eeea565b355bf7569869725a4ddabe861ad252d6bfefd7
|
4
|
+
data.tar.gz: 8d982347ca745e2476dcf3626259e082f45da66f7dc74a100909bb496d7476f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8bf89e3742d4da2d31087db199164db0bb0c25c5da783b6d5026fe87f1fc70abc8f0b52c650dc569b725406f607ffb9689da5c944a62b21786c2a8ab625b3cf5
|
7
|
+
data.tar.gz: b3a5ce5f2587a09682ddf4c3b643e69bc2a624e6862e7499fa47c5fbbf4d034a983647191db184492176f073104385cd6457b99283a0772b64f1f078838f8f3b
|
@@ -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/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.19
|
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-09-29 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
|
@@ -133,7 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
133
134
|
- !ruby/object:Gem::Version
|
134
135
|
version: '0'
|
135
136
|
requirements: []
|
136
|
-
rubygems_version: 3.
|
137
|
+
rubygems_version: 3.3.7
|
137
138
|
signing_key:
|
138
139
|
specification_version: 4
|
139
140
|
summary: Ruby gem for Bob API
|