smooch-api 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +7 -0
- data/README.md +181 -0
- data/Rakefile +8 -0
- data/docs/Action.md +16 -0
- data/docs/App.md +10 -0
- data/docs/AppApi.md +609 -0
- data/docs/AppCreate.md +8 -0
- data/docs/AppResponse.md +8 -0
- data/docs/AppUser.md +18 -0
- data/docs/AppUserApi.md +561 -0
- data/docs/AppUserLink.md +9 -0
- data/docs/AppUserPreCreate.md +14 -0
- data/docs/AppUserResponse.md +8 -0
- data/docs/AppUserUpdate.md +12 -0
- data/docs/Client.md +14 -0
- data/docs/ClientInfo.md +15 -0
- data/docs/Conversation.md +9 -0
- data/docs/ConversationApi.md +282 -0
- data/docs/Destination.md +9 -0
- data/docs/DeviceInit.md +12 -0
- data/docs/DeviceResponse.md +8 -0
- data/docs/DeviceUpdate.md +10 -0
- data/docs/DisplaySettings.md +8 -0
- data/docs/Event.md +8 -0
- data/docs/GetMessagesResponse.md +10 -0
- data/docs/Init.md +9 -0
- data/docs/InitApi.md +61 -0
- data/docs/InitResponse.md +9 -0
- data/docs/Integration.md +24 -0
- data/docs/IntegrationApi.md +121 -0
- data/docs/IntegrationCreate.md +23 -0
- data/docs/IntegrationResponse.md +8 -0
- data/docs/JwtResponse.md +8 -0
- data/docs/ListAppsResponse.md +10 -0
- data/docs/ListIntegrationsResponse.md +8 -0
- data/docs/ListSecretKeysResponse.md +8 -0
- data/docs/ListWebhooksResponse.md +8 -0
- data/docs/Menu.md +9 -0
- data/docs/MenuApi.md +155 -0
- data/docs/MenuItem.md +11 -0
- data/docs/MenuResponse.md +8 -0
- data/docs/Message.md +23 -0
- data/docs/MessageItem.md +13 -0
- data/docs/MessagePost.md +20 -0
- data/docs/MessageResponse.md +9 -0
- data/docs/PostMessagesResponse.md +9 -0
- data/docs/SecretKey.md +10 -0
- data/docs/SecretKeyCreate.md +8 -0
- data/docs/SecretKeyResponse.md +8 -0
- data/docs/TrackEventResponse.md +8 -0
- data/docs/TypingActivityTrigger.md +11 -0
- data/docs/Webhook.md +11 -0
- data/docs/WebhookApi.md +287 -0
- data/docs/WebhookCreate.md +9 -0
- data/docs/WebhookResponse.md +8 -0
- data/docs/WebhookUpdate.md +9 -0
- data/git_push.sh +55 -0
- data/lib/smooch-api.rb +91 -0
- data/lib/smooch-api/api/app_api.rb +628 -0
- data/lib/smooch-api/api/app_user_api.rb +585 -0
- data/lib/smooch-api/api/conversation_api.rb +298 -0
- data/lib/smooch-api/api/init_api.rb +75 -0
- data/lib/smooch-api/api/integration_api.rb +135 -0
- data/lib/smooch-api/api/menu_api.rb +173 -0
- data/lib/smooch-api/api/webhook_api.rb +306 -0
- data/lib/smooch-api/api_client.rb +376 -0
- data/lib/smooch-api/api_error.rb +37 -0
- data/lib/smooch-api/configuration.rb +202 -0
- data/lib/smooch-api/models/action.rb +311 -0
- data/lib/smooch-api/models/app.rb +223 -0
- data/lib/smooch-api/models/app_create.rb +193 -0
- data/lib/smooch-api/models/app_response.rb +188 -0
- data/lib/smooch-api/models/app_user.rb +307 -0
- data/lib/smooch-api/models/app_user_link.rb +236 -0
- data/lib/smooch-api/models/app_user_pre_create.rb +253 -0
- data/lib/smooch-api/models/app_user_response.rb +193 -0
- data/lib/smooch-api/models/app_user_update.rb +228 -0
- data/lib/smooch-api/models/client.rb +290 -0
- data/lib/smooch-api/models/client_info.rb +258 -0
- data/lib/smooch-api/models/conversation.rb +208 -0
- data/lib/smooch-api/models/destination.rb +208 -0
- data/lib/smooch-api/models/device_init.rb +270 -0
- data/lib/smooch-api/models/device_response.rb +188 -0
- data/lib/smooch-api/models/device_update.rb +207 -0
- data/lib/smooch-api/models/display_settings.rb +188 -0
- data/lib/smooch-api/models/event.rb +193 -0
- data/lib/smooch-api/models/get_messages_response.rb +210 -0
- data/lib/smooch-api/models/init.rb +202 -0
- data/lib/smooch-api/models/init_response.rb +208 -0
- data/lib/smooch-api/models/integration.rb +358 -0
- data/lib/smooch-api/models/integration_create.rb +343 -0
- data/lib/smooch-api/models/integration_response.rb +188 -0
- data/lib/smooch-api/models/jwt_response.rb +188 -0
- data/lib/smooch-api/models/list_apps_response.rb +210 -0
- data/lib/smooch-api/models/list_integrations_response.rb +190 -0
- data/lib/smooch-api/models/list_secret_keys_response.rb +190 -0
- data/lib/smooch-api/models/list_webhooks_response.rb +195 -0
- data/lib/smooch-api/models/menu.rb +205 -0
- data/lib/smooch-api/models/menu_item.rb +228 -0
- data/lib/smooch-api/models/menu_response.rb +193 -0
- data/lib/smooch-api/models/message.rb +415 -0
- data/lib/smooch-api/models/message_item.rb +250 -0
- data/lib/smooch-api/models/message_post.rb +355 -0
- data/lib/smooch-api/models/message_response.rb +208 -0
- data/lib/smooch-api/models/post_messages_response.rb +200 -0
- data/lib/smooch-api/models/secret_key.rb +223 -0
- data/lib/smooch-api/models/secret_key_create.rb +193 -0
- data/lib/smooch-api/models/secret_key_response.rb +188 -0
- data/lib/smooch-api/models/track_event_response.rb +188 -0
- data/lib/smooch-api/models/typing_activity_trigger.rb +228 -0
- data/lib/smooch-api/models/webhook.rb +261 -0
- data/lib/smooch-api/models/webhook_create.rb +226 -0
- data/lib/smooch-api/models/webhook_response.rb +193 -0
- data/lib/smooch-api/models/webhook_update.rb +221 -0
- data/lib/smooch-api/version.rb +14 -0
- data/smooch-api.gemspec +44 -0
- data/spec/api_client_spec.rb +225 -0
- data/spec/configuration_spec.rb +41 -0
- data/spec/spec_helper.rb +110 -0
- metadata +349 -0
data/docs/MenuItem.md
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
# SmoochApi::MenuItem
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**text** | **String** | The button text of the menu item. |
|
7
|
+
**uri** | **String** | A valid address, like http://smooch.io. Required for a *link* type item. | [optional]
|
8
|
+
**type** | **String** | Can either be [link](https://docs.smooch.io/javascript/#links) or [postback](https://docs.smooch.io/javascript/#postbacks), which correspond to Smooch’s [link and postback actions]((https://docs.smooch.io/javascript/#action-buttons). |
|
9
|
+
**postback** | **String** | A payload for a postback. Required for a *postback* type item. | [optional]
|
10
|
+
|
11
|
+
|
data/docs/Message.md
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
# SmoochApi::Message
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**_id** | **String** | The message ID, generated automatically. |
|
7
|
+
**author_id** | **String** | The ID of the message's author. |
|
8
|
+
**role** | **String** | The role of the individual posting the message. Can be either *appUser* or *appMaker*. |
|
9
|
+
**type** | **String** | The message type. |
|
10
|
+
**name** | **String** | The display name of the message author. |
|
11
|
+
**text** | **String** | The message text. Required for text messages. |
|
12
|
+
**email** | **String** | The email address of the message author. | [optional]
|
13
|
+
**avatar_url** | **String** | The URL of the desired message avatar image. |
|
14
|
+
**received** | **Float** | The unix timestamp of the moment the message was received. |
|
15
|
+
**media_url** | **String** | The mediaUrl for the image. Required for image messages. | [optional]
|
16
|
+
**media_type** | **String** | The mediaType for the image. Required for image messages. | [optional]
|
17
|
+
**metadata** | **Object** | Flat JSON object containing any custom properties associated with the message. | [optional]
|
18
|
+
**items** | [**Array<MessageItem>**](MessageItem.md) | The items in the message list. Required for carousel and list messages. | [optional]
|
19
|
+
**actions** | [**Array<Action>**](Action.md) | The actions in the message. | [optional]
|
20
|
+
**payload** | **String** | The payload of a reply action, if applicable. | [optional]
|
21
|
+
**display_settings** | [**DisplaySettings**](DisplaySettings.md) | Settings to adjust the carousel layout. See [Display Settings](https://docs.smooch.io/rest/#display-settings). | [optional]
|
22
|
+
|
23
|
+
|
data/docs/MessageItem.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# SmoochApi::MessageItem
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**title** | **String** | The title of the message item. |
|
7
|
+
**description** | **String** | The text description, or subtitle. | [optional]
|
8
|
+
**media_url** | **String** | The image URL to be shown in the carousel/list item. | [optional]
|
9
|
+
**size** | **String** | The size of the image to be shown in the carousel/list item. Only top item of Facebook Messenger carousel supported. Choose from *compact* and *large*. | [optional]
|
10
|
+
**media_type** | **String** | If a *mediaUrl* was specified, the media type is defined here, for example *image/jpeg*. | [optional]
|
11
|
+
**actions** | [**Array<Action>**](Action.md) | Array of [action buttons](https://docs.smooch.io/rest/#action-buttons). At least 1 is required, a maximum of 3 are allowed. |
|
12
|
+
|
13
|
+
|
data/docs/MessagePost.md
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# SmoochApi::MessagePost
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**role** | **String** | The role of the individual posting the message. Can be either *appUser* or *appMaker*. |
|
7
|
+
**type** | **String** | The message type. |
|
8
|
+
**name** | **String** | The display name of the message author. | [optional]
|
9
|
+
**email** | **String** | The email address of the message author. | [optional]
|
10
|
+
**avatar_url** | **String** | The URL of the desired message avatar image. | [optional]
|
11
|
+
**metadata** | **Object** | Flat JSON object containing any custom properties associated with the message. | [optional]
|
12
|
+
**payload** | **String** | The payload of a reply action, if applicable. | [optional]
|
13
|
+
**text** | **String** | The message text. Required for text messages. | [optional]
|
14
|
+
**media_url** | **String** | The mediaUrl for the image. Required for image messages. | [optional]
|
15
|
+
**media_type** | **String** | The mediaType for the image. Required for image messages. | [optional]
|
16
|
+
**items** | [**Array<MessageItem>**](MessageItem.md) | The items in the message list. Required for carousel and list messages. | [optional]
|
17
|
+
**actions** | [**Array<Action>**](Action.md) | The actions in the message. | [optional]
|
18
|
+
**destination** | [**Destination**](Destination.md) | Specifies which channel to deliver a message to. See [list integrations](https://docs.smooch.io/rest/#list-integrations) to get integration ID and type. | [optional]
|
19
|
+
|
20
|
+
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# SmoochApi::MessageResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**message** | **Object** | The message. |
|
7
|
+
**conversation** | [**Conversation**](Conversation.md) | The conversation. |
|
8
|
+
|
9
|
+
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# SmoochApi::PostMessagesResponse
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**conversation** | [**Conversation**](Conversation.md) | The conversation. | [optional]
|
7
|
+
**messages** | [**Array<Message>**](Message.md) | The messages. | [optional]
|
8
|
+
|
9
|
+
|
data/docs/SecretKey.md
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
# SmoochApi::SecretKey
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**_id** | **String** | The secret key ID, generated automatically. |
|
7
|
+
**secret** | **String** | The secret itself. |
|
8
|
+
**name** | **String** | A friendly identifier for the secret key. |
|
9
|
+
|
10
|
+
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# SmoochApi::TypingActivityTrigger
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**role** | **String** | The role of the actor. Must be *appMaker*. |
|
7
|
+
**type** | **String** | The type of activity to trigger. Must be either *typing:start* or *typing:stop*. |
|
8
|
+
**name** | **String** | The name of the app maker that starts or stops typing a response. | [optional]
|
9
|
+
**avatar_url** | **String** | The avatar URL of the app maker that starts typing a response. | [optional]
|
10
|
+
|
11
|
+
|
data/docs/Webhook.md
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
# SmoochApi::Webhook
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**_id** | **String** | The webhook ID, generated automatically. |
|
7
|
+
**target** | **String** | URL to be called when the webhook is triggered. |
|
8
|
+
**triggers** | **Array<String>** | An array of triggers you wish to have the webhook listen to. If unspecified the default trigger is *message*. |
|
9
|
+
**secret** | **String** | Secret which will be transmitted with each webhook invocation and can be used to verify the authenticity of the caller. |
|
10
|
+
|
11
|
+
|
data/docs/WebhookApi.md
ADDED
@@ -0,0 +1,287 @@
|
|
1
|
+
# SmoochApi::WebhookApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.smooch.io/v1*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**create_webhook**](WebhookApi.md#create_webhook) | **POST** /apps/{appId}/webhooks |
|
8
|
+
[**delete_webhook**](WebhookApi.md#delete_webhook) | **DELETE** /apps/{appId}/webhooks/{webhookId} |
|
9
|
+
[**get_webhook**](WebhookApi.md#get_webhook) | **GET** /apps/{appId}/webhooks/{webhookId} |
|
10
|
+
[**list_webhooks**](WebhookApi.md#list_webhooks) | **GET** /apps/{appId}/webhooks |
|
11
|
+
[**update_webhook**](WebhookApi.md#update_webhook) | **PUT** /apps/{appId}/webhooks/{webhookId} |
|
12
|
+
|
13
|
+
|
14
|
+
# **create_webhook**
|
15
|
+
> WebhookResponse create_webhook(app_id, webhook_create_body)
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
Create a webhook for the specified app.
|
20
|
+
|
21
|
+
### Example
|
22
|
+
```ruby
|
23
|
+
# load the gem
|
24
|
+
require 'smooch-api'
|
25
|
+
# setup authorization
|
26
|
+
SmoochApi.configure do |config|
|
27
|
+
# Configure API key authorization: jwt
|
28
|
+
config.api_key['Authorization'] = 'YOUR JWT'
|
29
|
+
config.api_key_prefix['Authorization'] = 'Bearer'
|
30
|
+
end
|
31
|
+
|
32
|
+
api_instance = SmoochApi::WebhookApi.new
|
33
|
+
|
34
|
+
app_id = "app_id_example" # String | Identifies the app.
|
35
|
+
|
36
|
+
webhook_create_body = SmoochApi::WebhookCreate.new # WebhookCreate | Body for a createWebhook request.
|
37
|
+
|
38
|
+
|
39
|
+
begin
|
40
|
+
result = api_instance.create_webhook(app_id, webhook_create_body)
|
41
|
+
p result
|
42
|
+
rescue SmoochApi::ApiError => e
|
43
|
+
puts "Exception when calling WebhookApi->create_webhook: #{e}"
|
44
|
+
end
|
45
|
+
```
|
46
|
+
|
47
|
+
### Parameters
|
48
|
+
|
49
|
+
Name | Type | Description | Notes
|
50
|
+
------------- | ------------- | ------------- | -------------
|
51
|
+
**app_id** | **String**| Identifies the app. |
|
52
|
+
**webhook_create_body** | [**WebhookCreate**](WebhookCreate.md)| Body for a createWebhook request. |
|
53
|
+
|
54
|
+
### Return type
|
55
|
+
|
56
|
+
[**WebhookResponse**](WebhookResponse.md)
|
57
|
+
|
58
|
+
### Authorization
|
59
|
+
|
60
|
+
[jwt](../README.md#jwt)
|
61
|
+
|
62
|
+
### HTTP request headers
|
63
|
+
|
64
|
+
- **Content-Type**: application/json
|
65
|
+
- **Accept**: application/json
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
# **delete_webhook**
|
70
|
+
> delete_webhook(app_id, webhook_id)
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
Delete the specified webhook.
|
75
|
+
|
76
|
+
### Example
|
77
|
+
```ruby
|
78
|
+
# load the gem
|
79
|
+
require 'smooch-api'
|
80
|
+
# setup authorization
|
81
|
+
SmoochApi.configure do |config|
|
82
|
+
# Configure API key authorization: jwt
|
83
|
+
config.api_key['Authorization'] = 'YOUR JWT'
|
84
|
+
config.api_key_prefix['Authorization'] = 'Bearer'
|
85
|
+
end
|
86
|
+
|
87
|
+
api_instance = SmoochApi::WebhookApi.new
|
88
|
+
|
89
|
+
app_id = "app_id_example" # String | Identifies the app.
|
90
|
+
|
91
|
+
webhook_id = "webhook_id_example" # String | Identifies the webhook.
|
92
|
+
|
93
|
+
|
94
|
+
begin
|
95
|
+
api_instance.delete_webhook(app_id, webhook_id)
|
96
|
+
rescue SmoochApi::ApiError => e
|
97
|
+
puts "Exception when calling WebhookApi->delete_webhook: #{e}"
|
98
|
+
end
|
99
|
+
```
|
100
|
+
|
101
|
+
### Parameters
|
102
|
+
|
103
|
+
Name | Type | Description | Notes
|
104
|
+
------------- | ------------- | ------------- | -------------
|
105
|
+
**app_id** | **String**| Identifies the app. |
|
106
|
+
**webhook_id** | **String**| Identifies the webhook. |
|
107
|
+
|
108
|
+
### Return type
|
109
|
+
|
110
|
+
nil (empty response body)
|
111
|
+
|
112
|
+
### Authorization
|
113
|
+
|
114
|
+
[jwt](../README.md#jwt)
|
115
|
+
|
116
|
+
### HTTP request headers
|
117
|
+
|
118
|
+
- **Content-Type**: application/json
|
119
|
+
- **Accept**: application/json
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
# **get_webhook**
|
124
|
+
> WebhookResponse get_webhook(app_id, webhook_id)
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
Get the specified webhook.
|
129
|
+
|
130
|
+
### Example
|
131
|
+
```ruby
|
132
|
+
# load the gem
|
133
|
+
require 'smooch-api'
|
134
|
+
# setup authorization
|
135
|
+
SmoochApi.configure do |config|
|
136
|
+
# Configure API key authorization: jwt
|
137
|
+
config.api_key['Authorization'] = 'YOUR JWT'
|
138
|
+
config.api_key_prefix['Authorization'] = 'Bearer'
|
139
|
+
end
|
140
|
+
|
141
|
+
api_instance = SmoochApi::WebhookApi.new
|
142
|
+
|
143
|
+
app_id = "app_id_example" # String | Identifies the app.
|
144
|
+
|
145
|
+
webhook_id = "webhook_id_example" # String | Identifies the webhook.
|
146
|
+
|
147
|
+
|
148
|
+
begin
|
149
|
+
result = api_instance.get_webhook(app_id, webhook_id)
|
150
|
+
p result
|
151
|
+
rescue SmoochApi::ApiError => e
|
152
|
+
puts "Exception when calling WebhookApi->get_webhook: #{e}"
|
153
|
+
end
|
154
|
+
```
|
155
|
+
|
156
|
+
### Parameters
|
157
|
+
|
158
|
+
Name | Type | Description | Notes
|
159
|
+
------------- | ------------- | ------------- | -------------
|
160
|
+
**app_id** | **String**| Identifies the app. |
|
161
|
+
**webhook_id** | **String**| Identifies the webhook. |
|
162
|
+
|
163
|
+
### Return type
|
164
|
+
|
165
|
+
[**WebhookResponse**](WebhookResponse.md)
|
166
|
+
|
167
|
+
### Authorization
|
168
|
+
|
169
|
+
[jwt](../README.md#jwt)
|
170
|
+
|
171
|
+
### HTTP request headers
|
172
|
+
|
173
|
+
- **Content-Type**: application/json
|
174
|
+
- **Accept**: application/json
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
# **list_webhooks**
|
179
|
+
> ListWebhooksResponse list_webhooks(app_id, )
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
List webhooks for the specified app.
|
184
|
+
|
185
|
+
### Example
|
186
|
+
```ruby
|
187
|
+
# load the gem
|
188
|
+
require 'smooch-api'
|
189
|
+
# setup authorization
|
190
|
+
SmoochApi.configure do |config|
|
191
|
+
# Configure API key authorization: jwt
|
192
|
+
config.api_key['Authorization'] = 'YOUR JWT'
|
193
|
+
config.api_key_prefix['Authorization'] = 'Bearer'
|
194
|
+
end
|
195
|
+
|
196
|
+
api_instance = SmoochApi::WebhookApi.new
|
197
|
+
|
198
|
+
app_id = "app_id_example" # String | Identifies the app.
|
199
|
+
|
200
|
+
|
201
|
+
begin
|
202
|
+
result = api_instance.list_webhooks(app_id, )
|
203
|
+
p result
|
204
|
+
rescue SmoochApi::ApiError => e
|
205
|
+
puts "Exception when calling WebhookApi->list_webhooks: #{e}"
|
206
|
+
end
|
207
|
+
```
|
208
|
+
|
209
|
+
### Parameters
|
210
|
+
|
211
|
+
Name | Type | Description | Notes
|
212
|
+
------------- | ------------- | ------------- | -------------
|
213
|
+
**app_id** | **String**| Identifies the app. |
|
214
|
+
|
215
|
+
### Return type
|
216
|
+
|
217
|
+
[**ListWebhooksResponse**](ListWebhooksResponse.md)
|
218
|
+
|
219
|
+
### Authorization
|
220
|
+
|
221
|
+
[jwt](../README.md#jwt)
|
222
|
+
|
223
|
+
### HTTP request headers
|
224
|
+
|
225
|
+
- **Content-Type**: application/json
|
226
|
+
- **Accept**: application/json
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
# **update_webhook**
|
231
|
+
> WebhookResponse update_webhook(app_id, webhook_idwebhook_update_body)
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
Update the specified webhook.
|
236
|
+
|
237
|
+
### Example
|
238
|
+
```ruby
|
239
|
+
# load the gem
|
240
|
+
require 'smooch-api'
|
241
|
+
# setup authorization
|
242
|
+
SmoochApi.configure do |config|
|
243
|
+
# Configure API key authorization: jwt
|
244
|
+
config.api_key['Authorization'] = 'YOUR JWT'
|
245
|
+
config.api_key_prefix['Authorization'] = 'Bearer'
|
246
|
+
end
|
247
|
+
|
248
|
+
api_instance = SmoochApi::WebhookApi.new
|
249
|
+
|
250
|
+
app_id = "app_id_example" # String | Identifies the app.
|
251
|
+
|
252
|
+
webhook_id = "webhook_id_example" # String | Identifies the webhook.
|
253
|
+
|
254
|
+
webhook_update_body = SmoochApi::WebhookUpdate.new # WebhookUpdate | Body for an updateWebhook request.
|
255
|
+
|
256
|
+
|
257
|
+
begin
|
258
|
+
result = api_instance.update_webhook(app_id, webhook_idwebhook_update_body)
|
259
|
+
p result
|
260
|
+
rescue SmoochApi::ApiError => e
|
261
|
+
puts "Exception when calling WebhookApi->update_webhook: #{e}"
|
262
|
+
end
|
263
|
+
```
|
264
|
+
|
265
|
+
### Parameters
|
266
|
+
|
267
|
+
Name | Type | Description | Notes
|
268
|
+
------------- | ------------- | ------------- | -------------
|
269
|
+
**app_id** | **String**| Identifies the app. |
|
270
|
+
**webhook_id** | **String**| Identifies the webhook. |
|
271
|
+
**webhook_update_body** | [**WebhookUpdate**](WebhookUpdate.md)| Body for an updateWebhook request. |
|
272
|
+
|
273
|
+
### Return type
|
274
|
+
|
275
|
+
[**WebhookResponse**](WebhookResponse.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
|
+
|