smooch-api 4.1.0 → 4.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -3
- data/docs/Action.md +2 -2
- data/docs/App.md +2 -2
- data/docs/AppApi.md +48 -48
- data/docs/AppSettings.md +2 -2
- data/docs/AppUser.md +6 -6
- data/docs/AppUserApi.md +78 -78
- data/docs/AppUserBusinessSystemsResponse.md +1 -1
- data/docs/AppUserLink.md +2 -2
- data/docs/AppUserPreCreate.md +3 -3
- data/docs/AppUserResponse.md +1 -1
- data/docs/AppUserUpdate.md +2 -2
- data/docs/AttachmentRemove.md +1 -1
- data/docs/AttachmentResponse.md +2 -2
- data/docs/AttachmentsApi.md +16 -16
- data/docs/AuthCodeResponse.md +1 -1
- data/docs/BusinessSystemItem.md +4 -4
- data/docs/ChannelEntityItem.md +3 -3
- data/docs/Client.md +4 -4
- data/docs/ClientInfo.md +8 -8
- data/docs/Conversation.md +2 -2
- data/docs/ConversationApi.md +42 -42
- data/docs/Destination.md +2 -2
- data/docs/DisplaySettings.md +1 -1
- data/docs/GetMessagesResponse.md +1 -1
- data/docs/Integration.md +44 -44
- data/docs/IntegrationApi.md +66 -66
- data/docs/IntegrationCreate.md +36 -36
- data/docs/IntegrationProfileUpdate.md +1 -1
- data/docs/IntegrationUpdate.md +16 -16
- data/docs/LinkRequestResponse.md +1 -1
- data/docs/LinkRequestResponseLinkRequests.md +1 -1
- data/docs/ListAppsResponse.md +1 -1
- data/docs/ListServiceAccountsResponse.md +2 -2
- data/docs/ListTemplatesResponse.md +1 -1
- data/docs/MenuApi.md +14 -14
- data/docs/Message.md +6 -6
- data/docs/MessageItem.md +2 -2
- data/docs/MessageOverride.md +8 -0
- data/docs/MessageOverrideWhatsapp.md +8 -0
- data/docs/MessagePost.md +4 -3
- data/docs/MessageResponse.md +1 -1
- data/docs/SecretKey.md +1 -1
- data/docs/ServiceAccount.md +1 -1
- data/docs/ServiceAccountApi.md +46 -46
- data/docs/ServiceAccountResponse.md +1 -1
- data/docs/Template.md +1 -1
- data/docs/TemplateApi.md +30 -30
- data/docs/TypingActivityTrigger.md +1 -1
- data/docs/Webhook.md +1 -1
- data/docs/WebhookApi.md +30 -30
- data/lib/smooch-api.rb +3 -1
- data/lib/smooch-api/api/app_api.rb +112 -112
- data/lib/smooch-api/api/app_user_api.rb +190 -190
- data/lib/smooch-api/api/attachments_api.rb +34 -34
- data/lib/smooch-api/api/conversation_api.rb +102 -102
- data/lib/smooch-api/api/integration_api.rb +161 -161
- data/lib/smooch-api/api/menu_api.rb +34 -34
- data/lib/smooch-api/api/service_account_api.rb +109 -109
- data/lib/smooch-api/api/template_api.rb +73 -73
- data/lib/smooch-api/api/webhook_api.rb +73 -73
- data/lib/smooch-api/api_client.rb +1 -1
- data/lib/smooch-api/api_error.rb +1 -1
- data/lib/smooch-api/configuration.rb +1 -1
- data/lib/smooch-api/models/action.rb +12 -12
- data/lib/smooch-api/models/app.rb +18 -18
- data/lib/smooch-api/models/app_create.rb +1 -1
- data/lib/smooch-api/models/app_response.rb +1 -1
- data/lib/smooch-api/models/app_settings.rb +12 -12
- data/lib/smooch-api/models/app_update.rb +1 -1
- data/lib/smooch-api/models/app_user.rb +38 -38
- data/lib/smooch-api/models/app_user_business_systems_response.rb +10 -10
- data/lib/smooch-api/models/app_user_channels_response.rb +1 -1
- data/lib/smooch-api/models/app_user_link.rb +12 -12
- data/lib/smooch-api/models/app_user_pre_create.rb +20 -20
- data/lib/smooch-api/models/app_user_response.rb +10 -10
- data/lib/smooch-api/models/app_user_update.rb +12 -12
- data/lib/smooch-api/models/attachment_remove.rb +10 -10
- data/lib/smooch-api/models/attachment_response.rb +18 -18
- data/lib/smooch-api/models/auth_code_response.rb +10 -10
- data/lib/smooch-api/models/business_system_item.rb +22 -22
- data/lib/smooch-api/models/channel_entity_item.rb +17 -17
- data/lib/smooch-api/models/client.rb +22 -22
- data/lib/smooch-api/models/client_info.rb +42 -42
- data/lib/smooch-api/models/confirmation.rb +1 -1
- data/lib/smooch-api/models/conversation.rb +18 -18
- data/lib/smooch-api/models/destination.rb +18 -18
- data/lib/smooch-api/models/display_settings.rb +7 -7
- data/lib/smooch-api/models/get_messages_response.rb +7 -7
- data/lib/smooch-api/models/integration.rb +225 -225
- data/lib/smooch-api/models/integration_create.rb +182 -182
- data/lib/smooch-api/models/integration_profile_update.rb +7 -7
- data/lib/smooch-api/models/integration_response.rb +1 -1
- data/lib/smooch-api/models/integration_update.rb +82 -82
- data/lib/smooch-api/models/jwt_response.rb +1 -1
- data/lib/smooch-api/models/link_request_response.rb +7 -7
- data/lib/smooch-api/models/link_request_response_link_requests.rb +10 -10
- data/lib/smooch-api/models/list_apps_response.rb +7 -7
- data/lib/smooch-api/models/list_integrations_response.rb +1 -1
- data/lib/smooch-api/models/list_secret_keys_response.rb +1 -1
- data/lib/smooch-api/models/list_service_accounts_response.rb +12 -12
- data/lib/smooch-api/models/list_templates_response.rb +7 -7
- data/lib/smooch-api/models/list_webhooks_response.rb +1 -1
- data/lib/smooch-api/models/menu.rb +1 -1
- data/lib/smooch-api/models/menu_item.rb +1 -1
- data/lib/smooch-api/models/menu_response.rb +1 -1
- data/lib/smooch-api/models/message.rb +41 -41
- data/lib/smooch-api/models/message_item.rb +12 -12
- data/lib/smooch-api/models/message_override.rb +188 -0
- data/lib/smooch-api/models/message_override_whatsapp.rb +189 -0
- data/lib/smooch-api/models/message_post.rb +30 -20
- data/lib/smooch-api/models/message_response.rb +7 -7
- data/lib/smooch-api/models/secret_key.rb +10 -10
- data/lib/smooch-api/models/secret_key_create.rb +1 -1
- data/lib/smooch-api/models/secret_key_response.rb +1 -1
- data/lib/smooch-api/models/service_account.rb +10 -10
- data/lib/smooch-api/models/service_account_create.rb +1 -1
- data/lib/smooch-api/models/service_account_response.rb +7 -7
- data/lib/smooch-api/models/service_account_update.rb +1 -1
- data/lib/smooch-api/models/source.rb +1 -1
- data/lib/smooch-api/models/sub_menu_item.rb +1 -1
- data/lib/smooch-api/models/template.rb +10 -10
- data/lib/smooch-api/models/template_create.rb +1 -1
- data/lib/smooch-api/models/template_response.rb +1 -1
- data/lib/smooch-api/models/template_update.rb +1 -1
- data/lib/smooch-api/models/typing_activity_trigger.rb +7 -7
- data/lib/smooch-api/models/webhook.rb +10 -10
- data/lib/smooch-api/models/webhook_create.rb +1 -1
- data/lib/smooch-api/models/webhook_response.rb +1 -1
- data/lib/smooch-api/models/webhook_update.rb +1 -1
- data/lib/smooch-api/version.rb +2 -2
- data/smooch-api.gemspec +1 -1
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +6 -2
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#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).
|
5
5
|
|
6
|
-
OpenAPI spec version: 4.
|
6
|
+
OpenAPI spec version: 4.2
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.2.3-SNAPSHOT
|
@@ -22,35 +22,35 @@ module SmoochApi
|
|
22
22
|
|
23
23
|
#
|
24
24
|
# Remove an attachment uploaded to Smooch.
|
25
|
-
# @param
|
26
|
-
# @param
|
25
|
+
# @param appId Identifies the app.
|
26
|
+
# @param attachmentRemoveBody Body for a removeAttachment request.
|
27
27
|
# @param [Hash] opts the optional parameters
|
28
28
|
# @return [nil]
|
29
|
-
def remove_attachment(
|
30
|
-
remove_attachment_with_http_info(
|
29
|
+
def remove_attachment(appId, attachmentRemoveBody, opts = {})
|
30
|
+
remove_attachment_with_http_info(appId, attachmentRemoveBody, opts)
|
31
31
|
return nil
|
32
32
|
end
|
33
33
|
|
34
34
|
#
|
35
35
|
# Remove an attachment uploaded to Smooch.
|
36
|
-
# @param
|
37
|
-
# @param
|
36
|
+
# @param appId Identifies the app.
|
37
|
+
# @param attachmentRemoveBody Body for a removeAttachment request.
|
38
38
|
# @param [Hash] opts the optional parameters
|
39
39
|
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
40
|
-
def remove_attachment_with_http_info(
|
40
|
+
def remove_attachment_with_http_info(appId, attachmentRemoveBody, opts = {})
|
41
41
|
if @api_client.config.debugging
|
42
42
|
@api_client.config.logger.debug "Calling API: AttachmentsApi.remove_attachment ..."
|
43
43
|
end
|
44
|
-
# verify the required parameter '
|
45
|
-
if @api_client.config.client_side_validation &&
|
46
|
-
fail ArgumentError, "Missing the required parameter '
|
44
|
+
# verify the required parameter 'appId' is set
|
45
|
+
if @api_client.config.client_side_validation && appId.nil?
|
46
|
+
fail ArgumentError, "Missing the required parameter 'appId' when calling AttachmentsApi.remove_attachment"
|
47
47
|
end
|
48
|
-
# verify the required parameter '
|
49
|
-
if @api_client.config.client_side_validation &&
|
50
|
-
fail ArgumentError, "Missing the required parameter '
|
48
|
+
# verify the required parameter 'attachmentRemoveBody' is set
|
49
|
+
if @api_client.config.client_side_validation && attachmentRemoveBody.nil?
|
50
|
+
fail ArgumentError, "Missing the required parameter 'attachmentRemoveBody' when calling AttachmentsApi.remove_attachment"
|
51
51
|
end
|
52
52
|
# resource path
|
53
|
-
local_var_path = "/v1.1/apps/{appId}/attachments/remove".sub('{' + 'appId' + '}',
|
53
|
+
local_var_path = "/v1.1/apps/{appId}/attachments/remove".sub('{' + 'appId' + '}', appId.to_s)
|
54
54
|
|
55
55
|
# query parameters
|
56
56
|
query_params = {}
|
@@ -66,7 +66,7 @@ module SmoochApi
|
|
66
66
|
form_params = {}
|
67
67
|
|
68
68
|
# http body (model)
|
69
|
-
post_body = @api_client.object_to_http_body(
|
69
|
+
post_body = @api_client.object_to_http_body(attachmentRemoveBody)
|
70
70
|
auth_names = ['jwt']
|
71
71
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
72
72
|
:header_params => header_params,
|
@@ -82,36 +82,36 @@ module SmoochApi
|
|
82
82
|
|
83
83
|
#
|
84
84
|
# Upload an attachment to Smooch to use in future messages.
|
85
|
-
# @param
|
85
|
+
# @param appId Identifies the app.
|
86
86
|
# @param source File to be uploaded
|
87
87
|
# @param access Access level for the resulting file
|
88
88
|
# @param [Hash] opts the optional parameters
|
89
|
-
# @option opts [String] :
|
90
|
-
# @option opts [String] :
|
91
|
-
# @option opts [String] :
|
89
|
+
# @option opts [String] :for The intended container for the attachment
|
90
|
+
# @option opts [String] :appUserId The appUserId of the user that will receive the attachment Used in attachments for messages
|
91
|
+
# @option opts [String] :userId The userId of the user that will receive the attachment Used in attachments for messages
|
92
92
|
# @return [AttachmentResponse]
|
93
|
-
def upload_attachment(
|
94
|
-
data, _status_code, _headers = upload_attachment_with_http_info(
|
93
|
+
def upload_attachment(appId, source, access, opts = {})
|
94
|
+
data, _status_code, _headers = upload_attachment_with_http_info(appId, source, access, opts)
|
95
95
|
return data
|
96
96
|
end
|
97
97
|
|
98
98
|
#
|
99
99
|
# Upload an attachment to Smooch to use in future messages.
|
100
|
-
# @param
|
100
|
+
# @param appId Identifies the app.
|
101
101
|
# @param source File to be uploaded
|
102
102
|
# @param access Access level for the resulting file
|
103
103
|
# @param [Hash] opts the optional parameters
|
104
|
-
# @option opts [String] :
|
105
|
-
# @option opts [String] :
|
106
|
-
# @option opts [String] :
|
104
|
+
# @option opts [String] :for The intended container for the attachment
|
105
|
+
# @option opts [String] :appUserId The appUserId of the user that will receive the attachment Used in attachments for messages
|
106
|
+
# @option opts [String] :userId The userId of the user that will receive the attachment Used in attachments for messages
|
107
107
|
# @return [Array<(AttachmentResponse, Fixnum, Hash)>] AttachmentResponse data, response status code and response headers
|
108
|
-
def upload_attachment_with_http_info(
|
108
|
+
def upload_attachment_with_http_info(appId, source, access, opts = {})
|
109
109
|
if @api_client.config.debugging
|
110
110
|
@api_client.config.logger.debug "Calling API: AttachmentsApi.upload_attachment ..."
|
111
111
|
end
|
112
|
-
# verify the required parameter '
|
113
|
-
if @api_client.config.client_side_validation &&
|
114
|
-
fail ArgumentError, "Missing the required parameter '
|
112
|
+
# verify the required parameter 'appId' is set
|
113
|
+
if @api_client.config.client_side_validation && appId.nil?
|
114
|
+
fail ArgumentError, "Missing the required parameter 'appId' when calling AttachmentsApi.upload_attachment"
|
115
115
|
end
|
116
116
|
# verify the required parameter 'source' is set
|
117
117
|
if @api_client.config.client_side_validation && source.nil?
|
@@ -122,14 +122,14 @@ module SmoochApi
|
|
122
122
|
fail ArgumentError, "Missing the required parameter 'access' when calling AttachmentsApi.upload_attachment"
|
123
123
|
end
|
124
124
|
# resource path
|
125
|
-
local_var_path = "/v1.1/apps/{appId}/attachments".sub('{' + 'appId' + '}',
|
125
|
+
local_var_path = "/v1.1/apps/{appId}/attachments".sub('{' + 'appId' + '}', appId.to_s)
|
126
126
|
|
127
127
|
# query parameters
|
128
128
|
query_params = {}
|
129
129
|
query_params[:'access'] = access
|
130
|
-
query_params[:'for'] = opts[:'
|
131
|
-
query_params[:'appUserId'] = opts[:'
|
132
|
-
query_params[:'userId'] = opts[:'
|
130
|
+
query_params[:'for'] = opts[:'for'] if !opts[:'for'].nil?
|
131
|
+
query_params[:'appUserId'] = opts[:'appUserId'] if !opts[:'appUserId'].nil?
|
132
|
+
query_params[:'userId'] = opts[:'userId'] if !opts[:'userId'].nil?
|
133
133
|
|
134
134
|
# header parameters
|
135
135
|
header_params = {}
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#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).
|
5
5
|
|
6
|
-
OpenAPI spec version: 4.
|
6
|
+
OpenAPI spec version: 4.2
|
7
7
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
9
9
|
Swagger Codegen version: 2.2.3-SNAPSHOT
|
@@ -22,41 +22,41 @@ module SmoochApi
|
|
22
22
|
|
23
23
|
#
|
24
24
|
# Deletes a single message.
|
25
|
-
# @param
|
26
|
-
# @param
|
27
|
-
# @param
|
25
|
+
# @param appId Identifies the app.
|
26
|
+
# @param userId Identifies the user. Can be either the smoochId or the userId.
|
27
|
+
# @param messageId Identifies the message.
|
28
28
|
# @param [Hash] opts the optional parameters
|
29
29
|
# @return [nil]
|
30
|
-
def delete_message(
|
31
|
-
delete_message_with_http_info(
|
30
|
+
def delete_message(appId, userId, messageId, opts = {})
|
31
|
+
delete_message_with_http_info(appId, userId, messageId, opts)
|
32
32
|
return nil
|
33
33
|
end
|
34
34
|
|
35
35
|
#
|
36
36
|
# Deletes a single message.
|
37
|
-
# @param
|
38
|
-
# @param
|
39
|
-
# @param
|
37
|
+
# @param appId Identifies the app.
|
38
|
+
# @param userId Identifies the user. Can be either the smoochId or the userId.
|
39
|
+
# @param messageId Identifies the message.
|
40
40
|
# @param [Hash] opts the optional parameters
|
41
41
|
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
42
|
-
def delete_message_with_http_info(
|
42
|
+
def delete_message_with_http_info(appId, userId, messageId, opts = {})
|
43
43
|
if @api_client.config.debugging
|
44
44
|
@api_client.config.logger.debug "Calling API: ConversationApi.delete_message ..."
|
45
45
|
end
|
46
|
-
# verify the required parameter '
|
47
|
-
if @api_client.config.client_side_validation &&
|
48
|
-
fail ArgumentError, "Missing the required parameter '
|
46
|
+
# verify the required parameter 'appId' is set
|
47
|
+
if @api_client.config.client_side_validation && appId.nil?
|
48
|
+
fail ArgumentError, "Missing the required parameter 'appId' when calling ConversationApi.delete_message"
|
49
49
|
end
|
50
|
-
# verify the required parameter '
|
51
|
-
if @api_client.config.client_side_validation &&
|
52
|
-
fail ArgumentError, "Missing the required parameter '
|
50
|
+
# verify the required parameter 'userId' is set
|
51
|
+
if @api_client.config.client_side_validation && userId.nil?
|
52
|
+
fail ArgumentError, "Missing the required parameter 'userId' when calling ConversationApi.delete_message"
|
53
53
|
end
|
54
|
-
# verify the required parameter '
|
55
|
-
if @api_client.config.client_side_validation &&
|
56
|
-
fail ArgumentError, "Missing the required parameter '
|
54
|
+
# verify the required parameter 'messageId' is set
|
55
|
+
if @api_client.config.client_side_validation && messageId.nil?
|
56
|
+
fail ArgumentError, "Missing the required parameter 'messageId' when calling ConversationApi.delete_message"
|
57
57
|
end
|
58
58
|
# resource path
|
59
|
-
local_var_path = "/v1.1/apps/{appId}/appusers/{userId}/messages/{messageId}".sub('{' + 'appId' + '}',
|
59
|
+
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)
|
60
60
|
|
61
61
|
# query parameters
|
62
62
|
query_params = {}
|
@@ -88,35 +88,35 @@ module SmoochApi
|
|
88
88
|
|
89
89
|
#
|
90
90
|
# 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.
|
91
|
-
# @param
|
92
|
-
# @param
|
91
|
+
# @param appId Identifies the app.
|
92
|
+
# @param userId Identifies the user. Can be either the smoochId or the userId.
|
93
93
|
# @param [Hash] opts the optional parameters
|
94
94
|
# @return [nil]
|
95
|
-
def delete_messages(
|
96
|
-
delete_messages_with_http_info(
|
95
|
+
def delete_messages(appId, userId, opts = {})
|
96
|
+
delete_messages_with_http_info(appId, userId, opts)
|
97
97
|
return nil
|
98
98
|
end
|
99
99
|
|
100
100
|
#
|
101
101
|
# 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.
|
102
|
-
# @param
|
103
|
-
# @param
|
102
|
+
# @param appId Identifies the app.
|
103
|
+
# @param userId Identifies the user. Can be either the smoochId or the userId.
|
104
104
|
# @param [Hash] opts the optional parameters
|
105
105
|
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
106
|
-
def delete_messages_with_http_info(
|
106
|
+
def delete_messages_with_http_info(appId, userId, opts = {})
|
107
107
|
if @api_client.config.debugging
|
108
108
|
@api_client.config.logger.debug "Calling API: ConversationApi.delete_messages ..."
|
109
109
|
end
|
110
|
-
# verify the required parameter '
|
111
|
-
if @api_client.config.client_side_validation &&
|
112
|
-
fail ArgumentError, "Missing the required parameter '
|
110
|
+
# verify the required parameter 'appId' is set
|
111
|
+
if @api_client.config.client_side_validation && appId.nil?
|
112
|
+
fail ArgumentError, "Missing the required parameter 'appId' when calling ConversationApi.delete_messages"
|
113
113
|
end
|
114
|
-
# verify the required parameter '
|
115
|
-
if @api_client.config.client_side_validation &&
|
116
|
-
fail ArgumentError, "Missing the required parameter '
|
114
|
+
# verify the required parameter 'userId' is set
|
115
|
+
if @api_client.config.client_side_validation && userId.nil?
|
116
|
+
fail ArgumentError, "Missing the required parameter 'userId' when calling ConversationApi.delete_messages"
|
117
117
|
end
|
118
118
|
# resource path
|
119
|
-
local_var_path = "/v1.1/apps/{appId}/appusers/{userId}/messages".sub('{' + 'appId' + '}',
|
119
|
+
local_var_path = "/v1.1/apps/{appId}/appusers/{userId}/messages".sub('{' + 'appId' + '}', appId.to_s).sub('{' + 'userId' + '}', userId.to_s)
|
120
120
|
|
121
121
|
# query parameters
|
122
122
|
query_params = {}
|
@@ -148,39 +148,39 @@ module SmoochApi
|
|
148
148
|
|
149
149
|
#
|
150
150
|
# Get the specified app user's messages.
|
151
|
-
# @param
|
152
|
-
# @param
|
151
|
+
# @param appId Identifies the app.
|
152
|
+
# @param userId Identifies the user. Can be either the smoochId or the userId.
|
153
153
|
# @param [Hash] opts the optional parameters
|
154
154
|
# @option opts [String] :before Timestamp of message. The API will return 100 messages before the specified timestamp (excluding any messages with the provided timestamp).
|
155
155
|
# @option opts [String] :after Timestamp of message. The API will return 100 messages after the specified timestamp (excluding any messages with the provided timestamp).
|
156
156
|
# @return [GetMessagesResponse]
|
157
|
-
def get_messages(
|
158
|
-
data, _status_code, _headers = get_messages_with_http_info(
|
157
|
+
def get_messages(appId, userId, opts = {})
|
158
|
+
data, _status_code, _headers = get_messages_with_http_info(appId, userId, opts)
|
159
159
|
return data
|
160
160
|
end
|
161
161
|
|
162
162
|
#
|
163
163
|
# Get the specified app user's messages.
|
164
|
-
# @param
|
165
|
-
# @param
|
164
|
+
# @param appId Identifies the app.
|
165
|
+
# @param userId Identifies the user. Can be either the smoochId or the userId.
|
166
166
|
# @param [Hash] opts the optional parameters
|
167
167
|
# @option opts [String] :before Timestamp of message. The API will return 100 messages before the specified timestamp (excluding any messages with the provided timestamp).
|
168
168
|
# @option opts [String] :after Timestamp of message. The API will return 100 messages after the specified timestamp (excluding any messages with the provided timestamp).
|
169
169
|
# @return [Array<(GetMessagesResponse, Fixnum, Hash)>] GetMessagesResponse data, response status code and response headers
|
170
|
-
def get_messages_with_http_info(
|
170
|
+
def get_messages_with_http_info(appId, userId, opts = {})
|
171
171
|
if @api_client.config.debugging
|
172
172
|
@api_client.config.logger.debug "Calling API: ConversationApi.get_messages ..."
|
173
173
|
end
|
174
|
-
# verify the required parameter '
|
175
|
-
if @api_client.config.client_side_validation &&
|
176
|
-
fail ArgumentError, "Missing the required parameter '
|
174
|
+
# verify the required parameter 'appId' is set
|
175
|
+
if @api_client.config.client_side_validation && appId.nil?
|
176
|
+
fail ArgumentError, "Missing the required parameter 'appId' when calling ConversationApi.get_messages"
|
177
177
|
end
|
178
|
-
# verify the required parameter '
|
179
|
-
if @api_client.config.client_side_validation &&
|
180
|
-
fail ArgumentError, "Missing the required parameter '
|
178
|
+
# verify the required parameter 'userId' is set
|
179
|
+
if @api_client.config.client_side_validation && userId.nil?
|
180
|
+
fail ArgumentError, "Missing the required parameter 'userId' when calling ConversationApi.get_messages"
|
181
181
|
end
|
182
182
|
# resource path
|
183
|
-
local_var_path = "/v1.1/apps/{appId}/appusers/{userId}/messages".sub('{' + 'appId' + '}',
|
183
|
+
local_var_path = "/v1.1/apps/{appId}/appusers/{userId}/messages".sub('{' + 'appId' + '}', appId.to_s).sub('{' + 'userId' + '}', userId.to_s)
|
184
184
|
|
185
185
|
# query parameters
|
186
186
|
query_params = {}
|
@@ -215,41 +215,41 @@ module SmoochApi
|
|
215
215
|
|
216
216
|
#
|
217
217
|
# Post a message to or from the app user.
|
218
|
-
# @param
|
219
|
-
# @param
|
220
|
-
# @param
|
218
|
+
# @param appId Identifies the app.
|
219
|
+
# @param userId Identifies the user. Can be either the smoochId or the userId.
|
220
|
+
# @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))
|
221
221
|
# @param [Hash] opts the optional parameters
|
222
222
|
# @return [MessageResponse]
|
223
|
-
def post_message(
|
224
|
-
data, _status_code, _headers = post_message_with_http_info(
|
223
|
+
def post_message(appId, userId, messagePostBody, opts = {})
|
224
|
+
data, _status_code, _headers = post_message_with_http_info(appId, userId, messagePostBody, opts)
|
225
225
|
return data
|
226
226
|
end
|
227
227
|
|
228
228
|
#
|
229
229
|
# Post a message to or from the app user.
|
230
|
-
# @param
|
231
|
-
# @param
|
232
|
-
# @param
|
230
|
+
# @param appId Identifies the app.
|
231
|
+
# @param userId Identifies the user. Can be either the smoochId or the userId.
|
232
|
+
# @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))
|
233
233
|
# @param [Hash] opts the optional parameters
|
234
234
|
# @return [Array<(MessageResponse, Fixnum, Hash)>] MessageResponse data, response status code and response headers
|
235
|
-
def post_message_with_http_info(
|
235
|
+
def post_message_with_http_info(appId, userId, messagePostBody, opts = {})
|
236
236
|
if @api_client.config.debugging
|
237
237
|
@api_client.config.logger.debug "Calling API: ConversationApi.post_message ..."
|
238
238
|
end
|
239
|
-
# verify the required parameter '
|
240
|
-
if @api_client.config.client_side_validation &&
|
241
|
-
fail ArgumentError, "Missing the required parameter '
|
239
|
+
# verify the required parameter 'appId' is set
|
240
|
+
if @api_client.config.client_side_validation && appId.nil?
|
241
|
+
fail ArgumentError, "Missing the required parameter 'appId' when calling ConversationApi.post_message"
|
242
242
|
end
|
243
|
-
# verify the required parameter '
|
244
|
-
if @api_client.config.client_side_validation &&
|
245
|
-
fail ArgumentError, "Missing the required parameter '
|
243
|
+
# verify the required parameter 'userId' is set
|
244
|
+
if @api_client.config.client_side_validation && userId.nil?
|
245
|
+
fail ArgumentError, "Missing the required parameter 'userId' when calling ConversationApi.post_message"
|
246
246
|
end
|
247
|
-
# verify the required parameter '
|
248
|
-
if @api_client.config.client_side_validation &&
|
249
|
-
fail ArgumentError, "Missing the required parameter '
|
247
|
+
# verify the required parameter 'messagePostBody' is set
|
248
|
+
if @api_client.config.client_side_validation && messagePostBody.nil?
|
249
|
+
fail ArgumentError, "Missing the required parameter 'messagePostBody' when calling ConversationApi.post_message"
|
250
250
|
end
|
251
251
|
# resource path
|
252
|
-
local_var_path = "/v1.1/apps/{appId}/appusers/{userId}/messages".sub('{' + 'appId' + '}',
|
252
|
+
local_var_path = "/v1.1/apps/{appId}/appusers/{userId}/messages".sub('{' + 'appId' + '}', appId.to_s).sub('{' + 'userId' + '}', userId.to_s)
|
253
253
|
|
254
254
|
# query parameters
|
255
255
|
query_params = {}
|
@@ -265,7 +265,7 @@ module SmoochApi
|
|
265
265
|
form_params = {}
|
266
266
|
|
267
267
|
# http body (model)
|
268
|
-
post_body = @api_client.object_to_http_body(
|
268
|
+
post_body = @api_client.object_to_http_body(messagePostBody)
|
269
269
|
auth_names = ['jwt']
|
270
270
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
271
271
|
:header_params => header_params,
|
@@ -282,35 +282,35 @@ module SmoochApi
|
|
282
282
|
|
283
283
|
#
|
284
284
|
# Reset the unread count of the conversation to 0.
|
285
|
-
# @param
|
286
|
-
# @param
|
285
|
+
# @param appId Identifies the app.
|
286
|
+
# @param userId Identifies the user. Can be either the smoochId or the userId.
|
287
287
|
# @param [Hash] opts the optional parameters
|
288
288
|
# @return [nil]
|
289
|
-
def reset_unread_count(
|
290
|
-
reset_unread_count_with_http_info(
|
289
|
+
def reset_unread_count(appId, userId, opts = {})
|
290
|
+
reset_unread_count_with_http_info(appId, userId, opts)
|
291
291
|
return nil
|
292
292
|
end
|
293
293
|
|
294
294
|
#
|
295
295
|
# Reset the unread count of the conversation to 0.
|
296
|
-
# @param
|
297
|
-
# @param
|
296
|
+
# @param appId Identifies the app.
|
297
|
+
# @param userId Identifies the user. Can be either the smoochId or the userId.
|
298
298
|
# @param [Hash] opts the optional parameters
|
299
299
|
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
300
|
-
def reset_unread_count_with_http_info(
|
300
|
+
def reset_unread_count_with_http_info(appId, userId, opts = {})
|
301
301
|
if @api_client.config.debugging
|
302
302
|
@api_client.config.logger.debug "Calling API: ConversationApi.reset_unread_count ..."
|
303
303
|
end
|
304
|
-
# verify the required parameter '
|
305
|
-
if @api_client.config.client_side_validation &&
|
306
|
-
fail ArgumentError, "Missing the required parameter '
|
304
|
+
# verify the required parameter 'appId' is set
|
305
|
+
if @api_client.config.client_side_validation && appId.nil?
|
306
|
+
fail ArgumentError, "Missing the required parameter 'appId' when calling ConversationApi.reset_unread_count"
|
307
307
|
end
|
308
|
-
# verify the required parameter '
|
309
|
-
if @api_client.config.client_side_validation &&
|
310
|
-
fail ArgumentError, "Missing the required parameter '
|
308
|
+
# verify the required parameter 'userId' is set
|
309
|
+
if @api_client.config.client_side_validation && userId.nil?
|
310
|
+
fail ArgumentError, "Missing the required parameter 'userId' when calling ConversationApi.reset_unread_count"
|
311
311
|
end
|
312
312
|
# resource path
|
313
|
-
local_var_path = "/v1.1/apps/{appId}/appusers/{userId}/conversation/read".sub('{' + 'appId' + '}',
|
313
|
+
local_var_path = "/v1.1/apps/{appId}/appusers/{userId}/conversation/read".sub('{' + 'appId' + '}', appId.to_s).sub('{' + 'userId' + '}', userId.to_s)
|
314
314
|
|
315
315
|
# query parameters
|
316
316
|
query_params = {}
|
@@ -342,41 +342,41 @@ module SmoochApi
|
|
342
342
|
|
343
343
|
#
|
344
344
|
# Notify Smooch when an app maker starts or stops typing a response.
|
345
|
-
# @param
|
346
|
-
# @param
|
347
|
-
# @param
|
345
|
+
# @param appId Identifies the app.
|
346
|
+
# @param userId Identifies the user. Can be either the smoochId or the userId.
|
347
|
+
# @param typingActivityTriggerBody Body for a triggerTypingActivity request.
|
348
348
|
# @param [Hash] opts the optional parameters
|
349
349
|
# @return [nil]
|
350
|
-
def trigger_typing_activity(
|
351
|
-
trigger_typing_activity_with_http_info(
|
350
|
+
def trigger_typing_activity(appId, userId, typingActivityTriggerBody, opts = {})
|
351
|
+
trigger_typing_activity_with_http_info(appId, userId, typingActivityTriggerBody, opts)
|
352
352
|
return nil
|
353
353
|
end
|
354
354
|
|
355
355
|
#
|
356
356
|
# Notify Smooch when an app maker starts or stops typing a response.
|
357
|
-
# @param
|
358
|
-
# @param
|
359
|
-
# @param
|
357
|
+
# @param appId Identifies the app.
|
358
|
+
# @param userId Identifies the user. Can be either the smoochId or the userId.
|
359
|
+
# @param typingActivityTriggerBody Body for a triggerTypingActivity request.
|
360
360
|
# @param [Hash] opts the optional parameters
|
361
361
|
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
362
|
-
def trigger_typing_activity_with_http_info(
|
362
|
+
def trigger_typing_activity_with_http_info(appId, userId, typingActivityTriggerBody, opts = {})
|
363
363
|
if @api_client.config.debugging
|
364
364
|
@api_client.config.logger.debug "Calling API: ConversationApi.trigger_typing_activity ..."
|
365
365
|
end
|
366
|
-
# verify the required parameter '
|
367
|
-
if @api_client.config.client_side_validation &&
|
368
|
-
fail ArgumentError, "Missing the required parameter '
|
366
|
+
# verify the required parameter 'appId' is set
|
367
|
+
if @api_client.config.client_side_validation && appId.nil?
|
368
|
+
fail ArgumentError, "Missing the required parameter 'appId' when calling ConversationApi.trigger_typing_activity"
|
369
369
|
end
|
370
|
-
# verify the required parameter '
|
371
|
-
if @api_client.config.client_side_validation &&
|
372
|
-
fail ArgumentError, "Missing the required parameter '
|
370
|
+
# verify the required parameter 'userId' is set
|
371
|
+
if @api_client.config.client_side_validation && userId.nil?
|
372
|
+
fail ArgumentError, "Missing the required parameter 'userId' when calling ConversationApi.trigger_typing_activity"
|
373
373
|
end
|
374
|
-
# verify the required parameter '
|
375
|
-
if @api_client.config.client_side_validation &&
|
376
|
-
fail ArgumentError, "Missing the required parameter '
|
374
|
+
# verify the required parameter 'typingActivityTriggerBody' is set
|
375
|
+
if @api_client.config.client_side_validation && typingActivityTriggerBody.nil?
|
376
|
+
fail ArgumentError, "Missing the required parameter 'typingActivityTriggerBody' when calling ConversationApi.trigger_typing_activity"
|
377
377
|
end
|
378
378
|
# resource path
|
379
|
-
local_var_path = "/v1.1/apps/{appId}/appusers/{userId}/conversation/activity".sub('{' + 'appId' + '}',
|
379
|
+
local_var_path = "/v1.1/apps/{appId}/appusers/{userId}/conversation/activity".sub('{' + 'appId' + '}', appId.to_s).sub('{' + 'userId' + '}', userId.to_s)
|
380
380
|
|
381
381
|
# query parameters
|
382
382
|
query_params = {}
|
@@ -392,7 +392,7 @@ module SmoochApi
|
|
392
392
|
form_params = {}
|
393
393
|
|
394
394
|
# http body (model)
|
395
|
-
post_body = @api_client.object_to_http_body(
|
395
|
+
post_body = @api_client.object_to_http_body(typingActivityTriggerBody)
|
396
396
|
auth_names = ['jwt']
|
397
397
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
398
398
|
:header_params => header_params,
|