mailslurp_client 12.4.7 → 12.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mailslurp_client.rb +13 -0
- data/lib/mailslurp_client/api/contact_controller_api.rb +4 -4
- data/lib/mailslurp_client/api/email_controller_api.rb +64 -0
- data/lib/mailslurp_client/api/group_controller_api.rb +4 -4
- data/lib/mailslurp_client/api/inbox_controller_api.rb +234 -8
- data/lib/mailslurp_client/api/inbox_ruleset_controller_api.rb +548 -0
- data/lib/mailslurp_client/api/missed_email_controller_api.rb +75 -7
- data/lib/mailslurp_client/api/sent_emails_controller_api.rb +150 -4
- data/lib/mailslurp_client/api/template_controller_api.rb +4 -4
- data/lib/mailslurp_client/api/tracking_controller_api.rb +218 -0
- data/lib/mailslurp_client/api/wait_for_controller_api.rb +2 -2
- data/lib/mailslurp_client/api/webhook_controller_api.rb +55 -1
- data/lib/mailslurp_client/models/abstract_webhook_payload.rb +3 -3
- data/lib/mailslurp_client/models/create_inbox_ruleset_options.rb +274 -0
- data/lib/mailslurp_client/models/create_tracking_pixel_options.rb +215 -0
- data/lib/mailslurp_client/models/create_webhook_options.rb +3 -3
- data/lib/mailslurp_client/models/inbox_ruleset_dto.rb +353 -0
- data/lib/mailslurp_client/models/inbox_ruleset_test_options.rb +211 -0
- data/lib/mailslurp_client/models/inbox_ruleset_test_result.rb +223 -0
- data/lib/mailslurp_client/models/page_inbox_ruleset_dto.rb +299 -0
- data/lib/mailslurp_client/models/page_tracking_pixel_projection.rb +299 -0
- data/lib/mailslurp_client/models/send_email_options.rb +11 -1
- data/lib/mailslurp_client/models/sent_email_dto.rb +12 -1
- data/lib/mailslurp_client/models/test_new_inbox_ruleset_options.rb +225 -0
- data/lib/mailslurp_client/models/tracking_pixel_dto.rb +303 -0
- data/lib/mailslurp_client/models/tracking_pixel_projection.rb +289 -0
- data/lib/mailslurp_client/models/webhook_dto.rb +2 -2
- data/lib/mailslurp_client/models/webhook_email_opened_payload.rb +322 -0
- data/lib/mailslurp_client/models/webhook_new_attachment_payload.rb +2 -2
- data/lib/mailslurp_client/models/webhook_new_contact_payload.rb +2 -2
- data/lib/mailslurp_client/models/webhook_new_email_payload.rb +2 -2
- data/lib/mailslurp_client/models/webhook_result_entity.rb +2 -2
- data/lib/mailslurp_client/version.rb +1 -1
- metadata +15 -2
@@ -0,0 +1,548 @@
|
|
1
|
+
=begin
|
2
|
+
#MailSlurp API
|
3
|
+
|
4
|
+
#MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 6.5.2
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module MailSlurpClient
|
16
|
+
class InboxRulesetControllerApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Create an inbox ruleset
|
23
|
+
# Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving
|
24
|
+
# @param create_inbox_ruleset_options [CreateInboxRulesetOptions] createInboxRulesetOptions
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @option opts [String] :inbox_id Inbox id to attach ruleset to
|
27
|
+
# @return [InboxRulesetDto]
|
28
|
+
def create_new_inbox_ruleset(create_inbox_ruleset_options, opts = {})
|
29
|
+
data, _status_code, _headers = create_new_inbox_ruleset_with_http_info(create_inbox_ruleset_options, opts)
|
30
|
+
data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Create an inbox ruleset
|
34
|
+
# Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving
|
35
|
+
# @param create_inbox_ruleset_options [CreateInboxRulesetOptions] createInboxRulesetOptions
|
36
|
+
# @param [Hash] opts the optional parameters
|
37
|
+
# @option opts [String] :inbox_id Inbox id to attach ruleset to
|
38
|
+
# @return [Array<(InboxRulesetDto, Integer, Hash)>] InboxRulesetDto data, response status code and response headers
|
39
|
+
def create_new_inbox_ruleset_with_http_info(create_inbox_ruleset_options, opts = {})
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug 'Calling API: InboxRulesetControllerApi.create_new_inbox_ruleset ...'
|
42
|
+
end
|
43
|
+
# verify the required parameter 'create_inbox_ruleset_options' is set
|
44
|
+
if @api_client.config.client_side_validation && create_inbox_ruleset_options.nil?
|
45
|
+
fail ArgumentError, "Missing the required parameter 'create_inbox_ruleset_options' when calling InboxRulesetControllerApi.create_new_inbox_ruleset"
|
46
|
+
end
|
47
|
+
# resource path
|
48
|
+
local_var_path = '/rulesets'
|
49
|
+
|
50
|
+
# query parameters
|
51
|
+
query_params = opts[:query_params] || {}
|
52
|
+
query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
|
53
|
+
|
54
|
+
# header parameters
|
55
|
+
header_params = opts[:header_params] || {}
|
56
|
+
# HTTP header 'Accept' (if needed)
|
57
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
58
|
+
# HTTP header 'Content-Type'
|
59
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
60
|
+
|
61
|
+
# form parameters
|
62
|
+
form_params = opts[:form_params] || {}
|
63
|
+
|
64
|
+
# http body (model)
|
65
|
+
post_body = opts[:body] || @api_client.object_to_http_body(create_inbox_ruleset_options)
|
66
|
+
|
67
|
+
# return_type
|
68
|
+
return_type = opts[:return_type] || 'InboxRulesetDto'
|
69
|
+
|
70
|
+
# auth_names
|
71
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
72
|
+
|
73
|
+
new_options = opts.merge(
|
74
|
+
:header_params => header_params,
|
75
|
+
:query_params => query_params,
|
76
|
+
:form_params => form_params,
|
77
|
+
:body => post_body,
|
78
|
+
:auth_names => auth_names,
|
79
|
+
:return_type => return_type
|
80
|
+
)
|
81
|
+
|
82
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
83
|
+
if @api_client.config.debugging
|
84
|
+
@api_client.config.logger.debug "API called: InboxRulesetControllerApi#create_new_inbox_ruleset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
85
|
+
end
|
86
|
+
return data, status_code, headers
|
87
|
+
end
|
88
|
+
|
89
|
+
# Delete an inbox ruleset
|
90
|
+
# Delete inbox ruleset
|
91
|
+
# @param id [String] ID of inbox ruleset
|
92
|
+
# @param [Hash] opts the optional parameters
|
93
|
+
# @return [nil]
|
94
|
+
def delete_inbox_ruleset(id, opts = {})
|
95
|
+
delete_inbox_ruleset_with_http_info(id, opts)
|
96
|
+
nil
|
97
|
+
end
|
98
|
+
|
99
|
+
# Delete an inbox ruleset
|
100
|
+
# Delete inbox ruleset
|
101
|
+
# @param id [String] ID of inbox ruleset
|
102
|
+
# @param [Hash] opts the optional parameters
|
103
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
104
|
+
def delete_inbox_ruleset_with_http_info(id, opts = {})
|
105
|
+
if @api_client.config.debugging
|
106
|
+
@api_client.config.logger.debug 'Calling API: InboxRulesetControllerApi.delete_inbox_ruleset ...'
|
107
|
+
end
|
108
|
+
# verify the required parameter 'id' is set
|
109
|
+
if @api_client.config.client_side_validation && id.nil?
|
110
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling InboxRulesetControllerApi.delete_inbox_ruleset"
|
111
|
+
end
|
112
|
+
# resource path
|
113
|
+
local_var_path = '/rulesets/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
114
|
+
|
115
|
+
# query parameters
|
116
|
+
query_params = opts[:query_params] || {}
|
117
|
+
|
118
|
+
# header parameters
|
119
|
+
header_params = opts[:header_params] || {}
|
120
|
+
|
121
|
+
# form parameters
|
122
|
+
form_params = opts[:form_params] || {}
|
123
|
+
|
124
|
+
# http body (model)
|
125
|
+
post_body = opts[:body]
|
126
|
+
|
127
|
+
# return_type
|
128
|
+
return_type = opts[:return_type]
|
129
|
+
|
130
|
+
# auth_names
|
131
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
132
|
+
|
133
|
+
new_options = opts.merge(
|
134
|
+
:header_params => header_params,
|
135
|
+
:query_params => query_params,
|
136
|
+
:form_params => form_params,
|
137
|
+
:body => post_body,
|
138
|
+
:auth_names => auth_names,
|
139
|
+
:return_type => return_type
|
140
|
+
)
|
141
|
+
|
142
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
143
|
+
if @api_client.config.debugging
|
144
|
+
@api_client.config.logger.debug "API called: InboxRulesetControllerApi#delete_inbox_ruleset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
145
|
+
end
|
146
|
+
return data, status_code, headers
|
147
|
+
end
|
148
|
+
|
149
|
+
# Delete inbox rulesets
|
150
|
+
# Delete inbox rulesets. Accepts optional inboxId filter.
|
151
|
+
# @param [Hash] opts the optional parameters
|
152
|
+
# @option opts [String] :inbox_id Optional inbox id to attach ruleset to
|
153
|
+
# @return [nil]
|
154
|
+
def delete_inbox_rulesets(opts = {})
|
155
|
+
delete_inbox_rulesets_with_http_info(opts)
|
156
|
+
nil
|
157
|
+
end
|
158
|
+
|
159
|
+
# Delete inbox rulesets
|
160
|
+
# Delete inbox rulesets. Accepts optional inboxId filter.
|
161
|
+
# @param [Hash] opts the optional parameters
|
162
|
+
# @option opts [String] :inbox_id Optional inbox id to attach ruleset to
|
163
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
164
|
+
def delete_inbox_rulesets_with_http_info(opts = {})
|
165
|
+
if @api_client.config.debugging
|
166
|
+
@api_client.config.logger.debug 'Calling API: InboxRulesetControllerApi.delete_inbox_rulesets ...'
|
167
|
+
end
|
168
|
+
# resource path
|
169
|
+
local_var_path = '/rulesets'
|
170
|
+
|
171
|
+
# query parameters
|
172
|
+
query_params = opts[:query_params] || {}
|
173
|
+
query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
|
174
|
+
|
175
|
+
# header parameters
|
176
|
+
header_params = opts[:header_params] || {}
|
177
|
+
|
178
|
+
# form parameters
|
179
|
+
form_params = opts[:form_params] || {}
|
180
|
+
|
181
|
+
# http body (model)
|
182
|
+
post_body = opts[:body]
|
183
|
+
|
184
|
+
# return_type
|
185
|
+
return_type = opts[:return_type]
|
186
|
+
|
187
|
+
# auth_names
|
188
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
189
|
+
|
190
|
+
new_options = opts.merge(
|
191
|
+
:header_params => header_params,
|
192
|
+
:query_params => query_params,
|
193
|
+
:form_params => form_params,
|
194
|
+
:body => post_body,
|
195
|
+
:auth_names => auth_names,
|
196
|
+
:return_type => return_type
|
197
|
+
)
|
198
|
+
|
199
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
200
|
+
if @api_client.config.debugging
|
201
|
+
@api_client.config.logger.debug "API called: InboxRulesetControllerApi#delete_inbox_rulesets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
202
|
+
end
|
203
|
+
return data, status_code, headers
|
204
|
+
end
|
205
|
+
|
206
|
+
# Get an inbox ruleset
|
207
|
+
# Get inbox ruleset
|
208
|
+
# @param id [String] ID of inbox ruleset
|
209
|
+
# @param [Hash] opts the optional parameters
|
210
|
+
# @return [InboxRulesetDto]
|
211
|
+
def get_inbox_ruleset(id, opts = {})
|
212
|
+
data, _status_code, _headers = get_inbox_ruleset_with_http_info(id, opts)
|
213
|
+
data
|
214
|
+
end
|
215
|
+
|
216
|
+
# Get an inbox ruleset
|
217
|
+
# Get inbox ruleset
|
218
|
+
# @param id [String] ID of inbox ruleset
|
219
|
+
# @param [Hash] opts the optional parameters
|
220
|
+
# @return [Array<(InboxRulesetDto, Integer, Hash)>] InboxRulesetDto data, response status code and response headers
|
221
|
+
def get_inbox_ruleset_with_http_info(id, opts = {})
|
222
|
+
if @api_client.config.debugging
|
223
|
+
@api_client.config.logger.debug 'Calling API: InboxRulesetControllerApi.get_inbox_ruleset ...'
|
224
|
+
end
|
225
|
+
# verify the required parameter 'id' is set
|
226
|
+
if @api_client.config.client_side_validation && id.nil?
|
227
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling InboxRulesetControllerApi.get_inbox_ruleset"
|
228
|
+
end
|
229
|
+
# resource path
|
230
|
+
local_var_path = '/rulesets/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
231
|
+
|
232
|
+
# query parameters
|
233
|
+
query_params = opts[:query_params] || {}
|
234
|
+
|
235
|
+
# header parameters
|
236
|
+
header_params = opts[:header_params] || {}
|
237
|
+
# HTTP header 'Accept' (if needed)
|
238
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
239
|
+
|
240
|
+
# form parameters
|
241
|
+
form_params = opts[:form_params] || {}
|
242
|
+
|
243
|
+
# http body (model)
|
244
|
+
post_body = opts[:body]
|
245
|
+
|
246
|
+
# return_type
|
247
|
+
return_type = opts[:return_type] || 'InboxRulesetDto'
|
248
|
+
|
249
|
+
# auth_names
|
250
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
251
|
+
|
252
|
+
new_options = opts.merge(
|
253
|
+
:header_params => header_params,
|
254
|
+
:query_params => query_params,
|
255
|
+
:form_params => form_params,
|
256
|
+
:body => post_body,
|
257
|
+
:auth_names => auth_names,
|
258
|
+
:return_type => return_type
|
259
|
+
)
|
260
|
+
|
261
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
262
|
+
if @api_client.config.debugging
|
263
|
+
@api_client.config.logger.debug "API called: InboxRulesetControllerApi#get_inbox_ruleset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
264
|
+
end
|
265
|
+
return data, status_code, headers
|
266
|
+
end
|
267
|
+
|
268
|
+
# List inbox rulesets
|
269
|
+
# List all rulesets attached to an inbox
|
270
|
+
# @param [Hash] opts the optional parameters
|
271
|
+
# @option opts [String] :inbox_id Optional inbox id to get rulesets from
|
272
|
+
# @option opts [Integer] :page Optional page index in inbox ruleset list pagination (default to 0)
|
273
|
+
# @option opts [String] :search_filter Optional search filter
|
274
|
+
# @option opts [Integer] :size Optional page size in inbox ruleset list pagination (default to 20)
|
275
|
+
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
|
276
|
+
# @return [PageInboxRulesetDto]
|
277
|
+
def get_inbox_rulesets(opts = {})
|
278
|
+
data, _status_code, _headers = get_inbox_rulesets_with_http_info(opts)
|
279
|
+
data
|
280
|
+
end
|
281
|
+
|
282
|
+
# List inbox rulesets
|
283
|
+
# List all rulesets attached to an inbox
|
284
|
+
# @param [Hash] opts the optional parameters
|
285
|
+
# @option opts [String] :inbox_id Optional inbox id to get rulesets from
|
286
|
+
# @option opts [Integer] :page Optional page index in inbox ruleset list pagination
|
287
|
+
# @option opts [String] :search_filter Optional search filter
|
288
|
+
# @option opts [Integer] :size Optional page size in inbox ruleset list pagination
|
289
|
+
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC
|
290
|
+
# @return [Array<(PageInboxRulesetDto, Integer, Hash)>] PageInboxRulesetDto data, response status code and response headers
|
291
|
+
def get_inbox_rulesets_with_http_info(opts = {})
|
292
|
+
if @api_client.config.debugging
|
293
|
+
@api_client.config.logger.debug 'Calling API: InboxRulesetControllerApi.get_inbox_rulesets ...'
|
294
|
+
end
|
295
|
+
allowable_values = ["ASC", "DESC"]
|
296
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
297
|
+
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
298
|
+
end
|
299
|
+
# resource path
|
300
|
+
local_var_path = '/rulesets'
|
301
|
+
|
302
|
+
# query parameters
|
303
|
+
query_params = opts[:query_params] || {}
|
304
|
+
query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
|
305
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
306
|
+
query_params[:'searchFilter'] = opts[:'search_filter'] if !opts[:'search_filter'].nil?
|
307
|
+
query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
|
308
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
309
|
+
|
310
|
+
# header parameters
|
311
|
+
header_params = opts[:header_params] || {}
|
312
|
+
# HTTP header 'Accept' (if needed)
|
313
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
314
|
+
|
315
|
+
# form parameters
|
316
|
+
form_params = opts[:form_params] || {}
|
317
|
+
|
318
|
+
# http body (model)
|
319
|
+
post_body = opts[:body]
|
320
|
+
|
321
|
+
# return_type
|
322
|
+
return_type = opts[:return_type] || 'PageInboxRulesetDto'
|
323
|
+
|
324
|
+
# auth_names
|
325
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
326
|
+
|
327
|
+
new_options = opts.merge(
|
328
|
+
:header_params => header_params,
|
329
|
+
:query_params => query_params,
|
330
|
+
:form_params => form_params,
|
331
|
+
:body => post_body,
|
332
|
+
:auth_names => auth_names,
|
333
|
+
:return_type => return_type
|
334
|
+
)
|
335
|
+
|
336
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
337
|
+
if @api_client.config.debugging
|
338
|
+
@api_client.config.logger.debug "API called: InboxRulesetControllerApi#get_inbox_rulesets\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
339
|
+
end
|
340
|
+
return data, status_code, headers
|
341
|
+
end
|
342
|
+
|
343
|
+
# Test an inbox ruleset
|
344
|
+
# Test an inbox ruleset
|
345
|
+
# @param id [String] ID of inbox ruleset
|
346
|
+
# @param inbox_ruleset_test_options [InboxRulesetTestOptions] inboxRulesetTestOptions
|
347
|
+
# @param [Hash] opts the optional parameters
|
348
|
+
# @return [InboxRulesetTestResult]
|
349
|
+
def test_inbox_ruleset(id, inbox_ruleset_test_options, opts = {})
|
350
|
+
data, _status_code, _headers = test_inbox_ruleset_with_http_info(id, inbox_ruleset_test_options, opts)
|
351
|
+
data
|
352
|
+
end
|
353
|
+
|
354
|
+
# Test an inbox ruleset
|
355
|
+
# Test an inbox ruleset
|
356
|
+
# @param id [String] ID of inbox ruleset
|
357
|
+
# @param inbox_ruleset_test_options [InboxRulesetTestOptions] inboxRulesetTestOptions
|
358
|
+
# @param [Hash] opts the optional parameters
|
359
|
+
# @return [Array<(InboxRulesetTestResult, Integer, Hash)>] InboxRulesetTestResult data, response status code and response headers
|
360
|
+
def test_inbox_ruleset_with_http_info(id, inbox_ruleset_test_options, opts = {})
|
361
|
+
if @api_client.config.debugging
|
362
|
+
@api_client.config.logger.debug 'Calling API: InboxRulesetControllerApi.test_inbox_ruleset ...'
|
363
|
+
end
|
364
|
+
# verify the required parameter 'id' is set
|
365
|
+
if @api_client.config.client_side_validation && id.nil?
|
366
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling InboxRulesetControllerApi.test_inbox_ruleset"
|
367
|
+
end
|
368
|
+
# verify the required parameter 'inbox_ruleset_test_options' is set
|
369
|
+
if @api_client.config.client_side_validation && inbox_ruleset_test_options.nil?
|
370
|
+
fail ArgumentError, "Missing the required parameter 'inbox_ruleset_test_options' when calling InboxRulesetControllerApi.test_inbox_ruleset"
|
371
|
+
end
|
372
|
+
# resource path
|
373
|
+
local_var_path = '/rulesets/{id}/test'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
374
|
+
|
375
|
+
# query parameters
|
376
|
+
query_params = opts[:query_params] || {}
|
377
|
+
|
378
|
+
# header parameters
|
379
|
+
header_params = opts[:header_params] || {}
|
380
|
+
# HTTP header 'Accept' (if needed)
|
381
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
382
|
+
# HTTP header 'Content-Type'
|
383
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
384
|
+
|
385
|
+
# form parameters
|
386
|
+
form_params = opts[:form_params] || {}
|
387
|
+
|
388
|
+
# http body (model)
|
389
|
+
post_body = opts[:body] || @api_client.object_to_http_body(inbox_ruleset_test_options)
|
390
|
+
|
391
|
+
# return_type
|
392
|
+
return_type = opts[:return_type] || 'InboxRulesetTestResult'
|
393
|
+
|
394
|
+
# auth_names
|
395
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
396
|
+
|
397
|
+
new_options = opts.merge(
|
398
|
+
:header_params => header_params,
|
399
|
+
:query_params => query_params,
|
400
|
+
:form_params => form_params,
|
401
|
+
:body => post_body,
|
402
|
+
:auth_names => auth_names,
|
403
|
+
:return_type => return_type
|
404
|
+
)
|
405
|
+
|
406
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
407
|
+
if @api_client.config.debugging
|
408
|
+
@api_client.config.logger.debug "API called: InboxRulesetControllerApi#test_inbox_ruleset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
409
|
+
end
|
410
|
+
return data, status_code, headers
|
411
|
+
end
|
412
|
+
|
413
|
+
# Test inbox rulesets for inbox
|
414
|
+
# Test inbox rulesets for inbox
|
415
|
+
# @param inbox_id [String] ID of inbox
|
416
|
+
# @param inbox_ruleset_test_options [InboxRulesetTestOptions] inboxRulesetTestOptions
|
417
|
+
# @param [Hash] opts the optional parameters
|
418
|
+
# @return [InboxRulesetTestResult]
|
419
|
+
def test_inbox_rulesets_for_inbox(inbox_id, inbox_ruleset_test_options, opts = {})
|
420
|
+
data, _status_code, _headers = test_inbox_rulesets_for_inbox_with_http_info(inbox_id, inbox_ruleset_test_options, opts)
|
421
|
+
data
|
422
|
+
end
|
423
|
+
|
424
|
+
# Test inbox rulesets for inbox
|
425
|
+
# Test inbox rulesets for inbox
|
426
|
+
# @param inbox_id [String] ID of inbox
|
427
|
+
# @param inbox_ruleset_test_options [InboxRulesetTestOptions] inboxRulesetTestOptions
|
428
|
+
# @param [Hash] opts the optional parameters
|
429
|
+
# @return [Array<(InboxRulesetTestResult, Integer, Hash)>] InboxRulesetTestResult data, response status code and response headers
|
430
|
+
def test_inbox_rulesets_for_inbox_with_http_info(inbox_id, inbox_ruleset_test_options, opts = {})
|
431
|
+
if @api_client.config.debugging
|
432
|
+
@api_client.config.logger.debug 'Calling API: InboxRulesetControllerApi.test_inbox_rulesets_for_inbox ...'
|
433
|
+
end
|
434
|
+
# verify the required parameter 'inbox_id' is set
|
435
|
+
if @api_client.config.client_side_validation && inbox_id.nil?
|
436
|
+
fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxRulesetControllerApi.test_inbox_rulesets_for_inbox"
|
437
|
+
end
|
438
|
+
# verify the required parameter 'inbox_ruleset_test_options' is set
|
439
|
+
if @api_client.config.client_side_validation && inbox_ruleset_test_options.nil?
|
440
|
+
fail ArgumentError, "Missing the required parameter 'inbox_ruleset_test_options' when calling InboxRulesetControllerApi.test_inbox_rulesets_for_inbox"
|
441
|
+
end
|
442
|
+
# resource path
|
443
|
+
local_var_path = '/rulesets'
|
444
|
+
|
445
|
+
# query parameters
|
446
|
+
query_params = opts[:query_params] || {}
|
447
|
+
query_params[:'inboxId'] = inbox_id
|
448
|
+
|
449
|
+
# header parameters
|
450
|
+
header_params = opts[:header_params] || {}
|
451
|
+
# HTTP header 'Accept' (if needed)
|
452
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
453
|
+
# HTTP header 'Content-Type'
|
454
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
455
|
+
|
456
|
+
# form parameters
|
457
|
+
form_params = opts[:form_params] || {}
|
458
|
+
|
459
|
+
# http body (model)
|
460
|
+
post_body = opts[:body] || @api_client.object_to_http_body(inbox_ruleset_test_options)
|
461
|
+
|
462
|
+
# return_type
|
463
|
+
return_type = opts[:return_type] || 'InboxRulesetTestResult'
|
464
|
+
|
465
|
+
# auth_names
|
466
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
467
|
+
|
468
|
+
new_options = opts.merge(
|
469
|
+
:header_params => header_params,
|
470
|
+
:query_params => query_params,
|
471
|
+
:form_params => form_params,
|
472
|
+
:body => post_body,
|
473
|
+
:auth_names => auth_names,
|
474
|
+
:return_type => return_type
|
475
|
+
)
|
476
|
+
|
477
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
478
|
+
if @api_client.config.debugging
|
479
|
+
@api_client.config.logger.debug "API called: InboxRulesetControllerApi#test_inbox_rulesets_for_inbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
480
|
+
end
|
481
|
+
return data, status_code, headers
|
482
|
+
end
|
483
|
+
|
484
|
+
# Test new inbox ruleset
|
485
|
+
# Test new inbox ruleset
|
486
|
+
# @param test_new_inbox_ruleset_options [TestNewInboxRulesetOptions] testNewInboxRulesetOptions
|
487
|
+
# @param [Hash] opts the optional parameters
|
488
|
+
# @return [InboxRulesetTestResult]
|
489
|
+
def test_new_inbox_ruleset(test_new_inbox_ruleset_options, opts = {})
|
490
|
+
data, _status_code, _headers = test_new_inbox_ruleset_with_http_info(test_new_inbox_ruleset_options, opts)
|
491
|
+
data
|
492
|
+
end
|
493
|
+
|
494
|
+
# Test new inbox ruleset
|
495
|
+
# Test new inbox ruleset
|
496
|
+
# @param test_new_inbox_ruleset_options [TestNewInboxRulesetOptions] testNewInboxRulesetOptions
|
497
|
+
# @param [Hash] opts the optional parameters
|
498
|
+
# @return [Array<(InboxRulesetTestResult, Integer, Hash)>] InboxRulesetTestResult data, response status code and response headers
|
499
|
+
def test_new_inbox_ruleset_with_http_info(test_new_inbox_ruleset_options, opts = {})
|
500
|
+
if @api_client.config.debugging
|
501
|
+
@api_client.config.logger.debug 'Calling API: InboxRulesetControllerApi.test_new_inbox_ruleset ...'
|
502
|
+
end
|
503
|
+
# verify the required parameter 'test_new_inbox_ruleset_options' is set
|
504
|
+
if @api_client.config.client_side_validation && test_new_inbox_ruleset_options.nil?
|
505
|
+
fail ArgumentError, "Missing the required parameter 'test_new_inbox_ruleset_options' when calling InboxRulesetControllerApi.test_new_inbox_ruleset"
|
506
|
+
end
|
507
|
+
# resource path
|
508
|
+
local_var_path = '/rulesets'
|
509
|
+
|
510
|
+
# query parameters
|
511
|
+
query_params = opts[:query_params] || {}
|
512
|
+
|
513
|
+
# header parameters
|
514
|
+
header_params = opts[:header_params] || {}
|
515
|
+
# HTTP header 'Accept' (if needed)
|
516
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
517
|
+
# HTTP header 'Content-Type'
|
518
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
519
|
+
|
520
|
+
# form parameters
|
521
|
+
form_params = opts[:form_params] || {}
|
522
|
+
|
523
|
+
# http body (model)
|
524
|
+
post_body = opts[:body] || @api_client.object_to_http_body(test_new_inbox_ruleset_options)
|
525
|
+
|
526
|
+
# return_type
|
527
|
+
return_type = opts[:return_type] || 'InboxRulesetTestResult'
|
528
|
+
|
529
|
+
# auth_names
|
530
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
531
|
+
|
532
|
+
new_options = opts.merge(
|
533
|
+
:header_params => header_params,
|
534
|
+
:query_params => query_params,
|
535
|
+
:form_params => form_params,
|
536
|
+
:body => post_body,
|
537
|
+
:auth_names => auth_names,
|
538
|
+
:return_type => return_type
|
539
|
+
)
|
540
|
+
|
541
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
542
|
+
if @api_client.config.debugging
|
543
|
+
@api_client.config.logger.debug "API called: InboxRulesetControllerApi#test_new_inbox_ruleset\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
544
|
+
end
|
545
|
+
return data, status_code, headers
|
546
|
+
end
|
547
|
+
end
|
548
|
+
end
|