Class: PureCloud::WorkforceManagementApi

Inherits:
Object
  • Object
show all
Defined in:
lib/purecloudclient_v2a/api/workforce_management_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ WorkforceManagementApi

Returns a new instance of WorkforceManagementApi.



23
24
25
# File 'lib/purecloudclient_v2a/api/workforce_management_api.rb', line 23

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



21
22
23
# File 'lib/purecloudclient_v2a/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

Parameters:

  • user_id

    User Id(s) for which to fetch current schedule adherence information. Min 1, Max of 100 userIds per request

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



32
33
34
35
# File 'lib/purecloudclient_v2a/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

Parameters:

  • user_id

    User Id(s) for which to fetch current schedule adherence information. Min 1, Max of 100 userIds per request

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Array<UserScheduleAdherence>, Fixnum, Hash)>)

    Array<UserScheduleAdherence> data, response status code and response headers



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
84
85
86
87
88
89
90
91
# File 'lib/purecloudclient_v2a/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

Parameters:

  • mu_id

    The muId of the management unit, or &#39;mine&#39; for the management unit of the logged-in user.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



98
99
100
101
# File 'lib/purecloudclient_v2a/api/workforce_management_api.rb', line 98

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

Parameters:

  • mu_id

    The muId of the management unit, or &#39;mine&#39; for the management unit of the logged-in user.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(ActivityCodeContainer, Fixnum, Hash)>)

    ActivityCodeContainer data, response status code and response headers



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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
# File 'lib/purecloudclient_v2a/api/workforce_management_api.rb', line 108

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_intraday_queues(mu_id, date, opts = {}) ⇒ WfmIntradayQueueListing

Get intraday queues for the given date

Parameters:

  • mu_id

    The muId of the management unit, or &#39;mine&#39; for the management unit of the logged-in user.

  • date

    ISO-8601 date string with no time or timezone component, interpreted in the configured management unit time zone, e.g. 2017-01-23

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



164
165
166
167
# File 'lib/purecloudclient_v2a/api/workforce_management_api.rb', line 164

def get_workforcemanagement_managementunit_intraday_queues(mu_id, date, opts = {})
  data, _status_code, _headers = get_workforcemanagement_managementunit_intraday_queues_with_http_info(mu_id, date, opts)
  return data
end

#get_workforcemanagement_managementunit_intraday_queues_with_http_info(mu_id, date, opts = {}) ⇒ Array<(WfmIntradayQueueListing, Fixnum, Hash)>

Get intraday queues for the given date

Parameters:

  • mu_id

    The muId of the management unit, or &#39;mine&#39; for the management unit of the logged-in user.

  • date

    ISO-8601 date string with no time or timezone component, interpreted in the configured management unit time zone, e.g. 2017-01-23

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(WfmIntradayQueueListing, Fixnum, Hash)>)

    WfmIntradayQueueListing data, response status code and response headers



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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
# File 'lib/purecloudclient_v2a/api/workforce_management_api.rb', line 175

def get_workforcemanagement_managementunit_intraday_queues_with_http_info(mu_id, date, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: WorkforceManagementApi.get_workforcemanagement_managementunit_intraday_queues ..."
  end
  
  
  # verify the required parameter 'mu_id' is set
  fail ArgumentError, "Missing the required parameter 'mu_id' when calling WorkforceManagementApi.get_workforcemanagement_managementunit_intraday_queues" if mu_id.nil?
  
  
  
  
  
  
  # verify the required parameter 'date' is set
  fail ArgumentError, "Missing the required parameter 'date' when calling WorkforceManagementApi.get_workforcemanagement_managementunit_intraday_queues" if date.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/workforcemanagement/managementunits/{muId}/intraday/queues".sub('{format}','json').sub('{' + 'muId' + '}', mu_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'date'] = date

  # 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 => 'WfmIntradayQueueListing')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WorkforceManagementApi#get_workforcemanagement_managementunit_intraday_queues\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

Parameters:

  • mu_id

    The muId of the management unit, or &#39;mine&#39; for the management unit of the logged-in user.

  • user_id

    The userId to whom the Time Off Request applies.

  • time_off_request_id

    Time Off Request Id

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



241
242
243
244
# File 'lib/purecloudclient_v2a/api/workforce_management_api.rb', line 241

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

Parameters:

  • mu_id

    The muId of the management unit, or &#39;mine&#39; for the management unit of the logged-in user.

  • user_id

    The userId to whom the Time Off Request applies.

  • time_off_request_id

    Time Off Request Id

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(TimeOffRequest, Fixnum, Hash)>)

    TimeOffRequest data, response status code and response headers



253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
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
# File 'lib/purecloudclient_v2a/api/workforce_management_api.rb', line 253

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

Parameters:

  • mu_id

    The muId of the management unit, or &#39;mine&#39; for the management unit of the logged-in user.

  • user_id

    The userId to whom the Time Off Request applies.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :recently_reviewed (BOOLEAN)

    Limit results to requests that have been reviewed within the preceding 30 days (default to false)

Returns:



326
327
328
329
# File 'lib/purecloudclient_v2a/api/workforce_management_api.rb', line 326

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

Parameters:

  • mu_id

    The muId of the management unit, or &#39;mine&#39; for the management unit of the logged-in user.

  • user_id

    The userId to whom the Time Off Request applies.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :recently_reviewed (BOOLEAN)

    Limit results to requests that have been reviewed within the preceding 30 days

Returns:

  • (Array<(TimeOffRequestList, Fixnum, Hash)>)

    TimeOffRequestList data, response status code and response headers



338
339
340
341
342
343
344
345
346
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
389
390
391
392
393
394
395
396
397
398
399
400
401
# File 'lib/purecloudclient_v2a/api/workforce_management_api.rb', line 338

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

Parameters:

  • mu_id

    The muId of the management unit, or &#39;mine&#39; for the management unit of the logged-in user.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



408
409
410
411
# File 'lib/purecloudclient_v2a/api/workforce_management_api.rb', line 408

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

Parameters:

  • mu_id

    The muId of the management unit, or &#39;mine&#39; for the management unit of the logged-in user.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(WfmUserEntityListing, Fixnum, Hash)>)

    WfmUserEntityListing data, response status code and response headers



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
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
# File 'lib/purecloudclient_v2a/api/workforce_management_api.rb', line 418

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 = {}) ⇒ ManagementUnitListing

Get management units

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)
  • :page_number (Integer) — default: default to 1
  • :expand (String)

Returns:



475
476
477
478
# File 'lib/purecloudclient_v2a/api/workforce_management_api.rb', line 475

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<(ManagementUnitListing, Fixnum, Hash)>

Get management units

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :page_size (Integer)
  • :page_number (Integer)
  • :expand (String)

Returns:

  • (Array<(ManagementUnitListing, Fixnum, Hash)>)

    ManagementUnitListing data, response status code and response headers



487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
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
# File 'lib/purecloudclient_v2a/api/workforce_management_api.rb', line 487

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
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  if opts[:'expand'] && !['details'].include?(opts[:'expand'])
    fail ArgumentError, 'invalid value for "expand", must be one of details'
  end
  
  
  
  
  # resource path
  local_var_path = "/api/v2/workforcemanagement/managementunits".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size']
  query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number']
  query_params[:'expand'] = opts[:'expand'] if opts[:'expand']

  # 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 => 'ManagementUnitListing')
  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

Parameters:

  • time_off_request_id

    Time Off Request Id

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



559
560
561
562
# File 'lib/purecloudclient_v2a/api/workforce_management_api.rb', line 559

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

Parameters:

  • time_off_request_id

    Time Off Request Id

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(TimeOffRequest, Fixnum, Hash)>)

    TimeOffRequest data, response status code and response headers



569
570
571
572
573
574
575
576
577
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
# File 'lib/purecloudclient_v2a/api/workforce_management_api.rb', line 569

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

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :recently_reviewed (BOOLEAN)

    Limit results to requests that have been reviewed within the preceding 30 days (default to false)

Returns:



624
625
626
627
# File 'lib/purecloudclient_v2a/api/workforce_management_api.rb', line 624

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

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :recently_reviewed (BOOLEAN)

    Limit results to requests that have been reviewed within the preceding 30 days

Returns:

  • (Array<(TimeOffRequestList, Fixnum, Hash)>)

    TimeOffRequestList data, response status code and response headers



634
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
674
675
676
677
678
679
680
681
# File 'lib/purecloudclient_v2a/api/workforce_management_api.rb', line 634

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

Parameters:

  • time_off_request_id

    Time Off Request Id

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (nil)


689
690
691
692
# File 'lib/purecloudclient_v2a/api/workforce_management_api.rb', line 689

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

Parameters:

  • time_off_request_id

    Time Off Request Id

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
# File 'lib/purecloudclient_v2a/api/workforce_management_api.rb', line 700

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_agents_managementunits(opts = {}) ⇒ Array<AgentManagementUnitReference>

Get the management units to which the agents belong

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :body (Array<String>)

    body

Returns:



760
761
762
763
# File 'lib/purecloudclient_v2a/api/workforce_management_api.rb', line 760

def post_workforcemanagement_agents_managementunits(opts = {})
  data, _status_code, _headers = post_workforcemanagement_agents_managementunits_with_http_info(opts)
  return data
end

#post_workforcemanagement_agents_managementunits_with_http_info(opts = {}) ⇒ Array<(Array<AgentManagementUnitReference>, Fixnum, Hash)>

Get the management units to which the agents belong

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :body (Array<String>)

    body

Returns:

  • (Array<(Array<AgentManagementUnitReference>, Fixnum, Hash)>)

    Array<AgentManagementUnitReference> data, response status code and response headers



770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
# File 'lib/purecloudclient_v2a/api/workforce_management_api.rb', line 770

def post_workforcemanagement_agents_managementunits_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: WorkforceManagementApi.post_workforcemanagement_agents_managementunits ..."
  end
  
  
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/workforcemanagement/agents/managementunits".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 => 'Array<AgentManagementUnitReference>')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WorkforceManagementApi#post_workforcemanagement_agents_managementunits\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_workforcemanagement_managementunit_historicaladherencequery(mu_id, opts = {}) ⇒ WfmHistoricalAdherenceResponse

Request a historical adherence report

Parameters:

  • mu_id

    The muId of the management unit, or &#39;mine&#39; for the management unit of the logged-in user.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



824
825
826
827
# File 'lib/purecloudclient_v2a/api/workforce_management_api.rb', line 824

def post_workforcemanagement_managementunit_historicaladherencequery(mu_id, opts = {})
  data, _status_code, _headers = post_workforcemanagement_managementunit_historicaladherencequery_with_http_info(mu_id, opts)
  return data
end

#post_workforcemanagement_managementunit_historicaladherencequery_with_http_info(mu_id, opts = {}) ⇒ Array<(WfmHistoricalAdherenceResponse, Fixnum, Hash)>

Request a historical adherence report

Parameters:

  • mu_id

    The muId of the management unit, or &#39;mine&#39; for the management unit of the logged-in user.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
# File 'lib/purecloudclient_v2a/api/workforce_management_api.rb', line 835

def post_workforcemanagement_managementunit_historicaladherencequery_with_http_info(mu_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: WorkforceManagementApi.post_workforcemanagement_managementunit_historicaladherencequery ..."
  end
  
  
  # verify the required parameter 'mu_id' is set
  fail ArgumentError, "Missing the required parameter 'mu_id' when calling WorkforceManagementApi.post_workforcemanagement_managementunit_historicaladherencequery" if mu_id.nil?
  
  
  
  
  
  
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/workforcemanagement/managementunits/{muId}/historicaladherencequery".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 => 'WfmHistoricalAdherenceResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WorkforceManagementApi#post_workforcemanagement_managementunit_historicaladherencequery\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_workforcemanagement_managementunit_intraday(mu_id, opts = {}) ⇒ IntradayResponse

Get intraday data for the given date for the requested queueIds

Parameters:

  • mu_id

    The muId of the management unit, or &#39;mine&#39; for the management unit of the logged-in user.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



897
898
899
900
# File 'lib/purecloudclient_v2a/api/workforce_management_api.rb', line 897

def post_workforcemanagement_managementunit_intraday(mu_id, opts = {})
  data, _status_code, _headers = post_workforcemanagement_managementunit_intraday_with_http_info(mu_id, opts)
  return data
end

#post_workforcemanagement_managementunit_intraday_with_http_info(mu_id, opts = {}) ⇒ Array<(IntradayResponse, Fixnum, Hash)>

Get intraday data for the given date for the requested queueIds

Parameters:

  • mu_id

    The muId of the management unit, or &#39;mine&#39; for the management unit of the logged-in user.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(IntradayResponse, Fixnum, Hash)>)

    IntradayResponse data, response status code and response headers



908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
# File 'lib/purecloudclient_v2a/api/workforce_management_api.rb', line 908

def post_workforcemanagement_managementunit_intraday_with_http_info(mu_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: WorkforceManagementApi.post_workforcemanagement_managementunit_intraday ..."
  end
  
  
  # verify the required parameter 'mu_id' is set
  fail ArgumentError, "Missing the required parameter 'mu_id' when calling WorkforceManagementApi.post_workforcemanagement_managementunit_intraday" if mu_id.nil?
  
  
  
  
  
  
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/workforcemanagement/managementunits/{muId}/intraday".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 => 'IntradayResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: WorkforceManagementApi#post_workforcemanagement_managementunit_intraday\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

Parameters:

  • mu_id

    The muId of the management unit, or &#39;mine&#39; for the management unit of the logged-in user.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



970
971
972
973
# File 'lib/purecloudclient_v2a/api/workforce_management_api.rb', line 970

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

Parameters:

  • mu_id

    The muId of the management unit, or &#39;mine&#39; for the management unit of the logged-in user.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(UserScheduleContainer, Fixnum, Hash)>)

    UserScheduleContainer data, response status code and response headers



981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
# File 'lib/purecloudclient_v2a/api/workforce_management_api.rb', line 981

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

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:



1042
1043
1044
1045
# File 'lib/purecloudclient_v2a/api/workforce_management_api.rb', line 1042

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

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

Returns:

  • (Array<(UserScheduleContainer, Fixnum, Hash)>)

    UserScheduleContainer data, response status code and response headers



1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
# File 'lib/purecloudclient_v2a/api/workforce_management_api.rb', line 1052

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