smooch-api 4.1.0 → 4.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -3
- data/docs/Action.md +2 -2
- data/docs/App.md +2 -2
- data/docs/AppApi.md +48 -48
- data/docs/AppSettings.md +2 -2
- data/docs/AppUser.md +6 -6
- data/docs/AppUserApi.md +78 -78
- data/docs/AppUserBusinessSystemsResponse.md +1 -1
- data/docs/AppUserLink.md +2 -2
- data/docs/AppUserPreCreate.md +3 -3
- data/docs/AppUserResponse.md +1 -1
- data/docs/AppUserUpdate.md +2 -2
- data/docs/AttachmentRemove.md +1 -1
- data/docs/AttachmentResponse.md +2 -2
- data/docs/AttachmentsApi.md +16 -16
- data/docs/AuthCodeResponse.md +1 -1
- data/docs/BusinessSystemItem.md +4 -4
- data/docs/ChannelEntityItem.md +3 -3
- data/docs/Client.md +4 -4
- data/docs/ClientInfo.md +8 -8
- data/docs/Conversation.md +2 -2
- data/docs/ConversationApi.md +42 -42
- data/docs/Destination.md +2 -2
- data/docs/DisplaySettings.md +1 -1
- data/docs/GetMessagesResponse.md +1 -1
- data/docs/Integration.md +44 -44
- data/docs/IntegrationApi.md +66 -66
- data/docs/IntegrationCreate.md +36 -36
- data/docs/IntegrationProfileUpdate.md +1 -1
- data/docs/IntegrationUpdate.md +16 -16
- data/docs/LinkRequestResponse.md +1 -1
- data/docs/LinkRequestResponseLinkRequests.md +1 -1
- data/docs/ListAppsResponse.md +1 -1
- data/docs/ListServiceAccountsResponse.md +2 -2
- data/docs/ListTemplatesResponse.md +1 -1
- data/docs/MenuApi.md +14 -14
- data/docs/Message.md +6 -6
- data/docs/MessageItem.md +2 -2
- data/docs/MessageOverride.md +8 -0
- data/docs/MessageOverrideWhatsapp.md +8 -0
- data/docs/MessagePost.md +4 -3
- data/docs/MessageResponse.md +1 -1
- data/docs/SecretKey.md +1 -1
- data/docs/ServiceAccount.md +1 -1
- data/docs/ServiceAccountApi.md +46 -46
- data/docs/ServiceAccountResponse.md +1 -1
- data/docs/Template.md +1 -1
- data/docs/TemplateApi.md +30 -30
- data/docs/TypingActivityTrigger.md +1 -1
- data/docs/Webhook.md +1 -1
- data/docs/WebhookApi.md +30 -30
- data/lib/smooch-api.rb +3 -1
- data/lib/smooch-api/api/app_api.rb +112 -112
- data/lib/smooch-api/api/app_user_api.rb +190 -190
- data/lib/smooch-api/api/attachments_api.rb +34 -34
- data/lib/smooch-api/api/conversation_api.rb +102 -102
- data/lib/smooch-api/api/integration_api.rb +161 -161
- data/lib/smooch-api/api/menu_api.rb +34 -34
- data/lib/smooch-api/api/service_account_api.rb +109 -109
- data/lib/smooch-api/api/template_api.rb +73 -73
- data/lib/smooch-api/api/webhook_api.rb +73 -73
- 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 +12 -12
- data/lib/smooch-api/models/app.rb +18 -18
- 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 +12 -12
- data/lib/smooch-api/models/app_update.rb +1 -1
- data/lib/smooch-api/models/app_user.rb +38 -38
- data/lib/smooch-api/models/app_user_business_systems_response.rb +10 -10
- data/lib/smooch-api/models/app_user_channels_response.rb +1 -1
- data/lib/smooch-api/models/app_user_link.rb +12 -12
- data/lib/smooch-api/models/app_user_pre_create.rb +20 -20
- data/lib/smooch-api/models/app_user_response.rb +10 -10
- data/lib/smooch-api/models/app_user_update.rb +12 -12
- data/lib/smooch-api/models/attachment_remove.rb +10 -10
- data/lib/smooch-api/models/attachment_response.rb +18 -18
- data/lib/smooch-api/models/auth_code_response.rb +10 -10
- data/lib/smooch-api/models/business_system_item.rb +22 -22
- data/lib/smooch-api/models/channel_entity_item.rb +17 -17
- data/lib/smooch-api/models/client.rb +22 -22
- data/lib/smooch-api/models/client_info.rb +42 -42
- data/lib/smooch-api/models/confirmation.rb +1 -1
- data/lib/smooch-api/models/conversation.rb +18 -18
- data/lib/smooch-api/models/destination.rb +18 -18
- data/lib/smooch-api/models/display_settings.rb +7 -7
- data/lib/smooch-api/models/get_messages_response.rb +7 -7
- data/lib/smooch-api/models/integration.rb +225 -225
- data/lib/smooch-api/models/integration_create.rb +182 -182
- data/lib/smooch-api/models/integration_profile_update.rb +7 -7
- data/lib/smooch-api/models/integration_response.rb +1 -1
- data/lib/smooch-api/models/integration_update.rb +82 -82
- data/lib/smooch-api/models/jwt_response.rb +1 -1
- data/lib/smooch-api/models/link_request_response.rb +7 -7
- data/lib/smooch-api/models/link_request_response_link_requests.rb +10 -10
- data/lib/smooch-api/models/list_apps_response.rb +7 -7
- 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 +12 -12
- data/lib/smooch-api/models/list_templates_response.rb +7 -7
- 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 +41 -41
- data/lib/smooch-api/models/message_item.rb +12 -12
- data/lib/smooch-api/models/message_override.rb +188 -0
- data/lib/smooch-api/models/message_override_whatsapp.rb +189 -0
- data/lib/smooch-api/models/message_post.rb +30 -20
- data/lib/smooch-api/models/message_response.rb +7 -7
- data/lib/smooch-api/models/secret_key.rb +10 -10
- 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/service_account.rb +10 -10
- data/lib/smooch-api/models/service_account_create.rb +1 -1
- data/lib/smooch-api/models/service_account_response.rb +7 -7
- 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 +10 -10
- 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/typing_activity_trigger.rb +7 -7
- data/lib/smooch-api/models/webhook.rb +10 -10
- 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 +6 -2
@@ -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: 4.
|
6
|
+
OpenAPI spec version: 4.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,35 +22,35 @@ module SmoochApi
|
|
22
22
|
|
23
23
|
#
|
24
24
|
# Create a template for the specified app.
|
25
|
-
# @param
|
26
|
-
# @param
|
25
|
+
# @param appId Identifies the app.
|
26
|
+
# @param templateCreateBody Body for a createTemplate request.
|
27
27
|
# @param [Hash] opts the optional parameters
|
28
28
|
# @return [TemplateResponse]
|
29
|
-
def create_template(
|
30
|
-
data, _status_code, _headers = create_template_with_http_info(
|
29
|
+
def create_template(appId, templateCreateBody, opts = {})
|
30
|
+
data, _status_code, _headers = create_template_with_http_info(appId, templateCreateBody, opts)
|
31
31
|
return data
|
32
32
|
end
|
33
33
|
|
34
34
|
#
|
35
35
|
# Create a template for the specified app.
|
36
|
-
# @param
|
37
|
-
# @param
|
36
|
+
# @param appId Identifies the app.
|
37
|
+
# @param templateCreateBody Body for a createTemplate request.
|
38
38
|
# @param [Hash] opts the optional parameters
|
39
39
|
# @return [Array<(TemplateResponse, Fixnum, Hash)>] TemplateResponse data, response status code and response headers
|
40
|
-
def create_template_with_http_info(
|
40
|
+
def create_template_with_http_info(appId, templateCreateBody, opts = {})
|
41
41
|
if @api_client.config.debugging
|
42
42
|
@api_client.config.logger.debug "Calling API: TemplateApi.create_template ..."
|
43
43
|
end
|
44
|
-
# verify the required parameter '
|
45
|
-
if @api_client.config.client_side_validation &&
|
46
|
-
fail ArgumentError, "Missing the required parameter '
|
44
|
+
# verify the required parameter 'appId' is set
|
45
|
+
if @api_client.config.client_side_validation && appId.nil?
|
46
|
+
fail ArgumentError, "Missing the required parameter 'appId' when calling TemplateApi.create_template"
|
47
47
|
end
|
48
|
-
# verify the required parameter '
|
49
|
-
if @api_client.config.client_side_validation &&
|
50
|
-
fail ArgumentError, "Missing the required parameter '
|
48
|
+
# verify the required parameter 'templateCreateBody' is set
|
49
|
+
if @api_client.config.client_side_validation && templateCreateBody.nil?
|
50
|
+
fail ArgumentError, "Missing the required parameter 'templateCreateBody' when calling TemplateApi.create_template"
|
51
51
|
end
|
52
52
|
# resource path
|
53
|
-
local_var_path = "/v1.1/apps/{appId}/templates".sub('{' + 'appId' + '}',
|
53
|
+
local_var_path = "/v1.1/apps/{appId}/templates".sub('{' + 'appId' + '}', appId.to_s)
|
54
54
|
|
55
55
|
# query parameters
|
56
56
|
query_params = {}
|
@@ -66,7 +66,7 @@ module SmoochApi
|
|
66
66
|
form_params = {}
|
67
67
|
|
68
68
|
# http body (model)
|
69
|
-
post_body = @api_client.object_to_http_body(
|
69
|
+
post_body = @api_client.object_to_http_body(templateCreateBody)
|
70
70
|
auth_names = ['jwt']
|
71
71
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
72
72
|
:header_params => header_params,
|
@@ -83,35 +83,35 @@ module SmoochApi
|
|
83
83
|
|
84
84
|
#
|
85
85
|
# Delete the specified template.
|
86
|
-
# @param
|
87
|
-
# @param
|
86
|
+
# @param appId Identifies the app.
|
87
|
+
# @param templateId Identifies the template.
|
88
88
|
# @param [Hash] opts the optional parameters
|
89
89
|
# @return [nil]
|
90
|
-
def delete_template(
|
91
|
-
delete_template_with_http_info(
|
90
|
+
def delete_template(appId, templateId, opts = {})
|
91
|
+
delete_template_with_http_info(appId, templateId, opts)
|
92
92
|
return nil
|
93
93
|
end
|
94
94
|
|
95
95
|
#
|
96
96
|
# Delete the specified template.
|
97
|
-
# @param
|
98
|
-
# @param
|
97
|
+
# @param appId Identifies the app.
|
98
|
+
# @param templateId Identifies the template.
|
99
99
|
# @param [Hash] opts the optional parameters
|
100
100
|
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
101
|
-
def delete_template_with_http_info(
|
101
|
+
def delete_template_with_http_info(appId, templateId, opts = {})
|
102
102
|
if @api_client.config.debugging
|
103
103
|
@api_client.config.logger.debug "Calling API: TemplateApi.delete_template ..."
|
104
104
|
end
|
105
|
-
# verify the required parameter '
|
106
|
-
if @api_client.config.client_side_validation &&
|
107
|
-
fail ArgumentError, "Missing the required parameter '
|
105
|
+
# verify the required parameter 'appId' is set
|
106
|
+
if @api_client.config.client_side_validation && appId.nil?
|
107
|
+
fail ArgumentError, "Missing the required parameter 'appId' when calling TemplateApi.delete_template"
|
108
108
|
end
|
109
|
-
# verify the required parameter '
|
110
|
-
if @api_client.config.client_side_validation &&
|
111
|
-
fail ArgumentError, "Missing the required parameter '
|
109
|
+
# verify the required parameter 'templateId' is set
|
110
|
+
if @api_client.config.client_side_validation && templateId.nil?
|
111
|
+
fail ArgumentError, "Missing the required parameter 'templateId' when calling TemplateApi.delete_template"
|
112
112
|
end
|
113
113
|
# resource path
|
114
|
-
local_var_path = "/v1.1/apps/{appId}/templates/{templateId}".sub('{' + 'appId' + '}',
|
114
|
+
local_var_path = "/v1.1/apps/{appId}/templates/{templateId}".sub('{' + 'appId' + '}', appId.to_s).sub('{' + 'templateId' + '}', templateId.to_s)
|
115
115
|
|
116
116
|
# query parameters
|
117
117
|
query_params = {}
|
@@ -143,35 +143,35 @@ module SmoochApi
|
|
143
143
|
|
144
144
|
#
|
145
145
|
# Get the specified template.
|
146
|
-
# @param
|
147
|
-
# @param
|
146
|
+
# @param appId Identifies the app.
|
147
|
+
# @param templateId Identifies the template.
|
148
148
|
# @param [Hash] opts the optional parameters
|
149
149
|
# @return [TemplateResponse]
|
150
|
-
def get_template(
|
151
|
-
data, _status_code, _headers = get_template_with_http_info(
|
150
|
+
def get_template(appId, templateId, opts = {})
|
151
|
+
data, _status_code, _headers = get_template_with_http_info(appId, templateId, opts)
|
152
152
|
return data
|
153
153
|
end
|
154
154
|
|
155
155
|
#
|
156
156
|
# Get the specified template.
|
157
|
-
# @param
|
158
|
-
# @param
|
157
|
+
# @param appId Identifies the app.
|
158
|
+
# @param templateId Identifies the template.
|
159
159
|
# @param [Hash] opts the optional parameters
|
160
160
|
# @return [Array<(TemplateResponse, Fixnum, Hash)>] TemplateResponse data, response status code and response headers
|
161
|
-
def get_template_with_http_info(
|
161
|
+
def get_template_with_http_info(appId, templateId, opts = {})
|
162
162
|
if @api_client.config.debugging
|
163
163
|
@api_client.config.logger.debug "Calling API: TemplateApi.get_template ..."
|
164
164
|
end
|
165
|
-
# verify the required parameter '
|
166
|
-
if @api_client.config.client_side_validation &&
|
167
|
-
fail ArgumentError, "Missing the required parameter '
|
165
|
+
# verify the required parameter 'appId' is set
|
166
|
+
if @api_client.config.client_side_validation && appId.nil?
|
167
|
+
fail ArgumentError, "Missing the required parameter 'appId' when calling TemplateApi.get_template"
|
168
168
|
end
|
169
|
-
# verify the required parameter '
|
170
|
-
if @api_client.config.client_side_validation &&
|
171
|
-
fail ArgumentError, "Missing the required parameter '
|
169
|
+
# verify the required parameter 'templateId' is set
|
170
|
+
if @api_client.config.client_side_validation && templateId.nil?
|
171
|
+
fail ArgumentError, "Missing the required parameter 'templateId' when calling TemplateApi.get_template"
|
172
172
|
end
|
173
173
|
# resource path
|
174
|
-
local_var_path = "/v1.1/apps/{appId}/templates/{templateId}".sub('{' + 'appId' + '}',
|
174
|
+
local_var_path = "/v1.1/apps/{appId}/templates/{templateId}".sub('{' + 'appId' + '}', appId.to_s).sub('{' + 'templateId' + '}', templateId.to_s)
|
175
175
|
|
176
176
|
# query parameters
|
177
177
|
query_params = {}
|
@@ -204,33 +204,33 @@ module SmoochApi
|
|
204
204
|
|
205
205
|
#
|
206
206
|
# List templates for the specified app.
|
207
|
-
# @param
|
207
|
+
# @param appId Identifies the app.
|
208
208
|
# @param [Hash] opts the optional parameters
|
209
209
|
# @option opts [Integer] :limit The number of records to return. (default to 25)
|
210
210
|
# @option opts [Integer] :offset The number of initial records to skip before picking records to return. (default to 0)
|
211
211
|
# @return [ListTemplatesResponse]
|
212
|
-
def list_templates(
|
213
|
-
data, _status_code, _headers = list_templates_with_http_info(
|
212
|
+
def list_templates(appId, opts = {})
|
213
|
+
data, _status_code, _headers = list_templates_with_http_info(appId, opts)
|
214
214
|
return data
|
215
215
|
end
|
216
216
|
|
217
217
|
#
|
218
218
|
# List templates for the specified app.
|
219
|
-
# @param
|
219
|
+
# @param appId Identifies the app.
|
220
220
|
# @param [Hash] opts the optional parameters
|
221
221
|
# @option opts [Integer] :limit The number of records to return.
|
222
222
|
# @option opts [Integer] :offset The number of initial records to skip before picking records to return.
|
223
223
|
# @return [Array<(ListTemplatesResponse, Fixnum, Hash)>] ListTemplatesResponse data, response status code and response headers
|
224
|
-
def list_templates_with_http_info(
|
224
|
+
def list_templates_with_http_info(appId, opts = {})
|
225
225
|
if @api_client.config.debugging
|
226
226
|
@api_client.config.logger.debug "Calling API: TemplateApi.list_templates ..."
|
227
227
|
end
|
228
|
-
# verify the required parameter '
|
229
|
-
if @api_client.config.client_side_validation &&
|
230
|
-
fail ArgumentError, "Missing the required parameter '
|
228
|
+
# verify the required parameter 'appId' is set
|
229
|
+
if @api_client.config.client_side_validation && appId.nil?
|
230
|
+
fail ArgumentError, "Missing the required parameter 'appId' when calling TemplateApi.list_templates"
|
231
231
|
end
|
232
232
|
# resource path
|
233
|
-
local_var_path = "/v1.1/apps/{appId}/templates".sub('{' + 'appId' + '}',
|
233
|
+
local_var_path = "/v1.1/apps/{appId}/templates".sub('{' + 'appId' + '}', appId.to_s)
|
234
234
|
|
235
235
|
# query parameters
|
236
236
|
query_params = {}
|
@@ -265,41 +265,41 @@ module SmoochApi
|
|
265
265
|
|
266
266
|
#
|
267
267
|
# Update the specified template.
|
268
|
-
# @param
|
269
|
-
# @param
|
270
|
-
# @param
|
268
|
+
# @param appId Identifies the app.
|
269
|
+
# @param templateId Identifies the template.
|
270
|
+
# @param templateUpdateBody Body for an updateTemplate request.
|
271
271
|
# @param [Hash] opts the optional parameters
|
272
272
|
# @return [TemplateResponse]
|
273
|
-
def update_template(
|
274
|
-
data, _status_code, _headers = update_template_with_http_info(
|
273
|
+
def update_template(appId, templateId, templateUpdateBody, opts = {})
|
274
|
+
data, _status_code, _headers = update_template_with_http_info(appId, templateId, templateUpdateBody, opts)
|
275
275
|
return data
|
276
276
|
end
|
277
277
|
|
278
278
|
#
|
279
279
|
# Update the specified template.
|
280
|
-
# @param
|
281
|
-
# @param
|
282
|
-
# @param
|
280
|
+
# @param appId Identifies the app.
|
281
|
+
# @param templateId Identifies the template.
|
282
|
+
# @param templateUpdateBody Body for an updateTemplate request.
|
283
283
|
# @param [Hash] opts the optional parameters
|
284
284
|
# @return [Array<(TemplateResponse, Fixnum, Hash)>] TemplateResponse data, response status code and response headers
|
285
|
-
def update_template_with_http_info(
|
285
|
+
def update_template_with_http_info(appId, templateId, templateUpdateBody, opts = {})
|
286
286
|
if @api_client.config.debugging
|
287
287
|
@api_client.config.logger.debug "Calling API: TemplateApi.update_template ..."
|
288
288
|
end
|
289
|
-
# verify the required parameter '
|
290
|
-
if @api_client.config.client_side_validation &&
|
291
|
-
fail ArgumentError, "Missing the required parameter '
|
289
|
+
# verify the required parameter 'appId' is set
|
290
|
+
if @api_client.config.client_side_validation && appId.nil?
|
291
|
+
fail ArgumentError, "Missing the required parameter 'appId' when calling TemplateApi.update_template"
|
292
292
|
end
|
293
|
-
# verify the required parameter '
|
294
|
-
if @api_client.config.client_side_validation &&
|
295
|
-
fail ArgumentError, "Missing the required parameter '
|
293
|
+
# verify the required parameter 'templateId' is set
|
294
|
+
if @api_client.config.client_side_validation && templateId.nil?
|
295
|
+
fail ArgumentError, "Missing the required parameter 'templateId' when calling TemplateApi.update_template"
|
296
296
|
end
|
297
|
-
# verify the required parameter '
|
298
|
-
if @api_client.config.client_side_validation &&
|
299
|
-
fail ArgumentError, "Missing the required parameter '
|
297
|
+
# verify the required parameter 'templateUpdateBody' is set
|
298
|
+
if @api_client.config.client_side_validation && templateUpdateBody.nil?
|
299
|
+
fail ArgumentError, "Missing the required parameter 'templateUpdateBody' when calling TemplateApi.update_template"
|
300
300
|
end
|
301
301
|
# resource path
|
302
|
-
local_var_path = "/v1.1/apps/{appId}/templates/{templateId}".sub('{' + 'appId' + '}',
|
302
|
+
local_var_path = "/v1.1/apps/{appId}/templates/{templateId}".sub('{' + 'appId' + '}', appId.to_s).sub('{' + 'templateId' + '}', templateId.to_s)
|
303
303
|
|
304
304
|
# query parameters
|
305
305
|
query_params = {}
|
@@ -315,7 +315,7 @@ module SmoochApi
|
|
315
315
|
form_params = {}
|
316
316
|
|
317
317
|
# http body (model)
|
318
|
-
post_body = @api_client.object_to_http_body(
|
318
|
+
post_body = @api_client.object_to_http_body(templateUpdateBody)
|
319
319
|
auth_names = ['jwt']
|
320
320
|
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
321
321
|
:header_params => header_params,
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#The Smooch API is a unified interface for powering messaging in your customer experiences across every channel. Our API speeds access to new markets, reduces time to ship, eliminates complexity, and helps you build the best experiences for your customers. For more information, visit our [official documentation](https://docs.smooch.io).
|
5
5
|
|
6
|
-
OpenAPI spec version: 4.
|
6
|
+
OpenAPI spec version: 4.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,35 +22,35 @@ module SmoochApi
|
|
22
22
|
|
23
23
|
#
|
24
24
|
# Create a webhook for the specified app.
|
25
|
-
# @param
|
26
|
-
# @param
|
25
|
+
# @param appId Identifies the app.
|
26
|
+
# @param webhookCreateBody Body for a createWebhook request.
|
27
27
|
# @param [Hash] opts the optional parameters
|
28
28
|
# @return [WebhookResponse]
|
29
|
-
def create_webhook(
|
30
|
-
data, _status_code, _headers = create_webhook_with_http_info(
|
29
|
+
def create_webhook(appId, webhookCreateBody, opts = {})
|
30
|
+
data, _status_code, _headers = create_webhook_with_http_info(appId, webhookCreateBody, opts)
|
31
31
|
return data
|
32
32
|
end
|
33
33
|
|
34
34
|
#
|
35
35
|
# Create a webhook for the specified app.
|
36
|
-
# @param
|
37
|
-
# @param
|
36
|
+
# @param appId Identifies the app.
|
37
|
+
# @param webhookCreateBody Body for a createWebhook request.
|
38
38
|
# @param [Hash] opts the optional parameters
|
39
39
|
# @return [Array<(WebhookResponse, Fixnum, Hash)>] WebhookResponse data, response status code and response headers
|
40
|
-
def create_webhook_with_http_info(
|
40
|
+
def create_webhook_with_http_info(appId, webhookCreateBody, opts = {})
|
41
41
|
if @api_client.config.debugging
|
42
42
|
@api_client.config.logger.debug "Calling API: WebhookApi.create_webhook ..."
|
43
43
|
end
|
44
|
-
# verify the required parameter '
|
45
|
-
if @api_client.config.client_side_validation &&
|
46
|
-
fail ArgumentError, "Missing the required parameter '
|
44
|
+
# verify the required parameter 'appId' is set
|
45
|
+
if @api_client.config.client_side_validation && appId.nil?
|
46
|
+
fail ArgumentError, "Missing the required parameter 'appId' when calling WebhookApi.create_webhook"
|
47
47
|
end
|
48
|
-
# verify the required parameter '
|
49
|
-
if @api_client.config.client_side_validation &&
|
50
|
-
fail ArgumentError, "Missing the required parameter '
|
48
|
+
# verify the required parameter 'webhookCreateBody' is set
|
49
|
+
if @api_client.config.client_side_validation && webhookCreateBody.nil?
|
50
|
+
fail ArgumentError, "Missing the required parameter 'webhookCreateBody' when calling WebhookApi.create_webhook"
|
51
51
|
end
|
52
52
|
# resource path
|
53
|
-
local_var_path = "/v1.1/apps/{appId}/webhooks".sub('{' + 'appId' + '}',
|
53
|
+
local_var_path = "/v1.1/apps/{appId}/webhooks".sub('{' + 'appId' + '}', appId.to_s)
|
54
54
|
|
55
55
|
# query parameters
|
56
56
|
query_params = {}
|
@@ -66,7 +66,7 @@ module SmoochApi
|
|
66
66
|
form_params = {}
|
67
67
|
|
68
68
|
# http body (model)
|
69
|
-
post_body = @api_client.object_to_http_body(
|
69
|
+
post_body = @api_client.object_to_http_body(webhookCreateBody)
|
70
70
|
auth_names = ['jwt']
|
71
71
|
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
72
72
|
:header_params => header_params,
|
@@ -83,35 +83,35 @@ module SmoochApi
|
|
83
83
|
|
84
84
|
#
|
85
85
|
# Delete the specified webhook.
|
86
|
-
# @param
|
87
|
-
# @param
|
86
|
+
# @param appId Identifies the app.
|
87
|
+
# @param webhookId Identifies the webhook.
|
88
88
|
# @param [Hash] opts the optional parameters
|
89
89
|
# @return [nil]
|
90
|
-
def delete_webhook(
|
91
|
-
delete_webhook_with_http_info(
|
90
|
+
def delete_webhook(appId, webhookId, opts = {})
|
91
|
+
delete_webhook_with_http_info(appId, webhookId, opts)
|
92
92
|
return nil
|
93
93
|
end
|
94
94
|
|
95
95
|
#
|
96
96
|
# Delete the specified webhook.
|
97
|
-
# @param
|
98
|
-
# @param
|
97
|
+
# @param appId Identifies the app.
|
98
|
+
# @param webhookId Identifies the webhook.
|
99
99
|
# @param [Hash] opts the optional parameters
|
100
100
|
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
101
|
-
def delete_webhook_with_http_info(
|
101
|
+
def delete_webhook_with_http_info(appId, webhookId, opts = {})
|
102
102
|
if @api_client.config.debugging
|
103
103
|
@api_client.config.logger.debug "Calling API: WebhookApi.delete_webhook ..."
|
104
104
|
end
|
105
|
-
# verify the required parameter '
|
106
|
-
if @api_client.config.client_side_validation &&
|
107
|
-
fail ArgumentError, "Missing the required parameter '
|
105
|
+
# verify the required parameter 'appId' is set
|
106
|
+
if @api_client.config.client_side_validation && appId.nil?
|
107
|
+
fail ArgumentError, "Missing the required parameter 'appId' when calling WebhookApi.delete_webhook"
|
108
108
|
end
|
109
|
-
# verify the required parameter '
|
110
|
-
if @api_client.config.client_side_validation &&
|
111
|
-
fail ArgumentError, "Missing the required parameter '
|
109
|
+
# verify the required parameter 'webhookId' is set
|
110
|
+
if @api_client.config.client_side_validation && webhookId.nil?
|
111
|
+
fail ArgumentError, "Missing the required parameter 'webhookId' when calling WebhookApi.delete_webhook"
|
112
112
|
end
|
113
113
|
# resource path
|
114
|
-
local_var_path = "/v1.1/apps/{appId}/webhooks/{webhookId}".sub('{' + 'appId' + '}',
|
114
|
+
local_var_path = "/v1.1/apps/{appId}/webhooks/{webhookId}".sub('{' + 'appId' + '}', appId.to_s).sub('{' + 'webhookId' + '}', webhookId.to_s)
|
115
115
|
|
116
116
|
# query parameters
|
117
117
|
query_params = {}
|
@@ -143,35 +143,35 @@ module SmoochApi
|
|
143
143
|
|
144
144
|
#
|
145
145
|
# Get the specified webhook.
|
146
|
-
# @param
|
147
|
-
# @param
|
146
|
+
# @param appId Identifies the app.
|
147
|
+
# @param webhookId Identifies the webhook.
|
148
148
|
# @param [Hash] opts the optional parameters
|
149
149
|
# @return [WebhookResponse]
|
150
|
-
def get_webhook(
|
151
|
-
data, _status_code, _headers = get_webhook_with_http_info(
|
150
|
+
def get_webhook(appId, webhookId, opts = {})
|
151
|
+
data, _status_code, _headers = get_webhook_with_http_info(appId, webhookId, opts)
|
152
152
|
return data
|
153
153
|
end
|
154
154
|
|
155
155
|
#
|
156
156
|
# Get the specified webhook.
|
157
|
-
# @param
|
158
|
-
# @param
|
157
|
+
# @param appId Identifies the app.
|
158
|
+
# @param webhookId Identifies the webhook.
|
159
159
|
# @param [Hash] opts the optional parameters
|
160
160
|
# @return [Array<(WebhookResponse, Fixnum, Hash)>] WebhookResponse data, response status code and response headers
|
161
|
-
def get_webhook_with_http_info(
|
161
|
+
def get_webhook_with_http_info(appId, webhookId, opts = {})
|
162
162
|
if @api_client.config.debugging
|
163
163
|
@api_client.config.logger.debug "Calling API: WebhookApi.get_webhook ..."
|
164
164
|
end
|
165
|
-
# verify the required parameter '
|
166
|
-
if @api_client.config.client_side_validation &&
|
167
|
-
fail ArgumentError, "Missing the required parameter '
|
165
|
+
# verify the required parameter 'appId' is set
|
166
|
+
if @api_client.config.client_side_validation && appId.nil?
|
167
|
+
fail ArgumentError, "Missing the required parameter 'appId' when calling WebhookApi.get_webhook"
|
168
168
|
end
|
169
|
-
# verify the required parameter '
|
170
|
-
if @api_client.config.client_side_validation &&
|
171
|
-
fail ArgumentError, "Missing the required parameter '
|
169
|
+
# verify the required parameter 'webhookId' is set
|
170
|
+
if @api_client.config.client_side_validation && webhookId.nil?
|
171
|
+
fail ArgumentError, "Missing the required parameter 'webhookId' when calling WebhookApi.get_webhook"
|
172
172
|
end
|
173
173
|
# resource path
|
174
|
-
local_var_path = "/v1.1/apps/{appId}/webhooks/{webhookId}".sub('{' + 'appId' + '}',
|
174
|
+
local_var_path = "/v1.1/apps/{appId}/webhooks/{webhookId}".sub('{' + 'appId' + '}', appId.to_s).sub('{' + 'webhookId' + '}', webhookId.to_s)
|
175
175
|
|
176
176
|
# query parameters
|
177
177
|
query_params = {}
|
@@ -204,29 +204,29 @@ module SmoochApi
|
|
204
204
|
|
205
205
|
#
|
206
206
|
# List webhooks for the specified app.
|
207
|
-
# @param
|
207
|
+
# @param appId Identifies the app.
|
208
208
|
# @param [Hash] opts the optional parameters
|
209
209
|
# @return [ListWebhooksResponse]
|
210
|
-
def list_webhooks(
|
211
|
-
data, _status_code, _headers = list_webhooks_with_http_info(
|
210
|
+
def list_webhooks(appId, opts = {})
|
211
|
+
data, _status_code, _headers = list_webhooks_with_http_info(appId, opts)
|
212
212
|
return data
|
213
213
|
end
|
214
214
|
|
215
215
|
#
|
216
216
|
# List webhooks for the specified app.
|
217
|
-
# @param
|
217
|
+
# @param appId Identifies the app.
|
218
218
|
# @param [Hash] opts the optional parameters
|
219
219
|
# @return [Array<(ListWebhooksResponse, Fixnum, Hash)>] ListWebhooksResponse data, response status code and response headers
|
220
|
-
def list_webhooks_with_http_info(
|
220
|
+
def list_webhooks_with_http_info(appId, opts = {})
|
221
221
|
if @api_client.config.debugging
|
222
222
|
@api_client.config.logger.debug "Calling API: WebhookApi.list_webhooks ..."
|
223
223
|
end
|
224
|
-
# verify the required parameter '
|
225
|
-
if @api_client.config.client_side_validation &&
|
226
|
-
fail ArgumentError, "Missing the required parameter '
|
224
|
+
# verify the required parameter 'appId' is set
|
225
|
+
if @api_client.config.client_side_validation && appId.nil?
|
226
|
+
fail ArgumentError, "Missing the required parameter 'appId' when calling WebhookApi.list_webhooks"
|
227
227
|
end
|
228
228
|
# resource path
|
229
|
-
local_var_path = "/v1.1/apps/{appId}/webhooks".sub('{' + 'appId' + '}',
|
229
|
+
local_var_path = "/v1.1/apps/{appId}/webhooks".sub('{' + 'appId' + '}', appId.to_s)
|
230
230
|
|
231
231
|
# query parameters
|
232
232
|
query_params = {}
|
@@ -259,41 +259,41 @@ module SmoochApi
|
|
259
259
|
|
260
260
|
#
|
261
261
|
# Update the specified webhook.
|
262
|
-
# @param
|
263
|
-
# @param
|
264
|
-
# @param
|
262
|
+
# @param appId Identifies the app.
|
263
|
+
# @param webhookId Identifies the webhook.
|
264
|
+
# @param webhookUpdateBody Body for an updateWebhook request.
|
265
265
|
# @param [Hash] opts the optional parameters
|
266
266
|
# @return [WebhookResponse]
|
267
|
-
def update_webhook(
|
268
|
-
data, _status_code, _headers = update_webhook_with_http_info(
|
267
|
+
def update_webhook(appId, webhookId, webhookUpdateBody, opts = {})
|
268
|
+
data, _status_code, _headers = update_webhook_with_http_info(appId, webhookId, webhookUpdateBody, opts)
|
269
269
|
return data
|
270
270
|
end
|
271
271
|
|
272
272
|
#
|
273
273
|
# Update the specified webhook.
|
274
|
-
# @param
|
275
|
-
# @param
|
276
|
-
# @param
|
274
|
+
# @param appId Identifies the app.
|
275
|
+
# @param webhookId Identifies the webhook.
|
276
|
+
# @param webhookUpdateBody Body for an updateWebhook request.
|
277
277
|
# @param [Hash] opts the optional parameters
|
278
278
|
# @return [Array<(WebhookResponse, Fixnum, Hash)>] WebhookResponse data, response status code and response headers
|
279
|
-
def update_webhook_with_http_info(
|
279
|
+
def update_webhook_with_http_info(appId, webhookId, webhookUpdateBody, opts = {})
|
280
280
|
if @api_client.config.debugging
|
281
281
|
@api_client.config.logger.debug "Calling API: WebhookApi.update_webhook ..."
|
282
282
|
end
|
283
|
-
# verify the required parameter '
|
284
|
-
if @api_client.config.client_side_validation &&
|
285
|
-
fail ArgumentError, "Missing the required parameter '
|
283
|
+
# verify the required parameter 'appId' is set
|
284
|
+
if @api_client.config.client_side_validation && appId.nil?
|
285
|
+
fail ArgumentError, "Missing the required parameter 'appId' when calling WebhookApi.update_webhook"
|
286
286
|
end
|
287
|
-
# verify the required parameter '
|
288
|
-
if @api_client.config.client_side_validation &&
|
289
|
-
fail ArgumentError, "Missing the required parameter '
|
287
|
+
# verify the required parameter 'webhookId' is set
|
288
|
+
if @api_client.config.client_side_validation && webhookId.nil?
|
289
|
+
fail ArgumentError, "Missing the required parameter 'webhookId' when calling WebhookApi.update_webhook"
|
290
290
|
end
|
291
|
-
# verify the required parameter '
|
292
|
-
if @api_client.config.client_side_validation &&
|
293
|
-
fail ArgumentError, "Missing the required parameter '
|
291
|
+
# verify the required parameter 'webhookUpdateBody' is set
|
292
|
+
if @api_client.config.client_side_validation && webhookUpdateBody.nil?
|
293
|
+
fail ArgumentError, "Missing the required parameter 'webhookUpdateBody' when calling WebhookApi.update_webhook"
|
294
294
|
end
|
295
295
|
# resource path
|
296
|
-
local_var_path = "/v1.1/apps/{appId}/webhooks/{webhookId}".sub('{' + 'appId' + '}',
|
296
|
+
local_var_path = "/v1.1/apps/{appId}/webhooks/{webhookId}".sub('{' + 'appId' + '}', appId.to_s).sub('{' + 'webhookId' + '}', webhookId.to_s)
|
297
297
|
|
298
298
|
# query parameters
|
299
299
|
query_params = {}
|
@@ -309,7 +309,7 @@ module SmoochApi
|
|
309
309
|
form_params = {}
|
310
310
|
|
311
311
|
# http body (model)
|
312
|
-
post_body = @api_client.object_to_http_body(
|
312
|
+
post_body = @api_client.object_to_http_body(webhookUpdateBody)
|
313
313
|
auth_names = ['jwt']
|
314
314
|
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
315
315
|
:header_params => header_params,
|