paychex_api 0.0.23 → 0.0.24
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 42a0c3031099569f0a4a88d0ee94e6df4917879d
|
4
|
+
data.tar.gz: 2818ed46371e2641b3110f9f4ae6e13d39c9a1dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e0cdbe1f7a752321cef63fed3036b4aa191be0c55c24aba7109750e933fcdf20eb2fc46b9c7c8edb4c20fd61fc789df7e4c88a2acbe5efefdd2706140411223
|
7
|
+
data.tar.gz: a7c6dbb305d8a6d195d87ee67defdd4e470bd93f71c5bf941d5c76d69df2f453e46b9f12e9755fed1f58fc35fe2c05b6bacc734fdcf11dc4c0207b54713b400e
|
data/lib/paychex_api/client.rb
CHANGED
@@ -13,6 +13,7 @@ require 'paychex_api/api_array'
|
|
13
13
|
module PaychexAPI
|
14
14
|
class Client < Footrest::Client
|
15
15
|
API_PATH = ''.freeze
|
16
|
+
STATUS_PATH = '/status'.freeze
|
16
17
|
COMPANIES_PATH = '/companies'.freeze
|
17
18
|
ASSOCIATIONS_PATH = '/'.freeze
|
18
19
|
ORGANIZATIONS_PATH = '/organizations'.freeze
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module PaychexAPI
|
2
|
+
class Client
|
3
|
+
module Statuses
|
4
|
+
def company_status(params={})
|
5
|
+
get("#{API_PATH}#{STATUS_PATH}/company", params)
|
6
|
+
end
|
7
|
+
|
8
|
+
def user_status(params={})
|
9
|
+
get("#{API_PATH}#{STATUS_PATH}/user", params)
|
10
|
+
end
|
11
|
+
|
12
|
+
def worker_status(params={})
|
13
|
+
get("#{API_PATH}#{STATUS_PATH}/worker", params)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/lib/paychex_api/version.rb
CHANGED
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
describe PaychexAPI::Client::Statuses do
|
3
|
+
before do
|
4
|
+
@client = PaychexAPI::Client.new(
|
5
|
+
prefix: 'http://test.paychex.com', client_id: 'client_id', client_secret: 'client_secret'
|
6
|
+
)
|
7
|
+
end
|
8
|
+
|
9
|
+
it 'should get company status' do
|
10
|
+
response = @client.company_status
|
11
|
+
expect(response['health']['status']).to(eq('UP'))
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'should get user status' do
|
15
|
+
response = @client.user_status
|
16
|
+
expect(response['health']['status']).to(eq('UP'))
|
17
|
+
end
|
18
|
+
|
19
|
+
it 'should get worker status' do
|
20
|
+
response = @client.worker_status
|
21
|
+
expect(response['health']['status']).to(eq('UP'))
|
22
|
+
end
|
23
|
+
end
|
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.24
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jay Shaffer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -242,6 +242,7 @@ files:
|
|
242
242
|
- lib/paychex_api/client/messages.rb
|
243
243
|
- lib/paychex_api/client/notifications.rb
|
244
244
|
- lib/paychex_api/client/purchases.rb
|
245
|
+
- lib/paychex_api/client/statuses.rb
|
245
246
|
- lib/paychex_api/client/users.rb
|
246
247
|
- lib/paychex_api/client/workers.rb
|
247
248
|
- lib/paychex_api/version.rb
|
@@ -253,6 +254,7 @@ files:
|
|
253
254
|
- spec/fixtures/companies_associations.json
|
254
255
|
- spec/fixtures/messages.json
|
255
256
|
- spec/fixtures/organizations.json
|
257
|
+
- spec/fixtures/status.json
|
256
258
|
- spec/fixtures/users.json
|
257
259
|
- spec/fixtures/workers.json
|
258
260
|
- spec/paychex_api/api_array_spec.rb
|
@@ -261,6 +263,7 @@ files:
|
|
261
263
|
- spec/paychex_api/client/messages_spec.rb
|
262
264
|
- spec/paychex_api/client/notifications_spec.rb
|
263
265
|
- spec/paychex_api/client/purchases_spec.rb
|
266
|
+
- spec/paychex_api/client/statuses_spec.rb
|
264
267
|
- spec/paychex_api/client/users_spec.rb
|
265
268
|
- spec/paychex_api/client/workers_spec.rb
|
266
269
|
- spec/paychex_api/client_spec.rb
|
@@ -298,6 +301,7 @@ test_files:
|
|
298
301
|
- spec/paychex_api/client/companies_spec.rb
|
299
302
|
- spec/paychex_api/client/associations_spec.rb
|
300
303
|
- spec/paychex_api/client/purchases_spec.rb
|
304
|
+
- spec/paychex_api/client/statuses_spec.rb
|
301
305
|
- spec/paychex_api/client/users_spec.rb
|
302
306
|
- spec/paychex_api/client/messages_spec.rb
|
303
307
|
- spec/paychex_api/client/workers_spec.rb
|
@@ -311,5 +315,6 @@ test_files:
|
|
311
315
|
- spec/fixtures/auth.json
|
312
316
|
- spec/fixtures/communications.json
|
313
317
|
- spec/fixtures/association_companies.json
|
318
|
+
- spec/fixtures/status.json
|
314
319
|
- spec/fixtures/companies_associations.json
|
315
320
|
- spec/test_helper.rb
|