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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 077dfe0dff5f3670fb8d7ff0f503720c4395a3ab
4
- data.tar.gz: bf93a9fe93408fde51fca020e1e9a1814a3b0540
3
+ metadata.gz: dbfb1725a99667377e0aebc1278fd71a996ede52
4
+ data.tar.gz: cfbdfeda78cdd0154713eae1bec5a40b8924bbe1
5
5
  SHA512:
6
- metadata.gz: a9d47324985b51ad7f38c5ece4b45ceb6f81cbc5759cce2458e6b733b2b3c2ec7eb0bf81a8119c18ae53888eb48c705f7c9a3236a7cf6b8da14be4b769993017
7
- data.tar.gz: 281ddff11e7237eaadfb78bdfc2fd334b874b927fa4fae45f2b1e0b36fdad0c35b17bafca020b91b0d740b488445f59721fec6aecacef9ce6a579cb7c0343c75
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
- # this is cool, just return
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 "unhandled error: #{response.status}"
104
+ raise UnexpectedResponse, "Unexpected response status: #{response.status}"
88
105
  end
89
106
  end
90
107
 
@@ -34,6 +34,9 @@ module PayrollHero
34
34
  class NotAcceptable < ServerReturnedError # 406
35
35
  end
36
36
 
37
+ class UnexpectedResponse < ServerReturnedError
38
+ end
39
+
37
40
  class UnprocessableEntity < ServerReturnedError # 422
38
41
  end
39
42
 
@@ -1,5 +1,5 @@
1
1
  module PayrollHero
2
2
  module Api
3
- VERSION = "1.2.1"
3
+ VERSION = "1.2.2"
4
4
  end
5
5
  end
@@ -5,6 +5,8 @@ module PayrollHero
5
5
  extend Configuration
6
6
 
7
7
  define_setting :core_base_url
8
+ define_setting :time_base_url
9
+ define_setting :leave_management_base_url
8
10
  define_setting :debug, false
9
11
  define_setting :application_name, :none
10
12
 
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.1
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: 2016-09-21 00:00:00.000000000 Z
11
+ date: 2017-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday