bobhr 0.5.29 → 0.5.31

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: 9f50d6a3f23be5df92b26048b13dae9e8b6c566519f8ecd7611ba1a4175ba9d3
4
- data.tar.gz: 7a71e366f4c6ba73d8fc23dbbf997fc27b2d6ac2a716b576c144a08b70922644
3
+ metadata.gz: 4d06c915d542dd8a758229e0dd3b781d2ff9e11dc9431ac3363f18f5b255de95
4
+ data.tar.gz: ae3f31ce745ff9c4a90839b79fe3ba09056a4d5b41d1ddb2044ad0c013f450c9
5
5
  SHA512:
6
- metadata.gz: 43c4b4c0324c8d3fa2ff0820a7f2c294d1e50ead86115ce30b8a8c09453d7f62a545c81f82af404633304497e91b1cf62f898382b3afa55219c512dc2b2a4b76
7
- data.tar.gz: 8bcd707124afa40ca6bc8173c568e9d36729c382ffcc8320cf7f9ba9edfdd5480aa02ec9538e6f6d3687352fb418edce1ee2f69236bee96cea1d0753e373255f
6
+ metadata.gz: 85c3edc3152f582951e557e4fcf394d53a58f22a6b5492cb73526a55dc40634172e9df2c611862ef9d7acd3947727ae375814f39abc99865819f60d7c7863f70
7
+ data.tar.gz: d51136179d43ceca32901ae7ae825e722c36bd022caf7b1f9cff8abfbe2fa7ef28ce6ee2344df2b3949c87fc918daec1609d26b22b23cfe3c8882d1369d271a1
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Bob
4
+ module Employee
5
+ class CustomTables < API
6
+ def self.rows(employee_id, table_id)
7
+ response = get("people/custom-tables/#{employee_id}/#{table_id}")
8
+ TableParser.new(response).rows
9
+ end
10
+
11
+ def self.add_row(employee_id, table_id, row_data)
12
+ post("people/custom-tables/#{employee_id}/#{table_id}", {values: row_data})
13
+ end
14
+ end
15
+ end
16
+ end
@@ -10,6 +10,7 @@ require_relative 'employee/work_history'
10
10
  require_relative 'employee/lifecycle_history'
11
11
  require_relative 'employee/time_off'
12
12
  require_relative 'employee/employment_history'
13
+ require_relative 'employee/custom_tables'
13
14
 
14
15
  module Bob
15
16
  class Employees < API
@@ -27,7 +27,7 @@ module Models
27
27
  end
28
28
 
29
29
  def entity
30
- human_readable.work.custom_columns.column_1633980105047
30
+ human_readable.work.custom_columns&.column_1633980105047
31
31
  end
32
32
 
33
33
  def city
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Models
4
+ class Table < Models::Base
5
+ end
6
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class TableParser < BaseParser
4
+ def rows
5
+ json_response['values'].map { |attributes| Models::Table.new(attributes) }
6
+ end
7
+ 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.29'
4
+ VERSION = '0.5.31'
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.29
4
+ version: 0.5.31
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: 2023-03-24 00:00:00.000000000 Z
11
+ date: 2023-05-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -63,6 +63,7 @@ files:
63
63
  - README.md
64
64
  - lib/bob.rb
65
65
  - lib/bob/api/api.rb
66
+ - lib/bob/api/employee/custom_tables.rb
66
67
  - lib/bob/api/employee/documents.rb
67
68
  - lib/bob/api/employee/employment_history.rb
68
69
  - lib/bob/api/employee/equity_grants.rb
@@ -92,6 +93,7 @@ files:
92
93
  - lib/bob/models/lifecycle_history.rb
93
94
  - lib/bob/models/onboarding_wizard.rb
94
95
  - lib/bob/models/salary.rb
96
+ - lib/bob/models/table.rb
95
97
  - lib/bob/models/time_off.rb
96
98
  - lib/bob/models/training.rb
97
99
  - lib/bob/models/variable_payment.rb
@@ -106,6 +108,7 @@ files:
106
108
  - lib/bob/parsers/lifecycle_history_parser.rb
107
109
  - lib/bob/parsers/onboarding_wizard_parser.rb
108
110
  - lib/bob/parsers/salary_parser.rb
111
+ - lib/bob/parsers/table_parser.rb
109
112
  - lib/bob/parsers/time_off_parser.rb
110
113
  - lib/bob/parsers/training_parser.rb
111
114
  - lib/bob/parsers/variable_payment_parser.rb