merge_hris_client 1.0.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 +7 -0
- data/Gemfile +9 -0
- data/README.md +179 -0
- data/Rakefile +10 -0
- data/config.json +1 -0
- data/docs/AccountIntegration.md +28 -0
- data/docs/AccountToken.md +18 -0
- data/docs/AccountTokenApi.md +79 -0
- data/docs/AvailableActions.md +22 -0
- data/docs/AvailableActionsApi.md +79 -0
- data/docs/Benefit.md +32 -0
- data/docs/BenefitPlanTypeEnum.md +15 -0
- data/docs/BenefitsApi.md +181 -0
- data/docs/CompaniesApi.md +175 -0
- data/docs/Company.md +28 -0
- data/docs/CountryEnum.md +15 -0
- data/docs/DataPassthrough.md +24 -0
- data/docs/DataPassthroughRequest.md +26 -0
- data/docs/Deduction.md +28 -0
- data/docs/Earning.md +26 -0
- data/docs/Employee.md +66 -0
- data/docs/EmployeePayrollRun.md +42 -0
- data/docs/EmployeePayrollRunsApi.md +183 -0
- data/docs/EmployeesApi.md +187 -0
- data/docs/Employment.md +38 -0
- data/docs/EmploymentStatusEnum.md +15 -0
- data/docs/EmploymentTypeEnum.md +15 -0
- data/docs/EmploymentsApi.md +177 -0
- data/docs/EndUserDetails.md +24 -0
- data/docs/EndUserDetailsRequest.md +26 -0
- data/docs/EthnicityEnum.md +15 -0
- data/docs/FlsaStatusEnum.md +15 -0
- data/docs/GenderEnum.md +15 -0
- data/docs/GenerateKeyApi.md +79 -0
- data/docs/GenerateRemoteKeyRequest.md +18 -0
- data/docs/LinkToken.md +20 -0
- data/docs/LinkTokenApi.md +79 -0
- data/docs/Location.md +36 -0
- data/docs/LocationsApi.md +175 -0
- data/docs/MaritalStatusEnum.md +15 -0
- data/docs/MethodEnum.md +15 -0
- data/docs/ModelOperation.md +22 -0
- data/docs/NullEnum.md +15 -0
- data/docs/PaginatedBenefitList.md +22 -0
- data/docs/PaginatedCompanyList.md +22 -0
- data/docs/PaginatedEmployeeList.md +22 -0
- data/docs/PaginatedEmployeePayrollRunList.md +22 -0
- data/docs/PaginatedEmploymentList.md +22 -0
- data/docs/PaginatedLocationList.md +22 -0
- data/docs/PaginatedPayrollRunList.md +22 -0
- data/docs/PaginatedTeamList.md +22 -0
- data/docs/PaginatedTimeOffList.md +22 -0
- data/docs/PassthroughApi.md +81 -0
- data/docs/PayCurrencyEnum.md +15 -0
- data/docs/PayFrequencyEnum.md +15 -0
- data/docs/PayPeriodEnum.md +15 -0
- data/docs/PayrollRun.md +32 -0
- data/docs/PayrollRunsApi.md +175 -0
- data/docs/RegenerateKeyApi.md +79 -0
- data/docs/RemoteData.md +20 -0
- data/docs/RemoteKey.md +20 -0
- data/docs/RemoteKeyForRegeneration.md +18 -0
- data/docs/RemoteKeyForRegenerationRequest.md +18 -0
- data/docs/RemoteResponse.md +26 -0
- data/docs/RequestTypeEnum.md +15 -0
- data/docs/RunStateEnum.md +15 -0
- data/docs/RunTypeEnum.md +15 -0
- data/docs/StateEnum.md +15 -0
- data/docs/SyncStatus.md +28 -0
- data/docs/SyncStatusApi.md +79 -0
- data/docs/Tax.md +28 -0
- data/docs/Team.md +24 -0
- data/docs/TeamsApi.md +175 -0
- data/docs/TimeOff.md +36 -0
- data/docs/TimeOffApi.md +183 -0
- data/docs/TimeOffStatusEnum.md +15 -0
- data/docs/TypeEnum.md +15 -0
- data/docs/UnitsEnum.md +15 -0
- data/git_push.sh +58 -0
- data/lib/merge_hris_client.rb +110 -0
- data/lib/merge_hris_client/api/account_token_api.rb +83 -0
- data/lib/merge_hris_client/api/available_actions_api.rb +84 -0
- data/lib/merge_hris_client/api/benefits_api.rb +196 -0
- data/lib/merge_hris_client/api/companies_api.rb +179 -0
- data/lib/merge_hris_client/api/employee_payroll_runs_api.rb +199 -0
- data/lib/merge_hris_client/api/employees_api.rb +205 -0
- data/lib/merge_hris_client/api/employments_api.rb +182 -0
- data/lib/merge_hris_client/api/generate_key_api.rb +85 -0
- data/lib/merge_hris_client/api/link_token_api.rb +85 -0
- data/lib/merge_hris_client/api/locations_api.rb +179 -0
- data/lib/merge_hris_client/api/passthrough_api.rb +92 -0
- data/lib/merge_hris_client/api/payroll_runs_api.rb +179 -0
- data/lib/merge_hris_client/api/regenerate_key_api.rb +85 -0
- data/lib/merge_hris_client/api/sync_status_api.rb +84 -0
- data/lib/merge_hris_client/api/teams_api.rb +179 -0
- data/lib/merge_hris_client/api/time_off_api.rb +199 -0
- data/lib/merge_hris_client/api_client.rb +390 -0
- data/lib/merge_hris_client/api_error.rb +57 -0
- data/lib/merge_hris_client/configuration.rb +279 -0
- data/lib/merge_hris_client/models/account_integration.rb +325 -0
- data/lib/merge_hris_client/models/account_token.rb +223 -0
- data/lib/merge_hris_client/models/available_actions.rb +249 -0
- data/lib/merge_hris_client/models/benefit.rb +297 -0
- data/lib/merge_hris_client/models/benefit_plan_type_enum.rb +56 -0
- data/lib/merge_hris_client/models/company.rb +277 -0
- data/lib/merge_hris_client/models/country_enum.rb +282 -0
- data/lib/merge_hris_client/models/data_passthrough.rb +262 -0
- data/lib/merge_hris_client/models/data_passthrough_request.rb +271 -0
- data/lib/merge_hris_client/models/deduction.rb +275 -0
- data/lib/merge_hris_client/models/earning.rb +264 -0
- data/lib/merge_hris_client/models/employee.rb +544 -0
- data/lib/merge_hris_client/models/employee_payroll_run.rb +352 -0
- data/lib/merge_hris_client/models/employment.rb +330 -0
- data/lib/merge_hris_client/models/employment_status_enum.rb +37 -0
- data/lib/merge_hris_client/models/employment_type_enum.rb +39 -0
- data/lib/merge_hris_client/models/end_user_details.rb +289 -0
- data/lib/merge_hris_client/models/end_user_details_request.rb +298 -0
- data/lib/merge_hris_client/models/ethnicity_enum.rb +42 -0
- data/lib/merge_hris_client/models/flsa_status_enum.rb +38 -0
- data/lib/merge_hris_client/models/gender_enum.rb +39 -0
- data/lib/merge_hris_client/models/generate_remote_key_request.rb +224 -0
- data/lib/merge_hris_client/models/link_token.rb +237 -0
- data/lib/merge_hris_client/models/location.rb +319 -0
- data/lib/merge_hris_client/models/marital_status_enum.rb +39 -0
- data/lib/merge_hris_client/models/method_enum.rb +41 -0
- data/lib/merge_hris_client/models/model_operation.rb +256 -0
- data/lib/merge_hris_client/models/paginated_benefit_list.rb +240 -0
- data/lib/merge_hris_client/models/paginated_company_list.rb +240 -0
- data/lib/merge_hris_client/models/paginated_employee_list.rb +240 -0
- data/lib/merge_hris_client/models/paginated_employee_payroll_run_list.rb +240 -0
- data/lib/merge_hris_client/models/paginated_employment_list.rb +240 -0
- data/lib/merge_hris_client/models/paginated_location_list.rb +240 -0
- data/lib/merge_hris_client/models/paginated_payroll_run_list.rb +240 -0
- data/lib/merge_hris_client/models/paginated_team_list.rb +240 -0
- data/lib/merge_hris_client/models/paginated_time_off_list.rb +240 -0
- data/lib/merge_hris_client/models/pay_currency_enum.rb +340 -0
- data/lib/merge_hris_client/models/pay_frequency_enum.rb +43 -0
- data/lib/merge_hris_client/models/pay_period_enum.rb +42 -0
- data/lib/merge_hris_client/models/payroll_run.rb +297 -0
- data/lib/merge_hris_client/models/remote_data.rb +234 -0
- data/lib/merge_hris_client/models/remote_key.rb +238 -0
- data/lib/merge_hris_client/models/remote_key_for_regeneration.rb +224 -0
- data/lib/merge_hris_client/models/remote_key_for_regeneration_request.rb +224 -0
- data/lib/merge_hris_client/models/remote_response.rb +279 -0
- data/lib/merge_hris_client/models/request_type_enum.rb +38 -0
- data/lib/merge_hris_client/models/run_state_enum.rb +39 -0
- data/lib/merge_hris_client/models/run_type_enum.rb +49 -0
- data/lib/merge_hris_client/models/state_enum.rb +93 -0
- data/lib/merge_hris_client/models/sync_status.rb +294 -0
- data/lib/merge_hris_client/models/tax.rb +275 -0
- data/lib/merge_hris_client/models/team.rb +253 -0
- data/lib/merge_hris_client/models/time_off.rb +319 -0
- data/lib/merge_hris_client/models/time_off_status_enum.rb +39 -0
- data/lib/merge_hris_client/models/type_enum.rb +38 -0
- data/lib/merge_hris_client/models/units_enum.rb +36 -0
- data/lib/merge_hris_client/version.rb +15 -0
- data/merge_hris_client-1.0.0.gem +0 -0
- data/merge_hris_client.gemspec +38 -0
- data/pull_request_template.md +20 -0
- data/spec/api/account_token_api_spec.rb +46 -0
- data/spec/api/available_actions_api_spec.rb +46 -0
- data/spec/api/benefits_api_spec.rb +68 -0
- data/spec/api/companies_api_spec.rb +65 -0
- data/spec/api/employee_payroll_runs_api_spec.rb +69 -0
- data/spec/api/employees_api_spec.rb +71 -0
- data/spec/api/employments_api_spec.rb +66 -0
- data/spec/api/link_token_api_spec.rb +46 -0
- data/spec/api/locations_api_spec.rb +65 -0
- data/spec/api/passthrough_api_spec.rb +48 -0
- data/spec/api/payroll_runs_api_spec.rb +65 -0
- data/spec/api/regenerate_key_api_spec.rb +46 -0
- data/spec/api/teams_api_spec.rb +65 -0
- data/spec/api/time_off_api_spec.rb +69 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/account_integration_spec.rb +58 -0
- data/spec/models/account_token_spec.rb +34 -0
- data/spec/models/available_actions_spec.rb +34 -0
- data/spec/models/benefit_plan_type_enum_spec.rb +28 -0
- data/spec/models/benefit_spec.rb +70 -0
- data/spec/models/company_spec.rb +58 -0
- data/spec/models/country_enum_spec.rb +28 -0
- data/spec/models/data_passthrough_request_spec.rb +58 -0
- data/spec/models/data_passthrough_spec.rb +52 -0
- data/spec/models/deduction_spec.rb +58 -0
- data/spec/models/earning_spec.rb +52 -0
- data/spec/models/employee_payroll_run_spec.rb +100 -0
- data/spec/models/employee_spec.rb +166 -0
- data/spec/models/employment_spec.rb +88 -0
- data/spec/models/employment_status_enum_spec.rb +28 -0
- data/spec/models/employment_type_enum_spec.rb +28 -0
- data/spec/models/end_user_details_request_spec.rb +56 -0
- data/spec/models/end_user_details_spec.rb +56 -0
- data/spec/models/ethnicity_enum_spec.rb +28 -0
- data/spec/models/flsa_status_enum_spec.rb +28 -0
- data/spec/models/gender_enum_spec.rb +28 -0
- data/spec/models/link_token_spec.rb +40 -0
- data/spec/models/location_spec.rb +82 -0
- data/spec/models/marital_status_enum_spec.rb +28 -0
- data/spec/models/method_enum_spec.rb +28 -0
- data/spec/models/model_operation_spec.rb +40 -0
- data/spec/models/paginated_benefit_list_spec.rb +46 -0
- data/spec/models/paginated_company_list_spec.rb +46 -0
- data/spec/models/paginated_employee_list_spec.rb +46 -0
- data/spec/models/paginated_employee_payroll_run_list_spec.rb +46 -0
- data/spec/models/paginated_employment_list_spec.rb +46 -0
- data/spec/models/paginated_location_list_spec.rb +46 -0
- data/spec/models/paginated_payroll_run_list_spec.rb +46 -0
- data/spec/models/paginated_team_list_spec.rb +46 -0
- data/spec/models/paginated_time_off_list_spec.rb +46 -0
- data/spec/models/pay_currency_enum_spec.rb +28 -0
- data/spec/models/pay_frequency_enum_spec.rb +28 -0
- data/spec/models/pay_period_enum_spec.rb +28 -0
- data/spec/models/payroll_run_spec.rb +70 -0
- data/spec/models/remote_data_spec.rb +40 -0
- data/spec/models/remote_key_for_regeneration_request_spec.rb +34 -0
- data/spec/models/remote_key_for_regeneration_spec.rb +34 -0
- data/spec/models/remote_key_spec.rb +40 -0
- data/spec/models/remote_response_spec.rb +58 -0
- data/spec/models/request_type_enum_spec.rb +28 -0
- data/spec/models/run_state_enum_spec.rb +28 -0
- data/spec/models/run_type_enum_spec.rb +28 -0
- data/spec/models/state_enum_spec.rb +28 -0
- data/spec/models/tax_spec.rb +58 -0
- data/spec/models/team_spec.rb +46 -0
- data/spec/models/time_off_spec.rb +82 -0
- data/spec/models/time_off_status_enum_spec.rb +28 -0
- data/spec/models/type_enum_spec.rb +28 -0
- data/spec/models/units_enum_spec.rb +28 -0
- data/spec/spec_helper.rb +111 -0
- data/test_ruby.rb +30 -0
- metadata +385 -0
data/docs/TimeOff.md
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# MergeHRISClient::TimeOff
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **id** | **String** | | [optional][readonly] |
|
|
8
|
+
| **remote_id** | **String** | The third-party API ID of the matching object. | [optional] |
|
|
9
|
+
| **employee** | **String** | The employee requesting time off. | [optional] |
|
|
10
|
+
| **approver** | **String** | The employee approving the time off request. | [optional] |
|
|
11
|
+
| **status** | [**TimeOffStatusEnum**](TimeOffStatusEnum.md) | The status of this time off request. | [optional] |
|
|
12
|
+
| **employee_note** | **String** | The employee note for this time off request. | [optional] |
|
|
13
|
+
| **units** | [**UnitsEnum**](UnitsEnum.md) | The unit of time requested. | [optional] |
|
|
14
|
+
| **amount** | **Float** | The number of time off units requested. | [optional] |
|
|
15
|
+
| **request_type** | [**RequestTypeEnum**](RequestTypeEnum.md) | The type of time off request. | [optional] |
|
|
16
|
+
| **remote_data** | [**Array<RemoteData>**](RemoteData.md) | | [optional][readonly] |
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
|
|
20
|
+
```ruby
|
|
21
|
+
require 'merge_hris_client'
|
|
22
|
+
|
|
23
|
+
instance = MergeHRISClient::TimeOff.new(
|
|
24
|
+
id: 91b2b905-e866-40c8-8be2-efe53827a0aa,
|
|
25
|
+
remote_id: 19202938,
|
|
26
|
+
employee: d2f972d0-2526-434b-9409-4c3b468e08f0,
|
|
27
|
+
approver: 9efbc633-3387-4306-aa55-e2c635e6bb4f,
|
|
28
|
+
status: APPROVED,
|
|
29
|
+
employee_note: Trip to Iowa. Miss those cornfields!,
|
|
30
|
+
units: DAYS,
|
|
31
|
+
amount: 13,
|
|
32
|
+
request_type: VACATION,
|
|
33
|
+
remote_data: [{"path":"/leave","data":["Varies by platform"]}]
|
|
34
|
+
)
|
|
35
|
+
```
|
|
36
|
+
|
data/docs/TimeOffApi.md
ADDED
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# MergeHRISClient::TimeOffApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.merge.dev/api/hris/v1*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**time_off_list**](TimeOffApi.md#time_off_list) | **GET** /time-off | |
|
|
8
|
+
| [**time_off_retrieve**](TimeOffApi.md#time_off_retrieve) | **GET** /time-off/{id} | |
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## time_off_list
|
|
12
|
+
|
|
13
|
+
> <PaginatedTimeOffList> time_off_list(x_account_token, opts)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
Returns a list of `TimeOff` objects.
|
|
18
|
+
|
|
19
|
+
### Examples
|
|
20
|
+
|
|
21
|
+
```ruby
|
|
22
|
+
require 'time'
|
|
23
|
+
require 'merge_hris_client'
|
|
24
|
+
# setup authorization
|
|
25
|
+
MergeHRISClient.configure do |config|
|
|
26
|
+
# Configure API key authorization: tokenAuth
|
|
27
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
|
28
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
29
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
api_instance = MergeHRISClient::TimeOffApi.new
|
|
33
|
+
x_account_token = 'x_account_token_example' # String | Token identifying the end user.
|
|
34
|
+
opts = {
|
|
35
|
+
approver_id: 'approver_id_example', # String | If provided, will only return time off for this approver.
|
|
36
|
+
created_after: Time.parse('2013-10-20T19:20:30+01:00'), # Time | If provided, will only return objects created after this datetime.
|
|
37
|
+
created_before: Time.parse('2013-10-20T19:20:30+01:00'), # Time | If provided, will only return objects created before this datetime.
|
|
38
|
+
cursor: 'cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw', # String | The pagination cursor value.
|
|
39
|
+
employee_id: 'employee_id_example', # String | If provided, will only return time off for this employee.
|
|
40
|
+
expand: 'approver', # String | Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
|
|
41
|
+
include_remote_data: true, # Boolean | Whether to include the original data Merge fetched from the third-party to produce these models.
|
|
42
|
+
modified_after: Time.parse('2013-10-20T19:20:30+01:00'), # Time | If provided, will only return objects modified after this datetime.
|
|
43
|
+
modified_before: Time.parse('2013-10-20T19:20:30+01:00'), # Time | If provided, will only return objects modified before this datetime.
|
|
44
|
+
page_size: 56, # Integer | Number of results to return per page.
|
|
45
|
+
remote_id: 'remote_id_example' # String | The API provider's ID for the given object.
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
begin
|
|
49
|
+
|
|
50
|
+
result = api_instance.time_off_list(x_account_token, opts)
|
|
51
|
+
p result
|
|
52
|
+
rescue MergeHRISClient::ApiError => e
|
|
53
|
+
puts "Error when calling TimeOffApi->time_off_list: #{e}"
|
|
54
|
+
end
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
#### Using the time_off_list_with_http_info variant
|
|
58
|
+
|
|
59
|
+
This returns an Array which contains the response data, status code and headers.
|
|
60
|
+
|
|
61
|
+
> <Array(<PaginatedTimeOffList>, Integer, Hash)> time_off_list_with_http_info(x_account_token, opts)
|
|
62
|
+
|
|
63
|
+
```ruby
|
|
64
|
+
begin
|
|
65
|
+
|
|
66
|
+
data, status_code, headers = api_instance.time_off_list_with_http_info(x_account_token, opts)
|
|
67
|
+
p status_code # => 2xx
|
|
68
|
+
p headers # => { ... }
|
|
69
|
+
p data # => <PaginatedTimeOffList>
|
|
70
|
+
rescue MergeHRISClient::ApiError => e
|
|
71
|
+
puts "Error when calling TimeOffApi->time_off_list_with_http_info: #{e}"
|
|
72
|
+
end
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Parameters
|
|
76
|
+
|
|
77
|
+
| Name | Type | Description | Notes |
|
|
78
|
+
| ---- | ---- | ----------- | ----- |
|
|
79
|
+
| **x_account_token** | **String** | Token identifying the end user. | |
|
|
80
|
+
| **approver_id** | **String** | If provided, will only return time off for this approver. | [optional] |
|
|
81
|
+
| **created_after** | **Time** | If provided, will only return objects created after this datetime. | [optional] |
|
|
82
|
+
| **created_before** | **Time** | If provided, will only return objects created before this datetime. | [optional] |
|
|
83
|
+
| **cursor** | **String** | The pagination cursor value. | [optional] |
|
|
84
|
+
| **employee_id** | **String** | If provided, will only return time off for this employee. | [optional] |
|
|
85
|
+
| **expand** | **String** | Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. | [optional] |
|
|
86
|
+
| **include_remote_data** | **Boolean** | Whether to include the original data Merge fetched from the third-party to produce these models. | [optional] |
|
|
87
|
+
| **modified_after** | **Time** | If provided, will only return objects modified after this datetime. | [optional] |
|
|
88
|
+
| **modified_before** | **Time** | If provided, will only return objects modified before this datetime. | [optional] |
|
|
89
|
+
| **page_size** | **Integer** | Number of results to return per page. | [optional] |
|
|
90
|
+
| **remote_id** | **String** | The API provider's ID for the given object. | [optional] |
|
|
91
|
+
|
|
92
|
+
### Return type
|
|
93
|
+
|
|
94
|
+
[**PaginatedTimeOffList**](PaginatedTimeOffList.md)
|
|
95
|
+
|
|
96
|
+
### Authorization
|
|
97
|
+
|
|
98
|
+
[tokenAuth](../README.md#tokenAuth)
|
|
99
|
+
|
|
100
|
+
### HTTP request headers
|
|
101
|
+
|
|
102
|
+
- **Content-Type**: Not defined
|
|
103
|
+
- **Accept**: application/json
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
## time_off_retrieve
|
|
107
|
+
|
|
108
|
+
> <TimeOff> time_off_retrieve(x_account_token, id, opts)
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
Returns an `TimeOff` object with the given `id`.
|
|
113
|
+
|
|
114
|
+
### Examples
|
|
115
|
+
|
|
116
|
+
```ruby
|
|
117
|
+
require 'time'
|
|
118
|
+
require 'merge_hris_client'
|
|
119
|
+
# setup authorization
|
|
120
|
+
MergeHRISClient.configure do |config|
|
|
121
|
+
# Configure API key authorization: tokenAuth
|
|
122
|
+
config.api_key['Authorization'] = 'YOUR API KEY'
|
|
123
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
124
|
+
# config.api_key_prefix['Authorization'] = 'Bearer'
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
api_instance = MergeHRISClient::TimeOffApi.new
|
|
128
|
+
x_account_token = 'x_account_token_example' # String | Token identifying the end user.
|
|
129
|
+
id = TODO # String |
|
|
130
|
+
opts = {
|
|
131
|
+
expand: 'approver', # String | Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
|
|
132
|
+
include_remote_data: true # Boolean | Whether to include the original data Merge fetched from the third-party to produce these models.
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
begin
|
|
136
|
+
|
|
137
|
+
result = api_instance.time_off_retrieve(x_account_token, id, opts)
|
|
138
|
+
p result
|
|
139
|
+
rescue MergeHRISClient::ApiError => e
|
|
140
|
+
puts "Error when calling TimeOffApi->time_off_retrieve: #{e}"
|
|
141
|
+
end
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
#### Using the time_off_retrieve_with_http_info variant
|
|
145
|
+
|
|
146
|
+
This returns an Array which contains the response data, status code and headers.
|
|
147
|
+
|
|
148
|
+
> <Array(<TimeOff>, Integer, Hash)> time_off_retrieve_with_http_info(x_account_token, id, opts)
|
|
149
|
+
|
|
150
|
+
```ruby
|
|
151
|
+
begin
|
|
152
|
+
|
|
153
|
+
data, status_code, headers = api_instance.time_off_retrieve_with_http_info(x_account_token, id, opts)
|
|
154
|
+
p status_code # => 2xx
|
|
155
|
+
p headers # => { ... }
|
|
156
|
+
p data # => <TimeOff>
|
|
157
|
+
rescue MergeHRISClient::ApiError => e
|
|
158
|
+
puts "Error when calling TimeOffApi->time_off_retrieve_with_http_info: #{e}"
|
|
159
|
+
end
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### Parameters
|
|
163
|
+
|
|
164
|
+
| Name | Type | Description | Notes |
|
|
165
|
+
| ---- | ---- | ----------- | ----- |
|
|
166
|
+
| **x_account_token** | **String** | Token identifying the end user. | |
|
|
167
|
+
| **id** | [**String**](.md) | | |
|
|
168
|
+
| **expand** | **String** | Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces. | [optional] |
|
|
169
|
+
| **include_remote_data** | **Boolean** | Whether to include the original data Merge fetched from the third-party to produce these models. | [optional] |
|
|
170
|
+
|
|
171
|
+
### Return type
|
|
172
|
+
|
|
173
|
+
[**TimeOff**](TimeOff.md)
|
|
174
|
+
|
|
175
|
+
### Authorization
|
|
176
|
+
|
|
177
|
+
[tokenAuth](../README.md#tokenAuth)
|
|
178
|
+
|
|
179
|
+
### HTTP request headers
|
|
180
|
+
|
|
181
|
+
- **Content-Type**: Not defined
|
|
182
|
+
- **Accept**: application/json
|
|
183
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# MergeHRISClient::TimeOffStatusEnum
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
|
|
8
|
+
## Example
|
|
9
|
+
|
|
10
|
+
```ruby
|
|
11
|
+
require 'merge_hris_client'
|
|
12
|
+
|
|
13
|
+
instance = MergeHRISClient::TimeOffStatusEnum.new()
|
|
14
|
+
```
|
|
15
|
+
|
data/docs/TypeEnum.md
ADDED
data/docs/UnitsEnum.md
ADDED
data/git_push.sh
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
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-pestore-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="merge-api"
|
|
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="merge-hris-ruby"
|
|
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'
|
|
58
|
+
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Merge HRIS API
|
|
3
|
+
|
|
4
|
+
#The unified API for building rich integrations with multiple HR Information System platforms.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Contact: hello@merge.dev
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 5.0.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
# Common files
|
|
14
|
+
require 'merge_hris_client/api_client'
|
|
15
|
+
require 'merge_hris_client/api_error'
|
|
16
|
+
require 'merge_hris_client/version'
|
|
17
|
+
require 'merge_hris_client/configuration'
|
|
18
|
+
|
|
19
|
+
# Models
|
|
20
|
+
require 'merge_hris_client/models/account_integration'
|
|
21
|
+
require 'merge_hris_client/models/account_token'
|
|
22
|
+
require 'merge_hris_client/models/available_actions'
|
|
23
|
+
require 'merge_hris_client/models/benefit'
|
|
24
|
+
require 'merge_hris_client/models/benefit_plan_type_enum'
|
|
25
|
+
require 'merge_hris_client/models/company'
|
|
26
|
+
require 'merge_hris_client/models/country_enum'
|
|
27
|
+
require 'merge_hris_client/models/data_passthrough'
|
|
28
|
+
require 'merge_hris_client/models/data_passthrough_request'
|
|
29
|
+
require 'merge_hris_client/models/deduction'
|
|
30
|
+
require 'merge_hris_client/models/earning'
|
|
31
|
+
require 'merge_hris_client/models/employee'
|
|
32
|
+
require 'merge_hris_client/models/employee_payroll_run'
|
|
33
|
+
require 'merge_hris_client/models/employment'
|
|
34
|
+
require 'merge_hris_client/models/employment_status_enum'
|
|
35
|
+
require 'merge_hris_client/models/employment_type_enum'
|
|
36
|
+
require 'merge_hris_client/models/end_user_details'
|
|
37
|
+
require 'merge_hris_client/models/end_user_details_request'
|
|
38
|
+
require 'merge_hris_client/models/ethnicity_enum'
|
|
39
|
+
require 'merge_hris_client/models/flsa_status_enum'
|
|
40
|
+
require 'merge_hris_client/models/gender_enum'
|
|
41
|
+
require 'merge_hris_client/models/generate_remote_key_request'
|
|
42
|
+
require 'merge_hris_client/models/link_token'
|
|
43
|
+
require 'merge_hris_client/models/location'
|
|
44
|
+
require 'merge_hris_client/models/marital_status_enum'
|
|
45
|
+
require 'merge_hris_client/models/method_enum'
|
|
46
|
+
require 'merge_hris_client/models/model_operation'
|
|
47
|
+
require 'merge_hris_client/models/paginated_benefit_list'
|
|
48
|
+
require 'merge_hris_client/models/paginated_company_list'
|
|
49
|
+
require 'merge_hris_client/models/paginated_employee_list'
|
|
50
|
+
require 'merge_hris_client/models/paginated_employee_payroll_run_list'
|
|
51
|
+
require 'merge_hris_client/models/paginated_employment_list'
|
|
52
|
+
require 'merge_hris_client/models/paginated_location_list'
|
|
53
|
+
require 'merge_hris_client/models/paginated_payroll_run_list'
|
|
54
|
+
require 'merge_hris_client/models/paginated_team_list'
|
|
55
|
+
require 'merge_hris_client/models/paginated_time_off_list'
|
|
56
|
+
require 'merge_hris_client/models/pay_currency_enum'
|
|
57
|
+
require 'merge_hris_client/models/pay_frequency_enum'
|
|
58
|
+
require 'merge_hris_client/models/pay_period_enum'
|
|
59
|
+
require 'merge_hris_client/models/payroll_run'
|
|
60
|
+
require 'merge_hris_client/models/remote_data'
|
|
61
|
+
require 'merge_hris_client/models/remote_key'
|
|
62
|
+
require 'merge_hris_client/models/remote_key_for_regeneration_request'
|
|
63
|
+
require 'merge_hris_client/models/remote_response'
|
|
64
|
+
require 'merge_hris_client/models/request_type_enum'
|
|
65
|
+
require 'merge_hris_client/models/run_state_enum'
|
|
66
|
+
require 'merge_hris_client/models/run_type_enum'
|
|
67
|
+
require 'merge_hris_client/models/state_enum'
|
|
68
|
+
require 'merge_hris_client/models/sync_status'
|
|
69
|
+
require 'merge_hris_client/models/tax'
|
|
70
|
+
require 'merge_hris_client/models/team'
|
|
71
|
+
require 'merge_hris_client/models/time_off'
|
|
72
|
+
require 'merge_hris_client/models/time_off_status_enum'
|
|
73
|
+
require 'merge_hris_client/models/type_enum'
|
|
74
|
+
require 'merge_hris_client/models/units_enum'
|
|
75
|
+
|
|
76
|
+
# APIs
|
|
77
|
+
require 'merge_hris_client/api/account_token_api'
|
|
78
|
+
require 'merge_hris_client/api/available_actions_api'
|
|
79
|
+
require 'merge_hris_client/api/benefits_api'
|
|
80
|
+
require 'merge_hris_client/api/companies_api'
|
|
81
|
+
require 'merge_hris_client/api/employee_payroll_runs_api'
|
|
82
|
+
require 'merge_hris_client/api/employees_api'
|
|
83
|
+
require 'merge_hris_client/api/employments_api'
|
|
84
|
+
require 'merge_hris_client/api/generate_key_api'
|
|
85
|
+
require 'merge_hris_client/api/link_token_api'
|
|
86
|
+
require 'merge_hris_client/api/locations_api'
|
|
87
|
+
require 'merge_hris_client/api/passthrough_api'
|
|
88
|
+
require 'merge_hris_client/api/payroll_runs_api'
|
|
89
|
+
require 'merge_hris_client/api/regenerate_key_api'
|
|
90
|
+
require 'merge_hris_client/api/sync_status_api'
|
|
91
|
+
require 'merge_hris_client/api/teams_api'
|
|
92
|
+
require 'merge_hris_client/api/time_off_api'
|
|
93
|
+
|
|
94
|
+
module MergeHRISClient
|
|
95
|
+
class << self
|
|
96
|
+
# Customize default settings for the SDK using block.
|
|
97
|
+
# MergeHRISClient.configure do |config|
|
|
98
|
+
# config.username = "xxx"
|
|
99
|
+
# config.password = "xxx"
|
|
100
|
+
# end
|
|
101
|
+
# If no block given, return the default Configuration object.
|
|
102
|
+
def configure
|
|
103
|
+
if block_given?
|
|
104
|
+
yield(Configuration.default)
|
|
105
|
+
else
|
|
106
|
+
Configuration.default
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
end
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Merge HRIS API
|
|
3
|
+
|
|
4
|
+
#The unified API for building rich integrations with multiple HR Information System platforms.
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0
|
|
7
|
+
Contact: hello@merge.dev
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 5.0.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module MergeHRISClient
|
|
16
|
+
class AccountTokenApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Returns the account token for the end user with the provided public token.
|
|
23
|
+
# @param public_token [String]
|
|
24
|
+
# @param [Hash] opts the optional parameters
|
|
25
|
+
# @return [AccountToken]
|
|
26
|
+
def account_token_retrieve(public_token, opts = {})
|
|
27
|
+
data, _status_code, _headers = account_token_retrieve_with_http_info(public_token, opts)
|
|
28
|
+
data
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
# Returns the account token for the end user with the provided public token.
|
|
32
|
+
# @param public_token [String]
|
|
33
|
+
# @param [Hash] opts the optional parameters
|
|
34
|
+
# @return [Array<(AccountToken, Integer, Hash)>] AccountToken data, response status code and response headers
|
|
35
|
+
def account_token_retrieve_with_http_info(public_token, opts = {})
|
|
36
|
+
if @api_client.config.debugging
|
|
37
|
+
@api_client.config.logger.debug 'Calling API: AccountTokenApi.account_token_retrieve ...'
|
|
38
|
+
end
|
|
39
|
+
# verify the required parameter 'public_token' is set
|
|
40
|
+
if @api_client.config.client_side_validation && public_token.nil?
|
|
41
|
+
fail ArgumentError, "Missing the required parameter 'public_token' when calling AccountTokenApi.account_token_retrieve"
|
|
42
|
+
end
|
|
43
|
+
# resource path
|
|
44
|
+
local_var_path = '/account-token/{public_token}'.sub('{' + 'public_token' + '}', CGI.escape(public_token.to_s))
|
|
45
|
+
|
|
46
|
+
# query parameters
|
|
47
|
+
query_params = opts[:query_params] || {}
|
|
48
|
+
|
|
49
|
+
# header parameters
|
|
50
|
+
header_params = opts[:header_params] || {}
|
|
51
|
+
# HTTP header 'Accept' (if needed)
|
|
52
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
53
|
+
|
|
54
|
+
# form parameters
|
|
55
|
+
form_params = opts[:form_params] || {}
|
|
56
|
+
|
|
57
|
+
# http body (model)
|
|
58
|
+
post_body = opts[:debug_body]
|
|
59
|
+
|
|
60
|
+
# return_type
|
|
61
|
+
return_type = opts[:debug_return_type] || 'AccountToken'
|
|
62
|
+
|
|
63
|
+
# auth_names
|
|
64
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
|
65
|
+
|
|
66
|
+
new_options = opts.merge(
|
|
67
|
+
:operation => :"AccountTokenApi.account_token_retrieve",
|
|
68
|
+
:header_params => header_params,
|
|
69
|
+
:query_params => query_params,
|
|
70
|
+
:form_params => form_params,
|
|
71
|
+
:body => post_body,
|
|
72
|
+
:auth_names => auth_names,
|
|
73
|
+
:return_type => return_type
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
77
|
+
if @api_client.config.debugging
|
|
78
|
+
@api_client.config.logger.debug "API called: AccountTokenApi#account_token_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
79
|
+
end
|
|
80
|
+
return data, status_code, headers
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|