paychex 0.2.1 → 0.3.0

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
  SHA256:
3
- metadata.gz: 9f58a4190d20737238057078b5f3098ec6e56fb706e9d8dd5f80fe9a9bd590de
4
- data.tar.gz: f1a9fc1c592088f1c2eeab84c71807bd5e32048432031a5c8668fdf58d821f25
3
+ metadata.gz: 171053f3e759cd8a55b1ed442d838abd6ec038eeaa600c3476776dcd188af09e
4
+ data.tar.gz: 6e1057927e3c8605d8892044ef6173ba140ec5dc0732968a8a6ae824776c4bbe
5
5
  SHA512:
6
- metadata.gz: a2ae581b3c3aa3b308ffcc5ca11bd2502288c684e5f206c6a8d80627f65e6c42a1e1dbe123b6bab5671dab0881257993cd5ee0ade16aabc3e9a2c98ae71d799c
7
- data.tar.gz: 02a94b753836489701d8f124ab17c19390f8e5a87b9208ff2a74c04282e29f211ceff1f0d1398354bd3187c2b230dc4201949fe1740fb845b6219fc44c2b126d
6
+ metadata.gz: cd1b46a147af931d70566f1ef948ffa420e9f194e0f79e3dc8c417d2c4f746ad55d48d8d3950d482e8db9165c4fb3e3277ec7120b8ed1c0a13e9d4220989119b
7
+ data.tar.gz: 93ca764cd7bb16ecb65f2945fd824bbf6a00236051259d21e5b9eba0fbc467ab1541690cbdd37d9bfa0adb9c035f402681aceac50a8348da69ae5bc4300f7406
@@ -0,0 +1,3 @@
1
+ # This owner will be the default owner for everything in the repo.
2
+ # Unless a later match takes precedence, @helloworld1812/kraken-payroll-integration will be requested for review when someone opens a pull request.
3
+ * @helloworld1812/kraken-payroll-integration
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- paychex (0.2.1)
4
+ paychex (0.3.0)
5
5
  addressable
6
6
  faraday
7
7
  faraday_middleware
@@ -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 = linked_companies.body.fetch('content')
39
- company = content.find { |company| company.fetch('displayId') == display_id }
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
- company = content.find { |company| company.fetch('displayId') == display_id }
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'
@@ -28,11 +28,11 @@ module Paychex
28
28
  # By default, don't set connection options.
29
29
  DEFAULT_CONNECTION_OPTIONS = {}
30
30
 
31
- # Default timeout time is 20 seconds
32
- DEFAULT_TIMEOUT = 20
31
+ # Default timeout time is 60 seconds
32
+ DEFAULT_TIMEOUT = 60
33
33
 
34
- # By default, the open timeout is 20 seconds.
35
- DEFAULT_OPEN_TIMEOUT = 20
34
+ # By default, the open timeout is 60 seconds.
35
+ DEFAULT_OPEN_TIMEOUT = 60
36
36
 
37
37
  DEFAULT_TOKEN_TIMEOUT = Time.new
38
38
 
@@ -1,3 +1,3 @@
1
1
  module Paychex
2
- VERSION = '0.2.1'
2
+ VERSION = '0.3.0'
3
3
  end
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.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mayank Dedhia
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-02-14 00:00:00.000000000 Z
11
+ date: 2023-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -158,6 +158,7 @@ executables: []
158
158
  extensions: []
159
159
  extra_rdoc_files: []
160
160
  files:
161
+ - ".github/CODEOWNERS"
161
162
  - ".gitignore"
162
163
  - ".rspec"
163
164
  - ".rubocop.yml"
@@ -198,7 +199,7 @@ metadata:
198
199
  homepage_uri: https://github.com/helloworld1812/paychex-ruby-gem
199
200
  source_code_uri: https://github.com/helloworld1812/paychex-ruby-gem
200
201
  changelog_uri: https://github.com/helloworld1812/paychex-ruby-gem/CHANGELOG.md
201
- post_install_message:
202
+ post_install_message:
202
203
  rdoc_options: []
203
204
  require_paths:
204
205
  - lib
@@ -213,8 +214,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
213
214
  - !ruby/object:Gem::Version
214
215
  version: '0'
215
216
  requirements: []
216
- rubygems_version: 3.4.4
217
- signing_key:
217
+ rubygems_version: 3.2.33
218
+ signing_key:
218
219
  specification_version: 4
219
220
  summary: Ruby wrapper for paychex.com APIs.
220
221
  test_files: []