merge_hris_client 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +21 -2
- data/docs/AccountToken.md +3 -1
- data/docs/AvailableActions.md +1 -1
- data/docs/BenefitRequest.md +28 -0
- data/docs/BenefitsApi.md +78 -0
- data/docs/DeleteAccountApi.md +77 -0
- data/docs/Employee.md +8 -6
- data/docs/EmployeeRequest.md +62 -0
- data/docs/EmployeesApi.md +83 -1
- data/docs/EmploymentRequest.md +34 -0
- data/docs/EmploymentsApi.md +78 -0
- data/docs/EndUserDetailsRequest.md +1 -1
- data/docs/Issue.md +30 -0
- data/docs/IssueStatusEnum.md +15 -0
- data/docs/IssuesApi.md +167 -0
- data/docs/Location.md +1 -1
- data/docs/ModelOperation.md +3 -1
- data/docs/PaginatedIssueList.md +22 -0
- data/docs/PaginatedSyncStatusList.md +22 -0
- data/docs/PaginatedTimeOffBalanceList.md +22 -0
- data/docs/RemoteDataRequest.md +20 -0
- data/docs/SyncStatus.md +1 -1
- data/docs/SyncStatusApi.md +89 -11
- data/docs/SyncStatusStatusEnum.md +15 -0
- data/docs/Team.md +2 -0
- data/docs/TeamsApi.md +2 -0
- data/docs/TimeOff.md +4 -0
- data/docs/TimeOffBalance.md +28 -0
- data/docs/TimeOffBalanceApi.md +181 -0
- data/lib/merge_hris_client.rb +15 -4
- data/lib/merge_hris_client/api/account_token_api.rb +1 -1
- data/lib/merge_hris_client/api/available_actions_api.rb +1 -1
- data/lib/merge_hris_client/api/benefits_api.rb +70 -1
- data/lib/merge_hris_client/api/companies_api.rb +1 -1
- data/lib/merge_hris_client/api/delete_account_api.rb +82 -0
- data/lib/merge_hris_client/api/employee_payroll_runs_api.rb +1 -1
- data/lib/merge_hris_client/api/employees_api.rb +76 -1
- data/lib/merge_hris_client/api/employments_api.rb +70 -1
- data/lib/merge_hris_client/api/generate_key_api.rb +1 -1
- data/lib/merge_hris_client/api/issues_api.rb +169 -0
- data/lib/merge_hris_client/api/link_token_api.rb +1 -1
- data/lib/merge_hris_client/api/locations_api.rb +1 -1
- data/lib/merge_hris_client/api/passthrough_api.rb +1 -1
- data/lib/merge_hris_client/api/payroll_runs_api.rb +1 -1
- data/lib/merge_hris_client/api/regenerate_key_api.rb +1 -1
- data/lib/merge_hris_client/api/sync_status_api.rb +79 -11
- data/lib/merge_hris_client/api/teams_api.rb +4 -1
- data/lib/merge_hris_client/api/time_off_api.rb +1 -1
- data/lib/merge_hris_client/api/time_off_balance_api.rb +196 -0
- data/lib/merge_hris_client/api_client.rb +2 -2
- data/lib/merge_hris_client/api_error.rb +1 -1
- data/lib/merge_hris_client/configuration.rb +1 -1
- data/lib/merge_hris_client/models/account_integration.rb +1 -1
- data/lib/merge_hris_client/models/account_token.rb +19 -5
- data/lib/merge_hris_client/models/available_actions.rb +1 -1
- data/lib/merge_hris_client/models/benefit.rb +1 -1
- data/lib/merge_hris_client/models/benefit_plan_type_enum.rb +1 -1
- data/lib/merge_hris_client/models/benefit_request.rb +276 -0
- data/lib/merge_hris_client/models/company.rb +1 -1
- data/lib/merge_hris_client/models/country_enum.rb +1 -1
- data/lib/merge_hris_client/models/data_passthrough_request.rb +2 -1
- data/lib/merge_hris_client/models/deduction.rb +1 -1
- data/lib/merge_hris_client/models/earning.rb +1 -1
- data/lib/merge_hris_client/models/employee.rb +32 -20
- data/lib/merge_hris_client/models/employee_payroll_run.rb +1 -1
- data/lib/merge_hris_client/models/employee_request.rb +523 -0
- data/lib/merge_hris_client/models/employment.rb +1 -1
- data/lib/merge_hris_client/models/employment_request.rb +309 -0
- data/lib/merge_hris_client/models/employment_status_enum.rb +1 -1
- data/lib/merge_hris_client/models/employment_type_enum.rb +1 -1
- data/lib/merge_hris_client/models/end_user_details_request.rb +2 -6
- data/lib/merge_hris_client/models/ethnicity_enum.rb +1 -1
- data/lib/merge_hris_client/models/flsa_status_enum.rb +1 -1
- data/lib/merge_hris_client/models/gender_enum.rb +1 -1
- data/lib/merge_hris_client/models/generate_remote_key_request.rb +1 -1
- data/lib/merge_hris_client/models/issue.rb +281 -0
- data/lib/merge_hris_client/models/issue_status_enum.rb +36 -0
- data/lib/merge_hris_client/models/link_token.rb +1 -1
- data/lib/merge_hris_client/models/location.rb +4 -4
- data/lib/merge_hris_client/models/method_enum.rb +1 -1
- data/lib/merge_hris_client/models/model_operation.rb +21 -5
- data/lib/merge_hris_client/models/paginated_benefit_list.rb +1 -1
- data/lib/merge_hris_client/models/paginated_company_list.rb +1 -1
- data/lib/merge_hris_client/models/paginated_employee_list.rb +1 -1
- data/lib/merge_hris_client/models/paginated_employee_payroll_run_list.rb +1 -1
- data/lib/merge_hris_client/models/paginated_employment_list.rb +1 -1
- data/lib/merge_hris_client/models/paginated_issue_list.rb +240 -0
- data/lib/merge_hris_client/models/paginated_location_list.rb +1 -1
- data/lib/merge_hris_client/models/paginated_payroll_run_list.rb +1 -1
- data/lib/merge_hris_client/models/paginated_sync_status_list.rb +240 -0
- data/lib/merge_hris_client/models/paginated_team_list.rb +1 -1
- data/lib/merge_hris_client/models/paginated_time_off_balance_list.rb +240 -0
- data/lib/merge_hris_client/models/paginated_time_off_list.rb +1 -1
- data/lib/merge_hris_client/models/pay_currency_enum.rb +1 -1
- data/lib/merge_hris_client/models/pay_frequency_enum.rb +1 -1
- data/lib/merge_hris_client/models/pay_period_enum.rb +1 -1
- data/lib/merge_hris_client/models/payroll_run.rb +1 -1
- data/lib/merge_hris_client/models/remote_data.rb +1 -1
- data/lib/merge_hris_client/models/remote_data_request.rb +234 -0
- data/lib/merge_hris_client/models/remote_key.rb +1 -1
- data/lib/merge_hris_client/models/remote_key_for_regeneration_request.rb +1 -1
- data/lib/merge_hris_client/models/remote_response.rb +1 -1
- data/lib/merge_hris_client/models/request_type_enum.rb +1 -1
- data/lib/merge_hris_client/models/run_state_enum.rb +1 -1
- data/lib/merge_hris_client/models/run_type_enum.rb +1 -1
- data/lib/merge_hris_client/models/sync_status.rb +2 -2
- data/lib/merge_hris_client/models/sync_status_status_enum.rb +37 -0
- data/lib/merge_hris_client/models/tax.rb +1 -1
- data/lib/merge_hris_client/models/team.rb +13 -2
- data/lib/merge_hris_client/models/time_off.rb +24 -2
- data/lib/merge_hris_client/models/time_off_balance.rb +275 -0
- data/lib/merge_hris_client/models/time_off_status_enum.rb +1 -1
- data/lib/merge_hris_client/models/type_enum.rb +1 -1
- data/lib/merge_hris_client/models/units_enum.rb +1 -1
- data/lib/merge_hris_client/version.rb +2 -2
- data/merge_hris_client-1.0.1.gem +0 -0
- data/merge_hris_client.gemspec +1 -1
- data/spec/api/delete_account_api_spec.rb +46 -0
- data/spec/api/generate_key_api_spec.rb +46 -0
- data/spec/api/issues_api_spec.rb +65 -0
- data/spec/api/sync_status_api_spec.rb +59 -0
- data/spec/api/time_off_balance_api_spec.rb +70 -0
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +1 -1
- data/spec/models/benefit_request_spec.rb +64 -0
- data/spec/models/employee_request_spec.rb +160 -0
- data/spec/models/employment_request_spec.rb +82 -0
- data/spec/models/generate_remote_key_request_spec.rb +34 -0
- data/spec/models/issue_spec.rb +70 -0
- data/spec/models/issue_status_enum_spec.rb +28 -0
- data/spec/models/paginated_issue_list_spec.rb +46 -0
- data/spec/models/paginated_sync_status_list_spec.rb +46 -0
- data/spec/models/paginated_time_off_balance_list_spec.rb +46 -0
- data/spec/models/remote_data_request_spec.rb +40 -0
- data/spec/models/sync_status_spec.rb +64 -0
- data/spec/models/sync_status_status_enum_spec.rb +28 -0
- data/spec/models/time_off_balance_spec.rb +64 -0
- data/spec/spec_helper.rb +1 -1
- data/test_ruby.rb +14 -11
- metadata +67 -2
@@ -0,0 +1,169 @@
|
|
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.1.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module MergeHRISClient
|
16
|
+
class IssuesApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Gets issues.
|
23
|
+
# @param [Hash] opts the optional parameters
|
24
|
+
# @option opts [String] :account_token account_token
|
25
|
+
# @option opts [Integer] :cursor The pagination cursor value.
|
26
|
+
# @option opts [String] :end_date If included, will only include issues whose most recent action occurred before this time
|
27
|
+
# @option opts [String] :end_user_organization_name end_user_organization_name
|
28
|
+
# @option opts [String] :include_muted If True, will include muted issues
|
29
|
+
# @option opts [String] :integration_name integration_name
|
30
|
+
# @option opts [Integer] :page_size Number of results to return per page.
|
31
|
+
# @option opts [String] :start_date If included, will only include issues whose most recent action occurred after this time
|
32
|
+
# @option opts [String] :status status
|
33
|
+
# @return [PaginatedIssueList]
|
34
|
+
def issues_list(opts = {})
|
35
|
+
data, _status_code, _headers = issues_list_with_http_info(opts)
|
36
|
+
data
|
37
|
+
end
|
38
|
+
|
39
|
+
# Gets issues.
|
40
|
+
# @param [Hash] opts the optional parameters
|
41
|
+
# @option opts [String] :account_token account_token
|
42
|
+
# @option opts [Integer] :cursor The pagination cursor value.
|
43
|
+
# @option opts [String] :end_date If included, will only include issues whose most recent action occurred before this time
|
44
|
+
# @option opts [String] :end_user_organization_name end_user_organization_name
|
45
|
+
# @option opts [String] :include_muted If True, will include muted issues
|
46
|
+
# @option opts [String] :integration_name integration_name
|
47
|
+
# @option opts [Integer] :page_size Number of results to return per page.
|
48
|
+
# @option opts [String] :start_date If included, will only include issues whose most recent action occurred after this time
|
49
|
+
# @option opts [String] :status status
|
50
|
+
# @return [Array<(PaginatedIssueList, Integer, Hash)>] PaginatedIssueList data, response status code and response headers
|
51
|
+
def issues_list_with_http_info(opts = {})
|
52
|
+
if @api_client.config.debugging
|
53
|
+
@api_client.config.logger.debug 'Calling API: IssuesApi.issues_list ...'
|
54
|
+
end
|
55
|
+
allowable_values = ["ONGOING", "RESOLVED"]
|
56
|
+
if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
|
57
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
|
58
|
+
end
|
59
|
+
# resource path
|
60
|
+
local_var_path = '/issues'
|
61
|
+
|
62
|
+
# query parameters
|
63
|
+
query_params = opts[:query_params] || {}
|
64
|
+
query_params[:'account_token'] = opts[:'account_token'] if !opts[:'account_token'].nil?
|
65
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
66
|
+
query_params[:'end_date'] = opts[:'end_date'] if !opts[:'end_date'].nil?
|
67
|
+
query_params[:'end_user_organization_name'] = opts[:'end_user_organization_name'] if !opts[:'end_user_organization_name'].nil?
|
68
|
+
query_params[:'include_muted'] = opts[:'include_muted'] if !opts[:'include_muted'].nil?
|
69
|
+
query_params[:'integration_name'] = opts[:'integration_name'] if !opts[:'integration_name'].nil?
|
70
|
+
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
71
|
+
query_params[:'start_date'] = opts[:'start_date'] if !opts[:'start_date'].nil?
|
72
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
73
|
+
|
74
|
+
# header parameters
|
75
|
+
header_params = opts[:header_params] || {}
|
76
|
+
# HTTP header 'Accept' (if needed)
|
77
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
78
|
+
|
79
|
+
# form parameters
|
80
|
+
form_params = opts[:form_params] || {}
|
81
|
+
|
82
|
+
# http body (model)
|
83
|
+
post_body = opts[:debug_body]
|
84
|
+
|
85
|
+
# return_type
|
86
|
+
return_type = opts[:debug_return_type] || 'PaginatedIssueList'
|
87
|
+
|
88
|
+
# auth_names
|
89
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
90
|
+
|
91
|
+
new_options = opts.merge(
|
92
|
+
:operation => :"IssuesApi.issues_list",
|
93
|
+
:header_params => header_params,
|
94
|
+
:query_params => query_params,
|
95
|
+
:form_params => form_params,
|
96
|
+
:body => post_body,
|
97
|
+
:auth_names => auth_names,
|
98
|
+
:return_type => return_type
|
99
|
+
)
|
100
|
+
|
101
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
102
|
+
if @api_client.config.debugging
|
103
|
+
@api_client.config.logger.debug "API called: IssuesApi#issues_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
104
|
+
end
|
105
|
+
return data, status_code, headers
|
106
|
+
end
|
107
|
+
|
108
|
+
# Get a specific issue.
|
109
|
+
# @param id [String]
|
110
|
+
# @param [Hash] opts the optional parameters
|
111
|
+
# @return [Issue]
|
112
|
+
def issues_retrieve(id, opts = {})
|
113
|
+
data, _status_code, _headers = issues_retrieve_with_http_info(id, opts)
|
114
|
+
data
|
115
|
+
end
|
116
|
+
|
117
|
+
# Get a specific issue.
|
118
|
+
# @param id [String]
|
119
|
+
# @param [Hash] opts the optional parameters
|
120
|
+
# @return [Array<(Issue, Integer, Hash)>] Issue data, response status code and response headers
|
121
|
+
def issues_retrieve_with_http_info(id, opts = {})
|
122
|
+
if @api_client.config.debugging
|
123
|
+
@api_client.config.logger.debug 'Calling API: IssuesApi.issues_retrieve ...'
|
124
|
+
end
|
125
|
+
# verify the required parameter 'id' is set
|
126
|
+
if @api_client.config.client_side_validation && id.nil?
|
127
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling IssuesApi.issues_retrieve"
|
128
|
+
end
|
129
|
+
# resource path
|
130
|
+
local_var_path = '/issues/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
131
|
+
|
132
|
+
# query parameters
|
133
|
+
query_params = opts[:query_params] || {}
|
134
|
+
|
135
|
+
# header parameters
|
136
|
+
header_params = opts[:header_params] || {}
|
137
|
+
# HTTP header 'Accept' (if needed)
|
138
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
139
|
+
|
140
|
+
# form parameters
|
141
|
+
form_params = opts[:form_params] || {}
|
142
|
+
|
143
|
+
# http body (model)
|
144
|
+
post_body = opts[:debug_body]
|
145
|
+
|
146
|
+
# return_type
|
147
|
+
return_type = opts[:debug_return_type] || 'Issue'
|
148
|
+
|
149
|
+
# auth_names
|
150
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
151
|
+
|
152
|
+
new_options = opts.merge(
|
153
|
+
:operation => :"IssuesApi.issues_retrieve",
|
154
|
+
:header_params => header_params,
|
155
|
+
:query_params => query_params,
|
156
|
+
:form_params => form_params,
|
157
|
+
:body => post_body,
|
158
|
+
:auth_names => auth_names,
|
159
|
+
:return_type => return_type
|
160
|
+
)
|
161
|
+
|
162
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
163
|
+
if @api_client.config.debugging
|
164
|
+
@api_client.config.logger.debug "API called: IssuesApi#issues_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
165
|
+
end
|
166
|
+
return data, status_code, headers
|
167
|
+
end
|
168
|
+
end
|
169
|
+
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0
|
7
7
|
Contact: hello@merge.dev
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.1.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -22,29 +22,35 @@ module MergeHRISClient
|
|
22
22
|
# Get syncing status.
|
23
23
|
# @param x_account_token [String] Token identifying the end user.
|
24
24
|
# @param [Hash] opts the optional parameters
|
25
|
-
# @
|
26
|
-
|
27
|
-
|
25
|
+
# @option opts [Integer] :cursor The pagination cursor value.
|
26
|
+
# @option opts [Integer] :page_size Number of results to return per page.
|
27
|
+
# @return [PaginatedSyncStatusList]
|
28
|
+
def sync_status_list(x_account_token, opts = {})
|
29
|
+
data, _status_code, _headers = sync_status_list_with_http_info(x_account_token, opts)
|
28
30
|
data
|
29
31
|
end
|
30
32
|
|
31
33
|
# Get syncing status.
|
32
34
|
# @param x_account_token [String] Token identifying the end user.
|
33
35
|
# @param [Hash] opts the optional parameters
|
34
|
-
# @
|
35
|
-
|
36
|
+
# @option opts [Integer] :cursor The pagination cursor value.
|
37
|
+
# @option opts [Integer] :page_size Number of results to return per page.
|
38
|
+
# @return [Array<(PaginatedSyncStatusList, Integer, Hash)>] PaginatedSyncStatusList data, response status code and response headers
|
39
|
+
def sync_status_list_with_http_info(x_account_token, opts = {})
|
36
40
|
if @api_client.config.debugging
|
37
|
-
@api_client.config.logger.debug 'Calling API: SyncStatusApi.
|
41
|
+
@api_client.config.logger.debug 'Calling API: SyncStatusApi.sync_status_list ...'
|
38
42
|
end
|
39
43
|
# verify the required parameter 'x_account_token' is set
|
40
44
|
if @api_client.config.client_side_validation && x_account_token.nil?
|
41
|
-
fail ArgumentError, "Missing the required parameter 'x_account_token' when calling SyncStatusApi.
|
45
|
+
fail ArgumentError, "Missing the required parameter 'x_account_token' when calling SyncStatusApi.sync_status_list"
|
42
46
|
end
|
43
47
|
# resource path
|
44
48
|
local_var_path = '/sync-status'
|
45
49
|
|
46
50
|
# query parameters
|
47
51
|
query_params = opts[:query_params] || {}
|
52
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
53
|
+
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
48
54
|
|
49
55
|
# header parameters
|
50
56
|
header_params = opts[:header_params] || {}
|
@@ -59,13 +65,13 @@ module MergeHRISClient
|
|
59
65
|
post_body = opts[:debug_body]
|
60
66
|
|
61
67
|
# return_type
|
62
|
-
return_type = opts[:debug_return_type] || '
|
68
|
+
return_type = opts[:debug_return_type] || 'PaginatedSyncStatusList'
|
63
69
|
|
64
70
|
# auth_names
|
65
71
|
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
66
72
|
|
67
73
|
new_options = opts.merge(
|
68
|
-
:operation => :"SyncStatusApi.
|
74
|
+
:operation => :"SyncStatusApi.sync_status_list",
|
69
75
|
:header_params => header_params,
|
70
76
|
:query_params => query_params,
|
71
77
|
:form_params => form_params,
|
@@ -76,7 +82,69 @@ module MergeHRISClient
|
|
76
82
|
|
77
83
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
78
84
|
if @api_client.config.debugging
|
79
|
-
@api_client.config.logger.debug "API called: SyncStatusApi#
|
85
|
+
@api_client.config.logger.debug "API called: SyncStatusApi#sync_status_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
86
|
+
end
|
87
|
+
return data, status_code, headers
|
88
|
+
end
|
89
|
+
|
90
|
+
# Force resync of all models.
|
91
|
+
# @param x_account_token [String] Token identifying the end user.
|
92
|
+
# @param [Hash] opts the optional parameters
|
93
|
+
# @return [SyncStatus]
|
94
|
+
def sync_status_resync_create(x_account_token, opts = {})
|
95
|
+
data, _status_code, _headers = sync_status_resync_create_with_http_info(x_account_token, opts)
|
96
|
+
data
|
97
|
+
end
|
98
|
+
|
99
|
+
# Force resync of all models.
|
100
|
+
# @param x_account_token [String] Token identifying the end user.
|
101
|
+
# @param [Hash] opts the optional parameters
|
102
|
+
# @return [Array<(SyncStatus, Integer, Hash)>] SyncStatus data, response status code and response headers
|
103
|
+
def sync_status_resync_create_with_http_info(x_account_token, opts = {})
|
104
|
+
if @api_client.config.debugging
|
105
|
+
@api_client.config.logger.debug 'Calling API: SyncStatusApi.sync_status_resync_create ...'
|
106
|
+
end
|
107
|
+
# verify the required parameter 'x_account_token' is set
|
108
|
+
if @api_client.config.client_side_validation && x_account_token.nil?
|
109
|
+
fail ArgumentError, "Missing the required parameter 'x_account_token' when calling SyncStatusApi.sync_status_resync_create"
|
110
|
+
end
|
111
|
+
# resource path
|
112
|
+
local_var_path = '/sync-status/resync'
|
113
|
+
|
114
|
+
# query parameters
|
115
|
+
query_params = opts[:query_params] || {}
|
116
|
+
|
117
|
+
# header parameters
|
118
|
+
header_params = opts[:header_params] || {}
|
119
|
+
# HTTP header 'Accept' (if needed)
|
120
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
121
|
+
header_params[:'X-Account-Token'] = x_account_token
|
122
|
+
|
123
|
+
# form parameters
|
124
|
+
form_params = opts[:form_params] || {}
|
125
|
+
|
126
|
+
# http body (model)
|
127
|
+
post_body = opts[:debug_body]
|
128
|
+
|
129
|
+
# return_type
|
130
|
+
return_type = opts[:debug_return_type] || 'SyncStatus'
|
131
|
+
|
132
|
+
# auth_names
|
133
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
134
|
+
|
135
|
+
new_options = opts.merge(
|
136
|
+
:operation => :"SyncStatusApi.sync_status_resync_create",
|
137
|
+
:header_params => header_params,
|
138
|
+
:query_params => query_params,
|
139
|
+
:form_params => form_params,
|
140
|
+
:body => post_body,
|
141
|
+
:auth_names => auth_names,
|
142
|
+
:return_type => return_type
|
143
|
+
)
|
144
|
+
|
145
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
146
|
+
if @api_client.config.debugging
|
147
|
+
@api_client.config.logger.debug "API called: SyncStatusApi#sync_status_resync_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
80
148
|
end
|
81
149
|
return data, status_code, headers
|
82
150
|
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: 1.0
|
7
7
|
Contact: hello@merge.dev
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.1.1
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -29,6 +29,7 @@ module MergeHRISClient
|
|
29
29
|
# @option opts [Time] :modified_after If provided, will only return objects modified after this datetime.
|
30
30
|
# @option opts [Time] :modified_before If provided, will only return objects modified before this datetime.
|
31
31
|
# @option opts [Integer] :page_size Number of results to return per page.
|
32
|
+
# @option opts [String] :parent_team_id If provided, will only return teams with this parent team.
|
32
33
|
# @option opts [String] :remote_id The API provider's ID for the given object.
|
33
34
|
# @return [PaginatedTeamList]
|
34
35
|
def teams_list(x_account_token, opts = {})
|
@@ -46,6 +47,7 @@ module MergeHRISClient
|
|
46
47
|
# @option opts [Time] :modified_after If provided, will only return objects modified after this datetime.
|
47
48
|
# @option opts [Time] :modified_before If provided, will only return objects modified before this datetime.
|
48
49
|
# @option opts [Integer] :page_size Number of results to return per page.
|
50
|
+
# @option opts [String] :parent_team_id If provided, will only return teams with this parent team.
|
49
51
|
# @option opts [String] :remote_id The API provider's ID for the given object.
|
50
52
|
# @return [Array<(PaginatedTeamList, Integer, Hash)>] PaginatedTeamList data, response status code and response headers
|
51
53
|
def teams_list_with_http_info(x_account_token, opts = {})
|
@@ -68,6 +70,7 @@ module MergeHRISClient
|
|
68
70
|
query_params[:'modified_after'] = opts[:'modified_after'] if !opts[:'modified_after'].nil?
|
69
71
|
query_params[:'modified_before'] = opts[:'modified_before'] if !opts[:'modified_before'].nil?
|
70
72
|
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
73
|
+
query_params[:'parent_team_id'] = opts[:'parent_team_id'] if !opts[:'parent_team_id'].nil?
|
71
74
|
query_params[:'remote_id'] = opts[:'remote_id'] if !opts[:'remote_id'].nil?
|
72
75
|
|
73
76
|
# header parameters
|
@@ -0,0 +1,196 @@
|
|
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.1.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module MergeHRISClient
|
16
|
+
class TimeOffBalanceApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Returns a list of `TimeOffBalance` objects.
|
23
|
+
# @param x_account_token [String] Token identifying the end user.
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @option opts [Time] :created_after If provided, will only return objects created after this datetime.
|
26
|
+
# @option opts [Time] :created_before If provided, will only return objects created before this datetime.
|
27
|
+
# @option opts [String] :cursor The pagination cursor value.
|
28
|
+
# @option opts [String] :employee_id If provided, will only return time off balances for this employee.
|
29
|
+
# @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
|
30
|
+
# @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
|
31
|
+
# @option opts [Time] :modified_after If provided, will only return objects modified after this datetime.
|
32
|
+
# @option opts [Time] :modified_before If provided, will only return objects modified before this datetime.
|
33
|
+
# @option opts [Integer] :page_size Number of results to return per page.
|
34
|
+
# @option opts [String] :remote_id The API provider's ID for the given object.
|
35
|
+
# @return [PaginatedTimeOffBalanceList]
|
36
|
+
def time_off_balance_list(x_account_token, opts = {})
|
37
|
+
data, _status_code, _headers = time_off_balance_list_with_http_info(x_account_token, opts)
|
38
|
+
data
|
39
|
+
end
|
40
|
+
|
41
|
+
# Returns a list of `TimeOffBalance` objects.
|
42
|
+
# @param x_account_token [String] Token identifying the end user.
|
43
|
+
# @param [Hash] opts the optional parameters
|
44
|
+
# @option opts [Time] :created_after If provided, will only return objects created after this datetime.
|
45
|
+
# @option opts [Time] :created_before If provided, will only return objects created before this datetime.
|
46
|
+
# @option opts [String] :cursor The pagination cursor value.
|
47
|
+
# @option opts [String] :employee_id If provided, will only return time off balances for this employee.
|
48
|
+
# @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
|
49
|
+
# @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
|
50
|
+
# @option opts [Time] :modified_after If provided, will only return objects modified after this datetime.
|
51
|
+
# @option opts [Time] :modified_before If provided, will only return objects modified before this datetime.
|
52
|
+
# @option opts [Integer] :page_size Number of results to return per page.
|
53
|
+
# @option opts [String] :remote_id The API provider's ID for the given object.
|
54
|
+
# @return [Array<(PaginatedTimeOffBalanceList, Integer, Hash)>] PaginatedTimeOffBalanceList data, response status code and response headers
|
55
|
+
def time_off_balance_list_with_http_info(x_account_token, opts = {})
|
56
|
+
if @api_client.config.debugging
|
57
|
+
@api_client.config.logger.debug 'Calling API: TimeOffBalanceApi.time_off_balance_list ...'
|
58
|
+
end
|
59
|
+
# verify the required parameter 'x_account_token' is set
|
60
|
+
if @api_client.config.client_side_validation && x_account_token.nil?
|
61
|
+
fail ArgumentError, "Missing the required parameter 'x_account_token' when calling TimeOffBalanceApi.time_off_balance_list"
|
62
|
+
end
|
63
|
+
allowable_values = ["employee"]
|
64
|
+
if @api_client.config.client_side_validation && opts[:'expand'] && !allowable_values.include?(opts[:'expand'])
|
65
|
+
fail ArgumentError, "invalid value for \"expand\", must be one of #{allowable_values}"
|
66
|
+
end
|
67
|
+
# resource path
|
68
|
+
local_var_path = '/time-off-balance'
|
69
|
+
|
70
|
+
# query parameters
|
71
|
+
query_params = opts[:query_params] || {}
|
72
|
+
query_params[:'created_after'] = opts[:'created_after'] if !opts[:'created_after'].nil?
|
73
|
+
query_params[:'created_before'] = opts[:'created_before'] if !opts[:'created_before'].nil?
|
74
|
+
query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
|
75
|
+
query_params[:'employee_id'] = opts[:'employee_id'] if !opts[:'employee_id'].nil?
|
76
|
+
query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].nil?
|
77
|
+
query_params[:'include_remote_data'] = opts[:'include_remote_data'] if !opts[:'include_remote_data'].nil?
|
78
|
+
query_params[:'modified_after'] = opts[:'modified_after'] if !opts[:'modified_after'].nil?
|
79
|
+
query_params[:'modified_before'] = opts[:'modified_before'] if !opts[:'modified_before'].nil?
|
80
|
+
query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
|
81
|
+
query_params[:'remote_id'] = opts[:'remote_id'] if !opts[:'remote_id'].nil?
|
82
|
+
|
83
|
+
# header parameters
|
84
|
+
header_params = opts[:header_params] || {}
|
85
|
+
# HTTP header 'Accept' (if needed)
|
86
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
87
|
+
header_params[:'X-Account-Token'] = x_account_token
|
88
|
+
|
89
|
+
# form parameters
|
90
|
+
form_params = opts[:form_params] || {}
|
91
|
+
|
92
|
+
# http body (model)
|
93
|
+
post_body = opts[:debug_body]
|
94
|
+
|
95
|
+
# return_type
|
96
|
+
return_type = opts[:debug_return_type] || 'PaginatedTimeOffBalanceList'
|
97
|
+
|
98
|
+
# auth_names
|
99
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
100
|
+
|
101
|
+
new_options = opts.merge(
|
102
|
+
:operation => :"TimeOffBalanceApi.time_off_balance_list",
|
103
|
+
:header_params => header_params,
|
104
|
+
:query_params => query_params,
|
105
|
+
:form_params => form_params,
|
106
|
+
:body => post_body,
|
107
|
+
:auth_names => auth_names,
|
108
|
+
:return_type => return_type
|
109
|
+
)
|
110
|
+
|
111
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
112
|
+
if @api_client.config.debugging
|
113
|
+
@api_client.config.logger.debug "API called: TimeOffBalanceApi#time_off_balance_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
114
|
+
end
|
115
|
+
return data, status_code, headers
|
116
|
+
end
|
117
|
+
|
118
|
+
# Returns an `TimeOffBalance` object with the given `id`.
|
119
|
+
# @param x_account_token [String] Token identifying the end user.
|
120
|
+
# @param id [String]
|
121
|
+
# @param [Hash] opts the optional parameters
|
122
|
+
# @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
|
123
|
+
# @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
|
124
|
+
# @return [TimeOffBalance]
|
125
|
+
def time_off_balance_retrieve(x_account_token, id, opts = {})
|
126
|
+
data, _status_code, _headers = time_off_balance_retrieve_with_http_info(x_account_token, id, opts)
|
127
|
+
data
|
128
|
+
end
|
129
|
+
|
130
|
+
# Returns an `TimeOffBalance` object with the given `id`.
|
131
|
+
# @param x_account_token [String] Token identifying the end user.
|
132
|
+
# @param id [String]
|
133
|
+
# @param [Hash] opts the optional parameters
|
134
|
+
# @option opts [String] :expand Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
|
135
|
+
# @option opts [Boolean] :include_remote_data Whether to include the original data Merge fetched from the third-party to produce these models.
|
136
|
+
# @return [Array<(TimeOffBalance, Integer, Hash)>] TimeOffBalance data, response status code and response headers
|
137
|
+
def time_off_balance_retrieve_with_http_info(x_account_token, id, opts = {})
|
138
|
+
if @api_client.config.debugging
|
139
|
+
@api_client.config.logger.debug 'Calling API: TimeOffBalanceApi.time_off_balance_retrieve ...'
|
140
|
+
end
|
141
|
+
# verify the required parameter 'x_account_token' is set
|
142
|
+
if @api_client.config.client_side_validation && x_account_token.nil?
|
143
|
+
fail ArgumentError, "Missing the required parameter 'x_account_token' when calling TimeOffBalanceApi.time_off_balance_retrieve"
|
144
|
+
end
|
145
|
+
# verify the required parameter 'id' is set
|
146
|
+
if @api_client.config.client_side_validation && id.nil?
|
147
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling TimeOffBalanceApi.time_off_balance_retrieve"
|
148
|
+
end
|
149
|
+
allowable_values = ["employee"]
|
150
|
+
if @api_client.config.client_side_validation && opts[:'expand'] && !allowable_values.include?(opts[:'expand'])
|
151
|
+
fail ArgumentError, "invalid value for \"expand\", must be one of #{allowable_values}"
|
152
|
+
end
|
153
|
+
# resource path
|
154
|
+
local_var_path = '/time-off-balance/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
155
|
+
|
156
|
+
# query parameters
|
157
|
+
query_params = opts[:query_params] || {}
|
158
|
+
query_params[:'expand'] = opts[:'expand'] if !opts[:'expand'].nil?
|
159
|
+
query_params[:'include_remote_data'] = opts[:'include_remote_data'] if !opts[:'include_remote_data'].nil?
|
160
|
+
|
161
|
+
# header parameters
|
162
|
+
header_params = opts[:header_params] || {}
|
163
|
+
# HTTP header 'Accept' (if needed)
|
164
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
165
|
+
header_params[:'X-Account-Token'] = x_account_token
|
166
|
+
|
167
|
+
# form parameters
|
168
|
+
form_params = opts[:form_params] || {}
|
169
|
+
|
170
|
+
# http body (model)
|
171
|
+
post_body = opts[:debug_body]
|
172
|
+
|
173
|
+
# return_type
|
174
|
+
return_type = opts[:debug_return_type] || 'TimeOffBalance'
|
175
|
+
|
176
|
+
# auth_names
|
177
|
+
auth_names = opts[:debug_auth_names] || ['tokenAuth']
|
178
|
+
|
179
|
+
new_options = opts.merge(
|
180
|
+
:operation => :"TimeOffBalanceApi.time_off_balance_retrieve",
|
181
|
+
:header_params => header_params,
|
182
|
+
:query_params => query_params,
|
183
|
+
:form_params => form_params,
|
184
|
+
:body => post_body,
|
185
|
+
:auth_names => auth_names,
|
186
|
+
:return_type => return_type
|
187
|
+
)
|
188
|
+
|
189
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
190
|
+
if @api_client.config.debugging
|
191
|
+
@api_client.config.logger.debug "API called: TimeOffBalanceApi#time_off_balance_retrieve\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
192
|
+
end
|
193
|
+
return data, status_code, headers
|
194
|
+
end
|
195
|
+
end
|
196
|
+
end
|