lib/smooch-api/api/conversation_api.rb in smooch-api-4.1.0 vs lib/smooch-api/api/conversation_api.rb in smooch-api-4.2.0

- old
+ new

@@ -1,11 +1,11 @@ =begin #Smooch #The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io). -OpenAPI spec version: 4.1 +OpenAPI spec version: 4.2 Generated by: https://github.com/swagger-api/swagger-codegen.git Swagger Codegen version: 2.2.3-SNAPSHOT =end @@ -20,45 +20,45 @@ @api_client = api_client end # # Deletes a single message. - # @param app_id Identifies the app. - # @param user_id Identifies the user. Can be either the smoochId or the userId. - # @param message_id Identifies the message. + # @param appId Identifies the app. + # @param userId Identifies the user. Can be either the smoochId or the userId. + # @param messageId Identifies the message. # @param [Hash] opts the optional parameters # @return [nil] - def delete_message(app_id, user_id, message_id, opts = {}) - delete_message_with_http_info(app_id, user_id, message_id, opts) + def delete_message(appId, userId, messageId, opts = {}) + delete_message_with_http_info(appId, userId, messageId, opts) return nil end # # Deletes a single message. - # @param app_id Identifies the app. - # @param user_id Identifies the user. Can be either the smoochId or the userId. - # @param message_id Identifies the message. + # @param appId Identifies the app. + # @param userId Identifies the user. Can be either the smoochId or the userId. + # @param messageId Identifies the message. # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers - def delete_message_with_http_info(app_id, user_id, message_id, opts = {}) + def delete_message_with_http_info(appId, userId, messageId, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConversationApi.delete_message ..." end - # verify the required parameter 'app_id' is set - if @api_client.config.client_side_validation && app_id.nil? - fail ArgumentError, "Missing the required parameter 'app_id' when calling ConversationApi.delete_message" + # verify the required parameter 'appId' is set + if @api_client.config.client_side_validation && appId.nil? + fail ArgumentError, "Missing the required parameter 'appId' when calling ConversationApi.delete_message" end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling ConversationApi.delete_message" + # verify the required parameter 'userId' is set + if @api_client.config.client_side_validation && userId.nil? + fail ArgumentError, "Missing the required parameter 'userId' when calling ConversationApi.delete_message" end - # verify the required parameter 'message_id' is set - if @api_client.config.client_side_validation && message_id.nil? - fail ArgumentError, "Missing the required parameter 'message_id' when calling ConversationApi.delete_message" + # verify the required parameter 'messageId' is set + if @api_client.config.client_side_validation && messageId.nil? + fail ArgumentError, "Missing the required parameter 'messageId' when calling ConversationApi.delete_message" end # resource path - local_var_path = "/v1.1/apps/{appId}/appusers/{userId}/messages/{messageId}".sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'messageId' + '}', message_id.to_s) + local_var_path = "/v1.1/apps/{appId}/appusers/{userId}/messages/{messageId}".sub('{' + 'appId' + '}', appId.to_s).sub('{' + 'userId' + '}', userId.to_s).sub('{' + 'messageId' + '}', messageId.to_s) # query parameters query_params = {} # header parameters @@ -86,39 +86,39 @@ return data, status_code, headers end # # Clears the message history for a user, permanently deleting all messages, but leaving any connections to Messaging Channels and Business Systems intact. These connections allow for the conversation to continue in the future, while still being associated to the same appUser. - # @param app_id Identifies the app. - # @param user_id Identifies the user. Can be either the smoochId or the userId. + # @param appId Identifies the app. + # @param userId Identifies the user. Can be either the smoochId or the userId. # @param [Hash] opts the optional parameters # @return [nil] - def delete_messages(app_id, user_id, opts = {}) - delete_messages_with_http_info(app_id, user_id, opts) + def delete_messages(appId, userId, opts = {}) + delete_messages_with_http_info(appId, userId, opts) return nil end # # Clears the message history for a user, permanently deleting all messages, but leaving any connections to Messaging Channels and Business Systems intact. These connections allow for the conversation to continue in the future, while still being associated to the same appUser. - # @param app_id Identifies the app. - # @param user_id Identifies the user. Can be either the smoochId or the userId. + # @param appId Identifies the app. + # @param userId Identifies the user. Can be either the smoochId or the userId. # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers - def delete_messages_with_http_info(app_id, user_id, opts = {}) + def delete_messages_with_http_info(appId, userId, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConversationApi.delete_messages ..." end - # verify the required parameter 'app_id' is set - if @api_client.config.client_side_validation && app_id.nil? - fail ArgumentError, "Missing the required parameter 'app_id' when calling ConversationApi.delete_messages" + # verify the required parameter 'appId' is set + if @api_client.config.client_side_validation && appId.nil? + fail ArgumentError, "Missing the required parameter 'appId' when calling ConversationApi.delete_messages" end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling ConversationApi.delete_messages" + # verify the required parameter 'userId' is set + if @api_client.config.client_side_validation && userId.nil? + fail ArgumentError, "Missing the required parameter 'userId' when calling ConversationApi.delete_messages" end # resource path - local_var_path = "/v1.1/apps/{appId}/appusers/{userId}/messages".sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'userId' + '}', user_id.to_s) + local_var_path = "/v1.1/apps/{appId}/appusers/{userId}/messages".sub('{' + 'appId' + '}', appId.to_s).sub('{' + 'userId' + '}', userId.to_s) # query parameters query_params = {} # header parameters @@ -146,43 +146,43 @@ return data, status_code, headers end # # Get the specified app user's messages. - # @param app_id Identifies the app. - # @param user_id Identifies the user. Can be either the smoochId or the userId. + # @param appId Identifies the app. + # @param userId Identifies the user. Can be either the smoochId or the userId. # @param [Hash] opts the optional parameters # @option opts [String] :before Timestamp of message. The API will return 100 messages before the specified timestamp (excluding any messages with the provided timestamp). # @option opts [String] :after Timestamp of message. The API will return 100 messages after the specified timestamp (excluding any messages with the provided timestamp). # @return [GetMessagesResponse] - def get_messages(app_id, user_id, opts = {}) - data, _status_code, _headers = get_messages_with_http_info(app_id, user_id, opts) + def get_messages(appId, userId, opts = {}) + data, _status_code, _headers = get_messages_with_http_info(appId, userId, opts) return data end # # Get the specified app user&#39;s messages. - # @param app_id Identifies the app. - # @param user_id Identifies the user. Can be either the smoochId or the userId. + # @param appId Identifies the app. + # @param userId Identifies the user. Can be either the smoochId or the userId. # @param [Hash] opts the optional parameters # @option opts [String] :before Timestamp of message. The API will return 100 messages before the specified timestamp (excluding any messages with the provided timestamp). # @option opts [String] :after Timestamp of message. The API will return 100 messages after the specified timestamp (excluding any messages with the provided timestamp). # @return [Array<(GetMessagesResponse, Fixnum, Hash)>] GetMessagesResponse data, response status code and response headers - def get_messages_with_http_info(app_id, user_id, opts = {}) + def get_messages_with_http_info(appId, userId, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConversationApi.get_messages ..." end - # verify the required parameter 'app_id' is set - if @api_client.config.client_side_validation && app_id.nil? - fail ArgumentError, "Missing the required parameter 'app_id' when calling ConversationApi.get_messages" + # verify the required parameter 'appId' is set + if @api_client.config.client_side_validation && appId.nil? + fail ArgumentError, "Missing the required parameter 'appId' when calling ConversationApi.get_messages" end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling ConversationApi.get_messages" + # verify the required parameter 'userId' is set + if @api_client.config.client_side_validation && userId.nil? + fail ArgumentError, "Missing the required parameter 'userId' when calling ConversationApi.get_messages" end # resource path - local_var_path = "/v1.1/apps/{appId}/appusers/{userId}/messages".sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'userId' + '}', user_id.to_s) + local_var_path = "/v1.1/apps/{appId}/appusers/{userId}/messages".sub('{' + 'appId' + '}', appId.to_s).sub('{' + 'userId' + '}', userId.to_s) # query parameters query_params = {} query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil? query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil? @@ -213,45 +213,45 @@ return data, status_code, headers end # # Post a message to or from the app user. - # @param app_id Identifies the app. - # @param user_id Identifies the user. Can be either the smoochId or the userId. - # @param message_post_body Body for a postMessage request. Additional arguments are necessary based on message type ([text](https://docs.smooch.io/rest#text-message), [image](https://docs.smooch.io/rest#image-message), [carousel](https://docs.smooch.io/rest#carousel-message), [list](https://docs.smooch.io/rest#list-message)) + # @param appId Identifies the app. + # @param userId Identifies the user. Can be either the smoochId or the userId. + # @param messagePostBody Body for a postMessage request. Additional arguments are necessary based on message type ([text](https://docs.smooch.io/rest#text-message), [image](https://docs.smooch.io/rest#image-message), [carousel](https://docs.smooch.io/rest#carousel-message), [list](https://docs.smooch.io/rest#list-message)) # @param [Hash] opts the optional parameters # @return [MessageResponse] - def post_message(app_id, user_id, message_post_body, opts = {}) - data, _status_code, _headers = post_message_with_http_info(app_id, user_id, message_post_body, opts) + def post_message(appId, userId, messagePostBody, opts = {}) + data, _status_code, _headers = post_message_with_http_info(appId, userId, messagePostBody, opts) return data end # # Post a message to or from the app user. - # @param app_id Identifies the app. - # @param user_id Identifies the user. Can be either the smoochId or the userId. - # @param message_post_body Body for a postMessage request. Additional arguments are necessary based on message type ([text](https://docs.smooch.io/rest#text-message), [image](https://docs.smooch.io/rest#image-message), [carousel](https://docs.smooch.io/rest#carousel-message), [list](https://docs.smooch.io/rest#list-message)) + # @param appId Identifies the app. + # @param userId Identifies the user. Can be either the smoochId or the userId. + # @param messagePostBody Body for a postMessage request. Additional arguments are necessary based on message type ([text](https://docs.smooch.io/rest#text-message), [image](https://docs.smooch.io/rest#image-message), [carousel](https://docs.smooch.io/rest#carousel-message), [list](https://docs.smooch.io/rest#list-message)) # @param [Hash] opts the optional parameters # @return [Array<(MessageResponse, Fixnum, Hash)>] MessageResponse data, response status code and response headers - def post_message_with_http_info(app_id, user_id, message_post_body, opts = {}) + def post_message_with_http_info(appId, userId, messagePostBody, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConversationApi.post_message ..." end - # verify the required parameter 'app_id' is set - if @api_client.config.client_side_validation && app_id.nil? - fail ArgumentError, "Missing the required parameter 'app_id' when calling ConversationApi.post_message" + # verify the required parameter 'appId' is set + if @api_client.config.client_side_validation && appId.nil? + fail ArgumentError, "Missing the required parameter 'appId' when calling ConversationApi.post_message" end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling ConversationApi.post_message" + # verify the required parameter 'userId' is set + if @api_client.config.client_side_validation && userId.nil? + fail ArgumentError, "Missing the required parameter 'userId' when calling ConversationApi.post_message" end - # verify the required parameter 'message_post_body' is set - if @api_client.config.client_side_validation && message_post_body.nil? - fail ArgumentError, "Missing the required parameter 'message_post_body' when calling ConversationApi.post_message" + # verify the required parameter 'messagePostBody' is set + if @api_client.config.client_side_validation && messagePostBody.nil? + fail ArgumentError, "Missing the required parameter 'messagePostBody' when calling ConversationApi.post_message" end # resource path - local_var_path = "/v1.1/apps/{appId}/appusers/{userId}/messages".sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'userId' + '}', user_id.to_s) + local_var_path = "/v1.1/apps/{appId}/appusers/{userId}/messages".sub('{' + 'appId' + '}', appId.to_s).sub('{' + 'userId' + '}', userId.to_s) # query parameters query_params = {} # header parameters @@ -263,11 +263,11 @@ # form parameters form_params = {} # http body (model) - post_body = @api_client.object_to_http_body(message_post_body) + post_body = @api_client.object_to_http_body(messagePostBody) auth_names = ['jwt'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -280,39 +280,39 @@ return data, status_code, headers end # # Reset the unread count of the conversation to 0. - # @param app_id Identifies the app. - # @param user_id Identifies the user. Can be either the smoochId or the userId. + # @param appId Identifies the app. + # @param userId Identifies the user. Can be either the smoochId or the userId. # @param [Hash] opts the optional parameters # @return [nil] - def reset_unread_count(app_id, user_id, opts = {}) - reset_unread_count_with_http_info(app_id, user_id, opts) + def reset_unread_count(appId, userId, opts = {}) + reset_unread_count_with_http_info(appId, userId, opts) return nil end # # Reset the unread count of the conversation to 0. - # @param app_id Identifies the app. - # @param user_id Identifies the user. Can be either the smoochId or the userId. + # @param appId Identifies the app. + # @param userId Identifies the user. Can be either the smoochId or the userId. # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers - def reset_unread_count_with_http_info(app_id, user_id, opts = {}) + def reset_unread_count_with_http_info(appId, userId, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConversationApi.reset_unread_count ..." end - # verify the required parameter 'app_id' is set - if @api_client.config.client_side_validation && app_id.nil? - fail ArgumentError, "Missing the required parameter 'app_id' when calling ConversationApi.reset_unread_count" + # verify the required parameter 'appId' is set + if @api_client.config.client_side_validation && appId.nil? + fail ArgumentError, "Missing the required parameter 'appId' when calling ConversationApi.reset_unread_count" end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling ConversationApi.reset_unread_count" + # verify the required parameter 'userId' is set + if @api_client.config.client_side_validation && userId.nil? + fail ArgumentError, "Missing the required parameter 'userId' when calling ConversationApi.reset_unread_count" end # resource path - local_var_path = "/v1.1/apps/{appId}/appusers/{userId}/conversation/read".sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'userId' + '}', user_id.to_s) + local_var_path = "/v1.1/apps/{appId}/appusers/{userId}/conversation/read".sub('{' + 'appId' + '}', appId.to_s).sub('{' + 'userId' + '}', userId.to_s) # query parameters query_params = {} # header parameters @@ -340,45 +340,45 @@ return data, status_code, headers end # # Notify Smooch when an app maker starts or stops typing a response. - # @param app_id Identifies the app. - # @param user_id Identifies the user. Can be either the smoochId or the userId. - # @param typing_activity_trigger_body Body for a triggerTypingActivity request. + # @param appId Identifies the app. + # @param userId Identifies the user. Can be either the smoochId or the userId. + # @param typingActivityTriggerBody Body for a triggerTypingActivity request. # @param [Hash] opts the optional parameters # @return [nil] - def trigger_typing_activity(app_id, user_id, typing_activity_trigger_body, opts = {}) - trigger_typing_activity_with_http_info(app_id, user_id, typing_activity_trigger_body, opts) + def trigger_typing_activity(appId, userId, typingActivityTriggerBody, opts = {}) + trigger_typing_activity_with_http_info(appId, userId, typingActivityTriggerBody, opts) return nil end # # Notify Smooch when an app maker starts or stops typing a response. - # @param app_id Identifies the app. - # @param user_id Identifies the user. Can be either the smoochId or the userId. - # @param typing_activity_trigger_body Body for a triggerTypingActivity request. + # @param appId Identifies the app. + # @param userId Identifies the user. Can be either the smoochId or the userId. + # @param typingActivityTriggerBody Body for a triggerTypingActivity request. # @param [Hash] opts the optional parameters # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers - def trigger_typing_activity_with_http_info(app_id, user_id, typing_activity_trigger_body, opts = {}) + def trigger_typing_activity_with_http_info(appId, userId, typingActivityTriggerBody, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: ConversationApi.trigger_typing_activity ..." end - # verify the required parameter 'app_id' is set - if @api_client.config.client_side_validation && app_id.nil? - fail ArgumentError, "Missing the required parameter 'app_id' when calling ConversationApi.trigger_typing_activity" + # verify the required parameter 'appId' is set + if @api_client.config.client_side_validation && appId.nil? + fail ArgumentError, "Missing the required parameter 'appId' when calling ConversationApi.trigger_typing_activity" end - # verify the required parameter 'user_id' is set - if @api_client.config.client_side_validation && user_id.nil? - fail ArgumentError, "Missing the required parameter 'user_id' when calling ConversationApi.trigger_typing_activity" + # verify the required parameter 'userId' is set + if @api_client.config.client_side_validation && userId.nil? + fail ArgumentError, "Missing the required parameter 'userId' when calling ConversationApi.trigger_typing_activity" end - # verify the required parameter 'typing_activity_trigger_body' is set - if @api_client.config.client_side_validation && typing_activity_trigger_body.nil? - fail ArgumentError, "Missing the required parameter 'typing_activity_trigger_body' when calling ConversationApi.trigger_typing_activity" + # verify the required parameter 'typingActivityTriggerBody' is set + if @api_client.config.client_side_validation && typingActivityTriggerBody.nil? + fail ArgumentError, "Missing the required parameter 'typingActivityTriggerBody' when calling ConversationApi.trigger_typing_activity" end # resource path - local_var_path = "/v1.1/apps/{appId}/appusers/{userId}/conversation/activity".sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'userId' + '}', user_id.to_s) + local_var_path = "/v1.1/apps/{appId}/appusers/{userId}/conversation/activity".sub('{' + 'appId' + '}', appId.to_s).sub('{' + 'userId' + '}', userId.to_s) # query parameters query_params = {} # header parameters @@ -390,10 +390,10 @@ # form parameters form_params = {} # http body (model) - post_body = @api_client.object_to_http_body(typing_activity_trigger_body) + post_body = @api_client.object_to_http_body(typingActivityTriggerBody) auth_names = ['jwt'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params,