payroll_hero-api 1.2.3 → 1.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +19 -1
- data/lib/payroll_hero/api/v4/employees.rb +37 -26
- data/lib/payroll_hero/api/v4/leaves.rb +2 -2
- data/lib/payroll_hero/api/v4/permissions.rb +2 -2
- data/lib/payroll_hero/api/v4/schedule_events.rb +27 -17
- data/lib/payroll_hero/api/v4/shifts.rb +2 -2
- data/lib/payroll_hero/api/version.rb +1 -1
- data/payroll_hero-api.gemspec +1 -1
- metadata +7 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 77e5710d27a5a6ac5f19f076937de2ece85b1bfdc2fa34a929251e80c74c435e
|
4
|
+
data.tar.gz: b28de20d36dfda6895afe6f5845bb54a21b1e2bc92c8de379fa64fdace19ef21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e8332d4e084e98d1860fa66733e1222ae7a641c614d43340eca6f0e6ca1c89e2b8b1997c1950322874ae950a71864dc7685753e4bf4e2719c7d7e523f93b845
|
7
|
+
data.tar.gz: e9a4c5d54984b0fc3dff6a48d24a4e4eb5714ba1708c9c7cb11085a6ed4a8a285270cb8a74dfa3f0a30ac901e4c3c5341b83ca6a0a4665084d92080be8851ca9
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,23 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## [v1.2.7](https://github.com/payrollhero/payroll_hero-api/tree/v1.2.7) (2021-12-16)
|
4
|
+
[Full Changelog](https://github.com/payrollhero/payroll_hero-api/compare/v1.2.6...v1.2.7)
|
5
|
+
|
6
|
+
## [v1.2.6](https://github.com/payrollhero/payroll_hero-api/tree/v1.2.6) (2017-12-04)
|
7
|
+
[Full Changelog](https://github.com/payrollhero/payroll_hero-api/compare/v1.2.5...v1.2.6)
|
8
|
+
|
9
|
+
## [v1.2.5](https://github.com/payrollhero/payroll_hero-api/tree/v1.2.5) (2017-11-09)
|
10
|
+
[Full Changelog](https://github.com/payrollhero/payroll_hero-api/compare/v1.2.4...v1.2.5)
|
11
|
+
|
12
|
+
## [v1.2.4](https://github.com/payrollhero/payroll_hero-api/tree/v1.2.4) (2017-11-09)
|
13
|
+
[Full Changelog](https://github.com/payrollhero/payroll_hero-api/compare/v1.2.3...v1.2.4)
|
14
|
+
|
15
|
+
## [v1.2.3](https://github.com/payrollhero/payroll_hero-api/tree/v1.2.3) (2017-09-19)
|
16
|
+
[Full Changelog](https://github.com/payrollhero/payroll_hero-api/compare/v1.2.2...v1.2.3)
|
17
|
+
|
18
|
+
## [v1.2.2](https://github.com/payrollhero/payroll_hero-api/tree/v1.2.2) (2017-09-19)
|
19
|
+
[Full Changelog](https://github.com/payrollhero/payroll_hero-api/compare/v1.2.1...v1.2.2)
|
20
|
+
|
3
21
|
## [v1.2.1](https://github.com/payrollhero/payroll_hero-api/tree/v1.2.1) (2016-09-21)
|
4
22
|
[Full Changelog](https://github.com/payrollhero/payroll_hero-api/compare/v1.2.0...v1.2.1)
|
5
23
|
|
@@ -27,4 +45,4 @@
|
|
27
45
|
|
28
46
|
|
29
47
|
|
30
|
-
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
|
48
|
+
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
|
@@ -9,17 +9,18 @@ module PayrollHero
|
|
9
9
|
# @param [Array|Symbol] only - Attribute names to be included on the response
|
10
10
|
# @param [Array|Symbol] except - Attribute names to be excluded on the response
|
11
11
|
# @param [Array|Symbol] include - Association names to be included in the response
|
12
|
-
def list(only: [], except: [], include: [], page: nil, per_page: nil)
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
12
|
+
def list(only: [], except: [], include: [], page: nil, per_page: nil, **params)
|
13
|
+
combined_params = params.merge(
|
14
|
+
remove_empty_values_from!(
|
15
|
+
only: Array(only),
|
16
|
+
except: Array(except),
|
17
|
+
include: Array(include),
|
18
|
+
page: page,
|
19
|
+
per_page: per_page
|
20
|
+
)
|
21
|
+
)
|
20
22
|
|
21
|
-
|
22
|
-
client.get("/api/v4/employees", params)
|
23
|
+
client.get "/api/v4/employees", combined_params
|
23
24
|
end
|
24
25
|
|
25
26
|
# implements the interface to get a single Employee record
|
@@ -29,8 +30,8 @@ module PayrollHero
|
|
29
30
|
# @param [Array|Symbol] only - Attribute names to be included on the response
|
30
31
|
# @param [Array|Symbol] except - Attribute names to be excluded on the response
|
31
32
|
# @param [Array|Symbol] include - Association names to be included in the response
|
32
|
-
def get(id, only: nil, except: nil, include: nil)
|
33
|
-
fetch
|
33
|
+
def get(id, only: nil, except: nil, include: nil, **params)
|
34
|
+
fetch id, only: only, except: except, include: include, **params
|
34
35
|
end
|
35
36
|
|
36
37
|
# Implements the interface to get a list of the API token owner's subordinates
|
@@ -40,8 +41,8 @@ module PayrollHero
|
|
40
41
|
# @param [Array|Symbol] only - Attribute names to be included on the response
|
41
42
|
# @param [Array|Symbol] except - Attribute names to be excluded on the response
|
42
43
|
# @param [Array|Symbol] include - Association names to be included in the response
|
43
|
-
def subordinates(id, only: [], except: [], include: [], page: nil, per_page: nil)
|
44
|
-
fetch
|
44
|
+
def subordinates(id, only: [], except: [], include: [], page: nil, per_page: nil, **params)
|
45
|
+
fetch "#{id}/subordinates", only: only, except: except, include: include, page: page, per_page: per_page, **params
|
45
46
|
end
|
46
47
|
|
47
48
|
# Implements the interface to get a list of the API token owner's superiors
|
@@ -51,22 +52,32 @@ module PayrollHero
|
|
51
52
|
# @param [Array|Symbol] only - Attribute names to be included on the response
|
52
53
|
# @param [Array|Symbol] except - Attribute names to be excluded on the response
|
53
54
|
# @param [Array|Symbol] include - Association names to be included in the response
|
54
|
-
def superiors(id, only: [], except: [], include: [], page: nil, per_page: nil)
|
55
|
-
fetch
|
55
|
+
def superiors(id, only: [], except: [], include: [], page: nil, per_page: nil, **params)
|
56
|
+
fetch"#{id}/superiors", only: only, except: except, include: include, page: page, per_page: per_page, **params
|
57
|
+
end
|
58
|
+
|
59
|
+
# Final Pay Feature: Convert all applicable leaves to work time
|
60
|
+
# only,except,include and paging params don't apply here as it's a write call
|
61
|
+
# expected attributes[Hash]: { leaves: [ { name: 'Vacation', number_of_days: 28.0 },...] }
|
62
|
+
|
63
|
+
def convert_leaves(id, attributes)
|
64
|
+
client.put "/api/v4/employees/#{id}/convert_leaves", attributes
|
56
65
|
end
|
57
66
|
|
58
67
|
private
|
59
68
|
|
60
|
-
def fetch(identifier, only:, except:, include:, page: nil, per_page: nil)
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
69
|
+
def fetch(identifier, only:, except:, include:, page: nil, per_page: nil, **params)
|
70
|
+
combined_params = params.merge(
|
71
|
+
remove_empty_values_from!(
|
72
|
+
only: Array(only),
|
73
|
+
except: Array(except),
|
74
|
+
include: Array(include),
|
75
|
+
page: page,
|
76
|
+
per_page: per_page
|
77
|
+
)
|
78
|
+
)
|
79
|
+
|
80
|
+
client.get "/api/v4/employees/#{identifier}", combined_params
|
70
81
|
end
|
71
82
|
end
|
72
83
|
end
|
@@ -3,24 +3,34 @@ module PayrollHero
|
|
3
3
|
module V4
|
4
4
|
class ScheduleEvents < BaseGroup
|
5
5
|
|
6
|
-
def list(
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
6
|
+
def list(
|
7
|
+
time_zone: nil,
|
8
|
+
start_time: nil,
|
9
|
+
end_time: nil,
|
10
|
+
start_date: nil,
|
11
|
+
end_date: nil,
|
12
|
+
employee_ids: [],
|
13
|
+
worksite_ids: [],
|
14
|
+
excluded_worksite_ids: nil,
|
15
|
+
shared_events: nil,
|
16
|
+
page: nil,
|
17
|
+
per_page: nil,
|
18
|
+
**params
|
19
|
+
)
|
20
|
+
combined_params = params.merge time_zone: time_zone,
|
21
|
+
start_time: start_time,
|
22
|
+
end_time: end_time,
|
23
|
+
start_date: start_date,
|
24
|
+
end_date: end_date,
|
25
|
+
employee_ids: employee_ids,
|
26
|
+
worksite_ids: worksite_ids,
|
27
|
+
excluded_worksite_ids: excluded_worksite_ids,
|
28
|
+
shared_events: shared_events,
|
29
|
+
page: page,
|
30
|
+
per_page: per_page
|
21
31
|
|
22
|
-
remove_nil_values_from!
|
23
|
-
client.get
|
32
|
+
remove_nil_values_from! combined_params
|
33
|
+
client.get '/api/v4/schedule_events', combined_params
|
24
34
|
end
|
25
35
|
|
26
36
|
end
|
data/payroll_hero-api.gemspec
CHANGED
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
|
|
24
24
|
spec.add_runtime_dependency 'hashie'
|
25
25
|
spec.add_runtime_dependency 'retries'
|
26
26
|
|
27
|
-
spec.add_development_dependency 'bundler'
|
27
|
+
spec.add_development_dependency 'bundler'
|
28
28
|
spec.add_development_dependency 'rake', '~> 10.0'
|
29
29
|
spec.add_development_dependency 'rspec'
|
30
30
|
spec.add_development_dependency 'vcr'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: payroll_hero-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Banasik
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-12-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -70,16 +70,16 @@ dependencies:
|
|
70
70
|
name: bundler
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rake
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -215,8 +215,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
215
215
|
- !ruby/object:Gem::Version
|
216
216
|
version: '0'
|
217
217
|
requirements: []
|
218
|
-
|
219
|
-
rubygems_version: 2.5.1
|
218
|
+
rubygems_version: 3.0.9
|
220
219
|
signing_key:
|
221
220
|
specification_version: 4
|
222
221
|
summary: Ruby API Client for PayrollHero Apis
|