paychex_api 0.0.4 → 0.0.5
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/lib/paychex_api/api_array.rb +1 -1
- data/lib/paychex_api/client.rb +1 -0
- data/lib/paychex_api/client/messages.rb +9 -0
- data/lib/paychex_api/version.rb +1 -1
- data/spec/fixtures/messages.json +0 -0
- data/spec/paychex_api/client/messages_spec.rb +23 -0
- data/spec/support/fake_paychex.rb +6 -0
- metadata +7 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 26445528480bff4925df351a175a69bc283f73f628c5175dbe00e027cb791ab5
|
4
|
+
data.tar.gz: 062d617c2cb719806e45c96f861c1c2090fff9a31a0065a40a87ccd1a701a6f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8f0e6534f085b51c2f0a8ff6616c1f60383e8448591e084c0236c4ce7afc3628c2dc9da92e8bb266f4c17fb6cda09d89a19f2ab5ace77701a40d9d6f45ee8b5
|
7
|
+
data.tar.gz: eeb98d3f9749faccbeed4558b4ff8772609b66778f101d9070cd399af8fad603632ec77ed1e8cbd20e70dbba2e4667a91a8a0cdc0e958ef1c22781d031d35302
|
@@ -20,7 +20,7 @@ module PaychexAPI
|
|
20
20
|
@api_client = api_client
|
21
21
|
@links = []
|
22
22
|
@metadata = {}
|
23
|
-
@errors = response.body['errors']
|
23
|
+
@errors = response.body['errors'] if response.body && response.body.key?('errors')
|
24
24
|
case response.status
|
25
25
|
when *((200..206).to_a + [302])
|
26
26
|
apply_response_metadata(response)
|
data/lib/paychex_api/client.rb
CHANGED
@@ -18,6 +18,7 @@ module PaychexAPI
|
|
18
18
|
ORGANIZATIONS_PATH = '/organizations'.freeze
|
19
19
|
JOB_TITLES_PATH = '/jobtitles'.freeze
|
20
20
|
WORKER_STATUSES_PATH = '/workerstatuses'.freeze
|
21
|
+
MESSAGES_PATH = '/messages'.freeze
|
21
22
|
NOTIFICATIONS_PATH = '/notifications'.freeze
|
22
23
|
WORKERS_PATH = '/workers'.freeze
|
23
24
|
COMMUNICATIONS_PATH = '/communications'.freeze
|
data/lib/paychex_api/version.rb
CHANGED
File without changes
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
describe PaychexAPI::Client::Notifications do
|
3
|
+
let!(:body) do
|
4
|
+
{
|
5
|
+
'companyId' => '00Z5V9BTI687WL8V60GT',
|
6
|
+
'asOfDate' => '2018-01-12T00:00:00Z',
|
7
|
+
'domains' => ['CLT_PROD'],
|
8
|
+
'action' => 'ADD',
|
9
|
+
'productCode' => 'LMS_ENH'
|
10
|
+
}
|
11
|
+
end
|
12
|
+
|
13
|
+
before do
|
14
|
+
@client = PaychexAPI::Client.new(
|
15
|
+
prefix: 'http://test.paychex.com', client_id: 'client_id', client_secret: 'client_secret'
|
16
|
+
)
|
17
|
+
end
|
18
|
+
|
19
|
+
it 'should create a message' do
|
20
|
+
response = @client.create_message(body)
|
21
|
+
expect(response.status).to(eq(201))
|
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.5
|
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-
|
11
|
+
date: 2018-06-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -239,6 +239,7 @@ files:
|
|
239
239
|
- lib/paychex_api/client.rb
|
240
240
|
- lib/paychex_api/client/associations.rb
|
241
241
|
- lib/paychex_api/client/companies.rb
|
242
|
+
- lib/paychex_api/client/messages.rb
|
242
243
|
- lib/paychex_api/client/notifications.rb
|
243
244
|
- lib/paychex_api/client/workers.rb
|
244
245
|
- lib/paychex_api/version.rb
|
@@ -246,11 +247,13 @@ files:
|
|
246
247
|
- spec/fixtures/auth.json
|
247
248
|
- spec/fixtures/communications.json
|
248
249
|
- spec/fixtures/companies.json
|
250
|
+
- spec/fixtures/messages.json
|
249
251
|
- spec/fixtures/organizations.json
|
250
252
|
- spec/fixtures/workers.json
|
251
253
|
- spec/paychex_api/api_array_spec.rb
|
252
254
|
- spec/paychex_api/client/associations_spec.rb
|
253
255
|
- spec/paychex_api/client/companies_spec.rb
|
256
|
+
- spec/paychex_api/client/messages_spec.rb
|
254
257
|
- spec/paychex_api/client/notifications_spec.rb
|
255
258
|
- spec/paychex_api/client/workers_spec.rb
|
256
259
|
- spec/paychex_api/client_spec.rb
|
@@ -285,11 +288,13 @@ test_files:
|
|
285
288
|
- spec/fixtures/auth.json
|
286
289
|
- spec/fixtures/communications.json
|
287
290
|
- spec/fixtures/companies.json
|
291
|
+
- spec/fixtures/messages.json
|
288
292
|
- spec/fixtures/organizations.json
|
289
293
|
- spec/fixtures/workers.json
|
290
294
|
- spec/paychex_api/api_array_spec.rb
|
291
295
|
- spec/paychex_api/client/associations_spec.rb
|
292
296
|
- spec/paychex_api/client/companies_spec.rb
|
297
|
+
- spec/paychex_api/client/messages_spec.rb
|
293
298
|
- spec/paychex_api/client/notifications_spec.rb
|
294
299
|
- spec/paychex_api/client/workers_spec.rb
|
295
300
|
- spec/paychex_api/client_spec.rb
|