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
data/docs/ConversationApi.md
CHANGED
|
@@ -4,15 +4,15 @@ All URIs are relative to *https://api.smooch.io/v1*
|
|
|
4
4
|
|
|
5
5
|
Method | HTTP request | Description
|
|
6
6
|
------------- | ------------- | -------------
|
|
7
|
-
[**delete_messages**](ConversationApi.md#delete_messages) | **DELETE** /appusers/{userId}/messages |
|
|
8
|
-
[**get_messages**](ConversationApi.md#get_messages) | **GET** /appusers/{userId}/messages |
|
|
9
|
-
[**post_message**](ConversationApi.md#post_message) | **POST** /appusers/{userId}/messages |
|
|
10
|
-
[**reset_unread_count**](ConversationApi.md#reset_unread_count) | **POST** /appusers/{userId}/conversation/read |
|
|
11
|
-
[**trigger_typing_activity**](ConversationApi.md#trigger_typing_activity) | **POST** /appusers/{userId}/conversation/activity |
|
|
7
|
+
[**delete_messages**](ConversationApi.md#delete_messages) | **DELETE** /apps/{appId}/appusers/{userId}/messages |
|
|
8
|
+
[**get_messages**](ConversationApi.md#get_messages) | **GET** /apps/{appId}/appusers/{userId}/messages |
|
|
9
|
+
[**post_message**](ConversationApi.md#post_message) | **POST** /apps/{appId}/appusers/{userId}/messages |
|
|
10
|
+
[**reset_unread_count**](ConversationApi.md#reset_unread_count) | **POST** /apps/{appId}/appusers/{userId}/conversation/read |
|
|
11
|
+
[**trigger_typing_activity**](ConversationApi.md#trigger_typing_activity) | **POST** /apps/{appId}/appusers/{userId}/conversation/activity |
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
# **delete_messages**
|
|
15
|
-
> delete_messages(user_id, )
|
|
15
|
+
> delete_messages(app_id, user_id, )
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
@@ -31,11 +31,13 @@ end
|
|
|
31
31
|
|
|
32
32
|
api_instance = SmoochApi::ConversationApi.new
|
|
33
33
|
|
|
34
|
+
app_id = "app_id_example" # String | Identifies the app.
|
|
35
|
+
|
|
34
36
|
user_id = "user_id_example" # String | Identifies the user. Can be either the smoochId or the userId.
|
|
35
37
|
|
|
36
38
|
|
|
37
39
|
begin
|
|
38
|
-
api_instance.delete_messages(user_id, )
|
|
40
|
+
api_instance.delete_messages(app_id, user_id, )
|
|
39
41
|
rescue SmoochApi::ApiError => e
|
|
40
42
|
puts "Exception when calling ConversationApi->delete_messages: #{e}"
|
|
41
43
|
end
|
|
@@ -45,6 +47,7 @@ end
|
|
|
45
47
|
|
|
46
48
|
Name | Type | Description | Notes
|
|
47
49
|
------------- | ------------- | ------------- | -------------
|
|
50
|
+
**app_id** | **String**| Identifies the app. |
|
|
48
51
|
**user_id** | **String**| Identifies the user. Can be either the smoochId or the userId. |
|
|
49
52
|
|
|
50
53
|
### Return type
|
|
@@ -63,7 +66,7 @@ nil (empty response body)
|
|
|
63
66
|
|
|
64
67
|
|
|
65
68
|
# **get_messages**
|
|
66
|
-
> GetMessagesResponse get_messages(user_id, , opts)
|
|
69
|
+
> GetMessagesResponse get_messages(app_id, user_id, , opts)
|
|
67
70
|
|
|
68
71
|
|
|
69
72
|
|
|
@@ -82,6 +85,8 @@ end
|
|
|
82
85
|
|
|
83
86
|
api_instance = SmoochApi::ConversationApi.new
|
|
84
87
|
|
|
88
|
+
app_id = "app_id_example" # String | Identifies the app.
|
|
89
|
+
|
|
85
90
|
user_id = "user_id_example" # String | Identifies the user. Can be either the smoochId or the userId.
|
|
86
91
|
|
|
87
92
|
opts = {
|
|
@@ -90,7 +95,7 @@ opts = {
|
|
|
90
95
|
}
|
|
91
96
|
|
|
92
97
|
begin
|
|
93
|
-
result = api_instance.get_messages(user_id, , opts)
|
|
98
|
+
result = api_instance.get_messages(app_id, user_id, , opts)
|
|
94
99
|
p result
|
|
95
100
|
rescue SmoochApi::ApiError => e
|
|
96
101
|
puts "Exception when calling ConversationApi->get_messages: #{e}"
|
|
@@ -101,6 +106,7 @@ end
|
|
|
101
106
|
|
|
102
107
|
Name | Type | Description | Notes
|
|
103
108
|
------------- | ------------- | ------------- | -------------
|
|
109
|
+
**app_id** | **String**| Identifies the app. |
|
|
104
110
|
**user_id** | **String**| Identifies the user. Can be either the smoochId or the userId. |
|
|
105
111
|
**before** | **String**| Timestamp of message. The API will return 100 messages before the specified timestamp (excluding any messages with the provided timestamp). | [optional]
|
|
106
112
|
**after** | **String**| Timestamp of message. The API will return 100 messages after the specified timestamp (excluding any messages with the provided timestamp). | [optional]
|
|
@@ -121,7 +127,7 @@ Name | Type | Description | Notes
|
|
|
121
127
|
|
|
122
128
|
|
|
123
129
|
# **post_message**
|
|
124
|
-
> MessageResponse post_message(user_id, message_post_body)
|
|
130
|
+
> MessageResponse post_message(app_id, user_id, message_post_body)
|
|
125
131
|
|
|
126
132
|
|
|
127
133
|
|
|
@@ -140,13 +146,15 @@ end
|
|
|
140
146
|
|
|
141
147
|
api_instance = SmoochApi::ConversationApi.new
|
|
142
148
|
|
|
149
|
+
app_id = "app_id_example" # String | Identifies the app.
|
|
150
|
+
|
|
143
151
|
user_id = "user_id_example" # String | Identifies the user. Can be either the smoochId or the userId.
|
|
144
152
|
|
|
145
153
|
message_post_body = SmoochApi::MessagePost.new # MessagePost | 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))
|
|
146
154
|
|
|
147
155
|
|
|
148
156
|
begin
|
|
149
|
-
result = api_instance.post_message(user_id, message_post_body)
|
|
157
|
+
result = api_instance.post_message(app_id, user_id, message_post_body)
|
|
150
158
|
p result
|
|
151
159
|
rescue SmoochApi::ApiError => e
|
|
152
160
|
puts "Exception when calling ConversationApi->post_message: #{e}"
|
|
@@ -157,6 +165,7 @@ end
|
|
|
157
165
|
|
|
158
166
|
Name | Type | Description | Notes
|
|
159
167
|
------------- | ------------- | ------------- | -------------
|
|
168
|
+
**app_id** | **String**| Identifies the app. |
|
|
160
169
|
**user_id** | **String**| Identifies the user. Can be either the smoochId or the userId. |
|
|
161
170
|
**message_post_body** | [**MessagePost**](MessagePost.md)| 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)) |
|
|
162
171
|
|
|
@@ -176,7 +185,7 @@ Name | Type | Description | Notes
|
|
|
176
185
|
|
|
177
186
|
|
|
178
187
|
# **reset_unread_count**
|
|
179
|
-
> reset_unread_count(user_id, )
|
|
188
|
+
> reset_unread_count(app_id, user_id, )
|
|
180
189
|
|
|
181
190
|
|
|
182
191
|
|
|
@@ -195,11 +204,13 @@ end
|
|
|
195
204
|
|
|
196
205
|
api_instance = SmoochApi::ConversationApi.new
|
|
197
206
|
|
|
207
|
+
app_id = "app_id_example" # String | Identifies the app.
|
|
208
|
+
|
|
198
209
|
user_id = "user_id_example" # String | Identifies the user. Can be either the smoochId or the userId.
|
|
199
210
|
|
|
200
211
|
|
|
201
212
|
begin
|
|
202
|
-
api_instance.reset_unread_count(user_id, )
|
|
213
|
+
api_instance.reset_unread_count(app_id, user_id, )
|
|
203
214
|
rescue SmoochApi::ApiError => e
|
|
204
215
|
puts "Exception when calling ConversationApi->reset_unread_count: #{e}"
|
|
205
216
|
end
|
|
@@ -209,6 +220,7 @@ end
|
|
|
209
220
|
|
|
210
221
|
Name | Type | Description | Notes
|
|
211
222
|
------------- | ------------- | ------------- | -------------
|
|
223
|
+
**app_id** | **String**| Identifies the app. |
|
|
212
224
|
**user_id** | **String**| Identifies the user. Can be either the smoochId or the userId. |
|
|
213
225
|
|
|
214
226
|
### Return type
|
|
@@ -227,7 +239,7 @@ nil (empty response body)
|
|
|
227
239
|
|
|
228
240
|
|
|
229
241
|
# **trigger_typing_activity**
|
|
230
|
-
> trigger_typing_activity(user_id, typing_activity_trigger_body)
|
|
242
|
+
> trigger_typing_activity(app_id, user_id, typing_activity_trigger_body)
|
|
231
243
|
|
|
232
244
|
|
|
233
245
|
|
|
@@ -246,13 +258,15 @@ end
|
|
|
246
258
|
|
|
247
259
|
api_instance = SmoochApi::ConversationApi.new
|
|
248
260
|
|
|
261
|
+
app_id = "app_id_example" # String | Identifies the app.
|
|
262
|
+
|
|
249
263
|
user_id = "user_id_example" # String | Identifies the user. Can be either the smoochId or the userId.
|
|
250
264
|
|
|
251
265
|
typing_activity_trigger_body = SmoochApi::TypingActivityTrigger.new # TypingActivityTrigger | Body for a triggerTypingActivity request.
|
|
252
266
|
|
|
253
267
|
|
|
254
268
|
begin
|
|
255
|
-
api_instance.trigger_typing_activity(user_id, typing_activity_trigger_body)
|
|
269
|
+
api_instance.trigger_typing_activity(app_id, user_id, typing_activity_trigger_body)
|
|
256
270
|
rescue SmoochApi::ApiError => e
|
|
257
271
|
puts "Exception when calling ConversationApi->trigger_typing_activity: #{e}"
|
|
258
272
|
end
|
|
@@ -262,6 +276,7 @@ end
|
|
|
262
276
|
|
|
263
277
|
Name | Type | Description | Notes
|
|
264
278
|
------------- | ------------- | ------------- | -------------
|
|
279
|
+
**app_id** | **String**| Identifies the app. |
|
|
265
280
|
**user_id** | **String**| Identifies the user. Can be either the smoochId or the userId. |
|
|
266
281
|
**typing_activity_trigger_body** | [**TypingActivityTrigger**](TypingActivityTrigger.md)| Body for a triggerTypingActivity request. |
|
|
267
282
|
|
data/docs/MenuApi.md
CHANGED
|
@@ -4,13 +4,13 @@ All URIs are relative to *https://api.smooch.io/v1*
|
|
|
4
4
|
|
|
5
5
|
Method | HTTP request | Description
|
|
6
6
|
------------- | ------------- | -------------
|
|
7
|
-
[**delete_menu**](MenuApi.md#delete_menu) | **DELETE** /menu |
|
|
8
|
-
[**get_menu**](MenuApi.md#get_menu) | **GET** /menu |
|
|
9
|
-
[**update_menu**](MenuApi.md#update_menu) | **PUT** /menu |
|
|
7
|
+
[**delete_menu**](MenuApi.md#delete_menu) | **DELETE** /apps/{appId}/menu |
|
|
8
|
+
[**get_menu**](MenuApi.md#get_menu) | **GET** /apps/{appId}/menu |
|
|
9
|
+
[**update_menu**](MenuApi.md#update_menu) | **PUT** /apps/{appId}/menu |
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
# **delete_menu**
|
|
13
|
-
> MenuResponse delete_menu
|
|
13
|
+
> MenuResponse delete_menu(app_id, )
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
@@ -29,8 +29,11 @@ end
|
|
|
29
29
|
|
|
30
30
|
api_instance = SmoochApi::MenuApi.new
|
|
31
31
|
|
|
32
|
+
app_id = "app_id_example" # String | Identifies the app.
|
|
33
|
+
|
|
34
|
+
|
|
32
35
|
begin
|
|
33
|
-
result = api_instance.delete_menu
|
|
36
|
+
result = api_instance.delete_menu(app_id, )
|
|
34
37
|
p result
|
|
35
38
|
rescue SmoochApi::ApiError => e
|
|
36
39
|
puts "Exception when calling MenuApi->delete_menu: #{e}"
|
|
@@ -38,7 +41,10 @@ end
|
|
|
38
41
|
```
|
|
39
42
|
|
|
40
43
|
### Parameters
|
|
41
|
-
|
|
44
|
+
|
|
45
|
+
Name | Type | Description | Notes
|
|
46
|
+
------------- | ------------- | ------------- | -------------
|
|
47
|
+
**app_id** | **String**| Identifies the app. |
|
|
42
48
|
|
|
43
49
|
### Return type
|
|
44
50
|
|
|
@@ -56,7 +62,7 @@ This endpoint does not need any parameter.
|
|
|
56
62
|
|
|
57
63
|
|
|
58
64
|
# **get_menu**
|
|
59
|
-
> MenuResponse get_menu
|
|
65
|
+
> MenuResponse get_menu(app_id, )
|
|
60
66
|
|
|
61
67
|
|
|
62
68
|
|
|
@@ -75,8 +81,11 @@ end
|
|
|
75
81
|
|
|
76
82
|
api_instance = SmoochApi::MenuApi.new
|
|
77
83
|
|
|
84
|
+
app_id = "app_id_example" # String | Identifies the app.
|
|
85
|
+
|
|
86
|
+
|
|
78
87
|
begin
|
|
79
|
-
result = api_instance.get_menu
|
|
88
|
+
result = api_instance.get_menu(app_id, )
|
|
80
89
|
p result
|
|
81
90
|
rescue SmoochApi::ApiError => e
|
|
82
91
|
puts "Exception when calling MenuApi->get_menu: #{e}"
|
|
@@ -84,7 +93,10 @@ end
|
|
|
84
93
|
```
|
|
85
94
|
|
|
86
95
|
### Parameters
|
|
87
|
-
|
|
96
|
+
|
|
97
|
+
Name | Type | Description | Notes
|
|
98
|
+
------------- | ------------- | ------------- | -------------
|
|
99
|
+
**app_id** | **String**| Identifies the app. |
|
|
88
100
|
|
|
89
101
|
### Return type
|
|
90
102
|
|
|
@@ -102,7 +114,7 @@ This endpoint does not need any parameter.
|
|
|
102
114
|
|
|
103
115
|
|
|
104
116
|
# **update_menu**
|
|
105
|
-
> MenuResponse update_menu(menu_update_body)
|
|
117
|
+
> MenuResponse update_menu(app_id, menu_update_body)
|
|
106
118
|
|
|
107
119
|
|
|
108
120
|
|
|
@@ -121,11 +133,13 @@ end
|
|
|
121
133
|
|
|
122
134
|
api_instance = SmoochApi::MenuApi.new
|
|
123
135
|
|
|
136
|
+
app_id = "app_id_example" # String | Identifies the app.
|
|
137
|
+
|
|
124
138
|
menu_update_body = SmoochApi::Menu.new # Menu | Body for a updateMenu request.
|
|
125
139
|
|
|
126
140
|
|
|
127
141
|
begin
|
|
128
|
-
result = api_instance.update_menu(menu_update_body)
|
|
142
|
+
result = api_instance.update_menu(app_id, menu_update_body)
|
|
129
143
|
p result
|
|
130
144
|
rescue SmoochApi::ApiError => e
|
|
131
145
|
puts "Exception when calling MenuApi->update_menu: #{e}"
|
|
@@ -136,6 +150,7 @@ end
|
|
|
136
150
|
|
|
137
151
|
Name | Type | Description | Notes
|
|
138
152
|
------------- | ------------- | ------------- | -------------
|
|
153
|
+
**app_id** | **String**| Identifies the app. |
|
|
139
154
|
**menu_update_body** | [**Menu**](Menu.md)| Body for a updateMenu request. |
|
|
140
155
|
|
|
141
156
|
### Return type
|
data/lib/smooch-api.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
|
|
@@ -34,14 +34,10 @@ require 'smooch-api/models/client_info'
|
|
|
34
34
|
require 'smooch-api/models/confirmation'
|
|
35
35
|
require 'smooch-api/models/conversation'
|
|
36
36
|
require 'smooch-api/models/destination'
|
|
37
|
-
require 'smooch-api/models/device_init'
|
|
38
37
|
require 'smooch-api/models/device_response'
|
|
39
38
|
require 'smooch-api/models/device_update'
|
|
40
39
|
require 'smooch-api/models/display_settings'
|
|
41
|
-
require 'smooch-api/models/event'
|
|
42
40
|
require 'smooch-api/models/get_messages_response'
|
|
43
|
-
require 'smooch-api/models/init'
|
|
44
|
-
require 'smooch-api/models/init_response'
|
|
45
41
|
require 'smooch-api/models/integration'
|
|
46
42
|
require 'smooch-api/models/integration_create'
|
|
47
43
|
require 'smooch-api/models/integration_response'
|
|
@@ -61,7 +57,6 @@ require 'smooch-api/models/secret_key'
|
|
|
61
57
|
require 'smooch-api/models/secret_key_create'
|
|
62
58
|
require 'smooch-api/models/secret_key_response'
|
|
63
59
|
require 'smooch-api/models/source'
|
|
64
|
-
require 'smooch-api/models/track_event_response'
|
|
65
60
|
require 'smooch-api/models/typing_activity_trigger'
|
|
66
61
|
require 'smooch-api/models/webhook'
|
|
67
62
|
require 'smooch-api/models/webhook_create'
|
|
@@ -73,7 +68,6 @@ require 'smooch-api/api/app_api'
|
|
|
73
68
|
require 'smooch-api/api/app_user_api'
|
|
74
69
|
require 'smooch-api/api/attachments_api'
|
|
75
70
|
require 'smooch-api/api/conversation_api'
|
|
76
|
-
require 'smooch-api/api/init_api'
|
|
77
71
|
require 'smooch-api/api/integration_api'
|
|
78
72
|
require 'smooch-api/api/menu_api'
|
|
79
73
|
require 'smooch-api/api/webhook_api'
|
|
@@ -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,27 +22,33 @@ module SmoochApi
|
|
|
22
22
|
|
|
23
23
|
#
|
|
24
24
|
# Update specified device information.
|
|
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 device_id Identifies the device.
|
|
27
28
|
# @param app_user_device_update_body Body for an updateAppUserDevice request.
|
|
28
29
|
# @param [Hash] opts the optional parameters
|
|
29
30
|
# @return [DeviceResponse]
|
|
30
|
-
def app_user_device_update(user_id, device_id, app_user_device_update_body, opts = {})
|
|
31
|
-
data, _status_code, _headers = app_user_device_update_with_http_info(user_id, device_id, app_user_device_update_body, opts)
|
|
31
|
+
def app_user_device_update(app_id, user_id, device_id, app_user_device_update_body, opts = {})
|
|
32
|
+
data, _status_code, _headers = app_user_device_update_with_http_info(app_id, user_id, device_id, app_user_device_update_body, opts)
|
|
32
33
|
return data
|
|
33
34
|
end
|
|
34
35
|
|
|
35
36
|
#
|
|
36
37
|
# Update specified device information.
|
|
38
|
+
# @param app_id Identifies the app.
|
|
37
39
|
# @param user_id Identifies the user. Can be either the smoochId or the userId.
|
|
38
40
|
# @param device_id Identifies the device.
|
|
39
41
|
# @param app_user_device_update_body Body for an updateAppUserDevice request.
|
|
40
42
|
# @param [Hash] opts the optional parameters
|
|
41
43
|
# @return [Array<(DeviceResponse, Fixnum, Hash)>] DeviceResponse data, response status code and response headers
|
|
42
|
-
def app_user_device_update_with_http_info(user_id, device_id, app_user_device_update_body, opts = {})
|
|
44
|
+
def app_user_device_update_with_http_info(app_id, user_id, device_id, app_user_device_update_body, opts = {})
|
|
43
45
|
if @api_client.config.debugging
|
|
44
46
|
@api_client.config.logger.debug "Calling API: AppUserApi.app_user_device_update ..."
|
|
45
47
|
end
|
|
48
|
+
# verify the required parameter 'app_id' is set
|
|
49
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
|
50
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling AppUserApi.app_user_device_update"
|
|
51
|
+
end
|
|
46
52
|
# verify the required parameter 'user_id' is set
|
|
47
53
|
if @api_client.config.client_side_validation && user_id.nil?
|
|
48
54
|
fail ArgumentError, "Missing the required parameter 'user_id' when calling AppUserApi.app_user_device_update"
|
|
@@ -56,7 +62,7 @@ module SmoochApi
|
|
|
56
62
|
fail ArgumentError, "Missing the required parameter 'app_user_device_update_body' when calling AppUserApi.app_user_device_update"
|
|
57
63
|
end
|
|
58
64
|
# resource path
|
|
59
|
-
local_var_path = "/appusers/{userId}/devices/{deviceId}".sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'deviceId' + '}', device_id.to_s)
|
|
65
|
+
local_var_path = "/apps/{appId}/appusers/{userId}/devices/{deviceId}".sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'deviceId' + '}', device_id.to_s)
|
|
60
66
|
|
|
61
67
|
# query parameters
|
|
62
68
|
query_params = {}
|
|
@@ -89,29 +95,35 @@ module SmoochApi
|
|
|
89
95
|
|
|
90
96
|
#
|
|
91
97
|
# Delete specified app user's profile.
|
|
98
|
+
# @param app_id Identifies the app.
|
|
92
99
|
# @param user_id Identifies the user. Can be either the smoochId or the userId.
|
|
93
100
|
# @param [Hash] opts the optional parameters
|
|
94
101
|
# @return [AppUserResponse]
|
|
95
|
-
def delete_app_user_profile(user_id, opts = {})
|
|
96
|
-
data, _status_code, _headers = delete_app_user_profile_with_http_info(user_id, opts)
|
|
102
|
+
def delete_app_user_profile(app_id, user_id, opts = {})
|
|
103
|
+
data, _status_code, _headers = delete_app_user_profile_with_http_info(app_id, user_id, opts)
|
|
97
104
|
return data
|
|
98
105
|
end
|
|
99
106
|
|
|
100
107
|
#
|
|
101
108
|
# Delete specified app user's profile.
|
|
109
|
+
# @param app_id Identifies the app.
|
|
102
110
|
# @param user_id Identifies the user. Can be either the smoochId or the userId.
|
|
103
111
|
# @param [Hash] opts the optional parameters
|
|
104
112
|
# @return [Array<(AppUserResponse, Fixnum, Hash)>] AppUserResponse data, response status code and response headers
|
|
105
|
-
def delete_app_user_profile_with_http_info(user_id, opts = {})
|
|
113
|
+
def delete_app_user_profile_with_http_info(app_id, user_id, opts = {})
|
|
106
114
|
if @api_client.config.debugging
|
|
107
115
|
@api_client.config.logger.debug "Calling API: AppUserApi.delete_app_user_profile ..."
|
|
108
116
|
end
|
|
117
|
+
# verify the required parameter 'app_id' is set
|
|
118
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
|
119
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling AppUserApi.delete_app_user_profile"
|
|
120
|
+
end
|
|
109
121
|
# verify the required parameter 'user_id' is set
|
|
110
122
|
if @api_client.config.client_side_validation && user_id.nil?
|
|
111
123
|
fail ArgumentError, "Missing the required parameter 'user_id' when calling AppUserApi.delete_app_user_profile"
|
|
112
124
|
end
|
|
113
125
|
# resource path
|
|
114
|
-
local_var_path = "/appusers/{userId}/profile".sub('{' + 'userId' + '}', user_id.to_s)
|
|
126
|
+
local_var_path = "/apps/{appId}/appusers/{userId}/profile".sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'userId' + '}', user_id.to_s)
|
|
115
127
|
|
|
116
128
|
# query parameters
|
|
117
129
|
query_params = {}
|
|
@@ -144,29 +156,35 @@ module SmoochApi
|
|
|
144
156
|
|
|
145
157
|
#
|
|
146
158
|
# Get the specified app user.
|
|
159
|
+
# @param app_id Identifies the app.
|
|
147
160
|
# @param user_id Identifies the user. Can be either the smoochId or the userId.
|
|
148
161
|
# @param [Hash] opts the optional parameters
|
|
149
162
|
# @return [AppUserResponse]
|
|
150
|
-
def get_app_user(user_id, opts = {})
|
|
151
|
-
data, _status_code, _headers = get_app_user_with_http_info(user_id, opts)
|
|
163
|
+
def get_app_user(app_id, user_id, opts = {})
|
|
164
|
+
data, _status_code, _headers = get_app_user_with_http_info(app_id, user_id, opts)
|
|
152
165
|
return data
|
|
153
166
|
end
|
|
154
167
|
|
|
155
168
|
#
|
|
156
169
|
# Get the specified app user.
|
|
170
|
+
# @param app_id Identifies the app.
|
|
157
171
|
# @param user_id Identifies the user. Can be either the smoochId or the userId.
|
|
158
172
|
# @param [Hash] opts the optional parameters
|
|
159
173
|
# @return [Array<(AppUserResponse, Fixnum, Hash)>] AppUserResponse data, response status code and response headers
|
|
160
|
-
def get_app_user_with_http_info(user_id, opts = {})
|
|
174
|
+
def get_app_user_with_http_info(app_id, user_id, opts = {})
|
|
161
175
|
if @api_client.config.debugging
|
|
162
176
|
@api_client.config.logger.debug "Calling API: AppUserApi.get_app_user ..."
|
|
163
177
|
end
|
|
178
|
+
# verify the required parameter 'app_id' is set
|
|
179
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
|
180
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling AppUserApi.get_app_user"
|
|
181
|
+
end
|
|
164
182
|
# verify the required parameter 'user_id' is set
|
|
165
183
|
if @api_client.config.client_side_validation && user_id.nil?
|
|
166
184
|
fail ArgumentError, "Missing the required parameter 'user_id' when calling AppUserApi.get_app_user"
|
|
167
185
|
end
|
|
168
186
|
# resource path
|
|
169
|
-
local_var_path = "/appusers/{userId}".sub('{' + 'userId' + '}', user_id.to_s)
|
|
187
|
+
local_var_path = "/apps/{appId}/appusers/{userId}".sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'userId' + '}', user_id.to_s)
|
|
170
188
|
|
|
171
189
|
# query parameters
|
|
172
190
|
query_params = {}
|
|
@@ -199,29 +217,35 @@ module SmoochApi
|
|
|
199
217
|
|
|
200
218
|
#
|
|
201
219
|
# Get specified app user's channel entity IDs.
|
|
220
|
+
# @param app_id Identifies the app.
|
|
202
221
|
# @param user_id Identifies the user. Can be either the smoochId or the userId.
|
|
203
222
|
# @param [Hash] opts the optional parameters
|
|
204
223
|
# @return [AppUserResponse]
|
|
205
|
-
def get_app_user_entity_ids(user_id, opts = {})
|
|
206
|
-
data, _status_code, _headers = get_app_user_entity_ids_with_http_info(user_id, opts)
|
|
224
|
+
def get_app_user_entity_ids(app_id, user_id, opts = {})
|
|
225
|
+
data, _status_code, _headers = get_app_user_entity_ids_with_http_info(app_id, user_id, opts)
|
|
207
226
|
return data
|
|
208
227
|
end
|
|
209
228
|
|
|
210
229
|
#
|
|
211
230
|
# Get specified app user's channel entity IDs.
|
|
231
|
+
# @param app_id Identifies the app.
|
|
212
232
|
# @param user_id Identifies the user. Can be either the smoochId or the userId.
|
|
213
233
|
# @param [Hash] opts the optional parameters
|
|
214
234
|
# @return [Array<(AppUserResponse, Fixnum, Hash)>] AppUserResponse data, response status code and response headers
|
|
215
|
-
def get_app_user_entity_ids_with_http_info(user_id, opts = {})
|
|
235
|
+
def get_app_user_entity_ids_with_http_info(app_id, user_id, opts = {})
|
|
216
236
|
if @api_client.config.debugging
|
|
217
237
|
@api_client.config.logger.debug "Calling API: AppUserApi.get_app_user_entity_ids ..."
|
|
218
238
|
end
|
|
239
|
+
# verify the required parameter 'app_id' is set
|
|
240
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
|
241
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling AppUserApi.get_app_user_entity_ids"
|
|
242
|
+
end
|
|
219
243
|
# verify the required parameter 'user_id' is set
|
|
220
244
|
if @api_client.config.client_side_validation && user_id.nil?
|
|
221
245
|
fail ArgumentError, "Missing the required parameter 'user_id' when calling AppUserApi.get_app_user_entity_ids"
|
|
222
246
|
end
|
|
223
247
|
# resource path
|
|
224
|
-
local_var_path = "/appusers/{userId}/channels".sub('{' + 'userId' + '}', user_id.to_s)
|
|
248
|
+
local_var_path = "/apps/{appId}/appusers/{userId}/channels".sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'userId' + '}', user_id.to_s)
|
|
225
249
|
|
|
226
250
|
# query parameters
|
|
227
251
|
query_params = {}
|
|
@@ -254,25 +278,31 @@ module SmoochApi
|
|
|
254
278
|
|
|
255
279
|
#
|
|
256
280
|
# Link specified app user to given channel.
|
|
281
|
+
# @param app_id Identifies the app.
|
|
257
282
|
# @param user_id Identifies the user. Can be either the smoochId or the userId.
|
|
258
283
|
# @param app_user_link_body Body for a linkAppUser request.
|
|
259
284
|
# @param [Hash] opts the optional parameters
|
|
260
285
|
# @return [AppUserResponse]
|
|
261
|
-
def link_app_user(user_id, app_user_link_body, opts = {})
|
|
262
|
-
data, _status_code, _headers = link_app_user_with_http_info(user_id, app_user_link_body, opts)
|
|
286
|
+
def link_app_user(app_id, user_id, app_user_link_body, opts = {})
|
|
287
|
+
data, _status_code, _headers = link_app_user_with_http_info(app_id, user_id, app_user_link_body, opts)
|
|
263
288
|
return data
|
|
264
289
|
end
|
|
265
290
|
|
|
266
291
|
#
|
|
267
292
|
# Link specified app user to given channel.
|
|
293
|
+
# @param app_id Identifies the app.
|
|
268
294
|
# @param user_id Identifies the user. Can be either the smoochId or the userId.
|
|
269
295
|
# @param app_user_link_body Body for a linkAppUser request.
|
|
270
296
|
# @param [Hash] opts the optional parameters
|
|
271
297
|
# @return [Array<(AppUserResponse, Fixnum, Hash)>] AppUserResponse data, response status code and response headers
|
|
272
|
-
def link_app_user_with_http_info(user_id, app_user_link_body, opts = {})
|
|
298
|
+
def link_app_user_with_http_info(app_id, user_id, app_user_link_body, opts = {})
|
|
273
299
|
if @api_client.config.debugging
|
|
274
300
|
@api_client.config.logger.debug "Calling API: AppUserApi.link_app_user ..."
|
|
275
301
|
end
|
|
302
|
+
# verify the required parameter 'app_id' is set
|
|
303
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
|
304
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling AppUserApi.link_app_user"
|
|
305
|
+
end
|
|
276
306
|
# verify the required parameter 'user_id' is set
|
|
277
307
|
if @api_client.config.client_side_validation && user_id.nil?
|
|
278
308
|
fail ArgumentError, "Missing the required parameter 'user_id' when calling AppUserApi.link_app_user"
|
|
@@ -282,7 +312,7 @@ module SmoochApi
|
|
|
282
312
|
fail ArgumentError, "Missing the required parameter 'app_user_link_body' when calling AppUserApi.link_app_user"
|
|
283
313
|
end
|
|
284
314
|
# resource path
|
|
285
|
-
local_var_path = "/appusers/{userId}/channels".sub('{' + 'userId' + '}', user_id.to_s)
|
|
315
|
+
local_var_path = "/apps/{appId}/appusers/{userId}/channels".sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'userId' + '}', user_id.to_s)
|
|
286
316
|
|
|
287
317
|
# query parameters
|
|
288
318
|
query_params = {}
|
|
@@ -315,27 +345,33 @@ module SmoochApi
|
|
|
315
345
|
|
|
316
346
|
#
|
|
317
347
|
# Send an image message to the conversation.
|
|
348
|
+
# @param app_id Identifies the app.
|
|
318
349
|
# @param user_id Identifies the user. Can be either the smoochId or the userId.
|
|
319
350
|
# @param source Image to be uploaded
|
|
320
351
|
# @param role Role of the sender
|
|
321
352
|
# @param [Hash] opts the optional parameters
|
|
322
353
|
# @return [MessageResponse]
|
|
323
|
-
def post_image_message(user_id, source, role, opts = {})
|
|
324
|
-
data, _status_code, _headers = post_image_message_with_http_info(user_id, source, role, opts)
|
|
354
|
+
def post_image_message(app_id, user_id, source, role, opts = {})
|
|
355
|
+
data, _status_code, _headers = post_image_message_with_http_info(app_id, user_id, source, role, opts)
|
|
325
356
|
return data
|
|
326
357
|
end
|
|
327
358
|
|
|
328
359
|
#
|
|
329
360
|
# Send an image message to the conversation.
|
|
361
|
+
# @param app_id Identifies the app.
|
|
330
362
|
# @param user_id Identifies the user. Can be either the smoochId or the userId.
|
|
331
363
|
# @param source Image to be uploaded
|
|
332
364
|
# @param role Role of the sender
|
|
333
365
|
# @param [Hash] opts the optional parameters
|
|
334
366
|
# @return [Array<(MessageResponse, Fixnum, Hash)>] MessageResponse data, response status code and response headers
|
|
335
|
-
def post_image_message_with_http_info(user_id, source, role, opts = {})
|
|
367
|
+
def post_image_message_with_http_info(app_id, user_id, source, role, opts = {})
|
|
336
368
|
if @api_client.config.debugging
|
|
337
369
|
@api_client.config.logger.debug "Calling API: AppUserApi.post_image_message ..."
|
|
338
370
|
end
|
|
371
|
+
# verify the required parameter 'app_id' is set
|
|
372
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
|
373
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling AppUserApi.post_image_message"
|
|
374
|
+
end
|
|
339
375
|
# verify the required parameter 'user_id' is set
|
|
340
376
|
if @api_client.config.client_side_validation && user_id.nil?
|
|
341
377
|
fail ArgumentError, "Missing the required parameter 'user_id' when calling AppUserApi.post_image_message"
|
|
@@ -349,7 +385,7 @@ module SmoochApi
|
|
|
349
385
|
fail ArgumentError, "Missing the required parameter 'role' when calling AppUserApi.post_image_message"
|
|
350
386
|
end
|
|
351
387
|
# resource path
|
|
352
|
-
local_var_path = "/appusers/{userId}/images".sub('{' + 'userId' + '}', user_id.to_s)
|
|
388
|
+
local_var_path = "/apps/{appId}/appusers/{userId}/images".sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'userId' + '}', user_id.to_s)
|
|
353
389
|
|
|
354
390
|
# query parameters
|
|
355
391
|
query_params = {}
|
|
@@ -384,29 +420,35 @@ module SmoochApi
|
|
|
384
420
|
|
|
385
421
|
#
|
|
386
422
|
# Pre-create an app user.
|
|
423
|
+
# @param app_id Identifies the app.
|
|
387
424
|
# @param app_user_pre_create_body Body for a preCreateAppUser request.
|
|
388
425
|
# @param [Hash] opts the optional parameters
|
|
389
426
|
# @return [AppUserResponse]
|
|
390
|
-
def pre_create_app_user(app_user_pre_create_body, opts = {})
|
|
391
|
-
data, _status_code, _headers = pre_create_app_user_with_http_info(app_user_pre_create_body, opts)
|
|
427
|
+
def pre_create_app_user(app_id, app_user_pre_create_body, opts = {})
|
|
428
|
+
data, _status_code, _headers = pre_create_app_user_with_http_info(app_id, app_user_pre_create_body, opts)
|
|
392
429
|
return data
|
|
393
430
|
end
|
|
394
431
|
|
|
395
432
|
#
|
|
396
433
|
# Pre-create an app user.
|
|
434
|
+
# @param app_id Identifies the app.
|
|
397
435
|
# @param app_user_pre_create_body Body for a preCreateAppUser request.
|
|
398
436
|
# @param [Hash] opts the optional parameters
|
|
399
437
|
# @return [Array<(AppUserResponse, Fixnum, Hash)>] AppUserResponse data, response status code and response headers
|
|
400
|
-
def pre_create_app_user_with_http_info(app_user_pre_create_body, opts = {})
|
|
438
|
+
def pre_create_app_user_with_http_info(app_id, app_user_pre_create_body, opts = {})
|
|
401
439
|
if @api_client.config.debugging
|
|
402
440
|
@api_client.config.logger.debug "Calling API: AppUserApi.pre_create_app_user ..."
|
|
403
441
|
end
|
|
442
|
+
# verify the required parameter 'app_id' is set
|
|
443
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
|
444
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling AppUserApi.pre_create_app_user"
|
|
445
|
+
end
|
|
404
446
|
# verify the required parameter 'app_user_pre_create_body' is set
|
|
405
447
|
if @api_client.config.client_side_validation && app_user_pre_create_body.nil?
|
|
406
448
|
fail ArgumentError, "Missing the required parameter 'app_user_pre_create_body' when calling AppUserApi.pre_create_app_user"
|
|
407
449
|
end
|
|
408
450
|
# resource path
|
|
409
|
-
local_var_path = "/appusers"
|
|
451
|
+
local_var_path = "/apps/{appId}/appusers".sub('{' + 'appId' + '}', app_id.to_s)
|
|
410
452
|
|
|
411
453
|
# query parameters
|
|
412
454
|
query_params = {}
|
|
@@ -437,88 +479,33 @@ module SmoochApi
|
|
|
437
479
|
return data, status_code, headers
|
|
438
480
|
end
|
|
439
481
|
|
|
440
|
-
#
|
|
441
|
-
# Track an event for the given app user.
|
|
442
|
-
# @param user_id Identifies the user. Can be either the smoochId or the userId.
|
|
443
|
-
# @param track_event_body Body for a trackEvent request.
|
|
444
|
-
# @param [Hash] opts the optional parameters
|
|
445
|
-
# @return [TrackEventResponse]
|
|
446
|
-
def track_event(user_id, track_event_body, opts = {})
|
|
447
|
-
data, _status_code, _headers = track_event_with_http_info(user_id, track_event_body, opts)
|
|
448
|
-
return data
|
|
449
|
-
end
|
|
450
|
-
|
|
451
|
-
#
|
|
452
|
-
# Track an event for the given app user.
|
|
453
|
-
# @param user_id Identifies the user. Can be either the smoochId or the userId.
|
|
454
|
-
# @param track_event_body Body for a trackEvent request.
|
|
455
|
-
# @param [Hash] opts the optional parameters
|
|
456
|
-
# @return [Array<(TrackEventResponse, Fixnum, Hash)>] TrackEventResponse data, response status code and response headers
|
|
457
|
-
def track_event_with_http_info(user_id, track_event_body, opts = {})
|
|
458
|
-
if @api_client.config.debugging
|
|
459
|
-
@api_client.config.logger.debug "Calling API: AppUserApi.track_event ..."
|
|
460
|
-
end
|
|
461
|
-
# verify the required parameter 'user_id' is set
|
|
462
|
-
if @api_client.config.client_side_validation && user_id.nil?
|
|
463
|
-
fail ArgumentError, "Missing the required parameter 'user_id' when calling AppUserApi.track_event"
|
|
464
|
-
end
|
|
465
|
-
# verify the required parameter 'track_event_body' is set
|
|
466
|
-
if @api_client.config.client_side_validation && track_event_body.nil?
|
|
467
|
-
fail ArgumentError, "Missing the required parameter 'track_event_body' when calling AppUserApi.track_event"
|
|
468
|
-
end
|
|
469
|
-
# resource path
|
|
470
|
-
local_var_path = "/appusers/{userId}/events".sub('{' + 'userId' + '}', user_id.to_s)
|
|
471
|
-
|
|
472
|
-
# query parameters
|
|
473
|
-
query_params = {}
|
|
474
|
-
|
|
475
|
-
# header parameters
|
|
476
|
-
header_params = {}
|
|
477
|
-
# HTTP header 'Accept' (if needed)
|
|
478
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
479
|
-
# HTTP header 'Content-Type'
|
|
480
|
-
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
|
481
|
-
|
|
482
|
-
# form parameters
|
|
483
|
-
form_params = {}
|
|
484
|
-
|
|
485
|
-
# http body (model)
|
|
486
|
-
post_body = @api_client.object_to_http_body(track_event_body)
|
|
487
|
-
auth_names = ['jwt']
|
|
488
|
-
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
489
|
-
:header_params => header_params,
|
|
490
|
-
:query_params => query_params,
|
|
491
|
-
:form_params => form_params,
|
|
492
|
-
:body => post_body,
|
|
493
|
-
:auth_names => auth_names,
|
|
494
|
-
:return_type => 'TrackEventResponse')
|
|
495
|
-
if @api_client.config.debugging
|
|
496
|
-
@api_client.config.logger.debug "API called: AppUserApi#track_event\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
497
|
-
end
|
|
498
|
-
return data, status_code, headers
|
|
499
|
-
end
|
|
500
|
-
|
|
501
482
|
#
|
|
502
483
|
# Unlink specified app user from given channel.
|
|
484
|
+
# @param app_id Identifies the app.
|
|
503
485
|
# @param user_id Identifies the user. Can be either the smoochId or the userId.
|
|
504
486
|
# @param channel Name of the channel.
|
|
505
487
|
# @param [Hash] opts the optional parameters
|
|
506
488
|
# @return [nil]
|
|
507
|
-
def unlink_app_user(user_id, channel, opts = {})
|
|
508
|
-
unlink_app_user_with_http_info(user_id, channel, opts)
|
|
489
|
+
def unlink_app_user(app_id, user_id, channel, opts = {})
|
|
490
|
+
unlink_app_user_with_http_info(app_id, user_id, channel, opts)
|
|
509
491
|
return nil
|
|
510
492
|
end
|
|
511
493
|
|
|
512
494
|
#
|
|
513
495
|
# Unlink specified app user from given channel.
|
|
496
|
+
# @param app_id Identifies the app.
|
|
514
497
|
# @param user_id Identifies the user. Can be either the smoochId or the userId.
|
|
515
498
|
# @param channel Name of the channel.
|
|
516
499
|
# @param [Hash] opts the optional parameters
|
|
517
500
|
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
|
518
|
-
def unlink_app_user_with_http_info(user_id, channel, opts = {})
|
|
501
|
+
def unlink_app_user_with_http_info(app_id, user_id, channel, opts = {})
|
|
519
502
|
if @api_client.config.debugging
|
|
520
503
|
@api_client.config.logger.debug "Calling API: AppUserApi.unlink_app_user ..."
|
|
521
504
|
end
|
|
505
|
+
# verify the required parameter 'app_id' is set
|
|
506
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
|
507
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling AppUserApi.unlink_app_user"
|
|
508
|
+
end
|
|
522
509
|
# verify the required parameter 'user_id' is set
|
|
523
510
|
if @api_client.config.client_side_validation && user_id.nil?
|
|
524
511
|
fail ArgumentError, "Missing the required parameter 'user_id' when calling AppUserApi.unlink_app_user"
|
|
@@ -528,7 +515,7 @@ module SmoochApi
|
|
|
528
515
|
fail ArgumentError, "Missing the required parameter 'channel' when calling AppUserApi.unlink_app_user"
|
|
529
516
|
end
|
|
530
517
|
# resource path
|
|
531
|
-
local_var_path = "/appusers/{userId}/channels/{channel}".sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'channel' + '}', channel.to_s)
|
|
518
|
+
local_var_path = "/apps/{appId}/appusers/{userId}/channels/{channel}".sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'userId' + '}', user_id.to_s).sub('{' + 'channel' + '}', channel.to_s)
|
|
532
519
|
|
|
533
520
|
# query parameters
|
|
534
521
|
query_params = {}
|
|
@@ -560,25 +547,31 @@ module SmoochApi
|
|
|
560
547
|
|
|
561
548
|
#
|
|
562
549
|
# Update the specified app user.
|
|
550
|
+
# @param app_id Identifies the app.
|
|
563
551
|
# @param user_id Identifies the user. Can be either the smoochId or the userId.
|
|
564
552
|
# @param app_user_update_body Body for an updateAppUser request.
|
|
565
553
|
# @param [Hash] opts the optional parameters
|
|
566
554
|
# @return [AppUserResponse]
|
|
567
|
-
def update_app_user(user_id, app_user_update_body, opts = {})
|
|
568
|
-
data, _status_code, _headers = update_app_user_with_http_info(user_id, app_user_update_body, opts)
|
|
555
|
+
def update_app_user(app_id, user_id, app_user_update_body, opts = {})
|
|
556
|
+
data, _status_code, _headers = update_app_user_with_http_info(app_id, user_id, app_user_update_body, opts)
|
|
569
557
|
return data
|
|
570
558
|
end
|
|
571
559
|
|
|
572
560
|
#
|
|
573
561
|
# Update the specified app user.
|
|
562
|
+
# @param app_id Identifies the app.
|
|
574
563
|
# @param user_id Identifies the user. Can be either the smoochId or the userId.
|
|
575
564
|
# @param app_user_update_body Body for an updateAppUser request.
|
|
576
565
|
# @param [Hash] opts the optional parameters
|
|
577
566
|
# @return [Array<(AppUserResponse, Fixnum, Hash)>] AppUserResponse data, response status code and response headers
|
|
578
|
-
def update_app_user_with_http_info(user_id, app_user_update_body, opts = {})
|
|
567
|
+
def update_app_user_with_http_info(app_id, user_id, app_user_update_body, opts = {})
|
|
579
568
|
if @api_client.config.debugging
|
|
580
569
|
@api_client.config.logger.debug "Calling API: AppUserApi.update_app_user ..."
|
|
581
570
|
end
|
|
571
|
+
# verify the required parameter 'app_id' is set
|
|
572
|
+
if @api_client.config.client_side_validation && app_id.nil?
|
|
573
|
+
fail ArgumentError, "Missing the required parameter 'app_id' when calling AppUserApi.update_app_user"
|
|
574
|
+
end
|
|
582
575
|
# verify the required parameter 'user_id' is set
|
|
583
576
|
if @api_client.config.client_side_validation && user_id.nil?
|
|
584
577
|
fail ArgumentError, "Missing the required parameter 'user_id' when calling AppUserApi.update_app_user"
|
|
@@ -588,7 +581,7 @@ module SmoochApi
|
|
|
588
581
|
fail ArgumentError, "Missing the required parameter 'app_user_update_body' when calling AppUserApi.update_app_user"
|
|
589
582
|
end
|
|
590
583
|
# resource path
|
|
591
|
-
local_var_path = "/appusers/{userId}".sub('{' + 'userId' + '}', user_id.to_s)
|
|
584
|
+
local_var_path = "/apps/{appId}/appusers/{userId}".sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'userId' + '}', user_id.to_s)
|
|
592
585
|
|
|
593
586
|
# query parameters
|
|
594
587
|
query_params = {}
|