smooch-api 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -0,0 +1,173 @@
1
+ =begin
2
+ #Smooch
3
+
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
+
6
+ OpenAPI spec version: 1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ =end
11
+
12
+ require "uri"
13
+
14
+ module SmoochApi
15
+ class MenuApi
16
+ attr_accessor :api_client
17
+
18
+ def initialize(api_client = ApiClient.default)
19
+ @api_client = api_client
20
+ end
21
+
22
+ #
23
+ # Remove the specified app’s menu.
24
+ # @param [Hash] opts the optional parameters
25
+ # @return [MenuResponse]
26
+ def delete_menu(opts = {})
27
+ data, _status_code, _headers = delete_menu_with_http_info(opts)
28
+ return data
29
+ end
30
+
31
+ #
32
+ # Remove the specified app’s menu.
33
+ # @param [Hash] opts the optional parameters
34
+ # @return [Array<(MenuResponse, Fixnum, Hash)>] MenuResponse data, response status code and response headers
35
+ def delete_menu_with_http_info(opts = {})
36
+ if @api_client.config.debugging
37
+ @api_client.config.logger.debug "Calling API: MenuApi.delete_menu ..."
38
+ end
39
+ # resource path
40
+ local_var_path = "/menu"
41
+
42
+ # query parameters
43
+ query_params = {}
44
+
45
+ # header parameters
46
+ header_params = {}
47
+ # HTTP header 'Accept' (if needed)
48
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
49
+ # HTTP header 'Content-Type'
50
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
51
+
52
+ # form parameters
53
+ form_params = {}
54
+
55
+ # http body (model)
56
+ post_body = nil
57
+ auth_names = ['jwt']
58
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
59
+ :header_params => header_params,
60
+ :query_params => query_params,
61
+ :form_params => form_params,
62
+ :body => post_body,
63
+ :auth_names => auth_names,
64
+ :return_type => 'MenuResponse')
65
+ if @api_client.config.debugging
66
+ @api_client.config.logger.debug "API called: MenuApi#delete_menu\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
67
+ end
68
+ return data, status_code, headers
69
+ end
70
+
71
+ #
72
+ # Get the specified app’s menu.
73
+ # @param [Hash] opts the optional parameters
74
+ # @return [MenuResponse]
75
+ def get_menu(opts = {})
76
+ data, _status_code, _headers = get_menu_with_http_info(opts)
77
+ return data
78
+ end
79
+
80
+ #
81
+ # Get the specified app’s menu.
82
+ # @param [Hash] opts the optional parameters
83
+ # @return [Array<(MenuResponse, Fixnum, Hash)>] MenuResponse data, response status code and response headers
84
+ def get_menu_with_http_info(opts = {})
85
+ if @api_client.config.debugging
86
+ @api_client.config.logger.debug "Calling API: MenuApi.get_menu ..."
87
+ end
88
+ # resource path
89
+ local_var_path = "/menu"
90
+
91
+ # query parameters
92
+ query_params = {}
93
+
94
+ # header parameters
95
+ header_params = {}
96
+ # HTTP header 'Accept' (if needed)
97
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
98
+ # HTTP header 'Content-Type'
99
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
100
+
101
+ # form parameters
102
+ form_params = {}
103
+
104
+ # http body (model)
105
+ post_body = nil
106
+ auth_names = ['jwt']
107
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
108
+ :header_params => header_params,
109
+ :query_params => query_params,
110
+ :form_params => form_params,
111
+ :body => post_body,
112
+ :auth_names => auth_names,
113
+ :return_type => 'MenuResponse')
114
+ if @api_client.config.debugging
115
+ @api_client.config.logger.debug "API called: MenuApi#get_menu\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
116
+ end
117
+ return data, status_code, headers
118
+ end
119
+
120
+ #
121
+ # Configure the specified app’s menu.
122
+ # @param menu_update_body Body for a updateMenu request.
123
+ # @param [Hash] opts the optional parameters
124
+ # @return [MenuResponse]
125
+ def update_menu(menu_update_body, opts = {})
126
+ data, _status_code, _headers = update_menu_with_http_info(menu_update_body, opts)
127
+ return data
128
+ end
129
+
130
+ #
131
+ # Configure the specified app’s menu.
132
+ # @param menu_update_body Body for a updateMenu request.
133
+ # @param [Hash] opts the optional parameters
134
+ # @return [Array<(MenuResponse, Fixnum, Hash)>] MenuResponse data, response status code and response headers
135
+ def update_menu_with_http_info(menu_update_body, opts = {})
136
+ if @api_client.config.debugging
137
+ @api_client.config.logger.debug "Calling API: MenuApi.update_menu ..."
138
+ end
139
+ # verify the required parameter 'menu_update_body' is set
140
+ fail ArgumentError, "Missing the required parameter 'menu_update_body' when calling MenuApi.update_menu" if menu_update_body.nil?
141
+ # resource path
142
+ local_var_path = "/menu"
143
+
144
+ # query parameters
145
+ query_params = {}
146
+
147
+ # header parameters
148
+ header_params = {}
149
+ # HTTP header 'Accept' (if needed)
150
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
151
+ # HTTP header 'Content-Type'
152
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
153
+
154
+ # form parameters
155
+ form_params = {}
156
+
157
+ # http body (model)
158
+ post_body = @api_client.object_to_http_body(menu_update_body)
159
+ auth_names = ['jwt']
160
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
161
+ :header_params => header_params,
162
+ :query_params => query_params,
163
+ :form_params => form_params,
164
+ :body => post_body,
165
+ :auth_names => auth_names,
166
+ :return_type => 'MenuResponse')
167
+ if @api_client.config.debugging
168
+ @api_client.config.logger.debug "API called: MenuApi#update_menu\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
169
+ end
170
+ return data, status_code, headers
171
+ end
172
+ end
173
+ end
@@ -0,0 +1,306 @@
1
+ =begin
2
+ #Smooch
3
+
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
+
6
+ OpenAPI spec version: 1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ =end
11
+
12
+ require "uri"
13
+
14
+ module SmoochApi
15
+ class WebhookApi
16
+ attr_accessor :api_client
17
+
18
+ def initialize(api_client = ApiClient.default)
19
+ @api_client = api_client
20
+ end
21
+
22
+ #
23
+ # Create a webhook for the specified app.
24
+ # @param app_id Identifies the app.
25
+ # @param webhook_create_body Body for a createWebhook request.
26
+ # @param [Hash] opts the optional parameters
27
+ # @return [WebhookResponse]
28
+ def create_webhook(app_id, webhook_create_body, opts = {})
29
+ data, _status_code, _headers = create_webhook_with_http_info(app_id, webhook_create_body, opts)
30
+ return data
31
+ end
32
+
33
+ #
34
+ # Create a webhook for the specified app.
35
+ # @param app_id Identifies the app.
36
+ # @param webhook_create_body Body for a createWebhook request.
37
+ # @param [Hash] opts the optional parameters
38
+ # @return [Array<(WebhookResponse, Fixnum, Hash)>] WebhookResponse data, response status code and response headers
39
+ def create_webhook_with_http_info(app_id, webhook_create_body, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug "Calling API: WebhookApi.create_webhook ..."
42
+ end
43
+ # verify the required parameter 'app_id' is set
44
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling WebhookApi.create_webhook" if app_id.nil?
45
+ # verify the required parameter 'webhook_create_body' is set
46
+ fail ArgumentError, "Missing the required parameter 'webhook_create_body' when calling WebhookApi.create_webhook" if webhook_create_body.nil?
47
+ # resource path
48
+ local_var_path = "/apps/{appId}/webhooks".sub('{' + 'appId' + '}', app_id.to_s)
49
+
50
+ # query parameters
51
+ query_params = {}
52
+
53
+ # header parameters
54
+ header_params = {}
55
+ # HTTP header 'Accept' (if needed)
56
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
57
+ # HTTP header 'Content-Type'
58
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
59
+
60
+ # form parameters
61
+ form_params = {}
62
+
63
+ # http body (model)
64
+ post_body = @api_client.object_to_http_body(webhook_create_body)
65
+ auth_names = ['jwt']
66
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
67
+ :header_params => header_params,
68
+ :query_params => query_params,
69
+ :form_params => form_params,
70
+ :body => post_body,
71
+ :auth_names => auth_names,
72
+ :return_type => 'WebhookResponse')
73
+ if @api_client.config.debugging
74
+ @api_client.config.logger.debug "API called: WebhookApi#create_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
75
+ end
76
+ return data, status_code, headers
77
+ end
78
+
79
+ #
80
+ # Delete the specified webhook.
81
+ # @param app_id Identifies the app.
82
+ # @param webhook_id Identifies the webhook.
83
+ # @param [Hash] opts the optional parameters
84
+ # @return [nil]
85
+ def delete_webhook(app_id, webhook_id, opts = {})
86
+ delete_webhook_with_http_info(app_id, webhook_id, opts)
87
+ return nil
88
+ end
89
+
90
+ #
91
+ # Delete the specified webhook.
92
+ # @param app_id Identifies the app.
93
+ # @param webhook_id Identifies the webhook.
94
+ # @param [Hash] opts the optional parameters
95
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
96
+ def delete_webhook_with_http_info(app_id, webhook_id, opts = {})
97
+ if @api_client.config.debugging
98
+ @api_client.config.logger.debug "Calling API: WebhookApi.delete_webhook ..."
99
+ end
100
+ # verify the required parameter 'app_id' is set
101
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling WebhookApi.delete_webhook" if app_id.nil?
102
+ # verify the required parameter 'webhook_id' is set
103
+ fail ArgumentError, "Missing the required parameter 'webhook_id' when calling WebhookApi.delete_webhook" if webhook_id.nil?
104
+ # resource path
105
+ local_var_path = "/apps/{appId}/webhooks/{webhookId}".sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'webhookId' + '}', webhook_id.to_s)
106
+
107
+ # query parameters
108
+ query_params = {}
109
+
110
+ # header parameters
111
+ header_params = {}
112
+ # HTTP header 'Accept' (if needed)
113
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
114
+ # HTTP header 'Content-Type'
115
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
116
+
117
+ # form parameters
118
+ form_params = {}
119
+
120
+ # http body (model)
121
+ post_body = nil
122
+ auth_names = ['jwt']
123
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
124
+ :header_params => header_params,
125
+ :query_params => query_params,
126
+ :form_params => form_params,
127
+ :body => post_body,
128
+ :auth_names => auth_names)
129
+ if @api_client.config.debugging
130
+ @api_client.config.logger.debug "API called: WebhookApi#delete_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
131
+ end
132
+ return data, status_code, headers
133
+ end
134
+
135
+ #
136
+ # Get the specified webhook.
137
+ # @param app_id Identifies the app.
138
+ # @param webhook_id Identifies the webhook.
139
+ # @param [Hash] opts the optional parameters
140
+ # @return [WebhookResponse]
141
+ def get_webhook(app_id, webhook_id, opts = {})
142
+ data, _status_code, _headers = get_webhook_with_http_info(app_id, webhook_id, opts)
143
+ return data
144
+ end
145
+
146
+ #
147
+ # Get the specified webhook.
148
+ # @param app_id Identifies the app.
149
+ # @param webhook_id Identifies the webhook.
150
+ # @param [Hash] opts the optional parameters
151
+ # @return [Array<(WebhookResponse, Fixnum, Hash)>] WebhookResponse data, response status code and response headers
152
+ def get_webhook_with_http_info(app_id, webhook_id, opts = {})
153
+ if @api_client.config.debugging
154
+ @api_client.config.logger.debug "Calling API: WebhookApi.get_webhook ..."
155
+ end
156
+ # verify the required parameter 'app_id' is set
157
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling WebhookApi.get_webhook" if app_id.nil?
158
+ # verify the required parameter 'webhook_id' is set
159
+ fail ArgumentError, "Missing the required parameter 'webhook_id' when calling WebhookApi.get_webhook" if webhook_id.nil?
160
+ # resource path
161
+ local_var_path = "/apps/{appId}/webhooks/{webhookId}".sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'webhookId' + '}', webhook_id.to_s)
162
+
163
+ # query parameters
164
+ query_params = {}
165
+
166
+ # header parameters
167
+ header_params = {}
168
+ # HTTP header 'Accept' (if needed)
169
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
170
+ # HTTP header 'Content-Type'
171
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
172
+
173
+ # form parameters
174
+ form_params = {}
175
+
176
+ # http body (model)
177
+ post_body = nil
178
+ auth_names = ['jwt']
179
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
180
+ :header_params => header_params,
181
+ :query_params => query_params,
182
+ :form_params => form_params,
183
+ :body => post_body,
184
+ :auth_names => auth_names,
185
+ :return_type => 'WebhookResponse')
186
+ if @api_client.config.debugging
187
+ @api_client.config.logger.debug "API called: WebhookApi#get_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
188
+ end
189
+ return data, status_code, headers
190
+ end
191
+
192
+ #
193
+ # List webhooks for the specified app.
194
+ # @param app_id Identifies the app.
195
+ # @param [Hash] opts the optional parameters
196
+ # @return [ListWebhooksResponse]
197
+ def list_webhooks(app_id, opts = {})
198
+ data, _status_code, _headers = list_webhooks_with_http_info(app_id, opts)
199
+ return data
200
+ end
201
+
202
+ #
203
+ # List webhooks for the specified app.
204
+ # @param app_id Identifies the app.
205
+ # @param [Hash] opts the optional parameters
206
+ # @return [Array<(ListWebhooksResponse, Fixnum, Hash)>] ListWebhooksResponse data, response status code and response headers
207
+ def list_webhooks_with_http_info(app_id, opts = {})
208
+ if @api_client.config.debugging
209
+ @api_client.config.logger.debug "Calling API: WebhookApi.list_webhooks ..."
210
+ end
211
+ # verify the required parameter 'app_id' is set
212
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling WebhookApi.list_webhooks" if app_id.nil?
213
+ # resource path
214
+ local_var_path = "/apps/{appId}/webhooks".sub('{' + 'appId' + '}', app_id.to_s)
215
+
216
+ # query parameters
217
+ query_params = {}
218
+
219
+ # header parameters
220
+ header_params = {}
221
+ # HTTP header 'Accept' (if needed)
222
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
223
+ # HTTP header 'Content-Type'
224
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
225
+
226
+ # form parameters
227
+ form_params = {}
228
+
229
+ # http body (model)
230
+ post_body = nil
231
+ auth_names = ['jwt']
232
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
233
+ :header_params => header_params,
234
+ :query_params => query_params,
235
+ :form_params => form_params,
236
+ :body => post_body,
237
+ :auth_names => auth_names,
238
+ :return_type => 'ListWebhooksResponse')
239
+ if @api_client.config.debugging
240
+ @api_client.config.logger.debug "API called: WebhookApi#list_webhooks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
241
+ end
242
+ return data, status_code, headers
243
+ end
244
+
245
+ #
246
+ # Update the specified webhook.
247
+ # @param app_id Identifies the app.
248
+ # @param webhook_id Identifies the webhook.
249
+ # @param webhook_update_body Body for an updateWebhook request.
250
+ # @param [Hash] opts the optional parameters
251
+ # @return [WebhookResponse]
252
+ def update_webhook(app_id, webhook_id, webhook_update_body, opts = {})
253
+ data, _status_code, _headers = update_webhook_with_http_info(app_id, webhook_id, webhook_update_body, opts)
254
+ return data
255
+ end
256
+
257
+ #
258
+ # Update the specified webhook.
259
+ # @param app_id Identifies the app.
260
+ # @param webhook_id Identifies the webhook.
261
+ # @param webhook_update_body Body for an updateWebhook request.
262
+ # @param [Hash] opts the optional parameters
263
+ # @return [Array<(WebhookResponse, Fixnum, Hash)>] WebhookResponse data, response status code and response headers
264
+ def update_webhook_with_http_info(app_id, webhook_id, webhook_update_body, opts = {})
265
+ if @api_client.config.debugging
266
+ @api_client.config.logger.debug "Calling API: WebhookApi.update_webhook ..."
267
+ end
268
+ # verify the required parameter 'app_id' is set
269
+ fail ArgumentError, "Missing the required parameter 'app_id' when calling WebhookApi.update_webhook" if app_id.nil?
270
+ # verify the required parameter 'webhook_id' is set
271
+ fail ArgumentError, "Missing the required parameter 'webhook_id' when calling WebhookApi.update_webhook" if webhook_id.nil?
272
+ # verify the required parameter 'webhook_update_body' is set
273
+ fail ArgumentError, "Missing the required parameter 'webhook_update_body' when calling WebhookApi.update_webhook" if webhook_update_body.nil?
274
+ # resource path
275
+ local_var_path = "/apps/{appId}/webhooks/{webhookId}".sub('{' + 'appId' + '}', app_id.to_s).sub('{' + 'webhookId' + '}', webhook_id.to_s)
276
+
277
+ # query parameters
278
+ query_params = {}
279
+
280
+ # header parameters
281
+ header_params = {}
282
+ # HTTP header 'Accept' (if needed)
283
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
284
+ # HTTP header 'Content-Type'
285
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
286
+
287
+ # form parameters
288
+ form_params = {}
289
+
290
+ # http body (model)
291
+ post_body = @api_client.object_to_http_body(webhook_update_body)
292
+ auth_names = ['jwt']
293
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
294
+ :header_params => header_params,
295
+ :query_params => query_params,
296
+ :form_params => form_params,
297
+ :body => post_body,
298
+ :auth_names => auth_names,
299
+ :return_type => 'WebhookResponse')
300
+ if @api_client.config.debugging
301
+ @api_client.config.logger.debug "API called: WebhookApi#update_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
302
+ end
303
+ return data, status_code, headers
304
+ end
305
+ end
306
+ end