smooch-api 1.12.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +18 -25
- data/docs/AppUserApi.md +54 -83
- data/docs/ConversationApi.md +30 -15
- data/docs/MenuApi.md +26 -11
- data/lib/smooch-api.rb +1 -7
- data/lib/smooch-api/api/app_api.rb +1 -1
- data/lib/smooch-api/api/app_user_api.rb +91 -98
- data/lib/smooch-api/api/attachments_api.rb +1 -1
- data/lib/smooch-api/api/conversation_api.rb +51 -21
- data/lib/smooch-api/api/integration_api.rb +1 -1
- data/lib/smooch-api/api/menu_api.rb +31 -13
- data/lib/smooch-api/api/webhook_api.rb +1 -1
- 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 +1 -34
- data/lib/smooch-api/models/app.rb +1 -1
- 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 +1 -1
- data/lib/smooch-api/models/app_update.rb +1 -1
- data/lib/smooch-api/models/app_user.rb +1 -1
- data/lib/smooch-api/models/app_user_link.rb +1 -34
- data/lib/smooch-api/models/app_user_pre_create.rb +1 -1
- data/lib/smooch-api/models/app_user_response.rb +1 -1
- data/lib/smooch-api/models/app_user_update.rb +1 -1
- data/lib/smooch-api/models/attachment_response.rb +1 -1
- data/lib/smooch-api/models/client.rb +1 -34
- data/lib/smooch-api/models/client_info.rb +1 -1
- data/lib/smooch-api/models/confirmation.rb +1 -1
- data/lib/smooch-api/models/conversation.rb +1 -1
- data/lib/smooch-api/models/destination.rb +1 -1
- data/lib/smooch-api/models/device_response.rb +1 -1
- data/lib/smooch-api/models/device_update.rb +1 -1
- data/lib/smooch-api/models/display_settings.rb +1 -1
- data/lib/smooch-api/models/get_messages_response.rb +1 -1
- data/lib/smooch-api/models/integration.rb +1 -1
- data/lib/smooch-api/models/integration_create.rb +1 -1
- data/lib/smooch-api/models/integration_response.rb +1 -1
- data/lib/smooch-api/models/jwt_response.rb +1 -1
- data/lib/smooch-api/models/list_apps_response.rb +1 -1
- 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_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 +1 -34
- data/lib/smooch-api/models/message_item.rb +1 -1
- data/lib/smooch-api/models/message_post.rb +1 -34
- data/lib/smooch-api/models/message_response.rb +1 -1
- data/lib/smooch-api/models/secret_key.rb +1 -1
- 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/source.rb +1 -1
- data/lib/smooch-api/models/typing_activity_trigger.rb +1 -1
- data/lib/smooch-api/models/webhook.rb +1 -22
- data/lib/smooch-api/models/webhook_create.rb +1 -22
- data/lib/smooch-api/models/webhook_response.rb +1 -1
- data/lib/smooch-api/models/webhook_update.rb +1 -22
- 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 +3 -15
- data/docs/DeviceInit.md +0 -12
- data/docs/Event.md +0 -8
- data/docs/Init.md +0 -9
- data/docs/InitApi.md +0 -61
- data/docs/InitResponse.md +0 -9
- data/docs/TrackEventResponse.md +0 -8
- data/lib/smooch-api/api/init_api.rb +0 -78
- data/lib/smooch-api/models/device_init.rb +0 -271
- data/lib/smooch-api/models/event.rb +0 -194
- data/lib/smooch-api/models/init.rb +0 -203
- data/lib/smooch-api/models/init_response.rb +0 -209
- data/lib/smooch-api/models/track_event_response.rb +0 -189
|
@@ -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:
|
|
6
|
+
OpenAPI spec version: 2
|
|
7
7
|
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
9
|
Swagger Codegen version: 2.2.3-SNAPSHOT
|
|
@@ -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:
|
|
6
|
+
OpenAPI spec version: 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,29 +22,35 @@ module SmoochApi
|
|
|
22
22
|
|
|
23
23
|
#
|
|
24
24
|
# 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.
|
|
25
|
+
# @param app_id Identifies the app.
|
|
25
26
|
# @param user_id Identifies the user. Can be either the smoochId or the userId.
|
|
26
27
|
# @param [Hash] opts the optional parameters
|
|
27
28
|
# @return [nil]
|
|
28
|
-
def delete_messages(user_id, opts = {})
|
|
29
|
-
delete_messages_with_http_info(user_id, opts)
|
|
29
|
+
def delete_messages(app_id, user_id, opts = {})
|
|
30
|
+
delete_messages_with_http_info(app_id, user_id, opts)
|
|
30
31
|
return nil
|
|
31
32
|
end
|
|
32
33
|
|
|
33
34
|
#
|
|
34
35
|
# 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.
|
|
36
|
+
# @param app_id Identifies the app.
|
|
35
37
|
# @param user_id Identifies the user. Can be either the smoochId or the userId.
|
|
36
38
|
# @param [Hash] opts the optional parameters
|
|
37
39
|
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
|
38
|
-
def delete_messages_with_http_info(user_id, opts = {})
|
|
40
|
+
def delete_messages_with_http_info(app_id, user_id, opts = {})
|
|
39
41
|
if @api_client.config.debugging
|
|
40
42
|
@api_client.config.logger.debug "Calling API: ConversationApi.delete_messages ..."
|
|
41
43
|
end
|
|
44
|
+
# verify the required parameter 'app_id' is set
|
|
45
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
|
46
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling ConversationApi.delete_messages"
|
|
47
|
+
end
|
|
42
48
|
# verify the required parameter 'user_id' is set
|
|
43
49
|
if @api_client.config.client_side_validation && user_id.nil?
|
|
44
50
|
fail ArgumentError, "Missing the required parameter 'user_id' when calling ConversationApi.delete_messages"
|
|
45
51
|
end
|
|
46
52
|
# resource path
|
|
47
|
-
local_var_path = "/appusers/{userId}/messages".sub('{' + 'userId' + '}', user_id.to_s)
|
|
53
|
+
local_var_path = "/apps/{appId}/appusers/{userId}/messages".sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'userId' + '}', user_id.to_s)
|
|
48
54
|
|
|
49
55
|
# query parameters
|
|
50
56
|
query_params = {}
|
|
@@ -76,33 +82,39 @@ module SmoochApi
|
|
|
76
82
|
|
|
77
83
|
#
|
|
78
84
|
# Get the specified app user's messages.
|
|
85
|
+
# @param app_id Identifies the app.
|
|
79
86
|
# @param user_id Identifies the user. Can be either the smoochId or the userId.
|
|
80
87
|
# @param [Hash] opts the optional parameters
|
|
81
88
|
# @option opts [String] :before Timestamp of message. The API will return 100 messages before the specified timestamp (excluding any messages with the provided timestamp).
|
|
82
89
|
# @option opts [String] :after Timestamp of message. The API will return 100 messages after the specified timestamp (excluding any messages with the provided timestamp).
|
|
83
90
|
# @return [GetMessagesResponse]
|
|
84
|
-
def get_messages(user_id, opts = {})
|
|
85
|
-
data, _status_code, _headers = get_messages_with_http_info(user_id, opts)
|
|
91
|
+
def get_messages(app_id, user_id, opts = {})
|
|
92
|
+
data, _status_code, _headers = get_messages_with_http_info(app_id, user_id, opts)
|
|
86
93
|
return data
|
|
87
94
|
end
|
|
88
95
|
|
|
89
96
|
#
|
|
90
97
|
# Get the specified app user's messages.
|
|
98
|
+
# @param app_id Identifies the app.
|
|
91
99
|
# @param user_id Identifies the user. Can be either the smoochId or the userId.
|
|
92
100
|
# @param [Hash] opts the optional parameters
|
|
93
101
|
# @option opts [String] :before Timestamp of message. The API will return 100 messages before the specified timestamp (excluding any messages with the provided timestamp).
|
|
94
102
|
# @option opts [String] :after Timestamp of message. The API will return 100 messages after the specified timestamp (excluding any messages with the provided timestamp).
|
|
95
103
|
# @return [Array<(GetMessagesResponse, Fixnum, Hash)>] GetMessagesResponse data, response status code and response headers
|
|
96
|
-
def get_messages_with_http_info(user_id, opts = {})
|
|
104
|
+
def get_messages_with_http_info(app_id, user_id, opts = {})
|
|
97
105
|
if @api_client.config.debugging
|
|
98
106
|
@api_client.config.logger.debug "Calling API: ConversationApi.get_messages ..."
|
|
99
107
|
end
|
|
108
|
+
# verify the required parameter 'app_id' is set
|
|
109
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
|
110
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling ConversationApi.get_messages"
|
|
111
|
+
end
|
|
100
112
|
# verify the required parameter 'user_id' is set
|
|
101
113
|
if @api_client.config.client_side_validation && user_id.nil?
|
|
102
114
|
fail ArgumentError, "Missing the required parameter 'user_id' when calling ConversationApi.get_messages"
|
|
103
115
|
end
|
|
104
116
|
# resource path
|
|
105
|
-
local_var_path = "/appusers/{userId}/messages".sub('{' + 'userId' + '}', user_id.to_s)
|
|
117
|
+
local_var_path = "/apps/{appId}/appusers/{userId}/messages".sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'userId' + '}', user_id.to_s)
|
|
106
118
|
|
|
107
119
|
# query parameters
|
|
108
120
|
query_params = {}
|
|
@@ -137,25 +149,31 @@ module SmoochApi
|
|
|
137
149
|
|
|
138
150
|
#
|
|
139
151
|
# Post a message to or from the app user.
|
|
152
|
+
# @param app_id Identifies the app.
|
|
140
153
|
# @param user_id Identifies the user. Can be either the smoochId or the userId.
|
|
141
154
|
# @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))
|
|
142
155
|
# @param [Hash] opts the optional parameters
|
|
143
156
|
# @return [MessageResponse]
|
|
144
|
-
def post_message(user_id, message_post_body, opts = {})
|
|
145
|
-
data, _status_code, _headers = post_message_with_http_info(user_id, message_post_body, opts)
|
|
157
|
+
def post_message(app_id, user_id, message_post_body, opts = {})
|
|
158
|
+
data, _status_code, _headers = post_message_with_http_info(app_id, user_id, message_post_body, opts)
|
|
146
159
|
return data
|
|
147
160
|
end
|
|
148
161
|
|
|
149
162
|
#
|
|
150
163
|
# Post a message to or from the app user.
|
|
164
|
+
# @param app_id Identifies the app.
|
|
151
165
|
# @param user_id Identifies the user. Can be either the smoochId or the userId.
|
|
152
166
|
# @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))
|
|
153
167
|
# @param [Hash] opts the optional parameters
|
|
154
168
|
# @return [Array<(MessageResponse, Fixnum, Hash)>] MessageResponse data, response status code and response headers
|
|
155
|
-
def post_message_with_http_info(user_id, message_post_body, opts = {})
|
|
169
|
+
def post_message_with_http_info(app_id, user_id, message_post_body, opts = {})
|
|
156
170
|
if @api_client.config.debugging
|
|
157
171
|
@api_client.config.logger.debug "Calling API: ConversationApi.post_message ..."
|
|
158
172
|
end
|
|
173
|
+
# verify the required parameter 'app_id' is set
|
|
174
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
|
175
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling ConversationApi.post_message"
|
|
176
|
+
end
|
|
159
177
|
# verify the required parameter 'user_id' is set
|
|
160
178
|
if @api_client.config.client_side_validation && user_id.nil?
|
|
161
179
|
fail ArgumentError, "Missing the required parameter 'user_id' when calling ConversationApi.post_message"
|
|
@@ -165,7 +183,7 @@ module SmoochApi
|
|
|
165
183
|
fail ArgumentError, "Missing the required parameter 'message_post_body' when calling ConversationApi.post_message"
|
|
166
184
|
end
|
|
167
185
|
# resource path
|
|
168
|
-
local_var_path = "/appusers/{userId}/messages".sub('{' + 'userId' + '}', user_id.to_s)
|
|
186
|
+
local_var_path = "/apps/{appId}/appusers/{userId}/messages".sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'userId' + '}', user_id.to_s)
|
|
169
187
|
|
|
170
188
|
# query parameters
|
|
171
189
|
query_params = {}
|
|
@@ -198,29 +216,35 @@ module SmoochApi
|
|
|
198
216
|
|
|
199
217
|
#
|
|
200
218
|
# Reset the unread count of the conversation to 0.
|
|
219
|
+
# @param app_id Identifies the app.
|
|
201
220
|
# @param user_id Identifies the user. Can be either the smoochId or the userId.
|
|
202
221
|
# @param [Hash] opts the optional parameters
|
|
203
222
|
# @return [nil]
|
|
204
|
-
def reset_unread_count(user_id, opts = {})
|
|
205
|
-
reset_unread_count_with_http_info(user_id, opts)
|
|
223
|
+
def reset_unread_count(app_id, user_id, opts = {})
|
|
224
|
+
reset_unread_count_with_http_info(app_id, user_id, opts)
|
|
206
225
|
return nil
|
|
207
226
|
end
|
|
208
227
|
|
|
209
228
|
#
|
|
210
229
|
# Reset the unread count of the conversation to 0.
|
|
230
|
+
# @param app_id Identifies the app.
|
|
211
231
|
# @param user_id Identifies the user. Can be either the smoochId or the userId.
|
|
212
232
|
# @param [Hash] opts the optional parameters
|
|
213
233
|
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
|
214
|
-
def reset_unread_count_with_http_info(user_id, opts = {})
|
|
234
|
+
def reset_unread_count_with_http_info(app_id, user_id, opts = {})
|
|
215
235
|
if @api_client.config.debugging
|
|
216
236
|
@api_client.config.logger.debug "Calling API: ConversationApi.reset_unread_count ..."
|
|
217
237
|
end
|
|
238
|
+
# verify the required parameter 'app_id' is set
|
|
239
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
|
240
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling ConversationApi.reset_unread_count"
|
|
241
|
+
end
|
|
218
242
|
# verify the required parameter 'user_id' is set
|
|
219
243
|
if @api_client.config.client_side_validation && user_id.nil?
|
|
220
244
|
fail ArgumentError, "Missing the required parameter 'user_id' when calling ConversationApi.reset_unread_count"
|
|
221
245
|
end
|
|
222
246
|
# resource path
|
|
223
|
-
local_var_path = "/appusers/{userId}/conversation/read".sub('{' + 'userId' + '}', user_id.to_s)
|
|
247
|
+
local_var_path = "/apps/{appId}/appusers/{userId}/conversation/read".sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'userId' + '}', user_id.to_s)
|
|
224
248
|
|
|
225
249
|
# query parameters
|
|
226
250
|
query_params = {}
|
|
@@ -252,25 +276,31 @@ module SmoochApi
|
|
|
252
276
|
|
|
253
277
|
#
|
|
254
278
|
# Notify Smooch when an app maker starts or stops typing a response.
|
|
279
|
+
# @param app_id Identifies the app.
|
|
255
280
|
# @param user_id Identifies the user. Can be either the smoochId or the userId.
|
|
256
281
|
# @param typing_activity_trigger_body Body for a triggerTypingActivity request.
|
|
257
282
|
# @param [Hash] opts the optional parameters
|
|
258
283
|
# @return [nil]
|
|
259
|
-
def trigger_typing_activity(user_id, typing_activity_trigger_body, opts = {})
|
|
260
|
-
trigger_typing_activity_with_http_info(user_id, typing_activity_trigger_body, opts)
|
|
284
|
+
def trigger_typing_activity(app_id, user_id, typing_activity_trigger_body, opts = {})
|
|
285
|
+
trigger_typing_activity_with_http_info(app_id, user_id, typing_activity_trigger_body, opts)
|
|
261
286
|
return nil
|
|
262
287
|
end
|
|
263
288
|
|
|
264
289
|
#
|
|
265
290
|
# Notify Smooch when an app maker starts or stops typing a response.
|
|
291
|
+
# @param app_id Identifies the app.
|
|
266
292
|
# @param user_id Identifies the user. Can be either the smoochId or the userId.
|
|
267
293
|
# @param typing_activity_trigger_body Body for a triggerTypingActivity request.
|
|
268
294
|
# @param [Hash] opts the optional parameters
|
|
269
295
|
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
|
270
|
-
def trigger_typing_activity_with_http_info(user_id, typing_activity_trigger_body, opts = {})
|
|
296
|
+
def trigger_typing_activity_with_http_info(app_id, user_id, typing_activity_trigger_body, opts = {})
|
|
271
297
|
if @api_client.config.debugging
|
|
272
298
|
@api_client.config.logger.debug "Calling API: ConversationApi.trigger_typing_activity ..."
|
|
273
299
|
end
|
|
300
|
+
# verify the required parameter 'app_id' is set
|
|
301
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
|
302
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling ConversationApi.trigger_typing_activity"
|
|
303
|
+
end
|
|
274
304
|
# verify the required parameter 'user_id' is set
|
|
275
305
|
if @api_client.config.client_side_validation && user_id.nil?
|
|
276
306
|
fail ArgumentError, "Missing the required parameter 'user_id' when calling ConversationApi.trigger_typing_activity"
|
|
@@ -280,7 +310,7 @@ module SmoochApi
|
|
|
280
310
|
fail ArgumentError, "Missing the required parameter 'typing_activity_trigger_body' when calling ConversationApi.trigger_typing_activity"
|
|
281
311
|
end
|
|
282
312
|
# resource path
|
|
283
|
-
local_var_path = "/appusers/{userId}/conversation/activity".sub('{' + 'userId' + '}', user_id.to_s)
|
|
313
|
+
local_var_path = "/apps/{appId}/appusers/{userId}/conversation/activity".sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'userId' + '}', user_id.to_s)
|
|
284
314
|
|
|
285
315
|
# query parameters
|
|
286
316
|
query_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:
|
|
6
|
+
OpenAPI spec version: 2
|
|
7
7
|
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
9
|
Swagger Codegen version: 2.2.3-SNAPSHOT
|
|
@@ -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:
|
|
6
|
+
OpenAPI spec version: 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,23 +22,29 @@ module SmoochApi
|
|
|
22
22
|
|
|
23
23
|
#
|
|
24
24
|
# Remove the specified app’s menu.
|
|
25
|
+
# @param app_id Identifies the app.
|
|
25
26
|
# @param [Hash] opts the optional parameters
|
|
26
27
|
# @return [MenuResponse]
|
|
27
|
-
def delete_menu(opts = {})
|
|
28
|
-
data, _status_code, _headers = delete_menu_with_http_info(opts)
|
|
28
|
+
def delete_menu(app_id, opts = {})
|
|
29
|
+
data, _status_code, _headers = delete_menu_with_http_info(app_id, opts)
|
|
29
30
|
return data
|
|
30
31
|
end
|
|
31
32
|
|
|
32
33
|
#
|
|
33
34
|
# Remove the specified app’s menu.
|
|
35
|
+
# @param app_id Identifies the app.
|
|
34
36
|
# @param [Hash] opts the optional parameters
|
|
35
37
|
# @return [Array<(MenuResponse, Fixnum, Hash)>] MenuResponse data, response status code and response headers
|
|
36
|
-
def delete_menu_with_http_info(opts = {})
|
|
38
|
+
def delete_menu_with_http_info(app_id, opts = {})
|
|
37
39
|
if @api_client.config.debugging
|
|
38
40
|
@api_client.config.logger.debug "Calling API: MenuApi.delete_menu ..."
|
|
39
41
|
end
|
|
42
|
+
# verify the required parameter 'app_id' is set
|
|
43
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
|
44
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling MenuApi.delete_menu"
|
|
45
|
+
end
|
|
40
46
|
# resource path
|
|
41
|
-
local_var_path = "/menu"
|
|
47
|
+
local_var_path = "/apps/{appId}/menu".sub('{' + 'appId' + '}', app_id.to_s)
|
|
42
48
|
|
|
43
49
|
# query parameters
|
|
44
50
|
query_params = {}
|
|
@@ -71,23 +77,29 @@ module SmoochApi
|
|
|
71
77
|
|
|
72
78
|
#
|
|
73
79
|
# Get the specified app’s menu.
|
|
80
|
+
# @param app_id Identifies the app.
|
|
74
81
|
# @param [Hash] opts the optional parameters
|
|
75
82
|
# @return [MenuResponse]
|
|
76
|
-
def get_menu(opts = {})
|
|
77
|
-
data, _status_code, _headers = get_menu_with_http_info(opts)
|
|
83
|
+
def get_menu(app_id, opts = {})
|
|
84
|
+
data, _status_code, _headers = get_menu_with_http_info(app_id, opts)
|
|
78
85
|
return data
|
|
79
86
|
end
|
|
80
87
|
|
|
81
88
|
#
|
|
82
89
|
# Get the specified app’s menu.
|
|
90
|
+
# @param app_id Identifies the app.
|
|
83
91
|
# @param [Hash] opts the optional parameters
|
|
84
92
|
# @return [Array<(MenuResponse, Fixnum, Hash)>] MenuResponse data, response status code and response headers
|
|
85
|
-
def get_menu_with_http_info(opts = {})
|
|
93
|
+
def get_menu_with_http_info(app_id, opts = {})
|
|
86
94
|
if @api_client.config.debugging
|
|
87
95
|
@api_client.config.logger.debug "Calling API: MenuApi.get_menu ..."
|
|
88
96
|
end
|
|
97
|
+
# verify the required parameter 'app_id' is set
|
|
98
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
|
99
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling MenuApi.get_menu"
|
|
100
|
+
end
|
|
89
101
|
# resource path
|
|
90
|
-
local_var_path = "/menu"
|
|
102
|
+
local_var_path = "/apps/{appId}/menu".sub('{' + 'appId' + '}', app_id.to_s)
|
|
91
103
|
|
|
92
104
|
# query parameters
|
|
93
105
|
query_params = {}
|
|
@@ -120,29 +132,35 @@ module SmoochApi
|
|
|
120
132
|
|
|
121
133
|
#
|
|
122
134
|
# Configure the specified app’s menu.
|
|
135
|
+
# @param app_id Identifies the app.
|
|
123
136
|
# @param menu_update_body Body for a updateMenu request.
|
|
124
137
|
# @param [Hash] opts the optional parameters
|
|
125
138
|
# @return [MenuResponse]
|
|
126
|
-
def update_menu(menu_update_body, opts = {})
|
|
127
|
-
data, _status_code, _headers = update_menu_with_http_info(menu_update_body, opts)
|
|
139
|
+
def update_menu(app_id, menu_update_body, opts = {})
|
|
140
|
+
data, _status_code, _headers = update_menu_with_http_info(app_id, menu_update_body, opts)
|
|
128
141
|
return data
|
|
129
142
|
end
|
|
130
143
|
|
|
131
144
|
#
|
|
132
145
|
# Configure the specified app’s menu.
|
|
146
|
+
# @param app_id Identifies the app.
|
|
133
147
|
# @param menu_update_body Body for a updateMenu request.
|
|
134
148
|
# @param [Hash] opts the optional parameters
|
|
135
149
|
# @return [Array<(MenuResponse, Fixnum, Hash)>] MenuResponse data, response status code and response headers
|
|
136
|
-
def update_menu_with_http_info(menu_update_body, opts = {})
|
|
150
|
+
def update_menu_with_http_info(app_id, menu_update_body, opts = {})
|
|
137
151
|
if @api_client.config.debugging
|
|
138
152
|
@api_client.config.logger.debug "Calling API: MenuApi.update_menu ..."
|
|
139
153
|
end
|
|
154
|
+
# verify the required parameter 'app_id' is set
|
|
155
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
|
156
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling MenuApi.update_menu"
|
|
157
|
+
end
|
|
140
158
|
# verify the required parameter 'menu_update_body' is set
|
|
141
159
|
if @api_client.config.client_side_validation && menu_update_body.nil?
|
|
142
160
|
fail ArgumentError, "Missing the required parameter 'menu_update_body' when calling MenuApi.update_menu"
|
|
143
161
|
end
|
|
144
162
|
# resource path
|
|
145
|
-
local_var_path = "/menu"
|
|
163
|
+
local_var_path = "/apps/{appId}/menu".sub('{' + 'appId' + '}', app_id.to_s)
|
|
146
164
|
|
|
147
165
|
# query parameters
|
|
148
166
|
query_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:
|
|
6
|
+
OpenAPI spec version: 2
|
|
7
7
|
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
9
|
Swagger Codegen version: 2.2.3-SNAPSHOT
|
|
@@ -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:
|
|
6
|
+
OpenAPI spec version: 2
|
|
7
7
|
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
9
|
Swagger Codegen version: 2.2.3-SNAPSHOT
|
data/lib/smooch-api/api_error.rb
CHANGED
|
@@ -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:
|
|
6
|
+
OpenAPI spec version: 2
|
|
7
7
|
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
9
|
Swagger Codegen version: 2.2.3-SNAPSHOT
|
|
@@ -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:
|
|
6
|
+
OpenAPI spec version: 2
|
|
7
7
|
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
9
|
Swagger Codegen version: 2.2.3-SNAPSHOT
|
|
@@ -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:
|
|
6
|
+
OpenAPI spec version: 2
|
|
7
7
|
|
|
8
8
|
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
9
9
|
Swagger Codegen version: 2.2.3-SNAPSHOT
|
|
@@ -45,27 +45,6 @@ module SmoochApi
|
|
|
45
45
|
# Extra options to pass directly to the channel API. See [Extra Channel Options](https://docs.smooch.io/rest#extra-channel-options-schema)
|
|
46
46
|
attr_accessor :extra_channel_options
|
|
47
47
|
|
|
48
|
-
class EnumAttributeValidator
|
|
49
|
-
attr_reader :datatype
|
|
50
|
-
attr_reader :allowable_values
|
|
51
|
-
|
|
52
|
-
def initialize(datatype, allowable_values)
|
|
53
|
-
@allowable_values = allowable_values.map do |value|
|
|
54
|
-
case datatype.to_s
|
|
55
|
-
when /Integer/i
|
|
56
|
-
value.to_i
|
|
57
|
-
when /Float/i
|
|
58
|
-
value.to_f
|
|
59
|
-
else
|
|
60
|
-
value
|
|
61
|
-
end
|
|
62
|
-
end
|
|
63
|
-
end
|
|
64
|
-
|
|
65
|
-
def valid?(value)
|
|
66
|
-
!value || allowable_values.include?(value)
|
|
67
|
-
end
|
|
68
|
-
end
|
|
69
48
|
|
|
70
49
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
71
50
|
def self.attribute_map
|
|
@@ -168,22 +147,10 @@ module SmoochApi
|
|
|
168
147
|
# @return true if the model is valid
|
|
169
148
|
def valid?
|
|
170
149
|
return false if @type.nil?
|
|
171
|
-
type_validator = EnumAttributeValidator.new('String', ["link", "buy", "postback", "reply", "locationRequest"])
|
|
172
|
-
return false unless type_validator.valid?(@type)
|
|
173
150
|
return false if @text.nil?
|
|
174
151
|
return true
|
|
175
152
|
end
|
|
176
153
|
|
|
177
|
-
# Custom attribute writer method checking allowed values (enum).
|
|
178
|
-
# @param [Object] type Object to be assigned
|
|
179
|
-
def type=(type)
|
|
180
|
-
validator = EnumAttributeValidator.new('String', ["link", "buy", "postback", "reply", "locationRequest"])
|
|
181
|
-
unless validator.valid?(type)
|
|
182
|
-
fail ArgumentError, "invalid value for 'type', must be one of #{validator.allowable_values}."
|
|
183
|
-
end
|
|
184
|
-
@type = type
|
|
185
|
-
end
|
|
186
|
-
|
|
187
154
|
# Checks equality by comparing each attribute.
|
|
188
155
|
# @param [Object] Object to be compared
|
|
189
156
|
def ==(o)
|