Class: PureCloud::CoachingApi

Inherits:
Object
  • Object
show all
Defined in:
lib/purecloudplatformclientv2/api/coaching_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ CoachingApi

Returns a new instance of CoachingApi.



23
24
25
# File 'lib/purecloudplatformclientv2/api/coaching_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/purecloudplatformclientv2/api/coaching_api.rb', line 21

def api_client
  @api_client
end

Instance Method Details

#delete_coaching_appointment(appointment_id, opts = {}) ⇒ CoachingAppointmentReference

Delete an existing appointment Permission not required if you are the creator of the appointment

Parameters:

  • appointment_id

    The ID of the coaching appointment.

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

    the optional parameters

Returns:



32
33
34
35
# File 'lib/purecloudplatformclientv2/api/coaching_api.rb', line 32

def delete_coaching_appointment(appointment_id, opts = {})
  data, _status_code, _headers = delete_coaching_appointment_with_http_info(appointment_id, opts)
  return data
end

#delete_coaching_appointment_annotation(appointment_id, annotation_id, opts = {}) ⇒ nil

Delete an existing annotation You must have the appropriate permission for the type of annotation you are updating. Permission not required if you are the creator or facilitator of the appointment

Parameters:

  • appointment_id

    The ID of the coaching appointment.

  • annotation_id

    The ID of the annotation.

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

    the optional parameters

Returns:

  • (nil)


98
99
100
101
# File 'lib/purecloudplatformclientv2/api/coaching_api.rb', line 98

def delete_coaching_appointment_annotation(appointment_id, annotation_id, opts = {})
  delete_coaching_appointment_annotation_with_http_info(appointment_id, annotation_id, opts)
  return nil
end

#delete_coaching_appointment_annotation_with_http_info(appointment_id, annotation_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Delete an existing annotation You must have the appropriate permission for the type of annotation you are updating. Permission not required if you are the creator or facilitator of the appointment

Parameters:

  • appointment_id

    The ID of the coaching appointment.

  • annotation_id

    The ID of the annotation.

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

    the optional parameters

Returns:

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

    nil, response status code and response headers



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
157
158
159
160
161
162
163
164
# File 'lib/purecloudplatformclientv2/api/coaching_api.rb', line 109

def delete_coaching_appointment_annotation_with_http_info(appointment_id, annotation_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CoachingApi.delete_coaching_appointment_annotation ..."
  end
  
  
  # verify the required parameter 'appointment_id' is set
  fail ArgumentError, "Missing the required parameter 'appointment_id' when calling CoachingApi.delete_coaching_appointment_annotation" if appointment_id.nil?
  
  
  
  
  
  
  # verify the required parameter 'annotation_id' is set
  fail ArgumentError, "Missing the required parameter 'annotation_id' when calling CoachingApi.delete_coaching_appointment_annotation" if annotation_id.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/coaching/appointments/{appointmentId}/annotations/{annotationId}".sub('{format}','json').sub('{' + 'appointmentId' + '}', appointment_id.to_s).sub('{' + 'annotationId' + '}', annotation_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 OAuth']
  data, status_code, headers = @api_client.call_api(:DELETE, 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: CoachingApi#delete_coaching_appointment_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_coaching_appointment_with_http_info(appointment_id, opts = {}) ⇒ Array<(CoachingAppointmentReference, Fixnum, Hash)>

Delete an existing appointment Permission not required if you are the creator of the appointment

Parameters:

  • appointment_id

    The ID of the coaching appointment.

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

    the optional parameters

Returns:



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
# File 'lib/purecloudplatformclientv2/api/coaching_api.rb', line 42

def delete_coaching_appointment_with_http_info(appointment_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CoachingApi.delete_coaching_appointment ..."
  end
  
  
  # verify the required parameter 'appointment_id' is set
  fail ArgumentError, "Missing the required parameter 'appointment_id' when calling CoachingApi.delete_coaching_appointment" if appointment_id.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/coaching/appointments/{appointmentId}".sub('{format}','json').sub('{' + 'appointmentId' + '}', appointment_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 OAuth']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'CoachingAppointmentReference')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CoachingApi#delete_coaching_appointment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_coaching_appointment(appointment_id, opts = {}) ⇒ CoachingAppointmentResponse

Retrieve an appointment Permission not required if you are the attendee, creator or facilitator of the appointment

Parameters:

  • appointment_id

    The ID of the coaching appointment.

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

    the optional parameters

Returns:



171
172
173
174
# File 'lib/purecloudplatformclientv2/api/coaching_api.rb', line 171

def get_coaching_appointment(appointment_id, opts = {})
  data, _status_code, _headers = get_coaching_appointment_with_http_info(appointment_id, opts)
  return data
end

#get_coaching_appointment_annotation(appointment_id, annotation_id, opts = {}) ⇒ CoachingAnnotation

Retrieve an annotation. You must have the appropriate permission for the type of annotation you are creating. Permission not required if you are related to the appointment (only the creator or facilitator can view private annotations).

Parameters:

  • appointment_id

    The ID of the coaching appointment.

  • annotation_id

    The ID of the annotation.

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

    the optional parameters

Returns:



237
238
239
240
# File 'lib/purecloudplatformclientv2/api/coaching_api.rb', line 237

def get_coaching_appointment_annotation(appointment_id, annotation_id, opts = {})
  data, _status_code, _headers = get_coaching_appointment_annotation_with_http_info(appointment_id, annotation_id, opts)
  return data
end

#get_coaching_appointment_annotation_with_http_info(appointment_id, annotation_id, opts = {}) ⇒ Array<(CoachingAnnotation, Fixnum, Hash)>

Retrieve an annotation. You must have the appropriate permission for the type of annotation you are creating. Permission not required if you are related to the appointment (only the creator or facilitator can view private annotations).

Parameters:

  • appointment_id

    The ID of the coaching appointment.

  • annotation_id

    The ID of the annotation.

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

    the optional parameters

Returns:

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

    CoachingAnnotation data, response status code and response headers



248
249
250
251
252
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
# File 'lib/purecloudplatformclientv2/api/coaching_api.rb', line 248

def get_coaching_appointment_annotation_with_http_info(appointment_id, annotation_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CoachingApi.get_coaching_appointment_annotation ..."
  end
  
  
  # verify the required parameter 'appointment_id' is set
  fail ArgumentError, "Missing the required parameter 'appointment_id' when calling CoachingApi.get_coaching_appointment_annotation" if appointment_id.nil?
  
  
  
  
  
  
  # verify the required parameter 'annotation_id' is set
  fail ArgumentError, "Missing the required parameter 'annotation_id' when calling CoachingApi.get_coaching_appointment_annotation" if annotation_id.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/coaching/appointments/{appointmentId}/annotations/{annotationId}".sub('{format}','json').sub('{' + 'appointmentId' + '}', appointment_id.to_s).sub('{' + 'annotationId' + '}', annotation_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 OAuth']
  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 => 'CoachingAnnotation')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CoachingApi#get_coaching_appointment_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_coaching_appointment_annotations(appointment_id, opts = {}) ⇒ CoachingAnnotationList

Get a list of annotations. You must have the appropriate permission for the type of annotation you are creating. Permission not required if you are related to the appointment (only the creator or facilitator can view private annotations).

Parameters:

  • appointment_id

    The ID of the coaching appointment.

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

    the optional parameters

Options Hash (opts):

  • :page_number (Integer)

    Page number (default to 1)

  • :page_size (Integer)

    Page size (default to 25)

Returns:



313
314
315
316
# File 'lib/purecloudplatformclientv2/api/coaching_api.rb', line 313

def get_coaching_appointment_annotations(appointment_id, opts = {})
  data, _status_code, _headers = get_coaching_appointment_annotations_with_http_info(appointment_id, opts)
  return data
end

#get_coaching_appointment_annotations_with_http_info(appointment_id, opts = {}) ⇒ Array<(CoachingAnnotationList, Fixnum, Hash)>

Get a list of annotations. You must have the appropriate permission for the type of annotation you are creating. Permission not required if you are related to the appointment (only the creator or facilitator can view private annotations).

Parameters:

  • appointment_id

    The ID of the coaching appointment.

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

    the optional parameters

Options Hash (opts):

  • :page_number (Integer)

    Page number

  • :page_size (Integer)

    Page size

Returns:

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

    CoachingAnnotationList data, response status code and response headers



325
326
327
328
329
330
331
332
333
334
335
336
337
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
# File 'lib/purecloudplatformclientv2/api/coaching_api.rb', line 325

def get_coaching_appointment_annotations_with_http_info(appointment_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CoachingApi.get_coaching_appointment_annotations ..."
  end
  
  
  # verify the required parameter 'appointment_id' is set
  fail ArgumentError, "Missing the required parameter 'appointment_id' when calling CoachingApi.get_coaching_appointment_annotations" if appointment_id.nil?
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/coaching/appointments/{appointmentId}/annotations".sub('{format}','json').sub('{' + 'appointmentId' + '}', appointment_id.to_s)

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

  # 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 OAuth']
  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 => 'CoachingAnnotationList')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CoachingApi#get_coaching_appointment_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_coaching_appointment_statuses(appointment_id, opts = {}) ⇒ CoachingAppointmentStatusDtoList

Get the list of status changes for a coaching appointment. Permission not required if you are an attendee, creator or facilitator of the appointment

Parameters:

  • appointment_id

    The ID of the coaching appointment.

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

    the optional parameters

Options Hash (opts):

  • :page_number (Integer)

    Page number (default to 1)

  • :page_size (Integer)

    Page size (default to 25)

Returns:



396
397
398
399
# File 'lib/purecloudplatformclientv2/api/coaching_api.rb', line 396

def get_coaching_appointment_statuses(appointment_id, opts = {})
  data, _status_code, _headers = get_coaching_appointment_statuses_with_http_info(appointment_id, opts)
  return data
end

#get_coaching_appointment_statuses_with_http_info(appointment_id, opts = {}) ⇒ Array<(CoachingAppointmentStatusDtoList, Fixnum, Hash)>

Get the list of status changes for a coaching appointment. Permission not required if you are an attendee, creator or facilitator of the appointment

Parameters:

  • appointment_id

    The ID of the coaching appointment.

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

    the optional parameters

Options Hash (opts):

  • :page_number (Integer)

    Page number

  • :page_size (Integer)

    Page size

Returns:



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
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
# File 'lib/purecloudplatformclientv2/api/coaching_api.rb', line 408

def get_coaching_appointment_statuses_with_http_info(appointment_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CoachingApi.get_coaching_appointment_statuses ..."
  end
  
  
  # verify the required parameter 'appointment_id' is set
  fail ArgumentError, "Missing the required parameter 'appointment_id' when calling CoachingApi.get_coaching_appointment_statuses" if appointment_id.nil?
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/coaching/appointments/{appointmentId}/statuses".sub('{format}','json').sub('{' + 'appointmentId' + '}', appointment_id.to_s)

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

  # 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 OAuth']
  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 => 'CoachingAppointmentStatusDtoList')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CoachingApi#get_coaching_appointment_statuses\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_coaching_appointment_with_http_info(appointment_id, opts = {}) ⇒ Array<(CoachingAppointmentResponse, Fixnum, Hash)>

Retrieve an appointment Permission not required if you are the attendee, creator or facilitator of the appointment

Parameters:

  • appointment_id

    The ID of the coaching appointment.

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

    the optional parameters

Returns:



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
# File 'lib/purecloudplatformclientv2/api/coaching_api.rb', line 181

def get_coaching_appointment_with_http_info(appointment_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CoachingApi.get_coaching_appointment ..."
  end
  
  
  # verify the required parameter 'appointment_id' is set
  fail ArgumentError, "Missing the required parameter 'appointment_id' when calling CoachingApi.get_coaching_appointment" if appointment_id.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/coaching/appointments/{appointmentId}".sub('{format}','json').sub('{' + 'appointmentId' + '}', appointment_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 OAuth']
  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 => 'CoachingAppointmentResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CoachingApi#get_coaching_appointment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_coaching_appointments(user_ids, opts = {}) ⇒ CoachingAppointmentResponseList

Get appointments for users and optional date range

Parameters:

  • user_ids

    The user IDs for which to retrieve appointments

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

    the optional parameters

Options Hash (opts):

  • :interval (String)

    Interval to filter data by. Intervals are represented as an ISO-8601 string. For example: YYYY-MM-DDThh:mm:ss/YYYY-MM-DDThh:mm:ss

  • :page_number (Integer)

    Page number (default to 1)

  • :page_size (Integer)

    Page size (default to 25)

  • :statuses (Array<String>)

    Appointment Statuses to filter by

  • :facilitator_ids (Array<String>)

    The facilitator IDs for which to retrieve appointments

  • :sort_order (String)

    Sort (by due date) either Asc or Desc

Returns:



483
484
485
486
# File 'lib/purecloudplatformclientv2/api/coaching_api.rb', line 483

def get_coaching_appointments(user_ids, opts = {})
  data, _status_code, _headers = get_coaching_appointments_with_http_info(user_ids, opts)
  return data
end

#get_coaching_appointments_me(opts = {}) ⇒ CoachingAppointmentResponseList

Get my appointments for a given date range

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :interval (String)

    Interval to filter data by. Intervals are represented as an ISO-8601 string. For example: YYYY-MM-DDThh:mm:ss/YYYY-MM-DDThh:mm:ss

  • :page_number (Integer)

    Page number (default to 1)

  • :page_size (Integer)

    Page size (default to 25)

  • :statuses (Array<String>)

    Appointment Statuses to filter by

  • :facilitator_ids (Array<String>)

    The facilitator IDs for which to retrieve appointments

  • :sort_order (String)

    Sort (by due date) either Asc or Desc

Returns:



606
607
608
609
# File 'lib/purecloudplatformclientv2/api/coaching_api.rb', line 606

def get_coaching_appointments_me(opts = {})
  data, _status_code, _headers = get_coaching_appointments_me_with_http_info(opts)
  return data
end

#get_coaching_appointments_me_with_http_info(opts = {}) ⇒ Array<(CoachingAppointmentResponseList, Fixnum, Hash)>

Get my appointments for a given date range

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :interval (String)

    Interval to filter data by. Intervals are represented as an ISO-8601 string. For example: YYYY-MM-DDThh:mm:ss/YYYY-MM-DDThh:mm:ss

  • :page_number (Integer)

    Page number

  • :page_size (Integer)

    Page size

  • :statuses (Array<String>)

    Appointment Statuses to filter by

  • :facilitator_ids (Array<String>)

    The facilitator IDs for which to retrieve appointments

  • :sort_order (String)

    Sort (by due date) either Asc or Desc

Returns:



621
622
623
624
625
626
627
628
629
630
631
632
633
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
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
# File 'lib/purecloudplatformclientv2/api/coaching_api.rb', line 621

def get_coaching_appointments_me_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CoachingApi.get_coaching_appointments_me ..."
  end
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  if opts[:'sort_order'] && !['Desc', 'Asc'].include?(opts[:'sort_order'])
    fail ArgumentError, 'invalid value for "sort_order", must be one of Desc, Asc'
  end
  
  
  
  
  # resource path
  local_var_path = "/api/v2/coaching/appointments/me".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'interval'] = opts[:'interval'] if opts[:'interval']
  query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number']
  query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size']
  query_params[:'statuses'] = @api_client.build_collection_param(opts[:'statuses'], :multi) if opts[:'statuses']
  query_params[:'facilitatorIds'] = @api_client.build_collection_param(opts[:'facilitator_ids'], :multi) if opts[:'facilitator_ids']
  query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order']

  # 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 OAuth']
  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 => 'CoachingAppointmentResponseList')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CoachingApi#get_coaching_appointments_me\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_coaching_appointments_with_http_info(user_ids, opts = {}) ⇒ Array<(CoachingAppointmentResponseList, Fixnum, Hash)>

Get appointments for users and optional date range

Parameters:

  • user_ids

    The user IDs for which to retrieve appointments

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

    the optional parameters

Options Hash (opts):

  • :interval (String)

    Interval to filter data by. Intervals are represented as an ISO-8601 string. For example: YYYY-MM-DDThh:mm:ss/YYYY-MM-DDThh:mm:ss

  • :page_number (Integer)

    Page number

  • :page_size (Integer)

    Page size

  • :statuses (Array<String>)

    Appointment Statuses to filter by

  • :facilitator_ids (Array<String>)

    The facilitator IDs for which to retrieve appointments

  • :sort_order (String)

    Sort (by due date) either Asc or Desc

Returns:



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
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
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
# File 'lib/purecloudplatformclientv2/api/coaching_api.rb', line 499

def get_coaching_appointments_with_http_info(user_ids, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CoachingApi.get_coaching_appointments ..."
  end
  
  
  # verify the required parameter 'user_ids' is set
  fail ArgumentError, "Missing the required parameter 'user_ids' when calling CoachingApi.get_coaching_appointments" if user_ids.nil?
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  
  if opts[:'sort_order'] && !['Desc', 'Asc'].include?(opts[:'sort_order'])
    fail ArgumentError, 'invalid value for "sort_order", must be one of Desc, Asc'
  end
  
  
  
  
  # resource path
  local_var_path = "/api/v2/coaching/appointments".sub('{format}','json')

  # query parameters
  query_params = {}
  query_params[:'userIds'] = @api_client.build_collection_param(user_ids, :multi)
  query_params[:'interval'] = opts[:'interval'] if opts[:'interval']
  query_params[:'pageNumber'] = opts[:'page_number'] if opts[:'page_number']
  query_params[:'pageSize'] = opts[:'page_size'] if opts[:'page_size']
  query_params[:'statuses'] = @api_client.build_collection_param(opts[:'statuses'], :multi) if opts[:'statuses']
  query_params[:'facilitatorIds'] = @api_client.build_collection_param(opts[:'facilitator_ids'], :multi) if opts[:'facilitator_ids']
  query_params[:'sortOrder'] = opts[:'sort_order'] if opts[:'sort_order']

  # 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 OAuth']
  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 => 'CoachingAppointmentResponseList')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CoachingApi#get_coaching_appointments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_coaching_notification(notification_id, opts = {}) ⇒ CoachingNotification

Get an existing notification Permission not required if you are the owner of the notification.

Parameters:

  • notification_id

    The ID of the notification.

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

    the optional parameters

Returns:



714
715
716
717
# File 'lib/purecloudplatformclientv2/api/coaching_api.rb', line 714

def get_coaching_notification(notification_id, opts = {})
  data, _status_code, _headers = get_coaching_notification_with_http_info(notification_id, opts)
  return data
end

#get_coaching_notification_with_http_info(notification_id, opts = {}) ⇒ Array<(CoachingNotification, Fixnum, Hash)>

Get an existing notification Permission not required if you are the owner of the notification.

Parameters:

  • notification_id

    The ID of the notification.

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

    the optional parameters

Returns:

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

    CoachingNotification data, response status code and response headers



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
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
# File 'lib/purecloudplatformclientv2/api/coaching_api.rb', line 724

def get_coaching_notification_with_http_info(notification_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CoachingApi.get_coaching_notification ..."
  end
  
  
  # verify the required parameter 'notification_id' is set
  fail ArgumentError, "Missing the required parameter 'notification_id' when calling CoachingApi.get_coaching_notification" if notification_id.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/coaching/notifications/{notificationId}".sub('{format}','json').sub('{' + 'notificationId' + '}', notification_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 OAuth']
  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 => 'CoachingNotification')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CoachingApi#get_coaching_notification\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_coaching_notifications(opts = {}) ⇒ CoachingNotificationList

Retrieve the list of your notifications.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page_number (Integer)

    Page number (default to 1)

  • :page_size (Integer)

    Page size (default to 25)

Returns:



780
781
782
783
# File 'lib/purecloudplatformclientv2/api/coaching_api.rb', line 780

def get_coaching_notifications(opts = {})
  data, _status_code, _headers = get_coaching_notifications_with_http_info(opts)
  return data
end

#get_coaching_notifications_with_http_info(opts = {}) ⇒ Array<(CoachingNotificationList, Fixnum, Hash)>

Retrieve the list of your notifications.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :page_number (Integer)

    Page number

  • :page_size (Integer)

    Page size

Returns:

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

    CoachingNotificationList data, response status code and response headers



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
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
# File 'lib/purecloudplatformclientv2/api/coaching_api.rb', line 791

def get_coaching_notifications_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CoachingApi.get_coaching_notifications ..."
  end
  
  
  
  
  
  
  
  
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/coaching/notifications".sub('{format}','json')

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

  # 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 OAuth']
  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 => 'CoachingNotificationList')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CoachingApi#get_coaching_notifications\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#patch_coaching_appointment(appointment_id, body, opts = {}) ⇒ CoachingAppointmentResponse

Update an existing appointment Permission not required if you are the creator or facilitator of the appointment

Parameters:

  • appointment_id

    The ID of the coaching appointment.

  • body

    The new version of the appointment

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

    the optional parameters

Returns:



853
854
855
856
# File 'lib/purecloudplatformclientv2/api/coaching_api.rb', line 853

def patch_coaching_appointment(appointment_id, body, opts = {})
  data, _status_code, _headers = patch_coaching_appointment_with_http_info(appointment_id, body, opts)
  return data
end

#patch_coaching_appointment_annotation(appointment_id, annotation_id, body, opts = {}) ⇒ CoachingAnnotation

Update an existing annotation. You must have the appropriate permission for the type of annotation you are updating. Permission not required if you are the creator or facilitator of the appointment

Parameters:

  • appointment_id

    The ID of the coaching appointment.

  • annotation_id

    The ID of the annotation.

  • body

    The new version of the annotation

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

    the optional parameters

Returns:



929
930
931
932
# File 'lib/purecloudplatformclientv2/api/coaching_api.rb', line 929

def patch_coaching_appointment_annotation(appointment_id, annotation_id, body, opts = {})
  data, _status_code, _headers = patch_coaching_appointment_annotation_with_http_info(appointment_id, annotation_id, body, opts)
  return data
end

#patch_coaching_appointment_annotation_with_http_info(appointment_id, annotation_id, body, opts = {}) ⇒ Array<(CoachingAnnotation, Fixnum, Hash)>

Update an existing annotation. You must have the appropriate permission for the type of annotation you are updating. Permission not required if you are the creator or facilitator of the appointment

Parameters:

  • appointment_id

    The ID of the coaching appointment.

  • annotation_id

    The ID of the annotation.

  • body

    The new version of the annotation

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

    the optional parameters

Returns:

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

    CoachingAnnotation data, response status code and response headers



941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
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
# File 'lib/purecloudplatformclientv2/api/coaching_api.rb', line 941

def patch_coaching_appointment_annotation_with_http_info(appointment_id, annotation_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CoachingApi.patch_coaching_appointment_annotation ..."
  end
  
  
  # verify the required parameter 'appointment_id' is set
  fail ArgumentError, "Missing the required parameter 'appointment_id' when calling CoachingApi.patch_coaching_appointment_annotation" if appointment_id.nil?
  
  
  
  
  
  
  # verify the required parameter 'annotation_id' is set
  fail ArgumentError, "Missing the required parameter 'annotation_id' when calling CoachingApi.patch_coaching_appointment_annotation" if annotation_id.nil?
  
  
  
  
  
  
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling CoachingApi.patch_coaching_appointment_annotation" if body.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/coaching/appointments/{appointmentId}/annotations/{annotationId}".sub('{format}','json').sub('{' + 'appointmentId' + '}', appointment_id.to_s).sub('{' + 'annotationId' + '}', annotation_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(body)
  
  auth_names = ['PureCloud OAuth']
  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,
    :return_type => 'CoachingAnnotation')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CoachingApi#patch_coaching_appointment_annotation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#patch_coaching_appointment_status(appointment_id, body, opts = {}) ⇒ CoachingAppointmentStatusDto

Update the status of a coaching appointment Permission not required if you are an attendee, creator or facilitator of the appointment

Parameters:

  • appointment_id

    The ID of the coaching appointment.

  • body

    Updated status of the coaching appointment

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

    the optional parameters

Returns:



1013
1014
1015
1016
# File 'lib/purecloudplatformclientv2/api/coaching_api.rb', line 1013

def patch_coaching_appointment_status(appointment_id, body, opts = {})
  data, _status_code, _headers = patch_coaching_appointment_status_with_http_info(appointment_id, body, opts)
  return data
end

#patch_coaching_appointment_status_with_http_info(appointment_id, body, opts = {}) ⇒ Array<(CoachingAppointmentStatusDto, Fixnum, Hash)>

Update the status of a coaching appointment Permission not required if you are an attendee, creator or facilitator of the appointment

Parameters:

  • appointment_id

    The ID of the coaching appointment.

  • body

    Updated status of the coaching appointment

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

    the optional parameters

Returns:



1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
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
# File 'lib/purecloudplatformclientv2/api/coaching_api.rb', line 1024

def patch_coaching_appointment_status_with_http_info(appointment_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CoachingApi.patch_coaching_appointment_status ..."
  end
  
  
  # verify the required parameter 'appointment_id' is set
  fail ArgumentError, "Missing the required parameter 'appointment_id' when calling CoachingApi.patch_coaching_appointment_status" if appointment_id.nil?
  
  
  
  
  
  
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling CoachingApi.patch_coaching_appointment_status" if body.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/coaching/appointments/{appointmentId}/status".sub('{format}','json').sub('{' + 'appointmentId' + '}', appointment_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(body)
  
  auth_names = ['PureCloud OAuth']
  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,
    :return_type => 'CoachingAppointmentStatusDto')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CoachingApi#patch_coaching_appointment_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#patch_coaching_appointment_with_http_info(appointment_id, body, opts = {}) ⇒ Array<(CoachingAppointmentResponse, Fixnum, Hash)>

Update an existing appointment Permission not required if you are the creator or facilitator of the appointment

Parameters:

  • appointment_id

    The ID of the coaching appointment.

  • body

    The new version of the appointment

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

    the optional parameters

Returns:



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
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
# File 'lib/purecloudplatformclientv2/api/coaching_api.rb', line 864

def patch_coaching_appointment_with_http_info(appointment_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CoachingApi.patch_coaching_appointment ..."
  end
  
  
  # verify the required parameter 'appointment_id' is set
  fail ArgumentError, "Missing the required parameter 'appointment_id' when calling CoachingApi.patch_coaching_appointment" if appointment_id.nil?
  
  
  
  
  
  
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling CoachingApi.patch_coaching_appointment" if body.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/coaching/appointments/{appointmentId}".sub('{format}','json').sub('{' + 'appointmentId' + '}', appointment_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(body)
  
  auth_names = ['PureCloud OAuth']
  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,
    :return_type => 'CoachingAppointmentResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CoachingApi#patch_coaching_appointment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#patch_coaching_notification(notification_id, body, opts = {}) ⇒ CoachingNotification

Update an existing notification. Can only update your own notifications.

Parameters:

  • notification_id

    The ID of the notification.

  • body

    Change the read state of a notification

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

    the optional parameters

Returns:



1088
1089
1090
1091
# File 'lib/purecloudplatformclientv2/api/coaching_api.rb', line 1088

def patch_coaching_notification(notification_id, body, opts = {})
  data, _status_code, _headers = patch_coaching_notification_with_http_info(notification_id, body, opts)
  return data
end

#patch_coaching_notification_with_http_info(notification_id, body, opts = {}) ⇒ Array<(CoachingNotification, Fixnum, Hash)>

Update an existing notification. Can only update your own notifications.

Parameters:

  • notification_id

    The ID of the notification.

  • body

    Change the read state of a notification

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

    the optional parameters

Returns:

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

    CoachingNotification data, response status code and response headers



1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
# File 'lib/purecloudplatformclientv2/api/coaching_api.rb', line 1099

def patch_coaching_notification_with_http_info(notification_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CoachingApi.patch_coaching_notification ..."
  end
  
  
  # verify the required parameter 'notification_id' is set
  fail ArgumentError, "Missing the required parameter 'notification_id' when calling CoachingApi.patch_coaching_notification" if notification_id.nil?
  
  
  
  
  
  
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling CoachingApi.patch_coaching_notification" if body.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/coaching/notifications/{notificationId}".sub('{format}','json').sub('{' + 'notificationId' + '}', notification_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(body)
  
  auth_names = ['PureCloud OAuth']
  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,
    :return_type => 'CoachingNotification')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CoachingApi#patch_coaching_notification\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_coaching_appointment_annotations(appointment_id, body, opts = {}) ⇒ CoachingAnnotation

Create a new annotation. You must have the appropriate permission for the type of annotation you are creating. Permission not required if you are related to the appointment (only the creator or facilitator can create private annotations).

Parameters:

  • appointment_id

    The ID of the coaching appointment.

  • body

    The annotation to add

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

    the optional parameters

Returns:



1163
1164
1165
1166
# File 'lib/purecloudplatformclientv2/api/coaching_api.rb', line 1163

def post_coaching_appointment_annotations(appointment_id, body, opts = {})
  data, _status_code, _headers = post_coaching_appointment_annotations_with_http_info(appointment_id, body, opts)
  return data
end

#post_coaching_appointment_annotations_with_http_info(appointment_id, body, opts = {}) ⇒ Array<(CoachingAnnotation, Fixnum, Hash)>

Create a new annotation. You must have the appropriate permission for the type of annotation you are creating. Permission not required if you are related to the appointment (only the creator or facilitator can create private annotations).

Parameters:

  • appointment_id

    The ID of the coaching appointment.

  • body

    The annotation to add

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

    the optional parameters

Returns:

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

    CoachingAnnotation data, response status code and response headers



1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
# File 'lib/purecloudplatformclientv2/api/coaching_api.rb', line 1174

def post_coaching_appointment_annotations_with_http_info(appointment_id, body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CoachingApi.post_coaching_appointment_annotations ..."
  end
  
  
  # verify the required parameter 'appointment_id' is set
  fail ArgumentError, "Missing the required parameter 'appointment_id' when calling CoachingApi.post_coaching_appointment_annotations" if appointment_id.nil?
  
  
  
  
  
  
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling CoachingApi.post_coaching_appointment_annotations" if body.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/coaching/appointments/{appointmentId}/annotations".sub('{format}','json').sub('{' + 'appointmentId' + '}', appointment_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(body)
  
  auth_names = ['PureCloud OAuth']
  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 => 'CoachingAnnotation')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CoachingApi#post_coaching_appointment_annotations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#post_coaching_appointments(body, opts = {}) ⇒ CoachingAppointmentResponse

Create a new appointment

Parameters:

  • body

    The appointment to add

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

    the optional parameters

Returns:



1237
1238
1239
1240
# File 'lib/purecloudplatformclientv2/api/coaching_api.rb', line 1237

def post_coaching_appointments(body, opts = {})
  data, _status_code, _headers = post_coaching_appointments_with_http_info(body, opts)
  return data
end

#post_coaching_appointments_with_http_info(body, opts = {}) ⇒ Array<(CoachingAppointmentResponse, Fixnum, Hash)>

Create a new appointment

Parameters:

  • body

    The appointment to add

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

    the optional parameters

Returns:



1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
# File 'lib/purecloudplatformclientv2/api/coaching_api.rb', line 1247

def post_coaching_appointments_with_http_info(body, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: CoachingApi.post_coaching_appointments ..."
  end
  
  
  # verify the required parameter 'body' is set
  fail ArgumentError, "Missing the required parameter 'body' when calling CoachingApi.post_coaching_appointments" if body.nil?
  
  
  
  
  
  # resource path
  local_var_path = "/api/v2/coaching/appointments".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(body)
  
  auth_names = ['PureCloud OAuth']
  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 => 'CoachingAppointmentResponse')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: CoachingApi#post_coaching_appointments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end