smooch-api 5.12.0 → 5.13.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 -12
- data/docs/AppApi.md +40 -10
- data/docs/AppUserApi.md +52 -13
- data/docs/AttachmentsApi.md +8 -2
- data/docs/ConversationApi.md +26 -8
- data/docs/DeploymentApi.md +24 -6
- data/docs/Enums.md +2 -0
- data/docs/Field.md +19 -0
- data/docs/FieldPost.md +14 -0
- data/docs/IntegrationApi.md +48 -12
- data/docs/MenuApi.md +12 -3
- data/docs/Message.md +5 -0
- data/docs/MessagePost.md +2 -0
- data/docs/Option.md +9 -0
- data/docs/QuotedMessage.md +10 -0
- data/docs/Select.md +10 -0
- data/docs/ServiceAccountApi.md +40 -10
- data/docs/TemplateApi.md +20 -5
- data/docs/WebhookApi.md +20 -5
- data/lib/smooch-api.rb +6 -1
- data/lib/smooch-api/api/app_api.rb +1 -1
- data/lib/smooch-api/api/app_user_api.rb +1 -1
- data/lib/smooch-api/api/attachments_api.rb +1 -1
- data/lib/smooch-api/api/conversation_api.rb +3 -3
- data/lib/smooch-api/api/deployment_api.rb +1 -1
- data/lib/smooch-api/api/integration_api.rb +1 -1
- data/lib/smooch-api/api/menu_api.rb +1 -1
- data/lib/smooch-api/api/service_account_api.rb +1 -1
- data/lib/smooch-api/api/template_api.rb +1 -1
- 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 -1
- data/lib/smooch-api/models/activity_response.rb +1 -1
- 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_business_systems_response.rb +1 -1
- data/lib/smooch-api/models/app_user_channels_response.rb +1 -1
- data/lib/smooch-api/models/app_user_link.rb +1 -1
- data/lib/smooch-api/models/app_user_merge.rb +1 -1
- 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_remove.rb +1 -1
- data/lib/smooch-api/models/attachment_response.rb +1 -1
- data/lib/smooch-api/models/auth_code_response.rb +1 -1
- data/lib/smooch-api/models/business_system_item.rb +1 -1
- data/lib/smooch-api/models/channel_entity_item.rb +1 -1
- data/lib/smooch-api/models/client.rb +1 -1
- 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/conversation_activity.rb +1 -1
- data/lib/smooch-api/models/deployment.rb +1 -1
- data/lib/smooch-api/models/deployment_activate_phone_number.rb +1 -1
- data/lib/smooch-api/models/deployment_confirm_code.rb +1 -1
- data/lib/smooch-api/models/deployment_create.rb +1 -1
- data/lib/smooch-api/models/deployment_response.rb +1 -1
- data/lib/smooch-api/models/destination.rb +1 -1
- data/lib/smooch-api/models/display_settings.rb +1 -1
- data/lib/smooch-api/models/enums.rb +46 -4
- data/lib/smooch-api/models/field.rb +318 -0
- data/lib/smooch-api/models/field_post.rb +266 -0
- data/lib/smooch-api/models/get_integration_profile_response.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_profile_update.rb +1 -1
- data/lib/smooch-api/models/integration_response.rb +1 -1
- data/lib/smooch-api/models/integration_update.rb +1 -1
- data/lib/smooch-api/models/jwt_response.rb +1 -1
- data/lib/smooch-api/models/link_request_response.rb +1 -1
- data/lib/smooch-api/models/link_request_response_link_requests.rb +1 -1
- data/lib/smooch-api/models/list_apps_response.rb +1 -1
- data/lib/smooch-api/models/list_deployments_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_service_accounts_response.rb +1 -1
- data/lib/smooch-api/models/list_templates_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/merged_user.rb +1 -1
- data/lib/smooch-api/models/message.rb +57 -5
- data/lib/smooch-api/models/message_item.rb +1 -1
- data/lib/smooch-api/models/message_override.rb +1 -1
- data/lib/smooch-api/models/message_override_whatsapp.rb +1 -1
- data/lib/smooch-api/models/message_post.rb +24 -2
- data/lib/smooch-api/models/message_response.rb +1 -1
- data/lib/smooch-api/models/option.rb +209 -0
- data/lib/smooch-api/models/quoted_message.rb +213 -0
- 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/select.rb +219 -0
- data/lib/smooch-api/models/service_account.rb +1 -1
- data/lib/smooch-api/models/service_account_create.rb +1 -1
- data/lib/smooch-api/models/service_account_response.rb +1 -1
- data/lib/smooch-api/models/service_account_update.rb +1 -1
- data/lib/smooch-api/models/source.rb +1 -1
- data/lib/smooch-api/models/sub_menu_item.rb +1 -1
- data/lib/smooch-api/models/template.rb +1 -1
- data/lib/smooch-api/models/template_create.rb +1 -1
- data/lib/smooch-api/models/template_response.rb +1 -1
- data/lib/smooch-api/models/template_update.rb +1 -1
- data/lib/smooch-api/models/upload_integration_profile_photo_response.rb +1 -1
- data/lib/smooch-api/models/webhook.rb +1 -1
- data/lib/smooch-api/models/webhook_create.rb +1 -1
- data/lib/smooch-api/models/webhook_response.rb +1 -1
- data/lib/smooch-api/models/webhook_update.rb +1 -1
- data/lib/smooch-api/version.rb +2 -2
- data/smooch-api.gemspec +1 -1
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +12 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3fc8ee7d3b2e34a46afdac07f0bf50f6c64449b2
|
|
4
|
+
data.tar.gz: 4652873e92dcac20ce301ac7b35aa75a073d729a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 20166d27e04796c0a2ae731c3939d1b73157caf235aafc6a6ac093a1efe783069e9f284fc17ddddf75e5cc3bdd0955e9ed0b2a707949d7d6ac842f60a6688a73
|
|
7
|
+
data.tar.gz: a6e1bc555bf9c568d06f005a1c930d65beb00425426855394c32749cd4f7644979eb1e50ca2e6ed26909af1a5cfeca9d6371ff6fca2a9a3408382060fc9aaada
|
data/README.md
CHANGED
|
@@ -25,23 +25,21 @@ gem install smooch-api
|
|
|
25
25
|
|
|
26
26
|
Add this to the Gemfile:
|
|
27
27
|
|
|
28
|
-
gem 'smooch-api', '~> 5.
|
|
28
|
+
gem 'smooch-api', '~> 5.13.0'
|
|
29
29
|
|
|
30
30
|
## Getting Started
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
JSON Web Tokens (JWTs) are an industry standard authentication mechanism. A great introduction to the technology is available [here](https://jwt.io/introduction/), and a broad set of supported JWT libraries for a variety of languages and platforms are available.
|
|
32
|
+
Familiarity with [Smooch API authentication](https://docs.smooch.io/guide/authentication-overview) is recommended.
|
|
35
33
|
|
|
36
|
-
|
|
34
|
+
### Basic Authentication (recommended)
|
|
37
35
|
|
|
38
|
-
|
|
36
|
+
With [basic authentication](https://docs.smooch.io/guide/basic-authentication), you can use your API key ID and secret to authenticate API requests. See below for a code sample.
|
|
39
37
|
|
|
40
|
-
|
|
38
|
+
### Authentication with JSON Web Tokens (JWTs)
|
|
41
39
|
|
|
42
|
-
|
|
40
|
+
See the [JSON Web Tokens (JWTs)](https://docs.smooch.io/guide/jwt) guide for more information and guidelines on when to use this method. In general, you'll want to favor using basic authentication.
|
|
43
41
|
|
|
44
|
-
|
|
42
|
+
To generate a JWT, use your API key ID and secret.
|
|
45
43
|
|
|
46
44
|
Using the [ruby-jwt](https://github.com/jwt/ruby-jwt) gem:
|
|
47
45
|
|
|
@@ -49,9 +47,9 @@ Using the [ruby-jwt](https://github.com/jwt/ruby-jwt) gem:
|
|
|
49
47
|
require 'jwt'
|
|
50
48
|
|
|
51
49
|
payload = {:scope => 'app'}
|
|
52
|
-
jwtHeader = {:kid =>
|
|
50
|
+
jwtHeader = {:kid => API_KEY_ID}
|
|
53
51
|
|
|
54
|
-
token = JWT.encode payload,
|
|
52
|
+
token = JWT.encode payload, API_KEY_SECRET, 'HS256', jwtHeader
|
|
55
53
|
```
|
|
56
54
|
|
|
57
55
|
### Running the code
|
|
@@ -62,7 +60,10 @@ require 'smooch-api'
|
|
|
62
60
|
|
|
63
61
|
# Setup authorization
|
|
64
62
|
SmoochApi.configure do |config|
|
|
65
|
-
|
|
63
|
+
|
|
64
|
+
# OR
|
|
65
|
+
|
|
66
|
+
# Configure JWT authorization (alternative method): jwt
|
|
66
67
|
config.api_key['Authorization'] = 'YOUR JWT'
|
|
67
68
|
config.api_key_prefix['Authorization'] = 'Bearer'
|
|
68
69
|
end
|
|
@@ -208,6 +209,8 @@ Class | Method | HTTP request | Description
|
|
|
208
209
|
- [SmoochApi::Destination](docs/Destination.md)
|
|
209
210
|
- [SmoochApi::DisplaySettings](docs/DisplaySettings.md)
|
|
210
211
|
- [SmoochApi::Enums](docs/Enums.md)
|
|
212
|
+
- [SmoochApi::Field](docs/Field.md)
|
|
213
|
+
- [SmoochApi::FieldPost](docs/FieldPost.md)
|
|
211
214
|
- [SmoochApi::GetIntegrationProfileResponse](docs/GetIntegrationProfileResponse.md)
|
|
212
215
|
- [SmoochApi::GetMessagesResponse](docs/GetMessagesResponse.md)
|
|
213
216
|
- [SmoochApi::Integration](docs/Integration.md)
|
|
@@ -235,9 +238,12 @@ Class | Method | HTTP request | Description
|
|
|
235
238
|
- [SmoochApi::MessageOverrideWhatsapp](docs/MessageOverrideWhatsapp.md)
|
|
236
239
|
- [SmoochApi::MessagePost](docs/MessagePost.md)
|
|
237
240
|
- [SmoochApi::MessageResponse](docs/MessageResponse.md)
|
|
241
|
+
- [SmoochApi::Option](docs/Option.md)
|
|
242
|
+
- [SmoochApi::QuotedMessage](docs/QuotedMessage.md)
|
|
238
243
|
- [SmoochApi::SecretKey](docs/SecretKey.md)
|
|
239
244
|
- [SmoochApi::SecretKeyCreate](docs/SecretKeyCreate.md)
|
|
240
245
|
- [SmoochApi::SecretKeyResponse](docs/SecretKeyResponse.md)
|
|
246
|
+
- [SmoochApi::Select](docs/Select.md)
|
|
241
247
|
- [SmoochApi::ServiceAccount](docs/ServiceAccount.md)
|
|
242
248
|
- [SmoochApi::ServiceAccountCreate](docs/ServiceAccountCreate.md)
|
|
243
249
|
- [SmoochApi::ServiceAccountResponse](docs/ServiceAccountResponse.md)
|
data/docs/AppApi.md
CHANGED
|
@@ -29,7 +29,10 @@ Create a new app.
|
|
|
29
29
|
require 'smooch-api'
|
|
30
30
|
# setup authorization
|
|
31
31
|
SmoochApi.configure do |config|
|
|
32
|
-
|
|
32
|
+
|
|
33
|
+
# OR
|
|
34
|
+
|
|
35
|
+
# Configure API key authorization (alternative): jwt
|
|
33
36
|
config.api_key['Authorization'] = 'YOUR JWT'
|
|
34
37
|
config.api_key_prefix['Authorization'] = 'Bearer'
|
|
35
38
|
end
|
|
@@ -81,7 +84,10 @@ Create a secret key for the specified app.
|
|
|
81
84
|
require 'smooch-api'
|
|
82
85
|
# setup authorization
|
|
83
86
|
SmoochApi.configure do |config|
|
|
84
|
-
|
|
87
|
+
|
|
88
|
+
# OR
|
|
89
|
+
|
|
90
|
+
# Configure API key authorization (alternative): jwt
|
|
85
91
|
config.api_key['Authorization'] = 'YOUR JWT'
|
|
86
92
|
config.api_key_prefix['Authorization'] = 'Bearer'
|
|
87
93
|
end
|
|
@@ -136,7 +142,10 @@ Delete the specified app.
|
|
|
136
142
|
require 'smooch-api'
|
|
137
143
|
# setup authorization
|
|
138
144
|
SmoochApi.configure do |config|
|
|
139
|
-
|
|
145
|
+
|
|
146
|
+
# OR
|
|
147
|
+
|
|
148
|
+
# Configure API key authorization (alternative): jwt
|
|
140
149
|
config.api_key['Authorization'] = 'YOUR JWT'
|
|
141
150
|
config.api_key_prefix['Authorization'] = 'Bearer'
|
|
142
151
|
end
|
|
@@ -187,7 +196,10 @@ Delete the specified secret key.
|
|
|
187
196
|
require 'smooch-api'
|
|
188
197
|
# setup authorization
|
|
189
198
|
SmoochApi.configure do |config|
|
|
190
|
-
|
|
199
|
+
|
|
200
|
+
# OR
|
|
201
|
+
|
|
202
|
+
# Configure API key authorization (alternative): jwt
|
|
191
203
|
config.api_key['Authorization'] = 'YOUR JWT'
|
|
192
204
|
config.api_key_prefix['Authorization'] = 'Bearer'
|
|
193
205
|
end
|
|
@@ -241,7 +253,10 @@ Get the specified app.
|
|
|
241
253
|
require 'smooch-api'
|
|
242
254
|
# setup authorization
|
|
243
255
|
SmoochApi.configure do |config|
|
|
244
|
-
|
|
256
|
+
|
|
257
|
+
# OR
|
|
258
|
+
|
|
259
|
+
# Configure API key authorization (alternative): jwt
|
|
245
260
|
config.api_key['Authorization'] = 'YOUR JWT'
|
|
246
261
|
config.api_key_prefix['Authorization'] = 'Bearer'
|
|
247
262
|
end
|
|
@@ -293,7 +308,10 @@ Get an app-scoped JWT for the specified secret key.
|
|
|
293
308
|
require 'smooch-api'
|
|
294
309
|
# setup authorization
|
|
295
310
|
SmoochApi.configure do |config|
|
|
296
|
-
|
|
311
|
+
|
|
312
|
+
# OR
|
|
313
|
+
|
|
314
|
+
# Configure API key authorization (alternative): jwt
|
|
297
315
|
config.api_key['Authorization'] = 'YOUR JWT'
|
|
298
316
|
config.api_key_prefix['Authorization'] = 'Bearer'
|
|
299
317
|
end
|
|
@@ -348,7 +366,10 @@ Get the specified secret key.
|
|
|
348
366
|
require 'smooch-api'
|
|
349
367
|
# setup authorization
|
|
350
368
|
SmoochApi.configure do |config|
|
|
351
|
-
|
|
369
|
+
|
|
370
|
+
# OR
|
|
371
|
+
|
|
372
|
+
# Configure API key authorization (alternative): jwt
|
|
352
373
|
config.api_key['Authorization'] = 'YOUR JWT'
|
|
353
374
|
config.api_key_prefix['Authorization'] = 'Bearer'
|
|
354
375
|
end
|
|
@@ -403,7 +424,10 @@ List all apps configured.
|
|
|
403
424
|
require 'smooch-api'
|
|
404
425
|
# setup authorization
|
|
405
426
|
SmoochApi.configure do |config|
|
|
406
|
-
|
|
427
|
+
|
|
428
|
+
# OR
|
|
429
|
+
|
|
430
|
+
# Configure API key authorization (alternative): jwt
|
|
407
431
|
config.api_key['Authorization'] = 'YOUR JWT'
|
|
408
432
|
config.api_key_prefix['Authorization'] = 'Bearer'
|
|
409
433
|
end
|
|
@@ -460,7 +484,10 @@ List the secret keys for the specified app.
|
|
|
460
484
|
require 'smooch-api'
|
|
461
485
|
# setup authorization
|
|
462
486
|
SmoochApi.configure do |config|
|
|
463
|
-
|
|
487
|
+
|
|
488
|
+
# OR
|
|
489
|
+
|
|
490
|
+
# Configure API key authorization (alternative): jwt
|
|
464
491
|
config.api_key['Authorization'] = 'YOUR JWT'
|
|
465
492
|
config.api_key_prefix['Authorization'] = 'Bearer'
|
|
466
493
|
end
|
|
@@ -512,7 +539,10 @@ Update the specified app.
|
|
|
512
539
|
require 'smooch-api'
|
|
513
540
|
# setup authorization
|
|
514
541
|
SmoochApi.configure do |config|
|
|
515
|
-
|
|
542
|
+
|
|
543
|
+
# OR
|
|
544
|
+
|
|
545
|
+
# Configure API key authorization (alternative): jwt
|
|
516
546
|
config.api_key['Authorization'] = 'YOUR JWT'
|
|
517
547
|
config.api_key_prefix['Authorization'] = 'Bearer'
|
|
518
548
|
end
|
data/docs/AppUserApi.md
CHANGED
|
@@ -32,7 +32,10 @@ Delete specified app user.
|
|
|
32
32
|
require 'smooch-api'
|
|
33
33
|
# setup authorization
|
|
34
34
|
SmoochApi.configure do |config|
|
|
35
|
-
|
|
35
|
+
|
|
36
|
+
# OR
|
|
37
|
+
|
|
38
|
+
# Configure API key authorization (alternative): jwt
|
|
36
39
|
config.api_key['Authorization'] = 'YOUR JWT'
|
|
37
40
|
config.api_key_prefix['Authorization'] = 'Bearer'
|
|
38
41
|
end
|
|
@@ -86,7 +89,10 @@ Delete specified app user's profile.
|
|
|
86
89
|
require 'smooch-api'
|
|
87
90
|
# setup authorization
|
|
88
91
|
SmoochApi.configure do |config|
|
|
89
|
-
|
|
92
|
+
|
|
93
|
+
# OR
|
|
94
|
+
|
|
95
|
+
# Configure API key authorization (alternative): jwt
|
|
90
96
|
config.api_key['Authorization'] = 'YOUR JWT'
|
|
91
97
|
config.api_key_prefix['Authorization'] = 'Bearer'
|
|
92
98
|
end
|
|
@@ -141,7 +147,10 @@ Get the specified app user.
|
|
|
141
147
|
require 'smooch-api'
|
|
142
148
|
# setup authorization
|
|
143
149
|
SmoochApi.configure do |config|
|
|
144
|
-
|
|
150
|
+
|
|
151
|
+
# OR
|
|
152
|
+
|
|
153
|
+
# Configure API key authorization (alternative): jwt
|
|
145
154
|
config.api_key['Authorization'] = 'YOUR JWT'
|
|
146
155
|
config.api_key_prefix['Authorization'] = 'Bearer'
|
|
147
156
|
end
|
|
@@ -196,7 +205,10 @@ Get an auth code for facilitating a channel transfer
|
|
|
196
205
|
require 'smooch-api'
|
|
197
206
|
# setup authorization
|
|
198
207
|
SmoochApi.configure do |config|
|
|
199
|
-
|
|
208
|
+
|
|
209
|
+
# OR
|
|
210
|
+
|
|
211
|
+
# Configure API key authorization (alternative): jwt
|
|
200
212
|
config.api_key['Authorization'] = 'YOUR JWT'
|
|
201
213
|
config.api_key_prefix['Authorization'] = 'Bearer'
|
|
202
214
|
end
|
|
@@ -251,7 +263,10 @@ Get specified app user's business system IDs.
|
|
|
251
263
|
require 'smooch-api'
|
|
252
264
|
# setup authorization
|
|
253
265
|
SmoochApi.configure do |config|
|
|
254
|
-
|
|
266
|
+
|
|
267
|
+
# OR
|
|
268
|
+
|
|
269
|
+
# Configure API key authorization (alternative): jwt
|
|
255
270
|
config.api_key['Authorization'] = 'YOUR JWT'
|
|
256
271
|
config.api_key_prefix['Authorization'] = 'Bearer'
|
|
257
272
|
end
|
|
@@ -306,7 +321,10 @@ Get specified app user's channel entity IDs.
|
|
|
306
321
|
require 'smooch-api'
|
|
307
322
|
# setup authorization
|
|
308
323
|
SmoochApi.configure do |config|
|
|
309
|
-
|
|
324
|
+
|
|
325
|
+
# OR
|
|
326
|
+
|
|
327
|
+
# Configure API key authorization (alternative): jwt
|
|
310
328
|
config.api_key['Authorization'] = 'YOUR JWT'
|
|
311
329
|
config.api_key_prefix['Authorization'] = 'Bearer'
|
|
312
330
|
end
|
|
@@ -361,7 +379,10 @@ Fetch link requests for the specified app user.
|
|
|
361
379
|
require 'smooch-api'
|
|
362
380
|
# setup authorization
|
|
363
381
|
SmoochApi.configure do |config|
|
|
364
|
-
|
|
382
|
+
|
|
383
|
+
# OR
|
|
384
|
+
|
|
385
|
+
# Configure API key authorization (alternative): jwt
|
|
365
386
|
config.api_key['Authorization'] = 'YOUR JWT'
|
|
366
387
|
config.api_key_prefix['Authorization'] = 'Bearer'
|
|
367
388
|
end
|
|
@@ -419,7 +440,10 @@ Link specified app user to given channel.
|
|
|
419
440
|
require 'smooch-api'
|
|
420
441
|
# setup authorization
|
|
421
442
|
SmoochApi.configure do |config|
|
|
422
|
-
|
|
443
|
+
|
|
444
|
+
# OR
|
|
445
|
+
|
|
446
|
+
# Configure API key authorization (alternative): jwt
|
|
423
447
|
config.api_key['Authorization'] = 'YOUR JWT'
|
|
424
448
|
config.api_key_prefix['Authorization'] = 'Bearer'
|
|
425
449
|
end
|
|
@@ -477,7 +501,10 @@ Force the merge of two specific users, when the business has determined that the
|
|
|
477
501
|
require 'smooch-api'
|
|
478
502
|
# setup authorization
|
|
479
503
|
SmoochApi.configure do |config|
|
|
480
|
-
|
|
504
|
+
|
|
505
|
+
# OR
|
|
506
|
+
|
|
507
|
+
# Configure API key authorization (alternative): jwt
|
|
481
508
|
config.api_key['Authorization'] = 'YOUR JWT'
|
|
482
509
|
config.api_key_prefix['Authorization'] = 'Bearer'
|
|
483
510
|
end
|
|
@@ -531,7 +558,10 @@ Send an image message to the conversation.
|
|
|
531
558
|
require 'smooch-api'
|
|
532
559
|
# setup authorization
|
|
533
560
|
SmoochApi.configure do |config|
|
|
534
|
-
|
|
561
|
+
|
|
562
|
+
# OR
|
|
563
|
+
|
|
564
|
+
# Configure API key authorization (alternative): jwt
|
|
535
565
|
config.api_key['Authorization'] = 'YOUR JWT'
|
|
536
566
|
config.api_key_prefix['Authorization'] = 'Bearer'
|
|
537
567
|
end
|
|
@@ -592,7 +622,10 @@ Pre-create an app user.
|
|
|
592
622
|
require 'smooch-api'
|
|
593
623
|
# setup authorization
|
|
594
624
|
SmoochApi.configure do |config|
|
|
595
|
-
|
|
625
|
+
|
|
626
|
+
# OR
|
|
627
|
+
|
|
628
|
+
# Configure API key authorization (alternative): jwt
|
|
596
629
|
config.api_key['Authorization'] = 'YOUR JWT'
|
|
597
630
|
config.api_key_prefix['Authorization'] = 'Bearer'
|
|
598
631
|
end
|
|
@@ -647,7 +680,10 @@ Unlink specified app user from given channel.
|
|
|
647
680
|
require 'smooch-api'
|
|
648
681
|
# setup authorization
|
|
649
682
|
SmoochApi.configure do |config|
|
|
650
|
-
|
|
683
|
+
|
|
684
|
+
# OR
|
|
685
|
+
|
|
686
|
+
# Configure API key authorization (alternative): jwt
|
|
651
687
|
config.api_key['Authorization'] = 'YOUR JWT'
|
|
652
688
|
config.api_key_prefix['Authorization'] = 'Bearer'
|
|
653
689
|
end
|
|
@@ -704,7 +740,10 @@ Update the specified app user.
|
|
|
704
740
|
require 'smooch-api'
|
|
705
741
|
# setup authorization
|
|
706
742
|
SmoochApi.configure do |config|
|
|
707
|
-
|
|
743
|
+
|
|
744
|
+
# OR
|
|
745
|
+
|
|
746
|
+
# Configure API key authorization (alternative): jwt
|
|
708
747
|
config.api_key['Authorization'] = 'YOUR JWT'
|
|
709
748
|
config.api_key_prefix['Authorization'] = 'Bearer'
|
|
710
749
|
end
|
data/docs/AttachmentsApi.md
CHANGED
|
@@ -21,7 +21,10 @@ Remove an attachment uploaded to Smooch.
|
|
|
21
21
|
require 'smooch-api'
|
|
22
22
|
# setup authorization
|
|
23
23
|
SmoochApi.configure do |config|
|
|
24
|
-
|
|
24
|
+
|
|
25
|
+
# OR
|
|
26
|
+
|
|
27
|
+
# Configure API key authorization (alternative): jwt
|
|
25
28
|
config.api_key['Authorization'] = 'YOUR JWT'
|
|
26
29
|
config.api_key_prefix['Authorization'] = 'Bearer'
|
|
27
30
|
end
|
|
@@ -75,7 +78,10 @@ Upload an attachment to Smooch to use in future messages.
|
|
|
75
78
|
require 'smooch-api'
|
|
76
79
|
# setup authorization
|
|
77
80
|
SmoochApi.configure do |config|
|
|
78
|
-
|
|
81
|
+
|
|
82
|
+
# OR
|
|
83
|
+
|
|
84
|
+
# Configure API key authorization (alternative): jwt
|
|
79
85
|
config.api_key['Authorization'] = 'YOUR JWT'
|
|
80
86
|
config.api_key_prefix['Authorization'] = 'Bearer'
|
|
81
87
|
end
|
data/docs/ConversationApi.md
CHANGED
|
@@ -25,7 +25,10 @@ Notify Smooch when an app maker starts or stops typing a response.
|
|
|
25
25
|
require 'smooch-api'
|
|
26
26
|
# setup authorization
|
|
27
27
|
SmoochApi.configure do |config|
|
|
28
|
-
|
|
28
|
+
|
|
29
|
+
# OR
|
|
30
|
+
|
|
31
|
+
# Configure API key authorization (alternative): jwt
|
|
29
32
|
config.api_key['Authorization'] = 'YOUR JWT'
|
|
30
33
|
config.api_key_prefix['Authorization'] = 'Bearer'
|
|
31
34
|
end
|
|
@@ -83,7 +86,10 @@ Deletes a single message.
|
|
|
83
86
|
require 'smooch-api'
|
|
84
87
|
# setup authorization
|
|
85
88
|
SmoochApi.configure do |config|
|
|
86
|
-
|
|
89
|
+
|
|
90
|
+
# OR
|
|
91
|
+
|
|
92
|
+
# Configure API key authorization (alternative): jwt
|
|
87
93
|
config.api_key['Authorization'] = 'YOUR JWT'
|
|
88
94
|
config.api_key_prefix['Authorization'] = 'Bearer'
|
|
89
95
|
end
|
|
@@ -140,7 +146,10 @@ Clears the message history for a user, permanently deleting all messages, but le
|
|
|
140
146
|
require 'smooch-api'
|
|
141
147
|
# setup authorization
|
|
142
148
|
SmoochApi.configure do |config|
|
|
143
|
-
|
|
149
|
+
|
|
150
|
+
# OR
|
|
151
|
+
|
|
152
|
+
# Configure API key authorization (alternative): jwt
|
|
144
153
|
config.api_key['Authorization'] = 'YOUR JWT'
|
|
145
154
|
config.api_key_prefix['Authorization'] = 'Bearer'
|
|
146
155
|
end
|
|
@@ -194,7 +203,10 @@ Get the specified app user's messages.
|
|
|
194
203
|
require 'smooch-api'
|
|
195
204
|
# setup authorization
|
|
196
205
|
SmoochApi.configure do |config|
|
|
197
|
-
|
|
206
|
+
|
|
207
|
+
# OR
|
|
208
|
+
|
|
209
|
+
# Configure API key authorization (alternative): jwt
|
|
198
210
|
config.api_key['Authorization'] = 'YOUR JWT'
|
|
199
211
|
config.api_key_prefix['Authorization'] = 'Bearer'
|
|
200
212
|
end
|
|
@@ -255,7 +267,10 @@ Post a message to or from the app user.
|
|
|
255
267
|
require 'smooch-api'
|
|
256
268
|
# setup authorization
|
|
257
269
|
SmoochApi.configure do |config|
|
|
258
|
-
|
|
270
|
+
|
|
271
|
+
# OR
|
|
272
|
+
|
|
273
|
+
# Configure API key authorization (alternative): jwt
|
|
259
274
|
config.api_key['Authorization'] = 'YOUR JWT'
|
|
260
275
|
config.api_key_prefix['Authorization'] = 'Bearer'
|
|
261
276
|
end
|
|
@@ -266,7 +281,7 @@ appId = "appId_example" # String | Identifies the app.
|
|
|
266
281
|
|
|
267
282
|
userId = "userId_example" # String | Identifies the user. Can be either the smoochId or the userId.
|
|
268
283
|
|
|
269
|
-
messagePostBody = SmoochApi::MessagePost.new # MessagePost | Body for a postMessage request. Additional arguments are necessary based on message type ([text](https://docs.smooch.io/rest
|
|
284
|
+
messagePostBody = SmoochApi::MessagePost.new # MessagePost | Body for a postMessage request. Additional arguments are necessary based on message type ([text](https://docs.smooch.io/rest/#text), [image](https://docs.smooch.io/rest/#image), [carousel](https://docs.smooch.io/rest/#carousel), [list](https://docs.smooch.io/rest/#list), [form](https://docs.smooch.io/rest/#form))
|
|
270
285
|
|
|
271
286
|
|
|
272
287
|
begin
|
|
@@ -283,7 +298,7 @@ Name | Type | Description | Notes
|
|
|
283
298
|
------------- | ------------- | ------------- | -------------
|
|
284
299
|
**appId** | **String**| Identifies the app. |
|
|
285
300
|
**userId** | **String**| Identifies the user. Can be either the smoochId or the userId. |
|
|
286
|
-
**messagePostBody** | [**MessagePost**](MessagePost.md)| Body for a postMessage request. Additional arguments are necessary based on message type ([text](https://docs.smooch.io/rest
|
|
301
|
+
**messagePostBody** | [**MessagePost**](MessagePost.md)| Body for a postMessage request. Additional arguments are necessary based on message type ([text](https://docs.smooch.io/rest/#text), [image](https://docs.smooch.io/rest/#image), [carousel](https://docs.smooch.io/rest/#carousel), [list](https://docs.smooch.io/rest/#list), [form](https://docs.smooch.io/rest/#form)) |
|
|
287
302
|
|
|
288
303
|
### Return type
|
|
289
304
|
|
|
@@ -313,7 +328,10 @@ Reset the unread count of the conversation to 0.
|
|
|
313
328
|
require 'smooch-api'
|
|
314
329
|
# setup authorization
|
|
315
330
|
SmoochApi.configure do |config|
|
|
316
|
-
|
|
331
|
+
|
|
332
|
+
# OR
|
|
333
|
+
|
|
334
|
+
# Configure API key authorization (alternative): jwt
|
|
317
335
|
config.api_key['Authorization'] = 'YOUR JWT'
|
|
318
336
|
config.api_key_prefix['Authorization'] = 'Bearer'
|
|
319
337
|
end
|