bobhr 0.4.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -2
  3. data/lib/bob/{api.rb → api/api.rb} +1 -1
  4. data/lib/bob/{employee → api/employee}/documents.rb +0 -0
  5. data/lib/bob/{employee → api/employee}/equity_grants.rb +2 -1
  6. data/lib/bob/{employee → api/employee}/invites.rb +0 -0
  7. data/lib/bob/{employee → api/employee}/salaries.rb +2 -1
  8. data/lib/bob/{employee → api/employee}/trainings.rb +2 -1
  9. data/lib/bob/{employee → api/employee}/variable_payments.rb +2 -1
  10. data/lib/bob/{employees.rb → api/employees.rb} +10 -7
  11. data/lib/bob/{metadata → api/metadata}/company_fields.rb +2 -1
  12. data/lib/bob/{metadata → api/metadata}/company_lists.rb +4 -2
  13. data/lib/bob/{metadata.rb → api/metadata.rb} +0 -0
  14. data/lib/bob/{onboarding_wizards.rb → api/onboarding_wizards.rb} +2 -1
  15. data/lib/bob/{reports.rb → api/reports.rb} +4 -1
  16. data/lib/bob/api/time_off.rb +20 -0
  17. data/lib/bob/models/base.rb +15 -0
  18. data/lib/bob/models/company_field.rb +6 -0
  19. data/lib/bob/models/company_list.rb +6 -0
  20. data/lib/bob/models/employee.rb +45 -0
  21. data/lib/bob/models/equity_grant.rb +6 -0
  22. data/lib/bob/models/onboarding_wizard.rb +6 -0
  23. data/lib/bob/models/salary.rb +9 -0
  24. data/lib/bob/models/time_off.rb +39 -0
  25. data/lib/bob/models/training.rb +6 -0
  26. data/lib/bob/models/variable_payment.rb +6 -0
  27. data/lib/bob/models.rb +12 -0
  28. data/lib/bob/parsers/base_parser.rb +9 -0
  29. data/lib/bob/parsers/company_field_parser.rb +7 -0
  30. data/lib/bob/parsers/company_list_parser.rb +11 -0
  31. data/lib/bob/parsers/employee_parser.rb +11 -0
  32. data/lib/bob/parsers/equity_grant_parser.rb +7 -0
  33. data/lib/bob/parsers/onboarding_wizard_parser.rb +7 -0
  34. data/lib/bob/parsers/salary_parser.rb +7 -0
  35. data/lib/bob/parsers/time_off_parser.rb +11 -0
  36. data/lib/bob/parsers/training_parser.rb +7 -0
  37. data/lib/bob/parsers/variable_payment_parser.rb +7 -0
  38. data/lib/bob/parsers.rb +12 -0
  39. data/lib/bob/util.rb +22 -0
  40. data/lib/bob/version.rb +1 -1
  41. data/lib/bob.rb +9 -6
  42. metadata +50 -27
  43. data/lib/bob/time_off.rb +0 -17
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4a4cfc182047ea0cc73d936310c357503289d39887a234d5ec98d4342912d340
4
- data.tar.gz: 3ded6f900318c2984a2fb02784b4ecdbd880ac3ddf711d31207d852c38f869e7
3
+ metadata.gz: 7be7ee6eb8986610c73cb5b369e2ba00cdb23b1ab33762e470fe35f141ccb95e
4
+ data.tar.gz: '08f8d8c2aed85d5d59bb68b269e0edbbaaa6c0d89b15613b7ed16c0b492e331f'
5
5
  SHA512:
6
- metadata.gz: e894d067445285d3dd4beafb06f8bc62e7d5aaedc9c47131ef8db93c2af2a357c222de13205fdd948fb47ad346941c9533dde687de3416cee7192ebdee2382e9
7
- data.tar.gz: b6582c5fb8de24a7d76b368061224359c2a0f02ece2cfc02510d115fd97dbfedf7775083d31ddc22c528f0bd900f20cb0038d8462874bafadc4661a1844abc82
6
+ metadata.gz: 463751142a4aaf1dd4112d38ac2f5849ff6b0228336a220ec61294e608639189674d2ef844cbc8ac6d88d4a93b6898240aadc5d01038916a79984306e0d7b6e2
7
+ data.tar.gz: eea598bc6402bcf2c28ed741fcb574d395b4a617a6e1bd75194f0dd6449d22ea419b341122ac77e4753ee48d8e5904669763a71068986d6e3adb171c45354edc
data/README.md CHANGED
@@ -40,6 +40,7 @@ Usage examples:
40
40
 
41
41
  Bob.access_token = 'your-access-token'
42
42
  employee = Bob::Employees.find(1)
43
+ employee.department
43
44
  employee_trainings = Bob::Employees::Trainings.all(1)
44
45
  ```
45
46
 
@@ -51,7 +52,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
51
52
 
52
53
  ## Contributing
53
54
 
54
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/hibob. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/hibob/blob/master/CODE_OF_CONDUCT.md).
55
+ Bug reports and pull requests are welcome on GitHub at https://github.com/lienvdsteen/hibob. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/lienvdsteen/hibob/blob/master/CODE_OF_CONDUCT.md).
55
56
 
56
57
  ## License
57
58
 
@@ -59,4 +60,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
59
60
 
60
61
  ## Code of Conduct
61
62
 
62
- Everyone interacting in the Hibob project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/hibob/blob/master/CODE_OF_CONDUCT.md).
63
+ Everyone interacting in the Hibob project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/lienvdsteen/hibob/blob/master/CODE_OF_CONDUCT.md).
@@ -64,7 +64,7 @@ module Bob
64
64
  CSV.open("tmp/#{file_name}.csv", 'wb') do |csv|
65
65
  csv << splitted.shift.split(',')
66
66
  splitted.each do |row|
67
- csv << row.split(',')
67
+ csv << CSV.parse_line(row)
68
68
  end
69
69
  end
70
70
 
File without changes
@@ -4,7 +4,8 @@ module Bob
4
4
  module Employee
5
5
  class EquityGrants < API
6
6
  def self.all(employee_id)
7
- get("people/#{employee_id}/equities")
7
+ response = get("people/#{employee_id}/equities")
8
+ EquityGrantParser.new(response).equity_grants
8
9
  end
9
10
 
10
11
  def self.create(employee_id, params = {})
File without changes
@@ -4,7 +4,8 @@ module Bob
4
4
  module Employee
5
5
  class Salaries < API
6
6
  def self.all(employee_id)
7
- get("people/#{employee_id}/salaries")
7
+ response = get("people/#{employee_id}/salaries")
8
+ SalaryParser.new(response).salaries
8
9
  end
9
10
 
10
11
  def self.create(employee_id, params = {})
@@ -4,7 +4,8 @@ module Bob
4
4
  module Employee
5
5
  class Trainings < API
6
6
  def self.all(employee_id)
7
- get("people/#{employee_id}/training")
7
+ response = get("people/#{employee_id}/training")
8
+ TrainingParser.new(response).trainings
8
9
  end
9
10
 
10
11
  def self.create(employee_id, params = {})
@@ -4,7 +4,8 @@ module Bob
4
4
  module Employee
5
5
  class VariablePayments < API
6
6
  def self.all(employee_id)
7
- get("people/#{employee_id}/variable")
7
+ response = get("people/#{employee_id}/variable")
8
+ VariablePaymentParser.new(response).variable_payments
8
9
  end
9
10
 
10
11
  def self.create(employee_id, params = {})
@@ -5,20 +5,23 @@ require_relative 'employee/trainings'
5
5
  require_relative 'employee/salaries'
6
6
  require_relative 'employee/equity_grants'
7
7
  require_relative 'employee/documents'
8
+ require_relative 'employee/variable_payments'
8
9
 
9
10
  module Bob
10
11
  class Employees < API
11
- def self.all(params = {})
12
- get('people', params)['employees']
12
+ def self.all(params = { includeHumanReadable: true })
13
+ response = get('people', params)
14
+ EmployeeParser.new(response).employees
13
15
  end
14
16
 
15
- def self.find(employee_id_or_email)
16
- get("people/#{employee_id_or_email}")
17
+ def self.find(employee_id_or_email, params: { includeHumanReadable: true })
18
+ response = get("people/#{employee_id_or_email}", params)
19
+ EmployeeParser.new(response).employee
17
20
  end
18
21
 
19
- def self.find_by(field:, value:)
20
- all.find do |employee|
21
- employee[field] == value
22
+ def self.find_by(field:, value:, params: { includeHumanReadable: true })
23
+ all(params).find do |employee|
24
+ employee.send(field) == value
22
25
  end
23
26
  end
24
27
 
@@ -4,7 +4,8 @@ module Bob
4
4
  module MetaData
5
5
  class CompanyFields < API
6
6
  def self.all
7
- get('company/people/fields')
7
+ response = get('company/people/fields')
8
+ CompanyFieldParser.new(response).fields
8
9
  end
9
10
 
10
11
  def self.create(params = {})
@@ -4,11 +4,13 @@ module Bob
4
4
  module MetaData
5
5
  class CompanyLists < API
6
6
  def self.all
7
- get('company/named-lists')
7
+ response = get('company/named-lists')
8
+ CompanyListParser.new(response).lists
8
9
  end
9
10
 
10
11
  def self.find(list_name)
11
- get("company/named-lists/#{list_name}")
12
+ response = get("company/named-lists/#{list_name}")
13
+ CompanyListParser.new(response).list
12
14
  end
13
15
 
14
16
  def self.add_item(list_name, params = {})
File without changes
@@ -3,7 +3,8 @@
3
3
  module Bob
4
4
  class OnboardingWizards < API
5
5
  def self.all
6
- get('onboarding/wizards')
6
+ response = get('onboarding/wizards')
7
+ OnboardingWizardParser.new(response).wizards
7
8
  end
8
9
  end
9
10
  end
@@ -14,10 +14,13 @@ module Bob
14
14
 
15
15
  def self.sftp_upload(sftp_details:, report_id:)
16
16
  file_name = read(report_id)
17
+ uri = URI.parse("sftp://#{sftp_details[:host]}")
17
18
 
18
- Net::SFTP.start(sftp_details[:host], sftp_details[:user], password: sftp_details[:password]) do |sftp|
19
+ Net::SFTP.start(uri.host, sftp_details[:user], password: sftp_details[:password]) do |sftp|
19
20
  sftp.upload!(file_name, sftp_details[:remote_file_path])
20
21
  end
22
+
23
+ true
21
24
  end
22
25
  end
23
26
  end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Bob
4
+ class TimeOff < API
5
+ def self.all_changed_since(since)
6
+ response = get('timeoff/requests/changes', { since: since })['changes']
7
+ TimeOffParser.new({ 'outs' => response }).events
8
+ end
9
+
10
+ def self.today
11
+ response = get('timeoff/outtoday')
12
+ TimeOffParser.new(response).events
13
+ end
14
+
15
+ def self.find_for_employee(employee_id, request_id)
16
+ response = get("timeoff/employees/#{employee_id}/requests/#{request_id}")
17
+ TimeOffParser.new(response).event
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Models
4
+ class Base
5
+ def initialize(raw)
6
+ attributes = Bob::Util.underscorize_hash(raw)
7
+
8
+ attributes.each do |k, v|
9
+ instance_variable_set("@#{k}", v.is_a?(Hash) ? Models::Base.new(v) : v)
10
+ self.class.send(:define_method, k, proc { instance_variable_get("@#{k}") })
11
+ self.class.send(:define_method, "#{k}=", proc { |val| instance_variable_set("@#{k}", val) })
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Models
4
+ class CompanyField < Models::Base
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Models
4
+ class CompanyList < Models::Base
5
+ end
6
+ end
@@ -0,0 +1,45 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Models
4
+ class Employee < Models::Base
5
+ def manager?
6
+ work.is_manager
7
+ end
8
+
9
+ def job_title
10
+ human_readable.work.title
11
+ end
12
+
13
+ def start_date
14
+ work.start_date
15
+ end
16
+
17
+ def department
18
+ work.department
19
+ end
20
+
21
+ def division
22
+ human_readable.work.custom_columns.column_1629151319875
23
+ end
24
+
25
+ def team
26
+ human_readable.work.custom_columns.column_1642024758438
27
+ end
28
+
29
+ def entity
30
+ human_readable.work.custom_columns.column_1633980105047
31
+ end
32
+
33
+ def city
34
+ address.site_city || address.city
35
+ end
36
+
37
+ def role_level
38
+ human_readable.work.custom_columns.column_1629151373898
39
+ end
40
+
41
+ def manager
42
+ work.reports_to
43
+ end
44
+ end
45
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Models
4
+ class EquityGrant < Models::Base
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Models
4
+ class OnboardingWizard < Models::Base
5
+ end
6
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Models
4
+ class Salary < Models::Base
5
+ def change_reason
6
+ custom_columns.column_1629237637766
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Models
4
+ class TimeOff < Models::Base
5
+ def employee
6
+ @employee ||= Bob::Employees.find(employee_id)
7
+ end
8
+
9
+ def parental_leave?
10
+ policy_type_display_name == 'Parental Leave'
11
+ end
12
+
13
+ def created?
14
+ change_type == 'Created'
15
+ end
16
+
17
+ def return_date
18
+ @return_date = parsed_end_date + 1.day
19
+ end
20
+
21
+ def multiple_days?
22
+ total_days_off > 1
23
+ end
24
+
25
+ def total_days_off
26
+ (start_date...end_date).count + 1
27
+ end
28
+
29
+ private
30
+
31
+ def parsed_start_date
32
+ Date.parse(start_date)
33
+ end
34
+
35
+ def parsed_end_date
36
+ Date.parse(end_date)
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Models
4
+ class Salary < Models::Base
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Models
4
+ class VariablePayment < Models::Base
5
+ end
6
+ end
data/lib/bob/models.rb ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'models/base'
4
+ require_relative 'models/employee'
5
+ require_relative 'models/equity_grant'
6
+ require_relative 'models/salary'
7
+ require_relative 'models/training'
8
+ require_relative 'models/variable_payment'
9
+ require_relative 'models/time_off'
10
+ require_relative 'models/company_list'
11
+ require_relative 'models/company_field'
12
+ require_relative 'models/onboarding_wizard'
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ class BaseParser
4
+ attr_reader :json_response
5
+
6
+ def initialize(json_response)
7
+ @json_response = json_response
8
+ end
9
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class CompanyFieldParser < BaseParser
4
+ def fields
5
+ json_response.map { |attributes| Models::CompanyField.new(attributes) }
6
+ end
7
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ class CompanyListParser < BaseParser
4
+ def list
5
+ Models::CompanyList.new(json_response)
6
+ end
7
+
8
+ def lists
9
+ json_response.map { |_key, attributes| Models::CompanyList.new(attributes) }
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ class EmployeeParser < BaseParser
4
+ def employee
5
+ Models::Employee.new(json_response)
6
+ end
7
+
8
+ def employees
9
+ json_response['employees'].map { |attributes| Models::Employee.new(attributes) }
10
+ end
11
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class EquityGrantParser < BaseParser
4
+ def equity_grants
5
+ json_response['values'].map { |attributes| Models::EquityGrant.new(attributes) }
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class OnboardingWizardParser < BaseParser
4
+ def wizards
5
+ json_response['values'].map { |attributes| Models::OnboardingWizard.new(attributes) }
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class SalaryParser < BaseParser
4
+ def salaries
5
+ json_response['values'].map { |attributes| Models::Salary.new(attributes) }
6
+ end
7
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ class TimeOffParser < BaseParser
4
+ def event
5
+ Models::TimeOff.new(json_response)
6
+ end
7
+
8
+ def events
9
+ json_response['outs'].map { |attributes| Models::TimeOff.new(attributes) }
10
+ end
11
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class TrainingParser < BaseParser
4
+ def trainings
5
+ json_response['values'].map { |attributes| Models::Training.new(attributes) }
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class VariablePaymentParser < BaseParser
4
+ def variable_payments
5
+ json_response['values'].map { |attributes| Models::VariablePayment.new(attributes) }
6
+ end
7
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'parsers/base_parser'
4
+ require_relative 'parsers/employee_parser'
5
+ require_relative 'parsers/equity_grant_parser'
6
+ require_relative 'parsers/salary_parser'
7
+ require_relative 'parsers/training_parser'
8
+ require_relative 'parsers/variable_payment_parser'
9
+ require_relative 'parsers/time_off_parser'
10
+ require_relative 'parsers/company_list_parser'
11
+ require_relative 'parsers/company_field_parser'
12
+ require_relative 'parsers/onboarding_wizard_parser'
data/lib/bob/util.rb ADDED
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Credits to https://github.com/myponto/ponto-ruby/blob/master/lib/ponto/util.rb
4
+ module Bob
5
+ module Util
6
+ def self.underscorize_hash(attributes)
7
+ attributes.keys.each_with_object({}) do |key, result|
8
+ result[underscore(key)] = attributes[key]
9
+ end
10
+ end
11
+
12
+ def self.underscore(camel_cased_word)
13
+ return camel_cased_word unless camel_cased_word =~ /[A-Z-]/
14
+
15
+ word = camel_cased_word.to_s.gsub(/([A-Z\d]+)([A-Z][a-z])/, '\1_\2')
16
+ word.gsub!(/([a-z\d])([A-Z])/, '\1_\2')
17
+ word.tr!('-', '_')
18
+ word.downcase!
19
+ word
20
+ end
21
+ end
22
+ 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.4.0'
4
+ VERSION = '0.5.1'
5
5
  end
data/lib/bob.rb CHANGED
@@ -2,13 +2,16 @@
2
2
 
3
3
  require_relative 'bob/version'
4
4
  require_relative 'bob/configuration'
5
- require_relative 'bob/api'
6
- require_relative 'bob/employees'
7
- require_relative 'bob/time_off'
8
- require_relative 'bob/onboarding_wizards'
9
- require_relative 'bob/metadata'
10
- require_relative 'bob/reports'
5
+ require_relative 'bob/api/api'
6
+ require_relative 'bob/api/employees'
7
+ require_relative 'bob/api/time_off'
8
+ require_relative 'bob/api/onboarding_wizards'
9
+ require_relative 'bob/api/metadata'
10
+ require_relative 'bob/api/reports'
11
11
  require_relative 'bob/webhooks'
12
+ require_relative 'bob/models'
13
+ require_relative 'bob/parsers'
14
+ require_relative 'bob/util'
12
15
 
13
16
  module Bob
14
17
  extend Configuration
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.4.0
4
+ version: 0.5.1
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-02-23 00:00:00.000000000 Z
11
+ date: 2022-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -25,33 +25,33 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: rest-client
28
+ name: net-sftp
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: '2.0'
33
+ version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: '2.0'
40
+ version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: net-sftp
42
+ name: rest-client
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: '2.0'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: '2.0'
55
55
  description: Ruby gem for Bob API
56
56
  email:
57
57
  - lienvandensteen@gmail.com
@@ -62,21 +62,44 @@ files:
62
62
  - LICENSE.txt
63
63
  - README.md
64
64
  - lib/bob.rb
65
- - lib/bob/api.rb
65
+ - lib/bob/api/api.rb
66
+ - lib/bob/api/employee/documents.rb
67
+ - lib/bob/api/employee/equity_grants.rb
68
+ - lib/bob/api/employee/invites.rb
69
+ - lib/bob/api/employee/salaries.rb
70
+ - lib/bob/api/employee/trainings.rb
71
+ - lib/bob/api/employee/variable_payments.rb
72
+ - lib/bob/api/employees.rb
73
+ - lib/bob/api/metadata.rb
74
+ - lib/bob/api/metadata/company_fields.rb
75
+ - lib/bob/api/metadata/company_lists.rb
76
+ - lib/bob/api/onboarding_wizards.rb
77
+ - lib/bob/api/reports.rb
78
+ - lib/bob/api/time_off.rb
66
79
  - lib/bob/configuration.rb
67
- - lib/bob/employee/documents.rb
68
- - lib/bob/employee/equity_grants.rb
69
- - lib/bob/employee/invites.rb
70
- - lib/bob/employee/salaries.rb
71
- - lib/bob/employee/trainings.rb
72
- - lib/bob/employee/variable_payments.rb
73
- - lib/bob/employees.rb
74
- - lib/bob/metadata.rb
75
- - lib/bob/metadata/company_fields.rb
76
- - lib/bob/metadata/company_lists.rb
77
- - lib/bob/onboarding_wizards.rb
78
- - lib/bob/reports.rb
79
- - lib/bob/time_off.rb
80
+ - lib/bob/models.rb
81
+ - lib/bob/models/base.rb
82
+ - lib/bob/models/company_field.rb
83
+ - lib/bob/models/company_list.rb
84
+ - lib/bob/models/employee.rb
85
+ - lib/bob/models/equity_grant.rb
86
+ - lib/bob/models/onboarding_wizard.rb
87
+ - lib/bob/models/salary.rb
88
+ - lib/bob/models/time_off.rb
89
+ - lib/bob/models/training.rb
90
+ - lib/bob/models/variable_payment.rb
91
+ - lib/bob/parsers.rb
92
+ - lib/bob/parsers/base_parser.rb
93
+ - lib/bob/parsers/company_field_parser.rb
94
+ - lib/bob/parsers/company_list_parser.rb
95
+ - lib/bob/parsers/employee_parser.rb
96
+ - lib/bob/parsers/equity_grant_parser.rb
97
+ - lib/bob/parsers/onboarding_wizard_parser.rb
98
+ - lib/bob/parsers/salary_parser.rb
99
+ - lib/bob/parsers/time_off_parser.rb
100
+ - lib/bob/parsers/training_parser.rb
101
+ - lib/bob/parsers/variable_payment_parser.rb
102
+ - lib/bob/util.rb
80
103
  - lib/bob/version.rb
81
104
  - lib/bob/webhooks.rb
82
105
  - lib/bobhr.rb
@@ -100,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
123
  - !ruby/object:Gem::Version
101
124
  version: '0'
102
125
  requirements: []
103
- rubygems_version: 3.3.7
126
+ rubygems_version: 3.2.31
104
127
  signing_key:
105
128
  specification_version: 4
106
129
  summary: Ruby gem for Bob API
data/lib/bob/time_off.rb DELETED
@@ -1,17 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Bob
4
- class TimeOff < API
5
- def self.all_changed_since(since)
6
- get('timeoff/requests/changes', { since: since })['changes']
7
- end
8
-
9
- def self.today
10
- get('timeoff/outtoday')
11
- end
12
-
13
- def self.find_for_employee(employee_id, request_id)
14
- get("timeoff/employees/#{employee_id}/requests/#{request_id}")
15
- end
16
- end
17
- end