class PureCloud::CoachingApi
Attributes
Public Class Methods
# File lib/purecloudplatformclientv2/api/coaching_api.rb, line 23 def initialize(api_client = ApiClient.default) @api_client = api_client end
Public Instance Methods
Delete an existing appointment Permission not required if you are the creator of the appointment @param appointment_id The ID of the coaching appointment. @param [Hash] opts the optional parameters @return [CoachingAppointmentReference]
# 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 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 @param appointment_id The ID of the coaching appointment. @param annotation_id The ID of the annotation. @param [Hash] opts the optional parameters @return [nil]
# 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 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 @param appointment_id The ID of the coaching appointment. @param annotation_id The ID of the annotation. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
# 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 an existing appointment Permission not required if you are the creator of the appointment @param appointment_id The ID of the coaching appointment. @param [Hash] opts the optional parameters @return [Array<(CoachingAppointmentReference
, Fixnum, Hash)>] CoachingAppointmentReference
data, response status code and response headers
# 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
Retrieve an appointment Permission not required if you are the attendee, creator or facilitator of the appointment @param appointment_id The ID of the coaching appointment. @param [Hash] opts the optional parameters @return [CoachingAppointmentResponse]
# 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
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). @param appointment_id The ID of the coaching appointment. @param annotation_id The ID of the annotation. @param [Hash] opts the optional parameters @return [CoachingAnnotation]
# 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
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). @param appointment_id The ID of the coaching appointment. @param annotation_id The ID of the annotation. @param [Hash] opts the optional parameters @return [Array<(CoachingAnnotation
, Fixnum, Hash)>] CoachingAnnotation
data, response status code and response headers
# 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 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). @param appointment_id The ID of the coaching appointment. @param [Hash] opts the optional parameters @option opts [Integer] :page_number Page
number (default to 1) @option opts [Integer] :page_size Page
size (default to 25) @return [CoachingAnnotationList]
# 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 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). @param appointment_id The ID of the coaching appointment. @param [Hash] opts the optional parameters @option opts [Integer] :page_number Page
number @option opts [Integer] :page_size Page
size @return [Array<(CoachingAnnotationList
, Fixnum, Hash)>] CoachingAnnotationList
data, response status code and response headers
# 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 the list of status changes for a coaching appointment. Permission not required if you are an attendee, creator or facilitator of the appointment @param appointment_id The ID of the coaching appointment. @param [Hash] opts the optional parameters @option opts [Integer] :page_number Page
number (default to 1) @option opts [Integer] :page_size Page
size (default to 25) @return [CoachingAppointmentStatusDtoList]
# 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 the list of status changes for a coaching appointment. Permission not required if you are an attendee, creator or facilitator of the appointment @param appointment_id The ID of the coaching appointment. @param [Hash] opts the optional parameters @option opts [Integer] :page_number Page
number @option opts [Integer] :page_size Page
size @return [Array<(CoachingAppointmentStatusDtoList
, Fixnum, Hash)>] CoachingAppointmentStatusDtoList
data, response status code and response headers
# 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
Retrieve an appointment Permission not required if you are the attendee, creator or facilitator of the appointment @param appointment_id The ID of the coaching appointment. @param [Hash] opts the optional parameters @return [Array<(CoachingAppointmentResponse
, Fixnum, Hash)>] CoachingAppointmentResponse
data, response status code and response headers
# 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 appointments for users and optional date range
@param user_ids The user IDs for which to retrieve appointments @param [Hash] opts the optional parameters @option opts [String] :interval 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 @option opts [Integer] :page_number Page
number (default to 1) @option opts [Integer] :page_size Page
size (default to 25) @option opts [Array<String>] :statuses Appointment Statuses to filter by @option opts [Array<String>] :facilitator_ids The facilitator IDs for which to retrieve appointments @option opts [String] :sort_order Sort (by due date) either Asc or Desc @option opts [Array<String>] :relationships Relationships to filter by @option opts [String] :completion_interval Appointment completion start and end to filter by. Intervals are represented as an ISO-8601 string. For example: YYYY-MM-DDThh:mm:ss/YYYY-MM-DDThh:mm:ss @option opts [String] :overdue Overdue status to filter by @return [CoachingAppointmentResponseList]
# File lib/purecloudplatformclientv2/api/coaching_api.rb, line 486 def get_coaching_appointments(user_ids, opts = {}) data, _status_code, _headers = get_coaching_appointments_with_http_info(user_ids, opts) return data end
Get my appointments for a given date range
@param [Hash] opts the optional parameters @option opts [String] :interval 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 @option opts [Integer] :page_number Page
number (default to 1) @option opts [Integer] :page_size Page
size (default to 25) @option opts [Array<String>] :statuses Appointment Statuses to filter by @option opts [Array<String>] :facilitator_ids The facilitator IDs for which to retrieve appointments @option opts [String] :sort_order Sort (by due date) either Asc or Desc @option opts [Array<String>] :relationships Relationships to filter by @option opts [String] :completion_interval Appointment completion start and end to filter by. Intervals are represented as an ISO-8601 string. For example: YYYY-MM-DDThh:mm:ss/YYYY-MM-DDThh:mm:ss @option opts [String] :overdue Overdue status to filter by @return [CoachingAppointmentResponseList]
# File lib/purecloudplatformclientv2/api/coaching_api.rb, line 640 def get_coaching_appointments_me(opts = {}) data, _status_code, _headers = get_coaching_appointments_me_with_http_info(opts) return data end
Get my appointments for a given date range
@param [Hash] opts the optional parameters @option opts [String] :interval 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 @option opts [Integer] :page_number Page
number @option opts [Integer] :page_size Page
size @option opts [Array<String>] :statuses Appointment Statuses to filter by @option opts [Array<String>] :facilitator_ids The facilitator IDs for which to retrieve appointments @option opts [String] :sort_order Sort (by due date) either Asc or Desc @option opts [Array<String>] :relationships Relationships to filter by @option opts [String] :completion_interval Appointment completion start and end to filter by. Intervals are represented as an ISO-8601 string. For example: YYYY-MM-DDThh:mm:ss/YYYY-MM-DDThh:mm:ss @option opts [String] :overdue Overdue status to filter by @return [Array<(CoachingAppointmentResponseList
, Fixnum, Hash)>] CoachingAppointmentResponseList
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/coaching_api.rb, line 658 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 if opts[:'overdue'] && !['Any', 'True', 'False'].include?(opts[:'overdue']) fail ArgumentError, 'invalid value for "overdue", must be one of Any, True, False' 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'] query_params[:'relationships'] = @api_client.build_collection_param(opts[:'relationships'], :multi) if opts[:'relationships'] query_params[:'completionInterval'] = opts[:'completion_interval'] if opts[:'completion_interval'] query_params[:'overdue'] = opts[:'overdue'] if opts[:'overdue'] # 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 appointments for users and optional date range
@param user_ids The user IDs for which to retrieve appointments @param [Hash] opts the optional parameters @option opts [String] :interval 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 @option opts [Integer] :page_number Page
number @option opts [Integer] :page_size Page
size @option opts [Array<String>] :statuses Appointment Statuses to filter by @option opts [Array<String>] :facilitator_ids The facilitator IDs for which to retrieve appointments @option opts [String] :sort_order Sort (by due date) either Asc or Desc @option opts [Array<String>] :relationships Relationships to filter by @option opts [String] :completion_interval Appointment completion start and end to filter by. Intervals are represented as an ISO-8601 string. For example: YYYY-MM-DDThh:mm:ss/YYYY-MM-DDThh:mm:ss @option opts [String] :overdue Overdue status to filter by @return [Array<(CoachingAppointmentResponseList
, Fixnum, Hash)>] CoachingAppointmentResponseList
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/coaching_api.rb, line 505 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 if opts[:'overdue'] && !['Any', 'True', 'False'].include?(opts[:'overdue']) fail ArgumentError, 'invalid value for "overdue", must be one of Any, True, False' 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'] query_params[:'relationships'] = @api_client.build_collection_param(opts[:'relationships'], :multi) if opts[:'relationships'] query_params[:'completionInterval'] = opts[:'completion_interval'] if opts[:'completion_interval'] query_params[:'overdue'] = opts[:'overdue'] if opts[:'overdue'] # 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 an existing notification Permission not required if you are the owner of the notification. @param notification_id The ID of the notification. @param [Hash] opts the optional parameters @option opts [Array<String>] :expand Indicates a field in the response which should be expanded. @return [CoachingNotification]
# File lib/purecloudplatformclientv2/api/coaching_api.rb, line 777 def get_coaching_notification(notification_id, opts = {}) data, _status_code, _headers = get_coaching_notification_with_http_info(notification_id, opts) return data end
Get an existing notification Permission not required if you are the owner of the notification. @param notification_id The ID of the notification. @param [Hash] opts the optional parameters @option opts [Array<String>] :expand Indicates a field in the response which should be expanded. @return [Array<(CoachingNotification
, Fixnum, Hash)>] CoachingNotification
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/coaching_api.rb, line 788 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 = {} query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) 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 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
Retrieve the list of your notifications.
@param [Hash] opts the optional parameters @option opts [Integer] :page_number Page
number (default to 1) @option opts [Integer] :page_size Page
size (default to 25) @option opts [Array<String>] :expand Indicates a field in the response which should be expanded. @return [CoachingNotificationList]
# File lib/purecloudplatformclientv2/api/coaching_api.rb, line 852 def get_coaching_notifications(opts = {}) data, _status_code, _headers = get_coaching_notifications_with_http_info(opts) return data end
Retrieve the list of your notifications.
@param [Hash] opts the optional parameters @option opts [Integer] :page_number Page
number @option opts [Integer] :page_size Page
size @option opts [Array<String>] :expand Indicates a field in the response which should be expanded. @return [Array<(CoachingNotificationList
, Fixnum, Hash)>] CoachingNotificationList
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/coaching_api.rb, line 864 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'] query_params[:'expand'] = @api_client.build_collection_param(opts[:'expand'], :multi) 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 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
Update an existing appointment Permission not required if you are the creator or facilitator of the appointment @param appointment_id The ID of the coaching appointment. @param body The new version of the appointment @param [Hash] opts the optional parameters @return [CoachingAppointmentResponse]
# File lib/purecloudplatformclientv2/api/coaching_api.rb, line 933 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
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 @param appointment_id The ID of the coaching appointment. @param annotation_id The ID of the annotation. @param body The new version of the annotation @param [Hash] opts the optional parameters @return [CoachingAnnotation]
# File lib/purecloudplatformclientv2/api/coaching_api.rb, line 1009 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
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 @param appointment_id The ID of the coaching appointment. @param annotation_id The ID of the annotation. @param body The new version of the annotation @param [Hash] opts the optional parameters @return [Array<(CoachingAnnotation
, Fixnum, Hash)>] CoachingAnnotation
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/coaching_api.rb, line 1021 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
Update the status of a coaching appointment Permission not required if you are an attendee, creator or facilitator of the appointment @param appointment_id The ID of the coaching appointment. @param body Updated status of the coaching appointment @param [Hash] opts the optional parameters @return [CoachingAppointmentStatusDto]
# File lib/purecloudplatformclientv2/api/coaching_api.rb, line 1093 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
Update the status of a coaching appointment Permission not required if you are an attendee, creator or facilitator of the appointment @param appointment_id The ID of the coaching appointment. @param body Updated status of the coaching appointment @param [Hash] opts the optional parameters @return [Array<(CoachingAppointmentStatusDto
, Fixnum, Hash)>] CoachingAppointmentStatusDto
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/coaching_api.rb, line 1104 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
Update an existing appointment Permission not required if you are the creator or facilitator of the appointment @param appointment_id The ID of the coaching appointment. @param body The new version of the appointment @param [Hash] opts the optional parameters @return [Array<(CoachingAppointmentResponse
, Fixnum, Hash)>] CoachingAppointmentResponse
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/coaching_api.rb, line 944 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
Update an existing notification. Can only update your own notifications. @param notification_id The ID of the notification. @param body Change
the read state of a notification @param [Hash] opts the optional parameters @return [CoachingNotification]
# File lib/purecloudplatformclientv2/api/coaching_api.rb, line 1168 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
Update an existing notification. Can only update your own notifications. @param notification_id The ID of the notification. @param body Change
the read state of a notification @param [Hash] opts the optional parameters @return [Array<(CoachingNotification
, Fixnum, Hash)>] CoachingNotification
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/coaching_api.rb, line 1179 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
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). @param appointment_id The ID of the coaching appointment. @param body The annotation to add @param [Hash] opts the optional parameters @return [CoachingAnnotation]
# File lib/purecloudplatformclientv2/api/coaching_api.rb, line 1243 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
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). @param appointment_id The ID of the coaching appointment. @param body The annotation to add @param [Hash] opts the optional parameters @return [Array<(CoachingAnnotation
, Fixnum, Hash)>] CoachingAnnotation
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/coaching_api.rb, line 1254 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
Create a new appointment
@param body The appointment to add @param [Hash] opts the optional parameters @return [CoachingAppointmentResponse]
# File lib/purecloudplatformclientv2/api/coaching_api.rb, line 1317 def post_coaching_appointments(body, opts = {}) data, _status_code, _headers = post_coaching_appointments_with_http_info(body, opts) return data end
Retrieve aggregated appointment data
@param body Aggregate Request @param [Hash] opts the optional parameters @return [CoachingAppointmentAggregateResponse]
# File lib/purecloudplatformclientv2/api/coaching_api.rb, line 1382 def post_coaching_appointments_aggregates_query(body, opts = {}) data, _status_code, _headers = post_coaching_appointments_aggregates_query_with_http_info(body, opts) return data end
Retrieve aggregated appointment data
@param body Aggregate Request @param [Hash] opts the optional parameters @return [Array<(CoachingAppointmentAggregateResponse
, Fixnum, Hash)>] CoachingAppointmentAggregateResponse
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/coaching_api.rb, line 1392 def post_coaching_appointments_aggregates_query_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: CoachingApi.post_coaching_appointments_aggregates_query ..." end # verify the required parameter 'body' is set fail ArgumentError, "Missing the required parameter 'body' when calling CoachingApi.post_coaching_appointments_aggregates_query" if body.nil? # resource path local_var_path = "/api/v2/coaching/appointments/aggregates/query".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 => 'CoachingAppointmentAggregateResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: CoachingApi#post_coaching_appointments_aggregates_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end
Create a new appointment
@param body The appointment to add @param [Hash] opts the optional parameters @return [Array<(CoachingAppointmentResponse
, Fixnum, Hash)>] CoachingAppointmentResponse
data, response status code and response headers
# File lib/purecloudplatformclientv2/api/coaching_api.rb, line 1327 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