stackone_hris_client

StackOneHRIS - the Ruby gem for the StackOne Unified API - HRIS

The documentation for the StackOne Unified API - HRIS

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • Package version: 1.5.2
  • Build package: org.openapitools.codegen.languages.RubyClientCodegen

Installation

Build a gem

To build the Ruby code into a gem:

gem build stackone_hris_client.gemspec

Then either install the gem locally:

gem install ./stackone_hris_client-1.5.2.gem

(for development, run gem install --dev ./stackone_hris_client-1.5.2.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'stackone_hris_client', '~> 1.5.2'

Install from Git

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:

gem 'stackone_hris_client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'stackone_hris_client'

# Setup authorization
StackOneHRIS.configure do |config|
  # Configure HTTP basic authorization: basic
  config.api_key_token = 'YOUR API KEY'
end

api_instance = StackOneHRIS::EmployeesApi.new
id = 'id_example' # String | 
 = 'x_account_id_example' # String | The account identifier
opts = {
  page: 'page_example', # String | The page number of the results to fetch
  page_size: 'page_size_example', # String | The number of results per page
  raw: true, # Boolean | Indicates that the raw request result is returned
  fields: ['inner_example'], # Array<String> | The list of fields to return in the response (if empty, all fields are returned)
  expand: ['inner_example'] # Array<String> | The list of fields that will be expanded in the response
}

begin
  #
  result = api_instance.employees_get(id, , opts)
  p result
rescue StackOneHRIS::ApiError => e
  puts "Exception when calling EmployeesApi->employees_get: #{e}"
end

Documentation for API Endpoints

All URIs are relative to https://api.stackone.com

Class Method HTTP request Description
StackOneHRIS::AccountsApi accounts_delete DELETE /accounts/id
StackOneHRIS::AccountsApi accounts_get GET /accounts/id
StackOneHRIS::AccountsApi accounts_list GET /accounts
StackOneHRIS::CompaniesApi companies_get GET /unified/hris/companies/id
StackOneHRIS::CompaniesApi companies_list GET /unified/hris/companies
StackOneHRIS::ConnectSessionsApi connect_sessions_authenticate POST /connect_sessions/authenticate
StackOneHRIS::ConnectSessionsApi connect_sessions_create POST /connect_sessions
StackOneHRIS::EmployeesApi employees_get GET /unified/hris/employees/id
StackOneHRIS::EmployeesApi employees_list GET /unified/hris/employees
StackOneHRIS::EmploymentsApi employments_get GET /unified/hris/employments/id
StackOneHRIS::EmploymentsApi employments_list GET /unified/hris/employments
StackOneHRIS::LocationsApi hris_locations_get GET /unified/hris/locations/id
StackOneHRIS::LocationsApi hris_locations_list GET /unified/hris/locations

Documentation for Models

Documentation for Authorization

basic

  • Type: HTTP basic authentication