paychex 0.2.2 → 0.3.0
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/client/companies.rb +5 -4
- data/lib/paychex/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 171053f3e759cd8a55b1ed442d838abd6ec038eeaa600c3476776dcd188af09e
|
|
4
|
+
data.tar.gz: 6e1057927e3c8605d8892044ef6173ba140ec5dc0732968a8a6ae824776c4bbe
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cd1b46a147af931d70566f1ef948ffa420e9f194e0f79e3dc8c417d2c4f746ad55d48d8d3950d482e8db9165c4fb3e3277ec7120b8ed1c0a13e9d4220989119b
|
|
7
|
+
data.tar.gz: 93ca764cd7bb16ecb65f2945fd824bbf6a00236051259d21e5b9eba0fbc467ab1541690cbdd37d9bfa0adb9c035f402681aceac50a8348da69ae5bc4300f7406
|
data/Gemfile.lock
CHANGED
|
@@ -2,6 +2,7 @@ module Paychex
|
|
|
2
2
|
class Client
|
|
3
3
|
module Companies
|
|
4
4
|
# Get a list of all the linked companies
|
|
5
|
+
# This will be unavailable once we have 200+ linked companies
|
|
5
6
|
def linked_companies
|
|
6
7
|
get('companies')
|
|
7
8
|
end
|
|
@@ -35,8 +36,8 @@ module Paychex
|
|
|
35
36
|
|
|
36
37
|
def details_by_display_id(display_id)
|
|
37
38
|
begin
|
|
38
|
-
content =
|
|
39
|
-
company = content
|
|
39
|
+
content = get("companies?displayId=#{display_id}").body.fetch('content')
|
|
40
|
+
company = content[0]
|
|
40
41
|
return {
|
|
41
42
|
"company": company,
|
|
42
43
|
"message": company.nil? ? 'not-found' : 'found'
|
|
@@ -59,9 +60,9 @@ module Paychex
|
|
|
59
60
|
def details_by_display_ids(display_ids)
|
|
60
61
|
ret = {}
|
|
61
62
|
begin
|
|
62
|
-
content = linked_companies.body.fetch('content')
|
|
63
63
|
display_ids.each do |display_id|
|
|
64
|
-
|
|
64
|
+
content = details_by_display_id(display_id)
|
|
65
|
+
company = content[:company]
|
|
65
66
|
ret[display_id.to_s] = {
|
|
66
67
|
"company": company,
|
|
67
68
|
"message": company.nil? ? 'not-found' : 'found'
|
data/lib/paychex/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: paychex
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Mayank Dedhia
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2023-
|
|
11
|
+
date: 2023-07-18 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|