paychex_api 0.0.14 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/paychex_api/client/workers.rb +1 -0
- data/lib/paychex_api/version.rb +1 -1
- data/spec/support/fake_paychex.rb +17 -17
- 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: 77d818de2086e5708f1d5b9d511ec1fbeed494c6
|
4
|
+
data.tar.gz: c2616c4c54d5ac1f81df80734599bcb05f204e3b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 839c8e4c9b706ed250aa6cc93be2be1ef6fe2f24e5d037576cf9c994afb745b0973ef41f6b67f0c4392480f51a60386a47b96b1e3180e55cd06d513270b7f50e
|
7
|
+
data.tar.gz: 28cc04d2524da910da1a08f816be735182afcfe3ce8632c01abe0b3354698c8bc7d36731d5575602f2d1efe664bea93865bb145c5007b18cfc4030a1b34cef15
|
data/Gemfile.lock
CHANGED
@@ -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
|
|
data/lib/paychex_api/version.rb
CHANGED
@@ -3,25 +3,25 @@ require 'tilt'
|
|
3
3
|
|
4
4
|
class FakePaychex < Sinatra::Base
|
5
5
|
# auth
|
6
|
-
post %r{/auth/oauth/v2/token
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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]
|
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
|
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
|
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
|
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
|
80
|
+
post %r{/messages} do
|
81
81
|
get_json_data 201, 'messages.json'
|
82
82
|
end
|
83
83
|
|
84
|
-
get %r{/users
|
84
|
+
get %r{/users.*} do
|
85
85
|
get_json_data 200, 'users.json'
|
86
86
|
end
|
87
87
|
|
88
|
-
get %r{/users/\S/workers
|
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.
|
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-
|
11
|
+
date: 2018-07-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|