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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ba27fbf4804e19318ce9f39e7dfe5488955a19b68f337da4407ce52824b71db3
4
- data.tar.gz: 82a0ce36154590d31b0ddbd605c20baf31432f94c996c6a0dd90e9b97cf85d60
3
+ metadata.gz: 9ea22a54b23deffef8eeea565b355bf7569869725a4ddabe861ad252d6bfefd7
4
+ data.tar.gz: 8d982347ca745e2476dcf3626259e082f45da66f7dc74a100909bb496d7476f0
5
5
  SHA512:
6
- metadata.gz: 5c0a58de9a8c6c7cb8ea9df7baf40393dc49ae84c808573e080dba5a0ffb0f6e2a0cc59506d9845d8d7ab79b9657a38eb7e1427586cd563463f790dd88fbce40
7
- data.tar.gz: 6181082e0b3f51da521f108f84735fed2c74cd6656629d1cdd356e69129a8aba279dca52db939720a4cdbbbf037854447dca800abad5158e78c97cfc4a35fc3f
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
@@ -2,3 +2,4 @@
2
2
 
3
3
  require_relative 'metadata/company_lists'
4
4
  require_relative 'metadata/company_fields'
5
+ require_relative 'metadata/time_off_policies'
@@ -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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Bob
4
- VERSION = '0.5.18'
4
+ VERSION = '0.5.19'
5
5
  end
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.18
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-08-03 00:00:00.000000000 Z
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.2.31
137
+ rubygems_version: 3.3.7
137
138
  signing_key:
138
139
  specification_version: 4
139
140
  summary: Ruby gem for Bob API