stackone_hris_client 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: b7b2ece4daf0c6a163d20b7c8877108df22c5acdf86d03b27986582d11547f73
4
+ data.tar.gz: af71cf660e66e3fb0d461c113169c448d65bd3949265d76a9f5b47e1dc46888c
5
+ SHA512:
6
+ metadata.gz: 041a04aee60c707b15864abef862a4daf83685b3a853d664aea9219e57a7e8cd04ff534a6310e0eb24a704adedaece1b99af0c8a55d0075cec2c153cfb354f54
7
+ data.tar.gz: 5f238823713f3cad99b24dd073ba23d47d319a5edd703f743d2a484c5f7dfa9bb9c1cb9699fa92b49130229fa2adfd5d6473149a49bb5c018383642a106d5c98
data/Gemfile ADDED
@@ -0,0 +1,9 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
4
+
5
+ group :development, :test do
6
+ gem 'rake', '~> 13.0.1'
7
+ gem 'pry-byebug'
8
+ gem 'rubocop', '~> 1.48.0'
9
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,73 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ stackone_hris_client (1.0.0)
5
+ typhoeus (~> 1.0, >= 1.0.1)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ ast (2.4.2)
11
+ byebug (11.1.3)
12
+ coderay (1.1.3)
13
+ diff-lcs (1.5.0)
14
+ ethon (0.16.0)
15
+ ffi (>= 1.15.0)
16
+ ffi (1.15.5)
17
+ json (2.6.3)
18
+ method_source (1.0.0)
19
+ parallel (1.22.1)
20
+ parser (3.2.1.1)
21
+ ast (~> 2.4.1)
22
+ pry (0.14.2)
23
+ coderay (~> 1.1)
24
+ method_source (~> 1.0)
25
+ pry-byebug (3.10.1)
26
+ byebug (~> 11.0)
27
+ pry (>= 0.13, < 0.15)
28
+ rainbow (3.1.1)
29
+ rake (13.0.6)
30
+ regexp_parser (2.7.0)
31
+ rexml (3.2.5)
32
+ rspec (3.12.0)
33
+ rspec-core (~> 3.12.0)
34
+ rspec-expectations (~> 3.12.0)
35
+ rspec-mocks (~> 3.12.0)
36
+ rspec-core (3.12.1)
37
+ rspec-support (~> 3.12.0)
38
+ rspec-expectations (3.12.2)
39
+ diff-lcs (>= 1.2.0, < 2.0)
40
+ rspec-support (~> 3.12.0)
41
+ rspec-mocks (3.12.4)
42
+ diff-lcs (>= 1.2.0, < 2.0)
43
+ rspec-support (~> 3.12.0)
44
+ rspec-support (3.12.0)
45
+ rubocop (1.48.1)
46
+ json (~> 2.3)
47
+ parallel (~> 1.10)
48
+ parser (>= 3.2.0.0)
49
+ rainbow (>= 2.2.2, < 4.0)
50
+ regexp_parser (>= 1.8, < 3.0)
51
+ rexml (>= 3.2.5, < 4.0)
52
+ rubocop-ast (>= 1.26.0, < 2.0)
53
+ ruby-progressbar (~> 1.7)
54
+ unicode-display_width (>= 2.4.0, < 3.0)
55
+ rubocop-ast (1.27.0)
56
+ parser (>= 3.2.1.0)
57
+ ruby-progressbar (1.13.0)
58
+ typhoeus (1.4.0)
59
+ ethon (>= 0.9.0)
60
+ unicode-display_width (2.4.2)
61
+
62
+ PLATFORMS
63
+ arm64-darwin-22
64
+
65
+ DEPENDENCIES
66
+ pry-byebug
67
+ rake (~> 13.0.1)
68
+ rspec (~> 3.6, >= 3.6.0)
69
+ rubocop (~> 1.48.0)
70
+ stackone_hris_client!
71
+
72
+ BUNDLED WITH
73
+ 2.4.7
data/README.md ADDED
@@ -0,0 +1,107 @@
1
+ # stackone_hris_client
2
+
3
+ StackOneHrisClient - the Ruby gem for the StackOne Unified API
4
+
5
+ The documentation for the StackOne Unified API
6
+
7
+ This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
8
+
9
+ - API version: 1.0
10
+ - Package version: 1.0.0
11
+ - Build package: org.openapitools.codegen.languages.RubyClientCodegen
12
+
13
+ ## Installation
14
+
15
+ ### Build a gem
16
+
17
+ To build the Ruby code into a gem:
18
+
19
+ ```shell
20
+ gem build stackone_hris_client.gemspec
21
+ ```
22
+
23
+ Then either install the gem locally:
24
+
25
+ ```shell
26
+ gem install ./stackone_hris_client-1.0.0.gem
27
+ ```
28
+
29
+ (for development, run `gem install --dev ./stackone_hris_client-1.0.0.gem` to install the development dependencies)
30
+
31
+ or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
32
+
33
+ Finally add this to the Gemfile:
34
+
35
+ gem 'stackone_hris_client', '~> 1.0.0'
36
+
37
+ ### Install from Git
38
+
39
+ If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
40
+
41
+ gem 'stackone_hris_client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
42
+
43
+ ### Include the Ruby code directly
44
+
45
+ Include the Ruby code directly using `-I` as follows:
46
+
47
+ ```shell
48
+ ruby -Ilib script.rb
49
+ ```
50
+
51
+ ## Getting Started
52
+
53
+ Please follow the [installation](#installation) procedure and then run the following code:
54
+
55
+ ```ruby
56
+ # Load the gem
57
+ require 'stackone_hris_client'
58
+
59
+ # Setup authorization
60
+ StackOneHrisClient.configure do |config|
61
+ # Configure HTTP basic authorization: basic
62
+ config.api_key_token = 'YOUR API KEY'
63
+ end
64
+
65
+ api_instance = StackOneHrisClient::EmployeesApi.new
66
+ id = 'id_example' # String |
67
+ x_account_id = 'x_account_id_example' # String | The account identifier
68
+ opts = {
69
+ page: 'page_example', # String | The page number of the results to fetch
70
+ page_size: 'page_size_example', # String | The number of results per page
71
+ raw: true, # Boolean | Indicates that the raw request result is returned
72
+ fields: ['inner_example'], # Array<String> | The list of fields to return in the response (if empty, all fields are returned)
73
+ expand: ['inner_example'] # Array<String> | The list of fields that will be expanded in the response
74
+ }
75
+
76
+ begin
77
+ #
78
+ result = api_instance.employees_get(id, x_account_id, opts)
79
+ p result
80
+ rescue StackOneHrisClient::ApiError => e
81
+ puts "Exception when calling EmployeesApi->employees_get: #{e}"
82
+ end
83
+
84
+ ```
85
+
86
+ ## Documentation for API Endpoints
87
+
88
+ All URIs are relative to *http://localhost*
89
+
90
+ Class | Method | HTTP request | Description
91
+ ------------ | ------------- | ------------- | -------------
92
+ *StackOneHrisClient::EmployeesApi* | [**employees_get**](docs/EmployeesApi.md#employees_get) | **GET** /unified/hris/employees/{id} |
93
+ *StackOneHrisClient::EmployeesApi* | [**employees_list**](docs/EmployeesApi.md#employees_list) | **GET** /unified/hris/employees |
94
+
95
+ ## Documentation for Models
96
+
97
+ - [StackOneHrisClient::Employee](docs/Employee.md)
98
+ - [StackOneHrisClient::EmployeeResult](docs/EmployeeResult.md)
99
+ - [StackOneHrisClient::EmployeesPaginated](docs/EmployeesPaginated.md)
100
+
101
+ ## Documentation for Authorization
102
+
103
+
104
+ ### basic
105
+
106
+ - **Type**: HTTP basic authentication
107
+
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ begin
4
+ require 'rspec/core/rake_task'
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+ task default: :spec
8
+ rescue LoadError
9
+ # no rspec available
10
+ end
data/docs/Employee.md ADDED
@@ -0,0 +1,48 @@
1
+ # StackOneHrisClient::Employee
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **id** | **String** | | |
8
+ | **first_name** | **String** | | |
9
+ | **last_name** | **String** | | |
10
+ | **name** | **String** | | |
11
+ | **display_name** | **String** | | |
12
+ | **avatar_url** | **String** | | [optional] |
13
+ | **personal_email** | **String** | | |
14
+ | **personal_phone_number** | **String** | | |
15
+ | **gender** | **String** | | |
16
+ | **work_email** | **String** | | |
17
+ | **work_phone_number** | **String** | | |
18
+ | **title** | **String** | | |
19
+ | **department** | **String** | | |
20
+ | **manager_id** | **String** | | |
21
+ | **birth_date** | **Time** | | |
22
+ | **start_date** | **Time** | | |
23
+
24
+ ## Example
25
+
26
+ ```ruby
27
+ require 'stackone_hris_client'
28
+
29
+ instance = StackOneHrisClient::Employee.new(
30
+ id: null,
31
+ first_name: null,
32
+ last_name: null,
33
+ name: null,
34
+ display_name: null,
35
+ avatar_url: null,
36
+ personal_email: null,
37
+ personal_phone_number: null,
38
+ gender: null,
39
+ work_email: null,
40
+ work_phone_number: null,
41
+ title: null,
42
+ department: null,
43
+ manager_id: null,
44
+ birth_date: null,
45
+ start_date: null
46
+ )
47
+ ```
48
+
@@ -0,0 +1,20 @@
1
+ # StackOneHrisClient::EmployeeResult
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **data** | [**Employee**](Employee.md) | | |
8
+ | **raw** | **String** | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'stackone_hris_client'
14
+
15
+ instance = StackOneHrisClient::EmployeeResult.new(
16
+ data: null,
17
+ raw: null
18
+ )
19
+ ```
20
+
@@ -0,0 +1,169 @@
1
+ # StackOneHrisClient::EmployeesApi
2
+
3
+ All URIs are relative to *http://localhost*
4
+
5
+ | Method | HTTP request | Description |
6
+ | ------ | ------------ | ----------- |
7
+ | [**employees_get**](EmployeesApi.md#employees_get) | **GET** /unified/hris/employees/{id} | |
8
+ | [**employees_list**](EmployeesApi.md#employees_list) | **GET** /unified/hris/employees | |
9
+
10
+
11
+ ## employees_get
12
+
13
+ > <EmployeeResult> employees_get(id, x_account_id, opts)
14
+
15
+
16
+
17
+ ### Examples
18
+
19
+ ```ruby
20
+ require 'time'
21
+ require 'stackone_hris_client'
22
+ # setup authorization
23
+ StackOneHrisClient.configure do |config|
24
+ # Configure HTTP basic authorization: basic
25
+ config.api_key_token = 'YOUR API KEY'
26
+ end
27
+
28
+ api_instance = StackOneHrisClient::EmployeesApi.new
29
+ id = 'id_example' # String |
30
+ x_account_id = 'x_account_id_example' # String | The account identifier
31
+ opts = {
32
+ page: 'page_example', # String | The page number of the results to fetch
33
+ page_size: 'page_size_example', # String | The number of results per page
34
+ raw: true, # Boolean | Indicates that the raw request result is returned
35
+ fields: ['inner_example'], # Array<String> | The list of fields to return in the response (if empty, all fields are returned)
36
+ expand: ['inner_example'] # Array<String> | The list of fields that will be expanded in the response
37
+ }
38
+
39
+ begin
40
+ #
41
+ result = api_instance.employees_get(id, x_account_id, opts)
42
+ p result
43
+ rescue StackOneHrisClient::ApiError => e
44
+ puts "Error when calling EmployeesApi->employees_get: #{e}"
45
+ end
46
+ ```
47
+
48
+ #### Using the employees_get_with_http_info variant
49
+
50
+ This returns an Array which contains the response data, status code and headers.
51
+
52
+ > <Array(<EmployeeResult>, Integer, Hash)> employees_get_with_http_info(id, x_account_id, opts)
53
+
54
+ ```ruby
55
+ begin
56
+ #
57
+ data, status_code, headers = api_instance.employees_get_with_http_info(id, x_account_id, opts)
58
+ p status_code # => 2xx
59
+ p headers # => { ... }
60
+ p data # => <EmployeeResult>
61
+ rescue StackOneHrisClient::ApiError => e
62
+ puts "Error when calling EmployeesApi->employees_get_with_http_info: #{e}"
63
+ end
64
+ ```
65
+
66
+ ### Parameters
67
+
68
+ | Name | Type | Description | Notes |
69
+ | ---- | ---- | ----------- | ----- |
70
+ | **id** | **String** | | |
71
+ | **x_account_id** | **String** | The account identifier | |
72
+ | **page** | **String** | The page number of the results to fetch | [optional] |
73
+ | **page_size** | **String** | The number of results per page | [optional][default to &#39;25&#39;] |
74
+ | **raw** | **Boolean** | Indicates that the raw request result is returned | [optional][default to false] |
75
+ | **fields** | [**Array&lt;String&gt;**](String.md) | The list of fields to return in the response (if empty, all fields are returned) | [optional] |
76
+ | **expand** | [**Array&lt;String&gt;**](String.md) | The list of fields that will be expanded in the response | [optional] |
77
+
78
+ ### Return type
79
+
80
+ [**EmployeeResult**](EmployeeResult.md)
81
+
82
+ ### Authorization
83
+
84
+ [basic](../README.md#basic)
85
+
86
+ ### HTTP request headers
87
+
88
+ - **Content-Type**: Not defined
89
+ - **Accept**: application/json
90
+
91
+
92
+ ## employees_list
93
+
94
+ > <EmployeesPaginated> employees_list(x_account_id, opts)
95
+
96
+
97
+
98
+ ### Examples
99
+
100
+ ```ruby
101
+ require 'time'
102
+ require 'stackone_hris_client'
103
+ # setup authorization
104
+ StackOneHrisClient.configure do |config|
105
+ # Configure HTTP basic authorization: basic
106
+ config.api_key_token = 'YOUR API KEY'
107
+ end
108
+
109
+ api_instance = StackOneHrisClient::EmployeesApi.new
110
+ x_account_id = 'x_account_id_example' # String | The account identifier
111
+ opts = {
112
+ page: 'page_example', # String | The page number of the results to fetch
113
+ page_size: 'page_size_example', # String | The number of results per page
114
+ raw: true, # Boolean | Indicates that the raw request result is returned
115
+ fields: ['inner_example'], # Array<String> | The list of fields to return in the response (if empty, all fields are returned)
116
+ expand: ['inner_example'] # Array<String> | The list of fields that will be expanded in the response
117
+ }
118
+
119
+ begin
120
+ #
121
+ result = api_instance.employees_list(x_account_id, opts)
122
+ p result
123
+ rescue StackOneHrisClient::ApiError => e
124
+ puts "Error when calling EmployeesApi->employees_list: #{e}"
125
+ end
126
+ ```
127
+
128
+ #### Using the employees_list_with_http_info variant
129
+
130
+ This returns an Array which contains the response data, status code and headers.
131
+
132
+ > <Array(<EmployeesPaginated>, Integer, Hash)> employees_list_with_http_info(x_account_id, opts)
133
+
134
+ ```ruby
135
+ begin
136
+ #
137
+ data, status_code, headers = api_instance.employees_list_with_http_info(x_account_id, opts)
138
+ p status_code # => 2xx
139
+ p headers # => { ... }
140
+ p data # => <EmployeesPaginated>
141
+ rescue StackOneHrisClient::ApiError => e
142
+ puts "Error when calling EmployeesApi->employees_list_with_http_info: #{e}"
143
+ end
144
+ ```
145
+
146
+ ### Parameters
147
+
148
+ | Name | Type | Description | Notes |
149
+ | ---- | ---- | ----------- | ----- |
150
+ | **x_account_id** | **String** | The account identifier | |
151
+ | **page** | **String** | The page number of the results to fetch | [optional] |
152
+ | **page_size** | **String** | The number of results per page | [optional][default to &#39;25&#39;] |
153
+ | **raw** | **Boolean** | Indicates that the raw request result is returned | [optional][default to false] |
154
+ | **fields** | [**Array&lt;String&gt;**](String.md) | The list of fields to return in the response (if empty, all fields are returned) | [optional] |
155
+ | **expand** | [**Array&lt;String&gt;**](String.md) | The list of fields that will be expanded in the response | [optional] |
156
+
157
+ ### Return type
158
+
159
+ [**EmployeesPaginated**](EmployeesPaginated.md)
160
+
161
+ ### Authorization
162
+
163
+ [basic](../README.md#basic)
164
+
165
+ ### HTTP request headers
166
+
167
+ - **Content-Type**: Not defined
168
+ - **Accept**: application/json
169
+
@@ -0,0 +1,22 @@
1
+ # StackOneHrisClient::EmployeesPaginated
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **next_page** | **String** | | |
8
+ | **data** | [**Array&lt;Employee&gt;**](Employee.md) | | |
9
+ | **raw** | **String** | | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'stackone_hris_client'
15
+
16
+ instance = StackOneHrisClient::EmployeesPaginated.new(
17
+ next_page: null,
18
+ data: null,
19
+ raw: null
20
+ )
21
+ ```
22
+
data/gem-config.yml ADDED
@@ -0,0 +1,14 @@
1
+ generatorName: ruby
2
+ inputSpec: https://api.eu1.stackone.com/documentation-yaml
3
+ additionalProperties:
4
+ moduleName: "StackOneHrisClient"
5
+ gemAuthor: "StackOne"
6
+ gemAuthorEmail: "developer-support@stackone.comm"
7
+ gemDescription: "StackOne Unified API client for enhanced integrations with HRIS systems"
8
+ gemHomepage: "https://stackone.com"
9
+ gemLicense: "MIT"
10
+ gemName: "stackone_hris_client"
11
+ gemRequiredRubyVersion: ">= 2.7"
12
+ gemSummary: "StackOne HRIS client gem"
13
+ gemVersion: "1.0.0"
14
+ library: "typhoeus"
data/generate_gem.sh ADDED
@@ -0,0 +1 @@
1
+ openapi-generator generate -c gem-config.yml
data/git_push.sh ADDED
@@ -0,0 +1,57 @@
1
+ #!/bin/sh
2
+ # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
3
+ #
4
+ # Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
5
+
6
+ git_user_id=$1
7
+ git_repo_id=$2
8
+ release_note=$3
9
+ git_host=$4
10
+
11
+ if [ "$git_host" = "" ]; then
12
+ git_host="github.com"
13
+ echo "[INFO] No command line input provided. Set \$git_host to $git_host"
14
+ fi
15
+
16
+ if [ "$git_user_id" = "" ]; then
17
+ git_user_id="GIT_USER_ID"
18
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
19
+ fi
20
+
21
+ if [ "$git_repo_id" = "" ]; then
22
+ git_repo_id="GIT_REPO_ID"
23
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
24
+ fi
25
+
26
+ if [ "$release_note" = "" ]; then
27
+ release_note="Minor update"
28
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
29
+ fi
30
+
31
+ # Initialize the local directory as a Git repository
32
+ git init
33
+
34
+ # Adds the files in the local repository and stages them for commit.
35
+ git add .
36
+
37
+ # Commits the tracked changes and prepares them to be pushed to a remote repository.
38
+ git commit -m "$release_note"
39
+
40
+ # Sets the new remote
41
+ git_remote=$(git remote)
42
+ if [ "$git_remote" = "" ]; then # git remote not defined
43
+
44
+ if [ "$GIT_TOKEN" = "" ]; then
45
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
46
+ git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
47
+ else
48
+ git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
49
+ fi
50
+
51
+ fi
52
+
53
+ git pull origin master
54
+
55
+ # Pushes (Forces) the changes in the local repository up to the remote repository
56
+ echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
57
+ git push origin master 2>&1 | grep -v 'To https'