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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ba27fbf4804e19318ce9f39e7dfe5488955a19b68f337da4407ce52824b71db3
4
- data.tar.gz: 82a0ce36154590d31b0ddbd605c20baf31432f94c996c6a0dd90e9b97cf85d60
3
+ metadata.gz: b8c2dbce2a29b1cbea28d746c699bdebedf1975662c8a5560e068a5e13a41fb2
4
+ data.tar.gz: 4baffb042fa6fae3be5af2380a34b2ca09a740c6e43e384e2cf615690055d1aa
5
5
  SHA512:
6
- metadata.gz: 5c0a58de9a8c6c7cb8ea9df7baf40393dc49ae84c808573e080dba5a0ffb0f6e2a0cc59506d9845d8d7ab79b9657a38eb7e1427586cd563463f790dd88fbce40
7
- data.tar.gz: 6181082e0b3f51da521f108f84735fed2c74cd6656629d1cdd356e69129a8aba279dca52db939720a4cdbbbf037854447dca800abad5158e78c97cfc4a35fc3f
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
@@ -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
@@ -75,7 +75,7 @@ module Models
75
75
  end
76
76
 
77
77
  def cost_center
78
- payroll.custom.field_1634476091511
78
+ human_readable.payroll.custom.field_1634476091511
79
79
  end
80
80
 
81
81
  def personal_email
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.20'
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.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-08-03 00:00:00.000000000 Z
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