Class: PureCloud::WorkforceManagementApi
- Inherits:
-
Object
- Object
- PureCloud::WorkforceManagementApi
- Defined in:
- lib/purecloudplatformclientv2/api/workforce_management_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_workforcemanagement_adherence(user_id, opts = {}) ⇒ Array<UserScheduleAdherence>
Get a list of UserScheduleAdherence records for the requested users.
-
#get_workforcemanagement_adherence_with_http_info(user_id, opts = {}) ⇒ Array<(Array<UserScheduleAdherence>, Fixnum, Hash)>
Get a list of UserScheduleAdherence records for the requested users.
-
#get_workforcemanagement_managementunit_activitycodes(mu_id, opts = {}) ⇒ ActivityCodeContainer
Get activity codes corresponding to a management unit.
-
#get_workforcemanagement_managementunit_activitycodes_with_http_info(mu_id, opts = {}) ⇒ Array<(ActivityCodeContainer, Fixnum, Hash)>
Get activity codes corresponding to a management unit.
-
#get_workforcemanagement_managementunit_user_timeoffrequest(mu_id, user_id, time_off_request_id, opts = {}) ⇒ TimeOffRequest
Get a time off request by id.
-
#get_workforcemanagement_managementunit_user_timeoffrequest_with_http_info(mu_id, user_id, time_off_request_id, opts = {}) ⇒ Array<(TimeOffRequest, Fixnum, Hash)>
Get a time off request by id.
-
#get_workforcemanagement_managementunit_user_timeoffrequests(mu_id, user_id, opts = {}) ⇒ TimeOffRequestList
Get a list of time off requests for any user.
-
#get_workforcemanagement_managementunit_user_timeoffrequests_with_http_info(mu_id, user_id, opts = {}) ⇒ Array<(TimeOffRequestList, Fixnum, Hash)>
Get a list of time off requests for any user.
-
#get_workforcemanagement_managementunit_users(mu_id, opts = {}) ⇒ WfmUserEntityListing
Get agents in the management unit.
-
#get_workforcemanagement_managementunit_users_with_http_info(mu_id, opts = {}) ⇒ Array<(WfmUserEntityListing, Fixnum, Hash)>
Get agents in the management unit.
-
#get_workforcemanagement_managementunits(opts = {}) ⇒ Array<ManagementUnit>
Get management units.
-
#get_workforcemanagement_managementunits_with_http_info(opts = {}) ⇒ Array<(Array<ManagementUnit>, Fixnum, Hash)>
Get management units.
-
#get_workforcemanagement_timeoffrequest(time_off_request_id, opts = {}) ⇒ TimeOffRequest
Get a time off request for the current user by id.
-
#get_workforcemanagement_timeoffrequest_with_http_info(time_off_request_id, opts = {}) ⇒ Array<(TimeOffRequest, Fixnum, Hash)>
Get a time off request for the current user by id.
-
#get_workforcemanagement_timeoffrequests(opts = {}) ⇒ TimeOffRequestList
Get a list of time off requests for the current user.
-
#get_workforcemanagement_timeoffrequests_with_http_info(opts = {}) ⇒ Array<(TimeOffRequestList, Fixnum, Hash)>
Get a list of time off requests for the current user.
-
#initialize(api_client = ApiClient.default) ⇒ WorkforceManagementApi
constructor
A new instance of WorkforceManagementApi.
-
#patch_workforcemanagement_timeoffrequest(time_off_request_id, opts = {}) ⇒ nil
Mark a time off request for the current user as read or unread.
-
#patch_workforcemanagement_timeoffrequest_with_http_info(time_off_request_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Mark a time off request for the current user as read or unread.
-
#post_workforcemanagement_managementunit_schedules_search(mu_id, opts = {}) ⇒ UserScheduleContainer
Get user schedules within the given time range.
-
#post_workforcemanagement_managementunit_schedules_search_with_http_info(mu_id, opts = {}) ⇒ Array<(UserScheduleContainer, Fixnum, Hash)>
Get user schedules within the given time range.
-
#post_workforcemanagement_schedules(opts = {}) ⇒ UserScheduleContainer
Get a schedule for the current user.
-
#post_workforcemanagement_schedules_with_http_info(opts = {}) ⇒ Array<(UserScheduleContainer, Fixnum, Hash)>
Get a schedule for the current user.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ WorkforceManagementApi
Returns a new instance of WorkforceManagementApi.
23 24 25 |
# File 'lib/purecloudplatformclientv2/api/workforce_management_api.rb', line 23 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
21 22 23 |
# File 'lib/purecloudplatformclientv2/api/workforce_management_api.rb', line 21 def api_client @api_client end |
Instance Method Details
#get_workforcemanagement_adherence(user_id, opts = {}) ⇒ Array<UserScheduleAdherence>
Get a list of UserScheduleAdherence records for the requested users
32 33 34 35 |
# File 'lib/purecloudplatformclientv2/api/workforce_management_api.rb', line 32 def get_workforcemanagement_adherence(user_id, opts = {}) data, _status_code, _headers = get_workforcemanagement_adherence_with_http_info(user_id, opts) return data end |
#get_workforcemanagement_adherence_with_http_info(user_id, opts = {}) ⇒ Array<(Array<UserScheduleAdherence>, Fixnum, Hash)>
Get a list of UserScheduleAdherence records for the requested users
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/purecloudplatformclientv2/api/workforce_management_api.rb', line 42 def get_workforcemanagement_adherence_with_http_info(user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: WorkforceManagementApi.get_workforcemanagement_adherence ..." end # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling WorkforceManagementApi.get_workforcemanagement_adherence" if user_id.nil? # resource path local_var_path = "/api/v2/workforcemanagement/adherence".sub('{format}','json') # query parameters query_params = {} query_params[:'userId'] = @api_client.build_collection_param(user_id, :multi) # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array<UserScheduleAdherence>') if @api_client.config.debugging @api_client.config.logger.debug "API called: WorkforceManagementApi#get_workforcemanagement_adherence\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_workforcemanagement_managementunit_activitycodes(mu_id, opts = {}) ⇒ ActivityCodeContainer
Get activity codes corresponding to a management unit
90 91 92 93 |
# File 'lib/purecloudplatformclientv2/api/workforce_management_api.rb', line 90 def get_workforcemanagement_managementunit_activitycodes(mu_id, opts = {}) data, _status_code, _headers = get_workforcemanagement_managementunit_activitycodes_with_http_info(mu_id, opts) return data end |
#get_workforcemanagement_managementunit_activitycodes_with_http_info(mu_id, opts = {}) ⇒ Array<(ActivityCodeContainer, Fixnum, Hash)>
Get activity codes corresponding to a management unit
100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
# File 'lib/purecloudplatformclientv2/api/workforce_management_api.rb', line 100 def get_workforcemanagement_managementunit_activitycodes_with_http_info(mu_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: WorkforceManagementApi.get_workforcemanagement_managementunit_activitycodes ..." end # verify the required parameter 'mu_id' is set fail ArgumentError, "Missing the required parameter 'mu_id' when calling WorkforceManagementApi.get_workforcemanagement_managementunit_activitycodes" if mu_id.nil? # resource path local_var_path = "/api/v2/workforcemanagement/managementunits/{muId}/activitycodes".sub('{format}','json').sub('{' + 'muId' + '}', mu_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ActivityCodeContainer') if @api_client.config.debugging @api_client.config.logger.debug "API called: WorkforceManagementApi#get_workforcemanagement_managementunit_activitycodes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_workforcemanagement_managementunit_user_timeoffrequest(mu_id, user_id, time_off_request_id, opts = {}) ⇒ TimeOffRequest
Get a time off request by id
149 150 151 152 |
# File 'lib/purecloudplatformclientv2/api/workforce_management_api.rb', line 149 def get_workforcemanagement_managementunit_user_timeoffrequest(mu_id, user_id, time_off_request_id, opts = {}) data, _status_code, _headers = get_workforcemanagement_managementunit_user_timeoffrequest_with_http_info(mu_id, user_id, time_off_request_id, opts) return data end |
#get_workforcemanagement_managementunit_user_timeoffrequest_with_http_info(mu_id, user_id, time_off_request_id, opts = {}) ⇒ Array<(TimeOffRequest, Fixnum, Hash)>
Get a time off request by id
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 |
# File 'lib/purecloudplatformclientv2/api/workforce_management_api.rb', line 161 def get_workforcemanagement_managementunit_user_timeoffrequest_with_http_info(mu_id, user_id, time_off_request_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: WorkforceManagementApi.get_workforcemanagement_managementunit_user_timeoffrequest ..." end # verify the required parameter 'mu_id' is set fail ArgumentError, "Missing the required parameter 'mu_id' when calling WorkforceManagementApi.get_workforcemanagement_managementunit_user_timeoffrequest" if mu_id.nil? # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling WorkforceManagementApi.get_workforcemanagement_managementunit_user_timeoffrequest" if user_id.nil? # verify the required parameter 'time_off_request_id' is set fail ArgumentError, "Missing the required parameter 'time_off_request_id' when calling WorkforceManagementApi.get_workforcemanagement_managementunit_user_timeoffrequest" if time_off_request_id.nil? # resource path local_var_path = "/api/v2/workforcemanagement/managementunits/{muId}/users/{userId}/timeoffrequests/{timeOffRequestId}".sub('{format}','json').sub('{' + 'muId' + '}', mu_id.to_s).sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'timeOffRequestId' + '}', time_off_request_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'TimeOffRequest') if @api_client.config.debugging @api_client.config.logger.debug "API called: WorkforceManagementApi#get_workforcemanagement_managementunit_user_timeoffrequest\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_workforcemanagement_managementunit_user_timeoffrequests(mu_id, user_id, opts = {}) ⇒ TimeOffRequestList
Get a list of time off requests for any user
214 215 216 217 |
# File 'lib/purecloudplatformclientv2/api/workforce_management_api.rb', line 214 def get_workforcemanagement_managementunit_user_timeoffrequests(mu_id, user_id, opts = {}) data, _status_code, _headers = get_workforcemanagement_managementunit_user_timeoffrequests_with_http_info(mu_id, user_id, opts) return data end |
#get_workforcemanagement_managementunit_user_timeoffrequests_with_http_info(mu_id, user_id, opts = {}) ⇒ Array<(TimeOffRequestList, Fixnum, Hash)>
Get a list of time off requests for any user
226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 |
# File 'lib/purecloudplatformclientv2/api/workforce_management_api.rb', line 226 def get_workforcemanagement_managementunit_user_timeoffrequests_with_http_info(mu_id, user_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: WorkforceManagementApi.get_workforcemanagement_managementunit_user_timeoffrequests ..." end # verify the required parameter 'mu_id' is set fail ArgumentError, "Missing the required parameter 'mu_id' when calling WorkforceManagementApi.get_workforcemanagement_managementunit_user_timeoffrequests" if mu_id.nil? # verify the required parameter 'user_id' is set fail ArgumentError, "Missing the required parameter 'user_id' when calling WorkforceManagementApi.get_workforcemanagement_managementunit_user_timeoffrequests" if user_id.nil? # resource path local_var_path = "/api/v2/workforcemanagement/managementunits/{muId}/users/{userId}/timeoffrequests".sub('{format}','json').sub('{' + 'muId' + '}', mu_id.to_s).sub('{' + 'userId' + '}', user_id.to_s) # query parameters query_params = {} query_params[:'recentlyReviewed'] = opts[:'recently_reviewed'] if opts[:'recently_reviewed'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'TimeOffRequestList') if @api_client.config.debugging @api_client.config.logger.debug "API called: WorkforceManagementApi#get_workforcemanagement_managementunit_user_timeoffrequests\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_workforcemanagement_managementunit_users(mu_id, opts = {}) ⇒ WfmUserEntityListing
Get agents in the management unit
276 277 278 279 |
# File 'lib/purecloudplatformclientv2/api/workforce_management_api.rb', line 276 def get_workforcemanagement_managementunit_users(mu_id, opts = {}) data, _status_code, _headers = get_workforcemanagement_managementunit_users_with_http_info(mu_id, opts) return data end |
#get_workforcemanagement_managementunit_users_with_http_info(mu_id, opts = {}) ⇒ Array<(WfmUserEntityListing, Fixnum, Hash)>
Get agents in the management unit
286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 |
# File 'lib/purecloudplatformclientv2/api/workforce_management_api.rb', line 286 def get_workforcemanagement_managementunit_users_with_http_info(mu_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: WorkforceManagementApi.get_workforcemanagement_managementunit_users ..." end # verify the required parameter 'mu_id' is set fail ArgumentError, "Missing the required parameter 'mu_id' when calling WorkforceManagementApi.get_workforcemanagement_managementunit_users" if mu_id.nil? # resource path local_var_path = "/api/v2/workforcemanagement/managementunits/{muId}/users".sub('{format}','json').sub('{' + 'muId' + '}', mu_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'WfmUserEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: WorkforceManagementApi#get_workforcemanagement_managementunit_users\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_workforcemanagement_managementunits(opts = {}) ⇒ Array<ManagementUnit>
Get management units
335 336 337 338 |
# File 'lib/purecloudplatformclientv2/api/workforce_management_api.rb', line 335 def get_workforcemanagement_managementunits(opts = {}) data, _status_code, _headers = get_workforcemanagement_managementunits_with_http_info(opts) return data end |
#get_workforcemanagement_managementunits_with_http_info(opts = {}) ⇒ Array<(Array<ManagementUnit>, Fixnum, Hash)>
Get management units
347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 |
# File 'lib/purecloudplatformclientv2/api/workforce_management_api.rb', line 347 def get_workforcemanagement_managementunits_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: WorkforceManagementApi.get_workforcemanagement_managementunits ..." end # resource path local_var_path = "/api/v2/workforcemanagement/managementunits".sub('{format}','json') # query parameters query_params = {} query_params[:'selector'] = opts[:'selector'] if opts[:'selector'] query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size'] query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Array<ManagementUnit>') if @api_client.config.debugging @api_client.config.logger.debug "API called: WorkforceManagementApi#get_workforcemanagement_managementunits\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_workforcemanagement_timeoffrequest(time_off_request_id, opts = {}) ⇒ TimeOffRequest
Get a time off request for the current user by id
395 396 397 398 |
# File 'lib/purecloudplatformclientv2/api/workforce_management_api.rb', line 395 def get_workforcemanagement_timeoffrequest(time_off_request_id, opts = {}) data, _status_code, _headers = get_workforcemanagement_timeoffrequest_with_http_info(time_off_request_id, opts) return data end |
#get_workforcemanagement_timeoffrequest_with_http_info(time_off_request_id, opts = {}) ⇒ Array<(TimeOffRequest, Fixnum, Hash)>
Get a time off request for the current user by id
405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 |
# File 'lib/purecloudplatformclientv2/api/workforce_management_api.rb', line 405 def get_workforcemanagement_timeoffrequest_with_http_info(time_off_request_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: WorkforceManagementApi.get_workforcemanagement_timeoffrequest ..." end # verify the required parameter 'time_off_request_id' is set fail ArgumentError, "Missing the required parameter 'time_off_request_id' when calling WorkforceManagementApi.get_workforcemanagement_timeoffrequest" if time_off_request_id.nil? # resource path local_var_path = "/api/v2/workforcemanagement/timeoffrequests/{timeOffRequestId}".sub('{format}','json').sub('{' + 'timeOffRequestId' + '}', time_off_request_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'TimeOffRequest') if @api_client.config.debugging @api_client.config.logger.debug "API called: WorkforceManagementApi#get_workforcemanagement_timeoffrequest\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_workforcemanagement_timeoffrequests(opts = {}) ⇒ TimeOffRequestList
Get a list of time off requests for the current user
452 453 454 455 |
# File 'lib/purecloudplatformclientv2/api/workforce_management_api.rb', line 452 def get_workforcemanagement_timeoffrequests(opts = {}) data, _status_code, _headers = get_workforcemanagement_timeoffrequests_with_http_info(opts) return data end |
#get_workforcemanagement_timeoffrequests_with_http_info(opts = {}) ⇒ Array<(TimeOffRequestList, Fixnum, Hash)>
Get a list of time off requests for the current user
462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 |
# File 'lib/purecloudplatformclientv2/api/workforce_management_api.rb', line 462 def get_workforcemanagement_timeoffrequests_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: WorkforceManagementApi.get_workforcemanagement_timeoffrequests ..." end # resource path local_var_path = "/api/v2/workforcemanagement/timeoffrequests".sub('{format}','json') # query parameters query_params = {} query_params[:'recentlyReviewed'] = opts[:'recently_reviewed'] if opts[:'recently_reviewed'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'TimeOffRequestList') if @api_client.config.debugging @api_client.config.logger.debug "API called: WorkforceManagementApi#get_workforcemanagement_timeoffrequests\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#patch_workforcemanagement_timeoffrequest(time_off_request_id, opts = {}) ⇒ nil
Mark a time off request for the current user as read or unread
509 510 511 512 |
# File 'lib/purecloudplatformclientv2/api/workforce_management_api.rb', line 509 def patch_workforcemanagement_timeoffrequest(time_off_request_id, opts = {}) patch_workforcemanagement_timeoffrequest_with_http_info(time_off_request_id, opts) return nil end |
#patch_workforcemanagement_timeoffrequest_with_http_info(time_off_request_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>
Mark a time off request for the current user as read or unread
520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 |
# File 'lib/purecloudplatformclientv2/api/workforce_management_api.rb', line 520 def patch_workforcemanagement_timeoffrequest_with_http_info(time_off_request_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: WorkforceManagementApi.patch_workforcemanagement_timeoffrequest ..." end # verify the required parameter 'time_off_request_id' is set fail ArgumentError, "Missing the required parameter 'time_off_request_id' when calling WorkforceManagementApi.patch_workforcemanagement_timeoffrequest" if time_off_request_id.nil? # resource path local_var_path = "/api/v2/workforcemanagement/timeoffrequests/{timeOffRequestId}".sub('{format}','json').sub('{' + 'timeOffRequestId' + '}', time_off_request_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names) if @api_client.config.debugging @api_client.config.logger.debug "API called: WorkforceManagementApi#patch_workforcemanagement_timeoffrequest\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post_workforcemanagement_managementunit_schedules_search(mu_id, opts = {}) ⇒ UserScheduleContainer
Get user schedules within the given time range
567 568 569 570 |
# File 'lib/purecloudplatformclientv2/api/workforce_management_api.rb', line 567 def post_workforcemanagement_managementunit_schedules_search(mu_id, opts = {}) data, _status_code, _headers = post_workforcemanagement_managementunit_schedules_search_with_http_info(mu_id, opts) return data end |
#post_workforcemanagement_managementunit_schedules_search_with_http_info(mu_id, opts = {}) ⇒ Array<(UserScheduleContainer, Fixnum, Hash)>
Get user schedules within the given time range
578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 |
# File 'lib/purecloudplatformclientv2/api/workforce_management_api.rb', line 578 def post_workforcemanagement_managementunit_schedules_search_with_http_info(mu_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: WorkforceManagementApi.post_workforcemanagement_managementunit_schedules_search ..." end # verify the required parameter 'mu_id' is set fail ArgumentError, "Missing the required parameter 'mu_id' when calling WorkforceManagementApi.post_workforcemanagement_managementunit_schedules_search" if mu_id.nil? # resource path local_var_path = "/api/v2/workforcemanagement/managementunits/{muId}/schedules/search".sub('{format}','json').sub('{' + 'muId' + '}', mu_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserScheduleContainer') if @api_client.config.debugging @api_client.config.logger.debug "API called: WorkforceManagementApi#post_workforcemanagement_managementunit_schedules_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post_workforcemanagement_schedules(opts = {}) ⇒ UserScheduleContainer
Get a schedule for the current user
625 626 627 628 |
# File 'lib/purecloudplatformclientv2/api/workforce_management_api.rb', line 625 def post_workforcemanagement_schedules(opts = {}) data, _status_code, _headers = post_workforcemanagement_schedules_with_http_info(opts) return data end |
#post_workforcemanagement_schedules_with_http_info(opts = {}) ⇒ Array<(UserScheduleContainer, Fixnum, Hash)>
Get a schedule for the current user
635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 |
# File 'lib/purecloudplatformclientv2/api/workforce_management_api.rb', line 635 def post_workforcemanagement_schedules_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: WorkforceManagementApi.post_workforcemanagement_schedules ..." end # resource path local_var_path = "/api/v2/workforcemanagement/schedules".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) local_header_accept = ['application/json'] local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result # HTTP header 'Content-Type' local_header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'UserScheduleContainer') if @api_client.config.debugging @api_client.config.logger.debug "API called: WorkforceManagementApi#post_workforcemanagement_schedules\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |