paychex_api 0.0.27 → 0.0.28
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +1 -1
- data/.rubocop.yml +2 -0
- data/Gemfile.lock +68 -56
- data/lib/paychex_api/client/companies.rb +8 -0
- data/lib/paychex_api/client.rb +1 -0
- data/lib/paychex_api/version.rb +1 -1
- data/paychex_api.gemspec +2 -2
- data/spec/fixtures/company_location.json +17 -0
- data/spec/fixtures/company_locations.json +80 -0
- data/spec/paychex_api/client/companies_spec.rb +10 -0
- data/spec/support/fake_paychex.rb +9 -0
- metadata +24 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 64d05e8b83a00fd01ba8934f109fc66bcbe1dc92937fed269e100c5557093eef
|
4
|
+
data.tar.gz: fb87588d4e5d234b72c5c048553de5b9e9d6a756d863398e1d8dc6792f2286a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d873ee94a663cec68f5ab81e440c2fa1271a4abb3e6f7869e6c0de175ed2b62096346cc6dbee8ea5d83002a4dc9ae598488247fe838826a5b55e829a383de5af
|
7
|
+
data.tar.gz: b7a19e1dd16e36dccab4d12934ee678dcd77fef51dca440252dcdaec5ad66b9d2e58c0983a296b18c4a3da483c9c35ecfb119a1121c1b2e2bfc8d51c0b11aa89
|
data/.github/workflows/ci.yml
CHANGED
data/.rubocop.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
paychex_api (0.0.
|
4
|
+
paychex_api (0.0.28)
|
5
5
|
faraday (~> 0.17.3)
|
6
6
|
faraday_middleware (>= 0.12.2)
|
7
7
|
footrest (>= 0.5.1)
|
@@ -9,62 +9,73 @@ PATH
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
activesupport (7.
|
12
|
+
activesupport (7.1.3.2)
|
13
|
+
base64
|
14
|
+
bigdecimal
|
13
15
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
16
|
+
connection_pool (>= 2.2.5)
|
17
|
+
drb
|
14
18
|
i18n (>= 1.6, < 2)
|
15
19
|
minitest (>= 5.1)
|
20
|
+
mutex_m
|
16
21
|
tzinfo (~> 2.0)
|
17
|
-
addressable (2.
|
18
|
-
public_suffix (>= 2.0.2, <
|
19
|
-
ast (2.4.
|
22
|
+
addressable (2.8.6)
|
23
|
+
public_suffix (>= 2.0.2, < 6.0)
|
24
|
+
ast (2.4.2)
|
25
|
+
base64 (0.2.0)
|
26
|
+
bigdecimal (3.1.6)
|
20
27
|
byebug (11.1.3)
|
21
28
|
coderay (1.1.3)
|
22
|
-
concurrent-ruby (1.
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
29
|
+
concurrent-ruby (1.2.3)
|
30
|
+
connection_pool (2.4.1)
|
31
|
+
crack (1.0.0)
|
32
|
+
bigdecimal
|
33
|
+
rexml
|
34
|
+
diff-lcs (1.5.1)
|
35
|
+
docile (1.4.0)
|
36
|
+
drb (2.2.1)
|
37
|
+
faraday (0.17.6)
|
28
38
|
multipart-post (>= 1.2, < 3)
|
29
39
|
faraday_middleware (0.14.0)
|
30
40
|
faraday (>= 0.7.4, < 1.0)
|
31
|
-
footrest (0.5.
|
41
|
+
footrest (0.5.5)
|
32
42
|
activesupport (>= 3.0.0)
|
33
43
|
faraday (>= 0.9.0, < 1)
|
34
44
|
link_header (>= 0.0.7)
|
35
|
-
gergich (1.2.
|
45
|
+
gergich (1.2.3)
|
36
46
|
httparty (~> 0.17)
|
37
47
|
sqlite3 (~> 1.4)
|
38
|
-
hashdiff (1.0
|
39
|
-
httparty (0.
|
40
|
-
|
48
|
+
hashdiff (1.1.0)
|
49
|
+
httparty (0.21.0)
|
50
|
+
mini_mime (>= 1.0.0)
|
41
51
|
multi_xml (>= 0.5.2)
|
42
|
-
i18n (1.
|
52
|
+
i18n (1.14.4)
|
43
53
|
concurrent-ruby (~> 1.0)
|
44
54
|
link_header (0.0.8)
|
45
55
|
method_source (1.0.0)
|
46
|
-
|
47
|
-
|
48
|
-
mime-types-data (3.2020.0512)
|
49
|
-
minitest (5.16.2)
|
56
|
+
mini_mime (1.1.5)
|
57
|
+
minitest (5.22.2)
|
50
58
|
multi_xml (0.6.0)
|
51
|
-
multipart-post (2.
|
52
|
-
mustermann (
|
59
|
+
multipart-post (2.4.0)
|
60
|
+
mustermann (2.0.2)
|
53
61
|
ruby2_keywords (~> 0.0.1)
|
54
|
-
|
55
|
-
|
62
|
+
mutex_m (0.2.0)
|
63
|
+
parallel (1.24.0)
|
64
|
+
parser (3.3.0.5)
|
56
65
|
ast (~> 2.4.1)
|
57
|
-
|
66
|
+
racc
|
67
|
+
pry (0.14.2)
|
58
68
|
coderay (~> 1.1)
|
59
69
|
method_source (~> 1.0)
|
60
|
-
public_suffix (
|
61
|
-
|
62
|
-
rack
|
70
|
+
public_suffix (5.0.4)
|
71
|
+
racc (1.7.3)
|
72
|
+
rack (2.2.8.1)
|
73
|
+
rack-protection (2.2.4)
|
63
74
|
rack
|
64
|
-
rainbow (3.
|
65
|
-
rake (13.0
|
66
|
-
regexp_parser (
|
67
|
-
rexml (3.2.
|
75
|
+
rainbow (3.1.1)
|
76
|
+
rake (13.1.0)
|
77
|
+
regexp_parser (2.9.0)
|
78
|
+
rexml (3.2.6)
|
68
79
|
rspec (2.99.0)
|
69
80
|
rspec-core (~> 2.99.0)
|
70
81
|
rspec-expectations (~> 2.99.0)
|
@@ -73,41 +84,42 @@ GEM
|
|
73
84
|
rspec-expectations (2.99.2)
|
74
85
|
diff-lcs (>= 1.1.3, < 2.0)
|
75
86
|
rspec-mocks (2.99.4)
|
76
|
-
rubocop (0.
|
87
|
+
rubocop (0.93.1)
|
77
88
|
parallel (~> 1.10)
|
78
|
-
parser (>= 2.7.1.
|
89
|
+
parser (>= 2.7.1.5)
|
79
90
|
rainbow (>= 2.2.2, < 4.0)
|
80
|
-
regexp_parser (>= 1.
|
91
|
+
regexp_parser (>= 1.8)
|
81
92
|
rexml
|
82
|
-
rubocop-ast (>= 0.
|
93
|
+
rubocop-ast (>= 0.6.0)
|
83
94
|
ruby-progressbar (~> 1.7)
|
84
95
|
unicode-display_width (>= 1.4.0, < 2.0)
|
85
|
-
rubocop-ast (
|
86
|
-
parser (>=
|
87
|
-
ruby-progressbar (1.
|
88
|
-
ruby2_keywords (0.0.
|
89
|
-
|
90
|
-
simplecov (0.18.5)
|
96
|
+
rubocop-ast (1.31.2)
|
97
|
+
parser (>= 3.3.0.4)
|
98
|
+
ruby-progressbar (1.13.0)
|
99
|
+
ruby2_keywords (0.0.5)
|
100
|
+
simplecov (0.22.0)
|
91
101
|
docile (~> 1.1)
|
92
102
|
simplecov-html (~> 0.11)
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
103
|
+
simplecov_json_formatter (~> 0.1)
|
104
|
+
simplecov-html (0.12.3)
|
105
|
+
simplecov_json_formatter (0.1.4)
|
106
|
+
sinatra (2.2.4)
|
107
|
+
mustermann (~> 2.0)
|
108
|
+
rack (~> 2.2)
|
109
|
+
rack-protection (= 2.2.4)
|
98
110
|
tilt (~> 2.0)
|
99
|
-
sqlite3 (1.
|
100
|
-
tilt (2.0
|
101
|
-
tzinfo (2.0.
|
111
|
+
sqlite3 (1.7.2-arm64-darwin)
|
112
|
+
tilt (2.3.0)
|
113
|
+
tzinfo (2.0.6)
|
102
114
|
concurrent-ruby (~> 1.0)
|
103
|
-
unicode-display_width (1.
|
104
|
-
webmock (3.
|
105
|
-
addressable (>= 2.
|
115
|
+
unicode-display_width (1.8.0)
|
116
|
+
webmock (3.23.0)
|
117
|
+
addressable (>= 2.8.0)
|
106
118
|
crack (>= 0.3.2)
|
107
119
|
hashdiff (>= 0.4.0, < 2.0.0)
|
108
120
|
|
109
121
|
PLATFORMS
|
110
|
-
|
122
|
+
arm64-darwin-22
|
111
123
|
|
112
124
|
DEPENDENCIES
|
113
125
|
bundler (>= 1.0)
|
@@ -123,4 +135,4 @@ DEPENDENCIES
|
|
123
135
|
webmock (>= 1.22)
|
124
136
|
|
125
137
|
BUNDLED WITH
|
126
|
-
2.
|
138
|
+
2.4.22
|
@@ -22,6 +22,14 @@ module PaychexAPI
|
|
22
22
|
get("#{API_PATH}#{COMPANIES_PATH}/#{company_id}#{WORKERS_PATH}", params)
|
23
23
|
end
|
24
24
|
|
25
|
+
def get_company_locations(company_id, params = {})
|
26
|
+
get("#{API_PATH}#{COMPANIES_PATH}/#{company_id}/#{LOCATIONS_PATH}", params)
|
27
|
+
end
|
28
|
+
|
29
|
+
def get_company_location(company_id, location_id, params = {})
|
30
|
+
get("#{API_PATH}#{COMPANIES_PATH}/#{company_id}/#{LOCATIONS_PATH}/#{location_id}", params)
|
31
|
+
end
|
32
|
+
|
25
33
|
def get_company_by_display_id(display_id, params = {})
|
26
34
|
params = params.merge(displayid: display_id)
|
27
35
|
get("#{API_PATH}#{COMPANIES_PATH}", params)
|
data/lib/paychex_api/client.rb
CHANGED
data/lib/paychex_api/version.rb
CHANGED
data/paychex_api.gemspec
CHANGED
@@ -3,8 +3,8 @@ $LOAD_PATH.push File.expand_path('lib', __dir__)
|
|
3
3
|
require 'paychex_api/version'
|
4
4
|
|
5
5
|
Gem::Specification.new do |gem|
|
6
|
-
gem.authors = ['
|
7
|
-
gem.email = ['
|
6
|
+
gem.authors = ['Cody Tanner']
|
7
|
+
gem.email = ['cody.tanner@getbridge.com']
|
8
8
|
gem.description = 'Interface for interacting with the paychex enterprise API'
|
9
9
|
gem.summary = 'Paychex API'
|
10
10
|
gem.homepage = ''
|
@@ -0,0 +1,17 @@
|
|
1
|
+
{
|
2
|
+
"content": [
|
3
|
+
{
|
4
|
+
"locationId": "1040011892857651",
|
5
|
+
"name": "Location_110207",
|
6
|
+
"address": {
|
7
|
+
"streetLineOne": "886 Queen Avenue",
|
8
|
+
"streetLineTwo": "866 Euclid Gate",
|
9
|
+
"city": "Buffalo",
|
10
|
+
"postalCode": "14202",
|
11
|
+
"countrySubdivisionCode": "NY",
|
12
|
+
"countryCode": "US"
|
13
|
+
}
|
14
|
+
}
|
15
|
+
],
|
16
|
+
"links": []
|
17
|
+
}
|
@@ -0,0 +1,80 @@
|
|
1
|
+
{
|
2
|
+
"metadata": {
|
3
|
+
"contentItemCount": 6
|
4
|
+
},
|
5
|
+
"content": [
|
6
|
+
{
|
7
|
+
"locationId": "1040011892857651",
|
8
|
+
"name": "Location_110207",
|
9
|
+
"address": {
|
10
|
+
"streetLineOne": "886 Queen Avenue",
|
11
|
+
"streetLineTwo": "866 Euclid Gate",
|
12
|
+
"city": "Buffalo",
|
13
|
+
"postalCode": "14202",
|
14
|
+
"countrySubdivisionCode": "NY",
|
15
|
+
"countryCode": "US"
|
16
|
+
}
|
17
|
+
},
|
18
|
+
{
|
19
|
+
"locationId": "1040011892857657",
|
20
|
+
"name": "Location_830745",
|
21
|
+
"address": {
|
22
|
+
"streetLineOne": "540 Cardinal Court",
|
23
|
+
"streetLineTwo": "347 Jackson Trail",
|
24
|
+
"city": "Bridgeport",
|
25
|
+
"postalCode": "06601",
|
26
|
+
"countrySubdivisionCode": "CT",
|
27
|
+
"countryCode": "US"
|
28
|
+
}
|
29
|
+
},
|
30
|
+
{
|
31
|
+
"locationId": "1040011892857681",
|
32
|
+
"name": "Location_965274",
|
33
|
+
"address": {
|
34
|
+
"streetLineOne": "700 Sixth Street",
|
35
|
+
"streetLineTwo": "948 Cypress Circle",
|
36
|
+
"city": "Portsmouth",
|
37
|
+
"postalCode": "03802",
|
38
|
+
"countrySubdivisionCode": "NH",
|
39
|
+
"countryCode": "US"
|
40
|
+
}
|
41
|
+
},
|
42
|
+
{
|
43
|
+
"locationId": "1040011892857669",
|
44
|
+
"name": "Location_933960",
|
45
|
+
"address": {
|
46
|
+
"streetLineOne": "91 Orchard Freeway",
|
47
|
+
"streetLineTwo": "386 Second Court",
|
48
|
+
"city": "Bangor",
|
49
|
+
"postalCode": "04402",
|
50
|
+
"countrySubdivisionCode": "ME",
|
51
|
+
"countryCode": "US"
|
52
|
+
}
|
53
|
+
},
|
54
|
+
{
|
55
|
+
"locationId": "1040011892857675",
|
56
|
+
"name": "Location_223814",
|
57
|
+
"address": {
|
58
|
+
"streetLineOne": "696 Bridle Highway",
|
59
|
+
"streetLineTwo": "238 Standish Heights",
|
60
|
+
"city": "Boston",
|
61
|
+
"postalCode": "02113",
|
62
|
+
"countrySubdivisionCode": "MA",
|
63
|
+
"countryCode": "US"
|
64
|
+
}
|
65
|
+
},
|
66
|
+
{
|
67
|
+
"locationId": "1040011892857663",
|
68
|
+
"name": "Location_882082",
|
69
|
+
"address": {
|
70
|
+
"streetLineOne": "367 Tanglewood Bay",
|
71
|
+
"streetLineTwo": "739 Nineth Freeway",
|
72
|
+
"city": "Burlington",
|
73
|
+
"postalCode": "05401",
|
74
|
+
"countrySubdivisionCode": "VT",
|
75
|
+
"countryCode": "US"
|
76
|
+
}
|
77
|
+
}
|
78
|
+
],
|
79
|
+
"links": []
|
80
|
+
}
|
@@ -31,6 +31,16 @@ describe PaychexAPI::Client::Companies do
|
|
31
31
|
expect(response.first['workerId']).to(eq('00Z5V9BTIHRQF2CF7BTH'))
|
32
32
|
end
|
33
33
|
|
34
|
+
it 'should get company locations' do
|
35
|
+
response = @client.get_company_locations(1)
|
36
|
+
expect(response.first['locationId']).to(eq('1040011892857651'))
|
37
|
+
end
|
38
|
+
|
39
|
+
it 'should get a company location' do
|
40
|
+
response = @client.get_company_location(1, 1)
|
41
|
+
expect(response.first['locationId']).to(eq('1040011892857651'))
|
42
|
+
end
|
43
|
+
|
34
44
|
it 'should get company associations with association type' do
|
35
45
|
response = @client.get_company_associations_by_regex_type(1, /LMS.*/)
|
36
46
|
expect(response.first['associations'].length).to(eq(1))
|
@@ -21,6 +21,15 @@ class FakePaychex < Sinatra::Base
|
|
21
21
|
get_json_data 200, 'workers.json'
|
22
22
|
end
|
23
23
|
|
24
|
+
# locations
|
25
|
+
get %r{/companies/.*/locations} do
|
26
|
+
get_json_data 200, 'company_locations.json'
|
27
|
+
end
|
28
|
+
|
29
|
+
get %r{/companies/.*/locations/\+d+} do
|
30
|
+
get_json_data 200, 'company_location.json'
|
31
|
+
end
|
32
|
+
|
24
33
|
get %r{/workers/\d+/users} do
|
25
34
|
case request.env['HTTP_ACCEPT']
|
26
35
|
when "application/json;profile='http://api.paychex.com/profiles/users/v1'"
|
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.28
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Cody Tanner
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-03-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -200,7 +200,7 @@ dependencies:
|
|
200
200
|
version: 0.5.1
|
201
201
|
description: Interface for interacting with the paychex enterprise API
|
202
202
|
email:
|
203
|
-
-
|
203
|
+
- cody.tanner@getbridge.com
|
204
204
|
executables: []
|
205
205
|
extensions: []
|
206
206
|
extra_rdoc_files: []
|
@@ -234,6 +234,8 @@ files:
|
|
234
234
|
- spec/fixtures/communications.json
|
235
235
|
- spec/fixtures/companies.json
|
236
236
|
- spec/fixtures/companies_associations.json
|
237
|
+
- spec/fixtures/company_location.json
|
238
|
+
- spec/fixtures/company_locations.json
|
237
239
|
- spec/fixtures/messages.json
|
238
240
|
- spec/fixtures/organizations.json
|
239
241
|
- spec/fixtures/status.json
|
@@ -271,31 +273,33 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
271
273
|
- !ruby/object:Gem::Version
|
272
274
|
version: '0'
|
273
275
|
requirements: []
|
274
|
-
rubygems_version: 3.
|
276
|
+
rubygems_version: 3.4.19
|
275
277
|
signing_key:
|
276
278
|
specification_version: 4
|
277
279
|
summary: Paychex API
|
278
280
|
test_files:
|
279
|
-
- spec/
|
280
|
-
- spec/
|
281
|
+
- spec/fixtures/association_companies.json
|
282
|
+
- spec/fixtures/auth.json
|
283
|
+
- spec/fixtures/communications.json
|
284
|
+
- spec/fixtures/companies.json
|
285
|
+
- spec/fixtures/companies_associations.json
|
286
|
+
- spec/fixtures/company_location.json
|
287
|
+
- spec/fixtures/company_locations.json
|
288
|
+
- spec/fixtures/messages.json
|
289
|
+
- spec/fixtures/organizations.json
|
290
|
+
- spec/fixtures/status.json
|
291
|
+
- spec/fixtures/users.json
|
292
|
+
- spec/fixtures/workers.json
|
281
293
|
- spec/paychex_api/api_array_spec.rb
|
282
|
-
- spec/paychex_api/client/companies_spec.rb
|
283
294
|
- spec/paychex_api/client/associations_spec.rb
|
295
|
+
- spec/paychex_api/client/companies_spec.rb
|
296
|
+
- spec/paychex_api/client/messages_spec.rb
|
297
|
+
- spec/paychex_api/client/notifications_spec.rb
|
284
298
|
- spec/paychex_api/client/purchases_spec.rb
|
285
299
|
- spec/paychex_api/client/statuses_spec.rb
|
286
300
|
- spec/paychex_api/client/users_spec.rb
|
287
|
-
- spec/paychex_api/client/messages_spec.rb
|
288
301
|
- spec/paychex_api/client/workers_spec.rb
|
289
|
-
- spec/paychex_api/
|
302
|
+
- spec/paychex_api/client_spec.rb
|
303
|
+
- spec/paychex_api/paychex_api_spec.rb
|
290
304
|
- spec/support/fake_paychex.rb
|
291
|
-
- spec/fixtures/messages.json
|
292
|
-
- spec/fixtures/organizations.json
|
293
|
-
- spec/fixtures/users.json
|
294
|
-
- spec/fixtures/companies.json
|
295
|
-
- spec/fixtures/workers.json
|
296
|
-
- spec/fixtures/auth.json
|
297
|
-
- spec/fixtures/communications.json
|
298
|
-
- spec/fixtures/association_companies.json
|
299
|
-
- spec/fixtures/status.json
|
300
|
-
- spec/fixtures/companies_associations.json
|
301
305
|
- spec/test_helper.rb
|