require "uri" module PureCloud class ConversationsApi attr_accessor :api_client def initialize(api_client = ApiClient.default) @api_client = api_client end # Get conversations # # @param [Hash] opts the optional parameters # @option opts [String] :communication_type Call or Chat communication filtering # @return [ConversationEntityListing] def get_conversations(opts = {}) data, status_code, headers = get_conversations_with_http_info(opts) return data end # Get conversations # # @param [Hash] opts the optional parameters # @option opts [String] :communication_type Call or Chat communication filtering # @return [Array<(ConversationEntityListing, Fixnum, Hash)>] ConversationEntityListing data, response status code and response headers def get_conversations_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConversationsApi#get_conversations ..." end # resource path path = "/api/v1/conversations".sub('{format}','json') # query parameters query_params = {} query_params[:'communicationType'] = opts[:'communication_type'] if opts[:'communication_type'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ConversationEntityListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationsApi#get_conversations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create conversation # # @param [Hash] opts the optional parameters # @option opts [String] :call Phone number to call # @option opts [String] :call_from Queue id to place the call from # @option opts [String] :call_queue_id Queue id to call # @option opts [String] :call_user_id User id to call (this will call the default number) # @option opts [Integer] :priority Priority level to use for routing when calling a queue # @option opts [String] :language_id Language id to use for routing when calling a queue # @option opts [Array] :skill_ids Skill ids to use for routing when calling a queue # @option opts [String] :body # @return [ConversationResponse] def post_conversations(opts = {}) data, status_code, headers = post_conversations_with_http_info(opts) return data end # Create conversation # # @param [Hash] opts the optional parameters # @option opts [String] :call Phone number to call # @option opts [String] :call_from Queue id to place the call from # @option opts [String] :call_queue_id Queue id to call # @option opts [String] :call_user_id User id to call (this will call the default number) # @option opts [Integer] :priority Priority level to use for routing when calling a queue # @option opts [String] :language_id Language id to use for routing when calling a queue # @option opts [Array] :skill_ids Skill ids to use for routing when calling a queue # @option opts [String] :body # @return [Array<(ConversationResponse, Fixnum, Hash)>] ConversationResponse data, response status code and response headers def post_conversations_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConversationsApi#post_conversations ..." end # resource path path = "/api/v1/conversations".sub('{format}','json') # query parameters query_params = {} query_params[:'call'] = opts[:'call'] if opts[:'call'] query_params[:'callFrom'] = opts[:'call_from'] if opts[:'call_from'] query_params[:'callQueueId'] = opts[:'call_queue_id'] if opts[:'call_queue_id'] query_params[:'callUserId'] = opts[:'call_user_id'] if opts[:'call_user_id'] query_params[:'priority'] = opts[:'priority'] if opts[:'priority'] query_params[:'languageId'] = opts[:'language_id'] if opts[:'language_id'] query_params[:'skillIds'] = @api_client.build_collection_param(opts[:'skill_ids'], :multi) if opts[:'skill_ids'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:POST, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ConversationResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationsApi#post_conversations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Create Fax Conversation # # @param [Hash] opts the optional parameters # @option opts [FaxSendRequest] :body Fax # @return [FaxSendResponse] def post_fax(opts = {}) data, status_code, headers = post_fax_with_http_info(opts) return data end # Create Fax Conversation # # @param [Hash] opts the optional parameters # @option opts [FaxSendRequest] :body Fax # @return [Array<(FaxSendResponse, Fixnum, Hash)>] FaxSendResponse data, response status code and response headers def post_fax_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConversationsApi#post_fax ..." end # resource path path = "/api/v1/conversations/fax".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:POST, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'FaxSendResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationsApi#post_fax\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get the maximum number of participants that this user can have on a conference # # @param [Hash] opts the optional parameters # @return [MaxParticipants] def get_maximumconferenceparties(opts = {}) data, status_code, headers = get_maximumconferenceparties_with_http_info(opts) return data end # Get the maximum number of participants that this user can have on a conference # # @param [Hash] opts the optional parameters # @return [Array<(MaxParticipants, Fixnum, Hash)>] MaxParticipants data, response status code and response headers def get_maximumconferenceparties_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConversationsApi#get_maximumconferenceparties ..." end # resource path path = "/api/v1/conversations/maximumconferenceparties".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'MaxParticipants') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationsApi#get_maximumconferenceparties\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Query historical conversations # # @param body Query parameters # @param [Hash] opts the optional parameters # @return [ConversationQueryResponse] def post_query(body, opts = {}) data, status_code, headers = post_query_with_http_info(body, opts) return data end # Query historical conversations # # @param body Query parameters # @param [Hash] opts the optional parameters # @return [Array<(ConversationQueryResponse, Fixnum, Hash)>] ConversationQueryResponse data, response status code and response headers def post_query_with_http_info(body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConversationsApi#post_query ..." end # verify the required parameter 'body' is set fail "Missing the required parameter 'body' when calling post_query" if body.nil? # resource path path = "/api/v1/conversations/query".sub('{format}','json') # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:POST, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ConversationQueryResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationsApi#post_query\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Query historical conversations with a date/time anchor # # @param anchor A point in time within the interval for the query that bounds the query. In the form of YYYYMMDDHHmmssSSSZX where YYYY is the 4-digit year, MM is the 2-digit month, DD is the 2-digit day-of-month, HH is the 2-digit hour-of-day (00-23), mm is the 2-digit minute, ss is the 2-digit second, SSS is the 3-digit millisecond, Z is the UTC offset expressed as 'Z', '+nnnn', '-nnnn', '+nn:nn', '-nn:nn', and X is either 'A' (for the anchor point being at the earliest point in the query) or 'D' (for the anchor point being the latest point in the query # @param body Query parameters # @param [Hash] opts the optional parameters # @return [ConversationQueryResponse] def post_query_0(anchor, body, opts = {}) data, status_code, headers = post_query_0_with_http_info(anchor, body, opts) return data end # Query historical conversations with a date/time anchor # # @param anchor A point in time within the interval for the query that bounds the query. In the form of YYYYMMDDHHmmssSSSZX where YYYY is the 4-digit year, MM is the 2-digit month, DD is the 2-digit day-of-month, HH is the 2-digit hour-of-day (00-23), mm is the 2-digit minute, ss is the 2-digit second, SSS is the 3-digit millisecond, Z is the UTC offset expressed as 'Z', '+nnnn', '-nnnn', '+nn:nn', '-nn:nn', and X is either 'A' (for the anchor point being at the earliest point in the query) or 'D' (for the anchor point being the latest point in the query # @param body Query parameters # @param [Hash] opts the optional parameters # @return [Array<(ConversationQueryResponse, Fixnum, Hash)>] ConversationQueryResponse data, response status code and response headers def post_query_0_with_http_info(anchor, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConversationsApi#post_query_0 ..." end # verify the required parameter 'anchor' is set fail "Missing the required parameter 'anchor' when calling post_query_0" if anchor.nil? # verify the required parameter 'body' is set fail "Missing the required parameter 'body' when calling post_query_0" if body.nil? # resource path path = "/api/v1/conversations/query/{anchor}".sub('{format}','json').sub('{' + 'anchor' + '}', anchor.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(body) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:POST, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ConversationQueryResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationsApi#post_query_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get conversation # # @param conversation_id conversation ID # @param [Hash] opts the optional parameters # @return [Conversation] def get(conversation_id, opts = {}) data, status_code, headers = get_with_http_info(conversation_id, opts) return data end # Get conversation # # @param conversation_id conversation ID # @param [Hash] opts the optional parameters # @return [Array<(Conversation, Fixnum, Hash)>] Conversation data, response status code and response headers def get_with_http_info(conversation_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConversationsApi#get ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling get" if conversation_id.nil? # resource path path = "/api/v1/conversations/{conversationId}".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Conversation') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationsApi#get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update conversation # # @param conversation_id conversation ID # @param [Hash] opts the optional parameters # @option opts [Conversation] :body Conversation # @return [Conversation] def put(conversation_id, opts = {}) data, status_code, headers = put_with_http_info(conversation_id, opts) return data end # Update conversation # # @param conversation_id conversation ID # @param [Hash] opts the optional parameters # @option opts [Conversation] :body Conversation # @return [Array<(Conversation, Fixnum, Hash)>] Conversation data, response status code and response headers def put_with_http_info(conversation_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConversationsApi#put ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling put" if conversation_id.nil? # resource path path = "/api/v1/conversations/{conversationId}".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:PUT, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Conversation') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationsApi#put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get conversation messages # # @param conversation_id conversation ID # @param [Hash] opts the optional parameters # @return [EmailMessageListing] def get_messages(conversation_id, opts = {}) data, status_code, headers = get_messages_with_http_info(conversation_id, opts) return data end # Get conversation messages # # @param conversation_id conversation ID # @param [Hash] opts the optional parameters # @return [Array<(EmailMessageListing, Fixnum, Hash)>] EmailMessageListing data, response status code and response headers def get_messages_with_http_info(conversation_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConversationsApi#get_messages ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling get_messages" if conversation_id.nil? # resource path path = "/api/v1/conversations/{conversationId}/messages".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EmailMessageListing') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationsApi#get_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Send an email reply # # @param conversation_id conversation ID # @param [Hash] opts the optional parameters # @option opts [EmailMessage] :body Reply # @return [EmailMessage] def post_messages(conversation_id, opts = {}) data, status_code, headers = post_messages_with_http_info(conversation_id, opts) return data end # Send an email reply # # @param conversation_id conversation ID # @param [Hash] opts the optional parameters # @option opts [EmailMessage] :body Reply # @return [Array<(EmailMessage, Fixnum, Hash)>] EmailMessage data, response status code and response headers def post_messages_with_http_info(conversation_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConversationsApi#post_messages ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling post_messages" if conversation_id.nil? # resource path path = "/api/v1/conversations/{conversationId}/messages".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:POST, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EmailMessage') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationsApi#post_messages\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get conversation draft reply # # @param conversation_id conversation ID # @param [Hash] opts the optional parameters # @return [EmailMessage] def get_messages_draft(conversation_id, opts = {}) data, status_code, headers = get_messages_draft_with_http_info(conversation_id, opts) return data end # Get conversation draft reply # # @param conversation_id conversation ID # @param [Hash] opts the optional parameters # @return [Array<(EmailMessage, Fixnum, Hash)>] EmailMessage data, response status code and response headers def get_messages_draft_with_http_info(conversation_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConversationsApi#get_messages_draft ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling get_messages_draft" if conversation_id.nil? # resource path path = "/api/v1/conversations/{conversationId}/messages/draft".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EmailMessage') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationsApi#get_messages_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update conversation draft reply # # @param conversation_id conversation ID # @param [Hash] opts the optional parameters # @option opts [EmailMessage] :body Draft # @return [EmailMessage] def put_messages_draft(conversation_id, opts = {}) data, status_code, headers = put_messages_draft_with_http_info(conversation_id, opts) return data end # Update conversation draft reply # # @param conversation_id conversation ID # @param [Hash] opts the optional parameters # @option opts [EmailMessage] :body Draft # @return [Array<(EmailMessage, Fixnum, Hash)>] EmailMessage data, response status code and response headers def put_messages_draft_with_http_info(conversation_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConversationsApi#put_messages_draft ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling put_messages_draft" if conversation_id.nil? # resource path path = "/api/v1/conversations/{conversationId}/messages/draft".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:PUT, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EmailMessage') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationsApi#put_messages_draft\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Delete attachment from draft # # @param conversation_id conversation ID # @param attachment_id attachment ID # @param [Hash] opts the optional parameters # @return [String] def delete_messages_draft_attachment(conversation_id, attachment_id, opts = {}) data, status_code, headers = delete_messages_draft_attachment_with_http_info(conversation_id, attachment_id, opts) return data end # Delete attachment from draft # # @param conversation_id conversation ID # @param attachment_id attachment ID # @param [Hash] opts the optional parameters # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers def delete_messages_draft_attachment_with_http_info(conversation_id, attachment_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConversationsApi#delete_messages_draft_attachment ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling delete_messages_draft_attachment" if conversation_id.nil? # verify the required parameter 'attachment_id' is set fail "Missing the required parameter 'attachment_id' when calling delete_messages_draft_attachment" if attachment_id.nil? # resource path path = "/api/v1/conversations/{conversationId}/messages/draft/attachments/{attachmentId}".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'attachmentId' + '}', attachment_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:DELETE, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationsApi#delete_messages_draft_attachment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get conversation message # # @param conversation_id conversation ID # @param id message ID # @param [Hash] opts the optional parameters # @return [EmailMessage] def get_messages_0(conversation_id, id, opts = {}) data, status_code, headers = get_messages_0_with_http_info(conversation_id, id, opts) return data end # Get conversation message # # @param conversation_id conversation ID # @param id message ID # @param [Hash] opts the optional parameters # @return [Array<(EmailMessage, Fixnum, Hash)>] EmailMessage data, response status code and response headers def get_messages_0_with_http_info(conversation_id, id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConversationsApi#get_messages_0 ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling get_messages_0" if conversation_id.nil? # verify the required parameter 'id' is set fail "Missing the required parameter 'id' when calling get_messages_0" if id.nil? # resource path path = "/api/v1/conversations/{conversationId}/messages/{id}".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'id' + '}', id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'EmailMessage') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationsApi#get_messages_0\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Add participants to a conversation # # @param conversation_id conversation ID # @param [Hash] opts the optional parameters # @option opts [Conversation] :body Conversation # @return [Conversation] def post_participants(conversation_id, opts = {}) data, status_code, headers = post_participants_with_http_info(conversation_id, opts) return data end # Add participants to a conversation # # @param conversation_id conversation ID # @param [Hash] opts the optional parameters # @option opts [Conversation] :body Conversation # @return [Array<(Conversation, Fixnum, Hash)>] Conversation data, response status code and response headers def post_participants_with_http_info(conversation_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConversationsApi#post_participants ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling post_participants" if conversation_id.nil? # resource path path = "/api/v1/conversations/{conversationId}/participants".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:POST, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Conversation') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationsApi#post_participants\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update a participant. # Specify the state as CONNECTED, DISCONNECTED. You can specify a wrap-up code. # @param conversation_id conversation ID # @param participant_id participant ID # @param [Hash] opts the optional parameters # @option opts [ParticipantRequest] :body # @return [nil] def put_participant(conversation_id, participant_id, opts = {}) put_participant_with_http_info(conversation_id, participant_id, opts) return nil end # Update a participant. # Specify the state as CONNECTED, DISCONNECTED. You can specify a wrap-up code. # @param conversation_id conversation ID # @param participant_id participant ID # @param [Hash] opts the optional parameters # @option opts [ParticipantRequest] :body # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def put_participant_with_http_info(conversation_id, participant_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConversationsApi#put_participant ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling put_participant" if conversation_id.nil? # verify the required parameter 'participant_id' is set fail "Missing the required parameter 'participant_id' when calling put_participant" if participant_id.nil? # resource path path = "/api/v1/conversations/{conversationId}/participants/{participantId}".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'participantId' + '}', participant_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:PUT, 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: ConversationsApi#put_participant\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Update the attributes on a conversation participant. # # @param conversation_id conversation ID # @param participant_id participant ID # @param [Hash] opts the optional parameters # @option opts [ParticipantAttributes] :body # @return [nil] def put_participant_attributes(conversation_id, participant_id, opts = {}) put_participant_attributes_with_http_info(conversation_id, participant_id, opts) return nil end # Update the attributes on a conversation participant. # # @param conversation_id conversation ID # @param participant_id participant ID # @param [Hash] opts the optional parameters # @option opts [ParticipantAttributes] :body # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def put_participant_attributes_with_http_info(conversation_id, participant_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConversationsApi#put_participant_attributes ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling put_participant_attributes" if conversation_id.nil? # verify the required parameter 'participant_id' is set fail "Missing the required parameter 'participant_id' when calling put_participant_attributes" if participant_id.nil? # resource path path = "/api/v1/conversations/{conversationId}/participants/{participantId}/attributes".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'participantId' + '}', participant_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:PUT, 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: ConversationsApi#put_participant_attributes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Change who can speak # # @param conversation_id conversation ID # @param participant_id The object of the transfer # @param [Hash] opts the optional parameters # @option opts [ConsultTransferUpdate] :body new speak to # @return [ConsultTransferResponse] def put_participant_consult(conversation_id, participant_id, opts = {}) data, status_code, headers = put_participant_consult_with_http_info(conversation_id, participant_id, opts) return data end # Change who can speak # # @param conversation_id conversation ID # @param participant_id The object of the transfer # @param [Hash] opts the optional parameters # @option opts [ConsultTransferUpdate] :body new speak to # @return [Array<(ConsultTransferResponse, Fixnum, Hash)>] ConsultTransferResponse data, response status code and response headers def put_participant_consult_with_http_info(conversation_id, participant_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConversationsApi#put_participant_consult ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling put_participant_consult" if conversation_id.nil? # verify the required parameter 'participant_id' is set fail "Missing the required parameter 'participant_id' when calling put_participant_consult" if participant_id.nil? # resource path path = "/api/v1/conversations/{conversationId}/participants/{participantId}/consult".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'participantId' + '}', participant_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:PUT, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ConsultTransferResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationsApi#put_participant_consult\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Initiate and update consult transfer # # @param conversation_id conversation ID # @param participant_id The object of the transfer # @param [Hash] opts the optional parameters # @option opts [ConsultTransfer] :body Destination address & initial speak to # @return [ConsultTransferResponse] def post_participant_consult(conversation_id, participant_id, opts = {}) data, status_code, headers = post_participant_consult_with_http_info(conversation_id, participant_id, opts) return data end # Initiate and update consult transfer # # @param conversation_id conversation ID # @param participant_id The object of the transfer # @param [Hash] opts the optional parameters # @option opts [ConsultTransfer] :body Destination address & initial speak to # @return [Array<(ConsultTransferResponse, Fixnum, Hash)>] ConsultTransferResponse data, response status code and response headers def post_participant_consult_with_http_info(conversation_id, participant_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConversationsApi#post_participant_consult ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling post_participant_consult" if conversation_id.nil? # verify the required parameter 'participant_id' is set fail "Missing the required parameter 'participant_id' when calling post_participant_consult" if participant_id.nil? # resource path path = "/api/v1/conversations/{conversationId}/participants/{participantId}/consult".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'participantId' + '}', participant_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = @api_client.object_to_http_body(opts[:'body']) auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:POST, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'ConsultTransferResponse') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationsApi#post_participant_consult\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Cancel the transfer # # @param conversation_id conversation ID # @param participant_id The object of the transfer # @param [Hash] opts the optional parameters # @return [String] def delete_participant_consult(conversation_id, participant_id, opts = {}) data, status_code, headers = delete_participant_consult_with_http_info(conversation_id, participant_id, opts) return data end # Cancel the transfer # # @param conversation_id conversation ID # @param participant_id The object of the transfer # @param [Hash] opts the optional parameters # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers def delete_participant_consult_with_http_info(conversation_id, participant_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConversationsApi#delete_participant_consult ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling delete_participant_consult" if conversation_id.nil? # verify the required parameter 'participant_id' is set fail "Missing the required parameter 'participant_id' when calling delete_participant_consult" if participant_id.nil? # resource path path = "/api/v1/conversations/{conversationId}/participants/{participantId}/consult".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'participantId' + '}', participant_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:DELETE, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationsApi#delete_participant_consult\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Listen in on the conversation from the point of view of a given participant. # # @param conversation_id conversation ID # @param participant_id participant ID # @param [Hash] opts the optional parameters # @return [nil] def post_participant_monitor(conversation_id, participant_id, opts = {}) post_participant_monitor_with_http_info(conversation_id, participant_id, opts) return nil end # Listen in on the conversation from the point of view of a given participant. # # @param conversation_id conversation ID # @param participant_id participant ID # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def post_participant_monitor_with_http_info(conversation_id, participant_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConversationsApi#post_participant_monitor ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling post_participant_monitor" if conversation_id.nil? # verify the required parameter 'participant_id' is set fail "Missing the required parameter 'participant_id' when calling post_participant_monitor" if participant_id.nil? # resource path path = "/api/v1/conversations/{conversationId}/participants/{participantId}/monitor".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'participantId' + '}', participant_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:POST, 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: ConversationsApi#post_participant_monitor\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Replace this participant with the specified user and/or address # # @param conversation_id conversation ID # @param participant_id participant ID # @param [Hash] opts the optional parameters # @option opts [String] :user_id The user that will replace this participant. If address is not supplied then the user's Work address will be used. This parameter is required when replacing a participant that has an active chat. # @option opts [String] :address The address that will be used to contact the new participant # @option opts [String] :username The username of the person that will replace this participant. This field is only used if the userId is blank. # @option opts [String] :queue_id The id of the queue that will replace this participant. # @option opts [BOOLEAN] :voicemail Indicates this participant will be replaced by the voicemail inbox of the participant. # @return [nil] def post_participant_replace(conversation_id, participant_id, opts = {}) post_participant_replace_with_http_info(conversation_id, participant_id, opts) return nil end # Replace this participant with the specified user and/or address # # @param conversation_id conversation ID # @param participant_id participant ID # @param [Hash] opts the optional parameters # @option opts [String] :user_id The user that will replace this participant. If address is not supplied then the user's Work address will be used. This parameter is required when replacing a participant that has an active chat. # @option opts [String] :address The address that will be used to contact the new participant # @option opts [String] :username The username of the person that will replace this participant. This field is only used if the userId is blank. # @option opts [String] :queue_id The id of the queue that will replace this participant. # @option opts [BOOLEAN] :voicemail Indicates this participant will be replaced by the voicemail inbox of the participant. # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers def post_participant_replace_with_http_info(conversation_id, participant_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConversationsApi#post_participant_replace ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling post_participant_replace" if conversation_id.nil? # verify the required parameter 'participant_id' is set fail "Missing the required parameter 'participant_id' when calling post_participant_replace" if participant_id.nil? # resource path path = "/api/v1/conversations/{conversationId}/participants/{participantId}/replace".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'participantId' + '}', participant_id.to_s) # query parameters query_params = {} query_params[:'userId'] = opts[:'user_id'] if opts[:'user_id'] query_params[:'address'] = opts[:'address'] if opts[:'address'] query_params[:'username'] = opts[:'username'] if opts[:'username'] query_params[:'queueId'] = opts[:'queue_id'] if opts[:'queue_id'] query_params[:'voicemail'] = opts[:'voicemail'] if opts[:'voicemail'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:POST, 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: ConversationsApi#post_participant_replace\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get the wrap-up for this conversation participant. # # @param conversation_id conversation ID # @param participant_id participant ID # @param [Hash] opts the optional parameters # @option opts [BOOLEAN] :provisional Indicates if the wrap-up code is provisional. # @return [WrapupCode] def get_participant_wrapup(conversation_id, participant_id, opts = {}) data, status_code, headers = get_participant_wrapup_with_http_info(conversation_id, participant_id, opts) return data end # Get the wrap-up for this conversation participant. # # @param conversation_id conversation ID # @param participant_id participant ID # @param [Hash] opts the optional parameters # @option opts [BOOLEAN] :provisional Indicates if the wrap-up code is provisional. # @return [Array<(WrapupCode, Fixnum, Hash)>] WrapupCode data, response status code and response headers def get_participant_wrapup_with_http_info(conversation_id, participant_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConversationsApi#get_participant_wrapup ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling get_participant_wrapup" if conversation_id.nil? # verify the required parameter 'participant_id' is set fail "Missing the required parameter 'participant_id' when calling get_participant_wrapup" if participant_id.nil? # resource path path = "/api/v1/conversations/{conversationId}/participants/{participantId}/wrapup".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'participantId' + '}', participant_id.to_s) # query parameters query_params = {} query_params[:'provisional'] = opts[:'provisional'] if opts[:'provisional'] # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'WrapupCode') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationsApi#get_participant_wrapup\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get list of wrapup codes for this conversation participant # # @param conversation_id conversation ID # @param participant_id participant ID # @param [Hash] opts the optional parameters # @return [WrapupCode] def get_participant_wrapupcodes(conversation_id, participant_id, opts = {}) data, status_code, headers = get_participant_wrapupcodes_with_http_info(conversation_id, participant_id, opts) return data end # Get list of wrapup codes for this conversation participant # # @param conversation_id conversation ID # @param participant_id participant ID # @param [Hash] opts the optional parameters # @return [Array<(WrapupCode, Fixnum, Hash)>] WrapupCode data, response status code and response headers def get_participant_wrapupcodes_with_http_info(conversation_id, participant_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConversationsApi#get_participant_wrapupcodes ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling get_participant_wrapupcodes" if conversation_id.nil? # verify the required parameter 'participant_id' is set fail "Missing the required parameter 'participant_id' when calling get_participant_wrapupcodes" if participant_id.nil? # resource path path = "/api/v1/conversations/{conversationId}/participants/{participantId}/wrapupcodes".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s).sub('{' + 'participantId' + '}', participant_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'WrapupCode') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationsApi#get_participant_wrapupcodes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get possible tags for Conversation # # @param conversation_id conversation ID # @param [Hash] opts the optional parameters # @return [Tag] def get_tags(conversation_id, opts = {}) data, status_code, headers = get_tags_with_http_info(conversation_id, opts) return data end # Get possible tags for Conversation # # @param conversation_id conversation ID # @param [Hash] opts the optional parameters # @return [Array<(Tag, Fixnum, Hash)>] Tag data, response status code and response headers def get_tags_with_http_info(conversation_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConversationsApi#get_tags ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling get_tags" if conversation_id.nil? # resource path path = "/api/v1/conversations/{conversationId}/tags".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'Tag') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationsApi#get_tags\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # Get possible wrap-up codes for Conversation # # @param conversation_id conversation ID # @param [Hash] opts the optional parameters # @return [WrapupCode] def get_wrapupcodes(conversation_id, opts = {}) data, status_code, headers = get_wrapupcodes_with_http_info(conversation_id, opts) return data end # Get possible wrap-up codes for Conversation # # @param conversation_id conversation ID # @param [Hash] opts the optional parameters # @return [Array<(WrapupCode, Fixnum, Hash)>] WrapupCode data, response status code and response headers def get_wrapupcodes_with_http_info(conversation_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConversationsApi#get_wrapupcodes ..." end # verify the required parameter 'conversation_id' is set fail "Missing the required parameter 'conversation_id' when calling get_wrapupcodes" if conversation_id.nil? # resource path path = "/api/v1/conversations/{conversationId}/wrapupcodes".sub('{format}','json').sub('{' + 'conversationId' + '}', conversation_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) _header_accept = ['application/json'] _header_accept_result = @api_client.select_header_accept(_header_accept) and header_params['Accept'] = _header_accept_result # HTTP header 'Content-Type' _header_content_type = ['application/json'] header_params['Content-Type'] = @api_client.select_header_content_type(_header_content_type) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['PureCloud Auth'] data, status_code, headers = @api_client.call_api(:GET, path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'WrapupCode') if @api_client.config.debugging @api_client.config.logger.debug "API called: ConversationsApi#get_wrapupcodes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end end end