paychex_api 0.0.14 → 0.0.15

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: 1ddb8cd08c2860c3314cf3f0d7747e17586c21d1
4
- data.tar.gz: 8503f285eb0b25ff54d3e5c2c97a8cf87f626b87
3
+ metadata.gz: 77d818de2086e5708f1d5b9d511ec1fbeed494c6
4
+ data.tar.gz: c2616c4c54d5ac1f81df80734599bcb05f204e3b
5
5
  SHA512:
6
- metadata.gz: d3f80ca3bf5f89a9bc55a4727d1da606da109eb41fb79644ab0d67ba025b84d8f03bb19ca29be24be2aa7bd636449d4059bee0079c3c93d53d2570d2d505c66f
7
- data.tar.gz: 628ddd0664c66d05d5064c85b83a8da9f6842aa7f1402af14291719e53ada3e8b3d6ee902ffcd83457575917cbe82cc462a37d52cfd411293f2222e77cf3e084
6
+ metadata.gz: 839c8e4c9b706ed250aa6cc93be2be1ef6fe2f24e5d037576cf9c994afb745b0973ef41f6b67f0c4392480f51a60386a47b96b1e3180e55cd06d513270b7f50e
7
+ data.tar.gz: 28cc04d2524da910da1a08f816be735182afcfe3ce8632c01abe0b3354698c8bc7d36731d5575602f2d1efe664bea93865bb145c5007b18cfc4030a1b34cef15
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- paychex_api (0.0.12)
4
+ paychex_api (0.0.15)
5
5
  faraday (~> 0.9.2)
6
6
  faraday_middleware (~> 0.9.2)
7
7
  footrest (>= 0.5.1)
@@ -2,6 +2,7 @@ module PaychexAPI
2
2
  class Client
3
3
  module Workers
4
4
  def get_all_workers(company_id, params = {})
5
+ connection.headers[:accept] = "application/json;profile='http://api.paychex.com/profiles/workers/nonpii/v1'"
5
6
  get("#{API_PATH}#{COMPANIES_PATH}/#{company_id}#{WORKERS_PATH}", params)
6
7
  end
7
8
 
@@ -1,3 +1,3 @@
1
1
  module PaychexAPI
2
- VERSION = '0.0.14'.freeze unless defined?(PaychexAPI::VERSION)
2
+ VERSION = '0.0.15'.freeze unless defined?(PaychexAPI::VERSION)
3
3
  end
@@ -3,25 +3,25 @@ require 'tilt'
3
3
 
4
4
  class FakePaychex < Sinatra::Base
5
5
  # auth
6
- post %r{/auth/oauth/v2/token$} do
6
+ post %r{/auth/oauth/v2/token} do
7
7
  get_json_data 200, 'auth.json'
8
8
  end
9
9
 
10
10
  # workers
11
- get %r{/companies/.*/workers.*$} do
11
+ get %r{/companies/.*/workers.*} do
12
12
  get_json_data 200, 'workers.json'
13
13
  end
14
14
 
15
15
  # workers
16
- get %r{/companies/.*/workers/\+d+$} do
16
+ get %r{/companies/.*/workers/\+d+} do
17
17
  get_json_data 200, 'workers.json'
18
18
  end
19
19
 
20
- get %r{/workers/\d+$} do
20
+ get %r{/workers/\d+} do
21
21
  get_json_data 200, 'workers.json'
22
22
  end
23
23
 
24
- get %r{/workers/\d+/users$} do
24
+ get %r{/workers/\d+/users} do
25
25
  case request.env['HTTP_ACCEPT']
26
26
  when "application/json;profile='http://api.paychex.com/profiles/users/v1'"
27
27
  get_json_data 200, 'users.json'
@@ -30,29 +30,29 @@ class FakePaychex < Sinatra::Base
30
30
  end
31
31
  end
32
32
 
33
- get %r{/workers/\d+/communications$} do
33
+ get %r{/workers/\d+/communications} do
34
34
  get_json_data 200, 'communications.json'
35
35
  end
36
36
 
37
- get %r{/workers/\d+/communications/\d+$} do
37
+ get %r{/workers/\d+/communications/\d+} do
38
38
  get_json_data 200, 'communications.json'
39
39
  end
40
40
 
41
- post %r{/workers/\d+/communications$} do
41
+ post %r{/workers/\d+/communications} do
42
42
  get_json_data 200, 'communications.json'
43
43
  end
44
44
 
45
- put %r{/workers/\d+/communications/\d+$} do
45
+ put %r{/workers/\d+/communications/\d+} do
46
46
  get_json_data 200, 'communications.json'
47
47
  end
48
48
 
49
- delete %r{/workers/\d+/communications/\d+$} do
49
+ delete %r{/workers/\d+/communications/\d+} do
50
50
  get_json_data 200, 'communications.json'
51
51
  end
52
52
 
53
53
  # companies
54
54
 
55
- get %r{/companies/[A-Za-z0-9]+$} do
55
+ get %r{/companies/[A-Za-z0-9]+} do
56
56
  case request.env['HTTP_ACCEPT']
57
57
  when "application/json;profile='http://api.paychex.com/profiles/company_associations/v1'"
58
58
  get_json_data 200, 'companies_associations.json'
@@ -61,31 +61,31 @@ class FakePaychex < Sinatra::Base
61
61
  end
62
62
  end
63
63
 
64
- get %r{/companies$} do
64
+ get %r{/companies} do
65
65
  get_json_data 200, 'companies.json'
66
66
  end
67
67
 
68
- get %r{/companies/[A-Za-z0-9]+/organizations+$} do
68
+ get %r{/companies/[A-Za-z0-9]+/organizations+} do
69
69
  get_json_data 200, 'organizations.json'
70
70
  end
71
71
 
72
72
  # Notifications
73
73
 
74
- post %r{/notifications/\S+$} do
74
+ post %r{/notifications/\S+} do
75
75
  get_json_data 200, 'communications.json'
76
76
  end
77
77
 
78
78
  # Messages
79
79
 
80
- post %r{/messages$} do
80
+ post %r{/messages} do
81
81
  get_json_data 201, 'messages.json'
82
82
  end
83
83
 
84
- get %r{/users.*$} do
84
+ get %r{/users.*} do
85
85
  get_json_data 200, 'users.json'
86
86
  end
87
87
 
88
- get %r{/users/\S/workers+$} do
88
+ get %r{/users/\S/workers+} do
89
89
  get_json_data 200, 'workers.json'
90
90
  end
91
91
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paychex_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.14
4
+ version: 0.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jay Shaffer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-22 00:00:00.000000000 Z
11
+ date: 2018-07-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler