payroll_hero-api 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -2
- data/lib/payroll_hero/api/client.rb +20 -3
- data/lib/payroll_hero/api/errors.rb +3 -0
- data/lib/payroll_hero/api/version.rb +1 -1
- data/lib/payroll_hero/api.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dbfb1725a99667377e0aebc1278fd71a996ede52
|
4
|
+
data.tar.gz: cfbdfeda78cdd0154713eae1bec5a40b8924bbe1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59c00fa970300da754558aa342f597e4b8d375cb15add58b685cf16f04ef0bf3038a7b93eba0b8fb38a16d71406531976b2e42878d1bd42c4ad10d266cb292e9
|
7
|
+
data.tar.gz: f89bcd83a55278f4a2499a0e332a432676032310c50eba896699664d118beba17bc9a2847e13b429cf3d0edc4da7be0efe5b6499a71aff61a1ac2d22c971ce5a
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# Change Log
|
2
2
|
|
3
|
+
## [v1.2.1](https://github.com/payrollhero/payroll_hero-api/tree/v1.2.1) (2016-09-21)
|
4
|
+
[Full Changelog](https://github.com/payrollhero/payroll_hero-api/compare/v1.2.0...v1.2.1)
|
5
|
+
|
6
|
+
- Add ScheduleEvents endpoint [\#11](https://github.com/payrollhero/payroll_hero-api/pull/11) ([vincentpaca](https://github.com/vincentpaca))
|
7
|
+
|
3
8
|
## [v1.2.0](https://github.com/payrollhero/payroll_hero-api/tree/v1.2.0) (2016-09-16)
|
4
9
|
[Full Changelog](https://github.com/payrollhero/payroll_hero-api/compare/v1.1.0...v1.2.0)
|
5
10
|
|
@@ -12,8 +17,6 @@
|
|
12
17
|
## [v1.0.1](https://github.com/payrollhero/payroll_hero-api/tree/v1.0.1) (2016-05-16)
|
13
18
|
[Full Changelog](https://github.com/payrollhero/payroll_hero-api/compare/v1.0.0...v1.0.1)
|
14
19
|
|
15
|
-
- Add attendance days [\#7](https://github.com/payrollhero/payroll_hero-api/pull/7) ([vincentpaca](https://github.com/vincentpaca))
|
16
|
-
|
17
20
|
## [v1.0.0](https://github.com/payrollhero/payroll_hero-api/tree/v1.0.0) (2016-04-18)
|
18
21
|
- Add api/v4 employees list interface [\#6](https://github.com/payrollhero/payroll_hero-api/pull/6) ([nicosuria](https://github.com/nicosuria))
|
19
22
|
- Add delete leave call. [\#5](https://github.com/payrollhero/payroll_hero-api/pull/5) ([mykola-kyryk](https://github.com/mykola-kyryk))
|
@@ -37,10 +37,26 @@ module PayrollHero
|
|
37
37
|
do_request(:post, path, params)
|
38
38
|
end
|
39
39
|
|
40
|
+
def put(path, params)
|
41
|
+
do_request(:put, path, params)
|
42
|
+
end
|
43
|
+
|
40
44
|
def delete(path, params = {})
|
41
45
|
do_request(:delete, path, params)
|
42
46
|
end
|
43
47
|
|
48
|
+
def head(path, params = {})
|
49
|
+
do_request(:head, path, params)
|
50
|
+
end
|
51
|
+
|
52
|
+
def patch
|
53
|
+
do_request(:patch, path, params)
|
54
|
+
end
|
55
|
+
|
56
|
+
def options
|
57
|
+
do_request(:options, path, params)
|
58
|
+
end
|
59
|
+
|
44
60
|
private
|
45
61
|
|
46
62
|
def do_request(method, path, params)
|
@@ -80,11 +96,12 @@ module PayrollHero
|
|
80
96
|
case response.status
|
81
97
|
when 400..499, 500..599
|
82
98
|
raise error_from(response)
|
83
|
-
when 200
|
84
|
-
#
|
99
|
+
when 200..299
|
100
|
+
# All success status codes, some are important, but should have already been handled by
|
101
|
+
# the underlying protocol
|
85
102
|
return
|
86
103
|
else
|
87
|
-
raise "
|
104
|
+
raise UnexpectedResponse, "Unexpected response status: #{response.status}"
|
88
105
|
end
|
89
106
|
end
|
90
107
|
|
data/lib/payroll_hero/api.rb
CHANGED
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.2
|
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: 2017-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|