smooch-api 1.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.
Files changed (121) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +7 -0
  3. data/README.md +181 -0
  4. data/Rakefile +8 -0
  5. data/docs/Action.md +16 -0
  6. data/docs/App.md +10 -0
  7. data/docs/AppApi.md +609 -0
  8. data/docs/AppCreate.md +8 -0
  9. data/docs/AppResponse.md +8 -0
  10. data/docs/AppUser.md +18 -0
  11. data/docs/AppUserApi.md +561 -0
  12. data/docs/AppUserLink.md +9 -0
  13. data/docs/AppUserPreCreate.md +14 -0
  14. data/docs/AppUserResponse.md +8 -0
  15. data/docs/AppUserUpdate.md +12 -0
  16. data/docs/Client.md +14 -0
  17. data/docs/ClientInfo.md +15 -0
  18. data/docs/Conversation.md +9 -0
  19. data/docs/ConversationApi.md +282 -0
  20. data/docs/Destination.md +9 -0
  21. data/docs/DeviceInit.md +12 -0
  22. data/docs/DeviceResponse.md +8 -0
  23. data/docs/DeviceUpdate.md +10 -0
  24. data/docs/DisplaySettings.md +8 -0
  25. data/docs/Event.md +8 -0
  26. data/docs/GetMessagesResponse.md +10 -0
  27. data/docs/Init.md +9 -0
  28. data/docs/InitApi.md +61 -0
  29. data/docs/InitResponse.md +9 -0
  30. data/docs/Integration.md +24 -0
  31. data/docs/IntegrationApi.md +121 -0
  32. data/docs/IntegrationCreate.md +23 -0
  33. data/docs/IntegrationResponse.md +8 -0
  34. data/docs/JwtResponse.md +8 -0
  35. data/docs/ListAppsResponse.md +10 -0
  36. data/docs/ListIntegrationsResponse.md +8 -0
  37. data/docs/ListSecretKeysResponse.md +8 -0
  38. data/docs/ListWebhooksResponse.md +8 -0
  39. data/docs/Menu.md +9 -0
  40. data/docs/MenuApi.md +155 -0
  41. data/docs/MenuItem.md +11 -0
  42. data/docs/MenuResponse.md +8 -0
  43. data/docs/Message.md +23 -0
  44. data/docs/MessageItem.md +13 -0
  45. data/docs/MessagePost.md +20 -0
  46. data/docs/MessageResponse.md +9 -0
  47. data/docs/PostMessagesResponse.md +9 -0
  48. data/docs/SecretKey.md +10 -0
  49. data/docs/SecretKeyCreate.md +8 -0
  50. data/docs/SecretKeyResponse.md +8 -0
  51. data/docs/TrackEventResponse.md +8 -0
  52. data/docs/TypingActivityTrigger.md +11 -0
  53. data/docs/Webhook.md +11 -0
  54. data/docs/WebhookApi.md +287 -0
  55. data/docs/WebhookCreate.md +9 -0
  56. data/docs/WebhookResponse.md +8 -0
  57. data/docs/WebhookUpdate.md +9 -0
  58. data/git_push.sh +55 -0
  59. data/lib/smooch-api.rb +91 -0
  60. data/lib/smooch-api/api/app_api.rb +628 -0
  61. data/lib/smooch-api/api/app_user_api.rb +585 -0
  62. data/lib/smooch-api/api/conversation_api.rb +298 -0
  63. data/lib/smooch-api/api/init_api.rb +75 -0
  64. data/lib/smooch-api/api/integration_api.rb +135 -0
  65. data/lib/smooch-api/api/menu_api.rb +173 -0
  66. data/lib/smooch-api/api/webhook_api.rb +306 -0
  67. data/lib/smooch-api/api_client.rb +376 -0
  68. data/lib/smooch-api/api_error.rb +37 -0
  69. data/lib/smooch-api/configuration.rb +202 -0
  70. data/lib/smooch-api/models/action.rb +311 -0
  71. data/lib/smooch-api/models/app.rb +223 -0
  72. data/lib/smooch-api/models/app_create.rb +193 -0
  73. data/lib/smooch-api/models/app_response.rb +188 -0
  74. data/lib/smooch-api/models/app_user.rb +307 -0
  75. data/lib/smooch-api/models/app_user_link.rb +236 -0
  76. data/lib/smooch-api/models/app_user_pre_create.rb +253 -0
  77. data/lib/smooch-api/models/app_user_response.rb +193 -0
  78. data/lib/smooch-api/models/app_user_update.rb +228 -0
  79. data/lib/smooch-api/models/client.rb +290 -0
  80. data/lib/smooch-api/models/client_info.rb +258 -0
  81. data/lib/smooch-api/models/conversation.rb +208 -0
  82. data/lib/smooch-api/models/destination.rb +208 -0
  83. data/lib/smooch-api/models/device_init.rb +270 -0
  84. data/lib/smooch-api/models/device_response.rb +188 -0
  85. data/lib/smooch-api/models/device_update.rb +207 -0
  86. data/lib/smooch-api/models/display_settings.rb +188 -0
  87. data/lib/smooch-api/models/event.rb +193 -0
  88. data/lib/smooch-api/models/get_messages_response.rb +210 -0
  89. data/lib/smooch-api/models/init.rb +202 -0
  90. data/lib/smooch-api/models/init_response.rb +208 -0
  91. data/lib/smooch-api/models/integration.rb +358 -0
  92. data/lib/smooch-api/models/integration_create.rb +343 -0
  93. data/lib/smooch-api/models/integration_response.rb +188 -0
  94. data/lib/smooch-api/models/jwt_response.rb +188 -0
  95. data/lib/smooch-api/models/list_apps_response.rb +210 -0
  96. data/lib/smooch-api/models/list_integrations_response.rb +190 -0
  97. data/lib/smooch-api/models/list_secret_keys_response.rb +190 -0
  98. data/lib/smooch-api/models/list_webhooks_response.rb +195 -0
  99. data/lib/smooch-api/models/menu.rb +205 -0
  100. data/lib/smooch-api/models/menu_item.rb +228 -0
  101. data/lib/smooch-api/models/menu_response.rb +193 -0
  102. data/lib/smooch-api/models/message.rb +415 -0
  103. data/lib/smooch-api/models/message_item.rb +250 -0
  104. data/lib/smooch-api/models/message_post.rb +355 -0
  105. data/lib/smooch-api/models/message_response.rb +208 -0
  106. data/lib/smooch-api/models/post_messages_response.rb +200 -0
  107. data/lib/smooch-api/models/secret_key.rb +223 -0
  108. data/lib/smooch-api/models/secret_key_create.rb +193 -0
  109. data/lib/smooch-api/models/secret_key_response.rb +188 -0
  110. data/lib/smooch-api/models/track_event_response.rb +188 -0
  111. data/lib/smooch-api/models/typing_activity_trigger.rb +228 -0
  112. data/lib/smooch-api/models/webhook.rb +261 -0
  113. data/lib/smooch-api/models/webhook_create.rb +226 -0
  114. data/lib/smooch-api/models/webhook_response.rb +193 -0
  115. data/lib/smooch-api/models/webhook_update.rb +221 -0
  116. data/lib/smooch-api/version.rb +14 -0
  117. data/smooch-api.gemspec +44 -0
  118. data/spec/api_client_spec.rb +225 -0
  119. data/spec/configuration_spec.rb +41 -0
  120. data/spec/spec_helper.rb +110 -0
  121. metadata +349 -0
data/docs/AppCreate.md ADDED
@@ -0,0 +1,8 @@
1
+ # SmoochApi::AppCreate
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **name** | **String** | The app's name. |
7
+
8
+
@@ -0,0 +1,8 @@
1
+ # SmoochApi::AppResponse
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **app** | [**App**](App.md) | The app. | [optional]
7
+
8
+
data/docs/AppUser.md ADDED
@@ -0,0 +1,18 @@
1
+ # SmoochApi::AppUser
2
+
3
+ ## Properties
4
+ Name | Type | Description | Notes
5
+ ------------ | ------------- | ------------- | -------------
6
+ **_id** | **String** | The app user's ID, generated automatically. |
7
+ **user_id** | **String** | The app user's userId. This ID is specified by the appMaker. | [optional]
8
+ **given_name** | **String** | The app user's given name. | [optional]
9
+ **surname** | **String** | The app user's surname. | [optional]
10
+ **email** | **String** | The app user's email. | [optional]
11
+ **signed_up_at** | **String** | A datetime string with the format *yyyy-mm-ddThh:mm:ssZ* representing the moment an appUser was created. | [optional]
12
+ **properties** | **Object** | Custom properties for the app user. |
13
+ **conversation_started** | **BOOLEAN** | Flag indicating if the conversation has started for the app user. |
14
+ **credential_required** | **BOOLEAN** | Flag indicating if the appUser is secured by a JSON Web Token or not. | [optional]
15
+ **clients** | [**Array<Client>**](Client.md) | List of clients associated with the app user. | [optional]
16
+ **pending_clients** | [**Array<Client>**](Client.md) | As clients, but containing linked clients which have not been confirmed yet (i.e. Twilio SMS). | [optional]
17
+
18
+
@@ -0,0 +1,561 @@
1
+ # SmoochApi::AppUserApi
2
+
3
+ All URIs are relative to *https://api.smooch.io/v1*
4
+
5
+ Method | HTTP request | Description
6
+ ------------- | ------------- | -------------
7
+ [**app_user_device_update**](AppUserApi.md#app_user_device_update) | **PUT** /appusers/{userId}/devices/{deviceId} |
8
+ [**delete_app_user_profile**](AppUserApi.md#delete_app_user_profile) | **DELETE** /appusers/{userId}/profile |
9
+ [**get_app_user**](AppUserApi.md#get_app_user) | **GET** /appusers/{userId} |
10
+ [**get_app_user_entity_ids**](AppUserApi.md#get_app_user_entity_ids) | **GET** /appusers/{userId}/channels |
11
+ [**link_app_user**](AppUserApi.md#link_app_user) | **POST** /appusers/{userId}/channels |
12
+ [**post_image_message**](AppUserApi.md#post_image_message) | **POST** /appusers/{userId}/images |
13
+ [**pre_create_app_user**](AppUserApi.md#pre_create_app_user) | **POST** /appusers |
14
+ [**track_event**](AppUserApi.md#track_event) | **POST** /appusers/{userId}/events |
15
+ [**unlink_app_user**](AppUserApi.md#unlink_app_user) | **DELETE** /appusers/{userId}/channels/{channel} |
16
+ [**update_app_user**](AppUserApi.md#update_app_user) | **PUT** /appusers/{userId} |
17
+
18
+
19
+ # **app_user_device_update**
20
+ > DeviceResponse app_user_device_update(user_id, device_id, app_user_device_update_body)
21
+
22
+
23
+
24
+ Update specified device information.
25
+
26
+ ### Example
27
+ ```ruby
28
+ # load the gem
29
+ require 'smooch-api'
30
+ # setup authorization
31
+ SmoochApi.configure do |config|
32
+ # Configure API key authorization: jwt
33
+ config.api_key['Authorization'] = 'YOUR JWT'
34
+ config.api_key_prefix['Authorization'] = 'Bearer'
35
+ end
36
+
37
+ api_instance = SmoochApi::AppUserApi.new
38
+
39
+ user_id = "user_id_example" # String | Identifies the user. Can be either the smoochId or the userId.
40
+
41
+ device_id = "device_id_example" # String | Identifies the device.
42
+
43
+ app_user_device_update_body = SmoochApi::DeviceUpdate.new # DeviceUpdate | Body for an updateAppUserDevice request.
44
+
45
+
46
+ begin
47
+ result = api_instance.app_user_device_update(user_id, device_id, app_user_device_update_body)
48
+ p result
49
+ rescue SmoochApi::ApiError => e
50
+ puts "Exception when calling AppUserApi->app_user_device_update: #{e}"
51
+ end
52
+ ```
53
+
54
+ ### Parameters
55
+
56
+ Name | Type | Description | Notes
57
+ ------------- | ------------- | ------------- | -------------
58
+ **user_id** | **String**| Identifies the user. Can be either the smoochId or the userId. |
59
+ **device_id** | **String**| Identifies the device. |
60
+ **app_user_device_update_body** | [**DeviceUpdate**](DeviceUpdate.md)| Body for an updateAppUserDevice request. |
61
+
62
+ ### Return type
63
+
64
+ [**DeviceResponse**](DeviceResponse.md)
65
+
66
+ ### Authorization
67
+
68
+ [jwt](../README.md#jwt)
69
+
70
+ ### HTTP request headers
71
+
72
+ - **Content-Type**: application/json
73
+ - **Accept**: application/json
74
+
75
+
76
+
77
+ # **delete_app_user_profile**
78
+ > AppUserResponse delete_app_user_profile(user_id, )
79
+
80
+
81
+
82
+ Delete specified app user's profile.
83
+
84
+ ### Example
85
+ ```ruby
86
+ # load the gem
87
+ require 'smooch-api'
88
+ # setup authorization
89
+ SmoochApi.configure do |config|
90
+ # Configure API key authorization: jwt
91
+ config.api_key['Authorization'] = 'YOUR JWT'
92
+ config.api_key_prefix['Authorization'] = 'Bearer'
93
+ end
94
+
95
+ api_instance = SmoochApi::AppUserApi.new
96
+
97
+ user_id = "user_id_example" # String | Identifies the user. Can be either the smoochId or the userId.
98
+
99
+
100
+ begin
101
+ result = api_instance.delete_app_user_profile(user_id, )
102
+ p result
103
+ rescue SmoochApi::ApiError => e
104
+ puts "Exception when calling AppUserApi->delete_app_user_profile: #{e}"
105
+ end
106
+ ```
107
+
108
+ ### Parameters
109
+
110
+ Name | Type | Description | Notes
111
+ ------------- | ------------- | ------------- | -------------
112
+ **user_id** | **String**| Identifies the user. Can be either the smoochId or the userId. |
113
+
114
+ ### Return type
115
+
116
+ [**AppUserResponse**](AppUserResponse.md)
117
+
118
+ ### Authorization
119
+
120
+ [jwt](../README.md#jwt)
121
+
122
+ ### HTTP request headers
123
+
124
+ - **Content-Type**: application/json
125
+ - **Accept**: application/json
126
+
127
+
128
+
129
+ # **get_app_user**
130
+ > AppUserResponse get_app_user(user_id, )
131
+
132
+
133
+
134
+ Get the specified app user.
135
+
136
+ ### Example
137
+ ```ruby
138
+ # load the gem
139
+ require 'smooch-api'
140
+ # setup authorization
141
+ SmoochApi.configure do |config|
142
+ # Configure API key authorization: jwt
143
+ config.api_key['Authorization'] = 'YOUR JWT'
144
+ config.api_key_prefix['Authorization'] = 'Bearer'
145
+ end
146
+
147
+ api_instance = SmoochApi::AppUserApi.new
148
+
149
+ user_id = "user_id_example" # String | Identifies the user. Can be either the smoochId or the userId.
150
+
151
+
152
+ begin
153
+ result = api_instance.get_app_user(user_id, )
154
+ p result
155
+ rescue SmoochApi::ApiError => e
156
+ puts "Exception when calling AppUserApi->get_app_user: #{e}"
157
+ end
158
+ ```
159
+
160
+ ### Parameters
161
+
162
+ Name | Type | Description | Notes
163
+ ------------- | ------------- | ------------- | -------------
164
+ **user_id** | **String**| Identifies the user. Can be either the smoochId or the userId. |
165
+
166
+ ### Return type
167
+
168
+ [**AppUserResponse**](AppUserResponse.md)
169
+
170
+ ### Authorization
171
+
172
+ [jwt](../README.md#jwt)
173
+
174
+ ### HTTP request headers
175
+
176
+ - **Content-Type**: application/json
177
+ - **Accept**: application/json
178
+
179
+
180
+
181
+ # **get_app_user_entity_ids**
182
+ > AppUserResponse get_app_user_entity_ids(user_id, )
183
+
184
+
185
+
186
+ Get specified app user's channel entity IDs.
187
+
188
+ ### Example
189
+ ```ruby
190
+ # load the gem
191
+ require 'smooch-api'
192
+ # setup authorization
193
+ SmoochApi.configure do |config|
194
+ # Configure API key authorization: jwt
195
+ config.api_key['Authorization'] = 'YOUR JWT'
196
+ config.api_key_prefix['Authorization'] = 'Bearer'
197
+ end
198
+
199
+ api_instance = SmoochApi::AppUserApi.new
200
+
201
+ user_id = "user_id_example" # String | Identifies the user. Can be either the smoochId or the userId.
202
+
203
+
204
+ begin
205
+ result = api_instance.get_app_user_entity_ids(user_id, )
206
+ p result
207
+ rescue SmoochApi::ApiError => e
208
+ puts "Exception when calling AppUserApi->get_app_user_entity_ids: #{e}"
209
+ end
210
+ ```
211
+
212
+ ### Parameters
213
+
214
+ Name | Type | Description | Notes
215
+ ------------- | ------------- | ------------- | -------------
216
+ **user_id** | **String**| Identifies the user. Can be either the smoochId or the userId. |
217
+
218
+ ### Return type
219
+
220
+ [**AppUserResponse**](AppUserResponse.md)
221
+
222
+ ### Authorization
223
+
224
+ [jwt](../README.md#jwt)
225
+
226
+ ### HTTP request headers
227
+
228
+ - **Content-Type**: application/json
229
+ - **Accept**: application/json
230
+
231
+
232
+
233
+ # **link_app_user**
234
+ > AppUserResponse link_app_user(user_id, app_user_link_body)
235
+
236
+
237
+
238
+ Link specified app user to given channel.
239
+
240
+ ### Example
241
+ ```ruby
242
+ # load the gem
243
+ require 'smooch-api'
244
+ # setup authorization
245
+ SmoochApi.configure do |config|
246
+ # Configure API key authorization: jwt
247
+ config.api_key['Authorization'] = 'YOUR JWT'
248
+ config.api_key_prefix['Authorization'] = 'Bearer'
249
+ end
250
+
251
+ api_instance = SmoochApi::AppUserApi.new
252
+
253
+ user_id = "user_id_example" # String | Identifies the user. Can be either the smoochId or the userId.
254
+
255
+ app_user_link_body = SmoochApi::AppUserLink.new # AppUserLink | Body for a linkAppUser request.
256
+
257
+
258
+ begin
259
+ result = api_instance.link_app_user(user_id, app_user_link_body)
260
+ p result
261
+ rescue SmoochApi::ApiError => e
262
+ puts "Exception when calling AppUserApi->link_app_user: #{e}"
263
+ end
264
+ ```
265
+
266
+ ### Parameters
267
+
268
+ Name | Type | Description | Notes
269
+ ------------- | ------------- | ------------- | -------------
270
+ **user_id** | **String**| Identifies the user. Can be either the smoochId or the userId. |
271
+ **app_user_link_body** | [**AppUserLink**](AppUserLink.md)| Body for a linkAppUser request. |
272
+
273
+ ### Return type
274
+
275
+ [**AppUserResponse**](AppUserResponse.md)
276
+
277
+ ### Authorization
278
+
279
+ [jwt](../README.md#jwt)
280
+
281
+ ### HTTP request headers
282
+
283
+ - **Content-Type**: application/json
284
+ - **Accept**: application/json
285
+
286
+
287
+
288
+ # **post_image_message**
289
+ > MessageResponse post_image_message(user_id, source, role)
290
+
291
+
292
+
293
+ Send an image message to the conversation.
294
+
295
+ ### Example
296
+ ```ruby
297
+ # load the gem
298
+ require 'smooch-api'
299
+ # setup authorization
300
+ SmoochApi.configure do |config|
301
+ # Configure API key authorization: jwt
302
+ config.api_key['Authorization'] = 'YOUR JWT'
303
+ config.api_key_prefix['Authorization'] = 'Bearer'
304
+ end
305
+
306
+ api_instance = SmoochApi::AppUserApi.new
307
+
308
+ user_id = "user_id_example" # String | Identifies the user. Can be either the smoochId or the userId.
309
+
310
+ source = File.new("/path/to/file.txt") # File | Image to be uploaded
311
+
312
+ role = "role_example" # String | Role of the sender
313
+
314
+
315
+ begin
316
+ result = api_instance.post_image_message(user_id, source, role)
317
+ p result
318
+ rescue SmoochApi::ApiError => e
319
+ puts "Exception when calling AppUserApi->post_image_message: #{e}"
320
+ end
321
+ ```
322
+
323
+ ### Parameters
324
+
325
+ Name | Type | Description | Notes
326
+ ------------- | ------------- | ------------- | -------------
327
+ **user_id** | **String**| Identifies the user. Can be either the smoochId or the userId. |
328
+ **source** | **File**| Image to be uploaded |
329
+ **role** | **String**| Role of the sender |
330
+
331
+ ### Return type
332
+
333
+ [**MessageResponse**](MessageResponse.md)
334
+
335
+ ### Authorization
336
+
337
+ [jwt](../README.md#jwt)
338
+
339
+ ### HTTP request headers
340
+
341
+ - **Content-Type**: multipart/form-data
342
+ - **Accept**: application/json
343
+
344
+
345
+
346
+ # **pre_create_app_user**
347
+ > AppUserResponse pre_create_app_user(app_user_pre_create_body)
348
+
349
+
350
+
351
+ Pre-create an app user.
352
+
353
+ ### Example
354
+ ```ruby
355
+ # load the gem
356
+ require 'smooch-api'
357
+ # setup authorization
358
+ SmoochApi.configure do |config|
359
+ # Configure API key authorization: jwt
360
+ config.api_key['Authorization'] = 'YOUR JWT'
361
+ config.api_key_prefix['Authorization'] = 'Bearer'
362
+ end
363
+
364
+ api_instance = SmoochApi::AppUserApi.new
365
+
366
+ app_user_pre_create_body = SmoochApi::AppUserPreCreate.new # AppUserPreCreate | Body for a preCreateAppUser request.
367
+
368
+
369
+ begin
370
+ result = api_instance.pre_create_app_user(app_user_pre_create_body)
371
+ p result
372
+ rescue SmoochApi::ApiError => e
373
+ puts "Exception when calling AppUserApi->pre_create_app_user: #{e}"
374
+ end
375
+ ```
376
+
377
+ ### Parameters
378
+
379
+ Name | Type | Description | Notes
380
+ ------------- | ------------- | ------------- | -------------
381
+ **app_user_pre_create_body** | [**AppUserPreCreate**](AppUserPreCreate.md)| Body for a preCreateAppUser request. |
382
+
383
+ ### Return type
384
+
385
+ [**AppUserResponse**](AppUserResponse.md)
386
+
387
+ ### Authorization
388
+
389
+ [jwt](../README.md#jwt)
390
+
391
+ ### HTTP request headers
392
+
393
+ - **Content-Type**: application/json
394
+ - **Accept**: application/json
395
+
396
+
397
+
398
+ # **track_event**
399
+ > TrackEventResponse track_event(user_id, track_event_body)
400
+
401
+
402
+
403
+ Track an event for the given app user.
404
+
405
+ ### Example
406
+ ```ruby
407
+ # load the gem
408
+ require 'smooch-api'
409
+ # setup authorization
410
+ SmoochApi.configure do |config|
411
+ # Configure API key authorization: jwt
412
+ config.api_key['Authorization'] = 'YOUR JWT'
413
+ config.api_key_prefix['Authorization'] = 'Bearer'
414
+ end
415
+
416
+ api_instance = SmoochApi::AppUserApi.new
417
+
418
+ user_id = "user_id_example" # String | Identifies the user. Can be either the smoochId or the userId.
419
+
420
+ track_event_body = SmoochApi::Event.new # Event | Body for a trackEvent request.
421
+
422
+
423
+ begin
424
+ result = api_instance.track_event(user_id, track_event_body)
425
+ p result
426
+ rescue SmoochApi::ApiError => e
427
+ puts "Exception when calling AppUserApi->track_event: #{e}"
428
+ end
429
+ ```
430
+
431
+ ### Parameters
432
+
433
+ Name | Type | Description | Notes
434
+ ------------- | ------------- | ------------- | -------------
435
+ **user_id** | **String**| Identifies the user. Can be either the smoochId or the userId. |
436
+ **track_event_body** | [**Event**](Event.md)| Body for a trackEvent request. |
437
+
438
+ ### Return type
439
+
440
+ [**TrackEventResponse**](TrackEventResponse.md)
441
+
442
+ ### Authorization
443
+
444
+ [jwt](../README.md#jwt)
445
+
446
+ ### HTTP request headers
447
+
448
+ - **Content-Type**: application/json
449
+ - **Accept**: application/json
450
+
451
+
452
+
453
+ # **unlink_app_user**
454
+ > unlink_app_user(user_id, channel)
455
+
456
+
457
+
458
+ Unlink specified app user from given channel.
459
+
460
+ ### Example
461
+ ```ruby
462
+ # load the gem
463
+ require 'smooch-api'
464
+ # setup authorization
465
+ SmoochApi.configure do |config|
466
+ # Configure API key authorization: jwt
467
+ config.api_key['Authorization'] = 'YOUR JWT'
468
+ config.api_key_prefix['Authorization'] = 'Bearer'
469
+ end
470
+
471
+ api_instance = SmoochApi::AppUserApi.new
472
+
473
+ user_id = "user_id_example" # String | Identifies the user. Can be either the smoochId or the userId.
474
+
475
+ channel = "channel_example" # String | Name of the channel.
476
+
477
+
478
+ begin
479
+ api_instance.unlink_app_user(user_id, channel)
480
+ rescue SmoochApi::ApiError => e
481
+ puts "Exception when calling AppUserApi->unlink_app_user: #{e}"
482
+ end
483
+ ```
484
+
485
+ ### Parameters
486
+
487
+ Name | Type | Description | Notes
488
+ ------------- | ------------- | ------------- | -------------
489
+ **user_id** | **String**| Identifies the user. Can be either the smoochId or the userId. |
490
+ **channel** | **String**| Name of the channel. |
491
+
492
+ ### Return type
493
+
494
+ nil (empty response body)
495
+
496
+ ### Authorization
497
+
498
+ [jwt](../README.md#jwt)
499
+
500
+ ### HTTP request headers
501
+
502
+ - **Content-Type**: application/json
503
+ - **Accept**: application/json
504
+
505
+
506
+
507
+ # **update_app_user**
508
+ > AppUserResponse update_app_user(user_id, app_user_update_body)
509
+
510
+
511
+
512
+ Update the specified app user.
513
+
514
+ ### Example
515
+ ```ruby
516
+ # load the gem
517
+ require 'smooch-api'
518
+ # setup authorization
519
+ SmoochApi.configure do |config|
520
+ # Configure API key authorization: jwt
521
+ config.api_key['Authorization'] = 'YOUR JWT'
522
+ config.api_key_prefix['Authorization'] = 'Bearer'
523
+ end
524
+
525
+ api_instance = SmoochApi::AppUserApi.new
526
+
527
+ user_id = "user_id_example" # String | Identifies the user. Can be either the smoochId or the userId.
528
+
529
+ app_user_update_body = SmoochApi::AppUserUpdate.new # AppUserUpdate | Body for an updateAppUser request.
530
+
531
+
532
+ begin
533
+ result = api_instance.update_app_user(user_id, app_user_update_body)
534
+ p result
535
+ rescue SmoochApi::ApiError => e
536
+ puts "Exception when calling AppUserApi->update_app_user: #{e}"
537
+ end
538
+ ```
539
+
540
+ ### Parameters
541
+
542
+ Name | Type | Description | Notes
543
+ ------------- | ------------- | ------------- | -------------
544
+ **user_id** | **String**| Identifies the user. Can be either the smoochId or the userId. |
545
+ **app_user_update_body** | [**AppUserUpdate**](AppUserUpdate.md)| Body for an updateAppUser request. |
546
+
547
+ ### Return type
548
+
549
+ [**AppUserResponse**](AppUserResponse.md)
550
+
551
+ ### Authorization
552
+
553
+ [jwt](../README.md#jwt)
554
+
555
+ ### HTTP request headers
556
+
557
+ - **Content-Type**: application/json
558
+ - **Accept**: application/json
559
+
560
+
561
+