paylocity_web_service 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/lib/paylocity_web_service/cache.rb +1 -1
- data/lib/paylocity_web_service/client/companies.rb +13 -4
- data/lib/paylocity_web_service/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: 33f09a98ae188a34663ec0cebb9f794cf7047fd30450554c96e9bc96aa4f878b
|
4
|
+
data.tar.gz: 1463dad0fec22d676864f791b4526ea2e696d1741d462435a1b3648525243dbf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1e62adc3cf74ac566588e02874a2ca991a204266fbedaa2c4cf20d5098ac653c40ee66b2af1eecd1849db2b07ba324d57a58d0a38d1ff9bf8ad732d6c5aa27e
|
7
|
+
data.tar.gz: 1f14ab469633028556a3c58714c15acf4c64d6e7e63b91d5479e11a8421d496cf4dee75d98a0a5c881e359b14d1d2ae5844b76f053b01dd869b48df86fbc3ee7
|
data/Gemfile
CHANGED
@@ -8,7 +8,7 @@ gemspec
|
|
8
8
|
# The following gems are required for local development and will not be included by `gem install mygem` or `bundle add mygem`.
|
9
9
|
group :development, :test do
|
10
10
|
gem 'awesome_print', require: 'ap'
|
11
|
-
gem 'pry
|
11
|
+
gem 'pry'
|
12
12
|
gem 'rubocop'
|
13
13
|
gem 'rake'
|
14
14
|
gem 'bundler'
|
@@ -1,16 +1,16 @@
|
|
1
1
|
module PaylocityWebService
|
2
2
|
class Client
|
3
3
|
module Companies
|
4
|
-
CodeResources = %W(
|
4
|
+
CodeResources = %W(costCenter1 costCenter2 costCenter3 deductions earnings taxes paygrade positions)
|
5
5
|
|
6
6
|
def company_schema
|
7
7
|
get("/api/v2/companies/#{company_id}/openapi")
|
8
8
|
end
|
9
9
|
|
10
10
|
# Available Code Resources:
|
11
|
-
# -
|
12
|
-
# -
|
13
|
-
# -
|
11
|
+
# - costCenter1
|
12
|
+
# - costCenter2
|
13
|
+
# - costCenter3
|
14
14
|
# - deductions
|
15
15
|
# - earnings
|
16
16
|
# - taxes
|
@@ -23,6 +23,15 @@ module PaylocityWebService
|
|
23
23
|
def code_resources
|
24
24
|
CodeResources
|
25
25
|
end
|
26
|
+
|
27
|
+
# Paylocity hasn't provide a way to check the connectivity of the API, we have to fire a request to check it.
|
28
|
+
def company_connected?
|
29
|
+
return true if company_codes('costCenter1').status == 200
|
30
|
+
return true if company_schema.code == 200
|
31
|
+
false
|
32
|
+
rescue => e
|
33
|
+
false
|
34
|
+
end
|
26
35
|
end
|
27
36
|
end
|
28
37
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paylocity_web_service
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Lv
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-06-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|