paylocity_web_service 0.1.2 → 0.2.1
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/.gitignore +2 -0
- 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/client/credentials.rb +2 -2
- data/lib/paylocity_web_service/client/onboardings.rb +9 -0
- data/lib/paylocity_web_service/client.rb +2 -0
- data/lib/paylocity_web_service/connection.rb +1 -1
- data/lib/paylocity_web_service/version.rb +1 -1
- metadata +3 -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/.gitignore
CHANGED
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
|
@@ -5,6 +5,7 @@ require 'paylocity_web_service/error'
|
|
5
5
|
require 'paylocity_web_service/client/companies'
|
6
6
|
require 'paylocity_web_service/client/employees'
|
7
7
|
require 'paylocity_web_service/client/credentials'
|
8
|
+
require 'paylocity_web_service/client/onboardings'
|
8
9
|
|
9
10
|
module PaylocityWebService
|
10
11
|
class Client
|
@@ -15,6 +16,7 @@ module PaylocityWebService
|
|
15
16
|
include PaylocityWebService::Client::Employees
|
16
17
|
include PaylocityWebService::Client::Companies
|
17
18
|
include PaylocityWebService::Client::Credentials
|
19
|
+
include PaylocityWebService::Client::Onboardings
|
18
20
|
|
19
21
|
def initialize(options={})
|
20
22
|
options = PaylocityWebService.options.merge(options)
|
@@ -96,7 +96,7 @@ module PaylocityWebService
|
|
96
96
|
conn.request :retry, max: 2
|
97
97
|
conn.request :json
|
98
98
|
|
99
|
-
conn.use PaylocityWebService::Middleware::Response::RaiseError
|
99
|
+
# conn.use PaylocityWebService::Middleware::Response::RaiseError
|
100
100
|
conn.use FaradayMiddleware::ParseJson, :content_type => /\bjson$/
|
101
101
|
end
|
102
102
|
|
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.1
|
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:
|
11
|
+
date: 2022-06-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -64,6 +64,7 @@ files:
|
|
64
64
|
- lib/paylocity_web_service/client/companies.rb
|
65
65
|
- lib/paylocity_web_service/client/credentials.rb
|
66
66
|
- lib/paylocity_web_service/client/employees.rb
|
67
|
+
- lib/paylocity_web_service/client/onboardings.rb
|
67
68
|
- lib/paylocity_web_service/configuration.rb
|
68
69
|
- lib/paylocity_web_service/connection.rb
|
69
70
|
- lib/paylocity_web_service/encryption.rb
|