=begin PureCloud Platform API With the PureCloud Platform API, you can control all aspects of your PureCloud environment. With the APIs you can access the system configuration, manage conversations and more. OpenAPI spec version: v2 Contact: DeveloperEvangelists@genesys.com Generated by: https://github.com/swagger-api/swagger-codegen.git License: UNLICENSED https://help.mypurecloud.com/articles/terms-and-conditions/ Terms of Service: https://help.mypurecloud.com/articles/terms-and-conditions/ =end require "uri" module PureCloud class CoachingApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client 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 [nil] def delete_coaching_appointment(appointment_id, opts = {}) delete_coaching_appointment_with_http_info(appointment_id, opts) return nil 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<(nil, Fixnum, Hash)>] nil, response status code and response headers 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) 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 # 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] 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 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 # 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] 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 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 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 # 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] 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 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] 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 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] 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 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 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 string; format is ISO-8601. Separate start and end times with forward slash '/' # @option opts [Integer] :page_number Page number (default to 1) # @option opts [Integer] :page_size Page size (default to 25) # @option opts [Array] :statuses Appointment Statuses to filter by # @option opts [Array] :facilitator_ids The facilitator IDs for which to retrieve appointments # @option opts [String] :sort_order Sort (by due date) either Asc or Desc # @return [CoachingAppointmentResponseList] def get_coaching_appointments(user_ids, opts = {}) data, _status_code, _headers = get_coaching_appointments_with_http_info(user_ids, opts) return data 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 string; format is ISO-8601. Separate start and end times with forward slash '/' # @option opts [Integer] :page_number Page number # @option opts [Integer] :page_size Page size # @option opts [Array] :statuses Appointment Statuses to filter by # @option opts [Array] :facilitator_ids The facilitator IDs for which to retrieve appointments # @option opts [String] :sort_order Sort (by due date) either Asc or Desc # @return [Array<(CoachingAppointmentResponseList, Fixnum, Hash)>] CoachingAppointmentResponseList data, response status code and response headers 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 my appointments for a given date range # # @param [Hash] opts the optional parameters # @option opts [String] :interval Interval string; format is ISO-8601. Separate start and end times with forward slash '/' # @option opts [Integer] :page_number Page number (default to 1) # @option opts [Integer] :page_size Page size (default to 25) # @option opts [Array] :statuses Appointment Statuses to filter by # @option opts [Array] :facilitator_ids The facilitator IDs for which to retrieve appointments # @option opts [String] :sort_order Sort (by due date) either Asc or Desc # @return [CoachingAppointmentResponseList] 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 string; format is ISO-8601. Separate start and end times with forward slash '/' # @option opts [Integer] :page_number Page number # @option opts [Integer] :page_size Page size # @option opts [Array] :statuses Appointment Statuses to filter by # @option opts [Array] :facilitator_ids The facilitator IDs for which to retrieve appointments # @option opts [String] :sort_order Sort (by due date) either Asc or Desc # @return [Array<(CoachingAppointmentResponseList, Fixnum, Hash)>] CoachingAppointmentResponseList data, response status code and response headers 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 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 # @return [CoachingNotification] 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 # @return [Array<(CoachingNotification, Fixnum, Hash)>] CoachingNotification data, response status code and response headers 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 # 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) # @return [CoachingNotificationList] 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 # @return [Array<(CoachingNotificationList, Fixnum, Hash)>] CoachingNotificationList data, response status code and response headers 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 # 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] 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 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 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 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] 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 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] 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 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 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] 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 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] 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 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] def post_coaching_appointments(body, opts = {}) data, _status_code, _headers = post_coaching_appointments_with_http_info(body, opts) return data 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 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 end end