mailslurp_client 15.17.6 → 15.17.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/mailslurp_client/api/connector_controller_api.rb +619 -0
- data/lib/mailslurp_client/models/bounce_projection.rb +15 -15
- data/lib/mailslurp_client/models/connector_dto.rb +407 -0
- data/lib/mailslurp_client/models/connector_projection.rb +346 -0
- data/lib/mailslurp_client/models/connector_sync_event_dto.rb +310 -0
- data/lib/mailslurp_client/models/connector_sync_event_projection.rb +306 -0
- data/lib/mailslurp_client/models/connector_sync_request_result.rb +224 -0
- data/lib/mailslurp_client/models/connector_sync_request_result_exception.rb +246 -0
- data/lib/mailslurp_client/models/connector_sync_request_result_exception_cause.rb +237 -0
- data/lib/mailslurp_client/models/connector_sync_request_result_exception_cause_stack_trace.rb +269 -0
- data/lib/mailslurp_client/models/connector_sync_request_result_exception_cause_suppressed.rb +226 -0
- data/lib/mailslurp_client/models/connector_sync_result.rb +222 -0
- data/lib/mailslurp_client/models/create_connector_imap_options.rb +267 -0
- data/lib/mailslurp_client/models/create_connector_options.rb +338 -0
- data/lib/mailslurp_client/models/email_projection.rb +10 -10
- data/lib/mailslurp_client/models/inbox_replier_event_projection.rb +13 -13
- data/lib/mailslurp_client/models/inbox_ruleset_dto.rb +1 -0
- data/lib/mailslurp_client/models/missed_email_projection.rb +11 -11
- data/lib/mailslurp_client/models/page_connector.rb +308 -0
- data/lib/mailslurp_client/models/page_connector_sync_events.rb +308 -0
- data/lib/mailslurp_client/models/thread_projection.rb +11 -11
- data/lib/mailslurp_client/version.rb +1 -1
- data/lib/mailslurp_client.rb +15 -0
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bcba3de3aae74c39d7d1381d28ba19200765b0cfe5cd0cd86e96daf228d74621
|
4
|
+
data.tar.gz: f361db2ceac042c6b9ee6155fb9c95fe2011011fa777a35c19a010ae7796ca41
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a74e4444e1069a72e17b175227d2f2fda659d68724196f1ee74f71df9c891a7c0422232b4675ba36f2b826ea0f5797cd2c265da0c8bf9bd102edca5c3532b3d
|
7
|
+
data.tar.gz: 0db7825d0108310b524e2a1cb116b5a399f7790f089eeb98521f849838cb9c27abd0948d4f247a368bf095f5d841c2be44fcba0e17b287c44d1a840e68bffb44
|
data/README.md
CHANGED
@@ -6,6 +6,7 @@ MailSlurp is an email API service that lets you create real email addresses in c
|
|
6
6
|
|
7
7
|
## Quick links
|
8
8
|
|
9
|
+
- [API documentation](https://docs.mailslurp.com/api/)
|
9
10
|
- [Method Documentation](https://ruby.mailslurp.com/)
|
10
11
|
- [Gem Package](https://rubygems.org/gems/mailslurp_client)
|
11
12
|
- [Github Source](https://github.com/mailslurp/mailslurp-client-ruby)
|
@@ -0,0 +1,619 @@
|
|
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://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 6.5.2
|
7
|
+
Contact: contact@mailslurp.dev
|
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 ConnectorControllerApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Create an inbox connector
|
23
|
+
# Sync emails between external mailboxes and MailSlurp inboxes
|
24
|
+
# @param create_connector_options [CreateConnectorOptions]
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [ConnectorDto]
|
27
|
+
def create_connector(create_connector_options, opts = {})
|
28
|
+
data, _status_code, _headers = create_connector_with_http_info(create_connector_options, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Create an inbox connector
|
33
|
+
# Sync emails between external mailboxes and MailSlurp inboxes
|
34
|
+
# @param create_connector_options [CreateConnectorOptions]
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(ConnectorDto, Integer, Hash)>] ConnectorDto data, response status code and response headers
|
37
|
+
def create_connector_with_http_info(create_connector_options, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: ConnectorControllerApi.create_connector ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'create_connector_options' is set
|
42
|
+
if @api_client.config.client_side_validation && create_connector_options.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'create_connector_options' when calling ConnectorControllerApi.create_connector"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/connectors'
|
47
|
+
|
48
|
+
# query parameters
|
49
|
+
query_params = opts[:query_params] || {}
|
50
|
+
|
51
|
+
# header parameters
|
52
|
+
header_params = opts[:header_params] || {}
|
53
|
+
# HTTP header 'Accept' (if needed)
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
55
|
+
# HTTP header 'Content-Type'
|
56
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
57
|
+
|
58
|
+
# form parameters
|
59
|
+
form_params = opts[:form_params] || {}
|
60
|
+
|
61
|
+
# http body (model)
|
62
|
+
post_body = opts[:body] || @api_client.object_to_http_body(create_connector_options)
|
63
|
+
|
64
|
+
# return_type
|
65
|
+
return_type = opts[:return_type] || 'ConnectorDto'
|
66
|
+
|
67
|
+
# auth_names
|
68
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
69
|
+
|
70
|
+
new_options = opts.merge(
|
71
|
+
:header_params => header_params,
|
72
|
+
:query_params => query_params,
|
73
|
+
:form_params => form_params,
|
74
|
+
:body => post_body,
|
75
|
+
:auth_names => auth_names,
|
76
|
+
:return_type => return_type
|
77
|
+
)
|
78
|
+
|
79
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
80
|
+
if @api_client.config.debugging
|
81
|
+
@api_client.config.logger.debug "API called: ConnectorControllerApi#create_connector\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
82
|
+
end
|
83
|
+
return data, status_code, headers
|
84
|
+
end
|
85
|
+
|
86
|
+
# Delete an inbox connector
|
87
|
+
# @param id [String]
|
88
|
+
# @param [Hash] opts the optional parameters
|
89
|
+
# @return [nil]
|
90
|
+
def delete_connector(id, opts = {})
|
91
|
+
delete_connector_with_http_info(id, opts)
|
92
|
+
nil
|
93
|
+
end
|
94
|
+
|
95
|
+
# Delete an inbox connector
|
96
|
+
# @param id [String]
|
97
|
+
# @param [Hash] opts the optional parameters
|
98
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
99
|
+
def delete_connector_with_http_info(id, opts = {})
|
100
|
+
if @api_client.config.debugging
|
101
|
+
@api_client.config.logger.debug 'Calling API: ConnectorControllerApi.delete_connector ...'
|
102
|
+
end
|
103
|
+
# verify the required parameter 'id' is set
|
104
|
+
if @api_client.config.client_side_validation && id.nil?
|
105
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ConnectorControllerApi.delete_connector"
|
106
|
+
end
|
107
|
+
# resource path
|
108
|
+
local_var_path = '/connectors/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
109
|
+
|
110
|
+
# query parameters
|
111
|
+
query_params = opts[:query_params] || {}
|
112
|
+
|
113
|
+
# header parameters
|
114
|
+
header_params = opts[:header_params] || {}
|
115
|
+
|
116
|
+
# form parameters
|
117
|
+
form_params = opts[:form_params] || {}
|
118
|
+
|
119
|
+
# http body (model)
|
120
|
+
post_body = opts[:body]
|
121
|
+
|
122
|
+
# return_type
|
123
|
+
return_type = opts[:return_type]
|
124
|
+
|
125
|
+
# auth_names
|
126
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
127
|
+
|
128
|
+
new_options = opts.merge(
|
129
|
+
:header_params => header_params,
|
130
|
+
:query_params => query_params,
|
131
|
+
:form_params => form_params,
|
132
|
+
:body => post_body,
|
133
|
+
:auth_names => auth_names,
|
134
|
+
:return_type => return_type
|
135
|
+
)
|
136
|
+
|
137
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
138
|
+
if @api_client.config.debugging
|
139
|
+
@api_client.config.logger.debug "API called: ConnectorControllerApi#delete_connector\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
140
|
+
end
|
141
|
+
return data, status_code, headers
|
142
|
+
end
|
143
|
+
|
144
|
+
# Get all inbox connector sync events
|
145
|
+
# @param [Hash] opts the optional parameters
|
146
|
+
# @option opts [Integer] :page Optional page index in connector list pagination (default to 0)
|
147
|
+
# @option opts [Integer] :size Optional page size in connector list pagination (default to 20)
|
148
|
+
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
|
149
|
+
# @option opts [DateTime] :since Filter by created at after the given timestamp
|
150
|
+
# @option opts [DateTime] :before Filter by created at before the given timestamp
|
151
|
+
# @return [PageConnectorSyncEvents]
|
152
|
+
def get_all_connector_sync_events(opts = {})
|
153
|
+
data, _status_code, _headers = get_all_connector_sync_events_with_http_info(opts)
|
154
|
+
data
|
155
|
+
end
|
156
|
+
|
157
|
+
# Get all inbox connector sync events
|
158
|
+
# @param [Hash] opts the optional parameters
|
159
|
+
# @option opts [Integer] :page Optional page index in connector list pagination
|
160
|
+
# @option opts [Integer] :size Optional page size in connector list pagination
|
161
|
+
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC
|
162
|
+
# @option opts [DateTime] :since Filter by created at after the given timestamp
|
163
|
+
# @option opts [DateTime] :before Filter by created at before the given timestamp
|
164
|
+
# @return [Array<(PageConnectorSyncEvents, Integer, Hash)>] PageConnectorSyncEvents data, response status code and response headers
|
165
|
+
def get_all_connector_sync_events_with_http_info(opts = {})
|
166
|
+
if @api_client.config.debugging
|
167
|
+
@api_client.config.logger.debug 'Calling API: ConnectorControllerApi.get_all_connector_sync_events ...'
|
168
|
+
end
|
169
|
+
allowable_values = ["ASC", "DESC"]
|
170
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
171
|
+
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
172
|
+
end
|
173
|
+
# resource path
|
174
|
+
local_var_path = '/connectors/events'
|
175
|
+
|
176
|
+
# query parameters
|
177
|
+
query_params = opts[:query_params] || {}
|
178
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
179
|
+
query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
|
180
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
181
|
+
query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
|
182
|
+
query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
|
183
|
+
|
184
|
+
# header parameters
|
185
|
+
header_params = opts[:header_params] || {}
|
186
|
+
# HTTP header 'Accept' (if needed)
|
187
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
188
|
+
|
189
|
+
# form parameters
|
190
|
+
form_params = opts[:form_params] || {}
|
191
|
+
|
192
|
+
# http body (model)
|
193
|
+
post_body = opts[:body]
|
194
|
+
|
195
|
+
# return_type
|
196
|
+
return_type = opts[:return_type] || 'PageConnectorSyncEvents'
|
197
|
+
|
198
|
+
# auth_names
|
199
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
200
|
+
|
201
|
+
new_options = opts.merge(
|
202
|
+
:header_params => header_params,
|
203
|
+
:query_params => query_params,
|
204
|
+
:form_params => form_params,
|
205
|
+
:body => post_body,
|
206
|
+
:auth_names => auth_names,
|
207
|
+
:return_type => return_type
|
208
|
+
)
|
209
|
+
|
210
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
211
|
+
if @api_client.config.debugging
|
212
|
+
@api_client.config.logger.debug "API called: ConnectorControllerApi#get_all_connector_sync_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
213
|
+
end
|
214
|
+
return data, status_code, headers
|
215
|
+
end
|
216
|
+
|
217
|
+
# Get an inbox connector
|
218
|
+
# @param id [String]
|
219
|
+
# @param [Hash] opts the optional parameters
|
220
|
+
# @return [ConnectorDto]
|
221
|
+
def get_connector(id, opts = {})
|
222
|
+
data, _status_code, _headers = get_connector_with_http_info(id, opts)
|
223
|
+
data
|
224
|
+
end
|
225
|
+
|
226
|
+
# Get an inbox connector
|
227
|
+
# @param id [String]
|
228
|
+
# @param [Hash] opts the optional parameters
|
229
|
+
# @return [Array<(ConnectorDto, Integer, Hash)>] ConnectorDto data, response status code and response headers
|
230
|
+
def get_connector_with_http_info(id, opts = {})
|
231
|
+
if @api_client.config.debugging
|
232
|
+
@api_client.config.logger.debug 'Calling API: ConnectorControllerApi.get_connector ...'
|
233
|
+
end
|
234
|
+
# verify the required parameter 'id' is set
|
235
|
+
if @api_client.config.client_side_validation && id.nil?
|
236
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ConnectorControllerApi.get_connector"
|
237
|
+
end
|
238
|
+
# resource path
|
239
|
+
local_var_path = '/connectors/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
240
|
+
|
241
|
+
# query parameters
|
242
|
+
query_params = opts[:query_params] || {}
|
243
|
+
|
244
|
+
# header parameters
|
245
|
+
header_params = opts[:header_params] || {}
|
246
|
+
# HTTP header 'Accept' (if needed)
|
247
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
248
|
+
|
249
|
+
# form parameters
|
250
|
+
form_params = opts[:form_params] || {}
|
251
|
+
|
252
|
+
# http body (model)
|
253
|
+
post_body = opts[:body]
|
254
|
+
|
255
|
+
# return_type
|
256
|
+
return_type = opts[:return_type] || 'ConnectorDto'
|
257
|
+
|
258
|
+
# auth_names
|
259
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
260
|
+
|
261
|
+
new_options = opts.merge(
|
262
|
+
:header_params => header_params,
|
263
|
+
:query_params => query_params,
|
264
|
+
:form_params => form_params,
|
265
|
+
:body => post_body,
|
266
|
+
:auth_names => auth_names,
|
267
|
+
:return_type => return_type
|
268
|
+
)
|
269
|
+
|
270
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
271
|
+
if @api_client.config.debugging
|
272
|
+
@api_client.config.logger.debug "API called: ConnectorControllerApi#get_connector\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
273
|
+
end
|
274
|
+
return data, status_code, headers
|
275
|
+
end
|
276
|
+
|
277
|
+
# Get an inbox connector sync event
|
278
|
+
# @param id [String]
|
279
|
+
# @param [Hash] opts the optional parameters
|
280
|
+
# @return [ConnectorSyncEventDto]
|
281
|
+
def get_connector_sync_event(id, opts = {})
|
282
|
+
data, _status_code, _headers = get_connector_sync_event_with_http_info(id, opts)
|
283
|
+
data
|
284
|
+
end
|
285
|
+
|
286
|
+
# Get an inbox connector sync event
|
287
|
+
# @param id [String]
|
288
|
+
# @param [Hash] opts the optional parameters
|
289
|
+
# @return [Array<(ConnectorSyncEventDto, Integer, Hash)>] ConnectorSyncEventDto data, response status code and response headers
|
290
|
+
def get_connector_sync_event_with_http_info(id, opts = {})
|
291
|
+
if @api_client.config.debugging
|
292
|
+
@api_client.config.logger.debug 'Calling API: ConnectorControllerApi.get_connector_sync_event ...'
|
293
|
+
end
|
294
|
+
# verify the required parameter 'id' is set
|
295
|
+
if @api_client.config.client_side_validation && id.nil?
|
296
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ConnectorControllerApi.get_connector_sync_event"
|
297
|
+
end
|
298
|
+
# resource path
|
299
|
+
local_var_path = '/connectors/events/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
300
|
+
|
301
|
+
# query parameters
|
302
|
+
query_params = opts[:query_params] || {}
|
303
|
+
|
304
|
+
# header parameters
|
305
|
+
header_params = opts[:header_params] || {}
|
306
|
+
# HTTP header 'Accept' (if needed)
|
307
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
308
|
+
|
309
|
+
# form parameters
|
310
|
+
form_params = opts[:form_params] || {}
|
311
|
+
|
312
|
+
# http body (model)
|
313
|
+
post_body = opts[:body]
|
314
|
+
|
315
|
+
# return_type
|
316
|
+
return_type = opts[:return_type] || 'ConnectorSyncEventDto'
|
317
|
+
|
318
|
+
# auth_names
|
319
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
320
|
+
|
321
|
+
new_options = opts.merge(
|
322
|
+
:header_params => header_params,
|
323
|
+
:query_params => query_params,
|
324
|
+
:form_params => form_params,
|
325
|
+
:body => post_body,
|
326
|
+
:auth_names => auth_names,
|
327
|
+
:return_type => return_type
|
328
|
+
)
|
329
|
+
|
330
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
331
|
+
if @api_client.config.debugging
|
332
|
+
@api_client.config.logger.debug "API called: ConnectorControllerApi#get_connector_sync_event\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
333
|
+
end
|
334
|
+
return data, status_code, headers
|
335
|
+
end
|
336
|
+
|
337
|
+
# Get an inbox connector sync events
|
338
|
+
# @param id [String]
|
339
|
+
# @param [Hash] opts the optional parameters
|
340
|
+
# @option opts [Integer] :page Optional page index in connector list pagination (default to 0)
|
341
|
+
# @option opts [Integer] :size Optional page size in connector list pagination (default to 20)
|
342
|
+
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
|
343
|
+
# @option opts [DateTime] :since Filter by created at after the given timestamp
|
344
|
+
# @option opts [DateTime] :before Filter by created at before the given timestamp
|
345
|
+
# @return [PageConnectorSyncEvents]
|
346
|
+
def get_connector_sync_events(id, opts = {})
|
347
|
+
data, _status_code, _headers = get_connector_sync_events_with_http_info(id, opts)
|
348
|
+
data
|
349
|
+
end
|
350
|
+
|
351
|
+
# Get an inbox connector sync events
|
352
|
+
# @param id [String]
|
353
|
+
# @param [Hash] opts the optional parameters
|
354
|
+
# @option opts [Integer] :page Optional page index in connector list pagination
|
355
|
+
# @option opts [Integer] :size Optional page size in connector list pagination
|
356
|
+
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC
|
357
|
+
# @option opts [DateTime] :since Filter by created at after the given timestamp
|
358
|
+
# @option opts [DateTime] :before Filter by created at before the given timestamp
|
359
|
+
# @return [Array<(PageConnectorSyncEvents, Integer, Hash)>] PageConnectorSyncEvents data, response status code and response headers
|
360
|
+
def get_connector_sync_events_with_http_info(id, opts = {})
|
361
|
+
if @api_client.config.debugging
|
362
|
+
@api_client.config.logger.debug 'Calling API: ConnectorControllerApi.get_connector_sync_events ...'
|
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 ConnectorControllerApi.get_connector_sync_events"
|
367
|
+
end
|
368
|
+
allowable_values = ["ASC", "DESC"]
|
369
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
370
|
+
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
371
|
+
end
|
372
|
+
# resource path
|
373
|
+
local_var_path = '/connectors/{id}/events'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
374
|
+
|
375
|
+
# query parameters
|
376
|
+
query_params = opts[:query_params] || {}
|
377
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
378
|
+
query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
|
379
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
380
|
+
query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
|
381
|
+
query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
|
382
|
+
|
383
|
+
# header parameters
|
384
|
+
header_params = opts[:header_params] || {}
|
385
|
+
# HTTP header 'Accept' (if needed)
|
386
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
387
|
+
|
388
|
+
# form parameters
|
389
|
+
form_params = opts[:form_params] || {}
|
390
|
+
|
391
|
+
# http body (model)
|
392
|
+
post_body = opts[:body]
|
393
|
+
|
394
|
+
# return_type
|
395
|
+
return_type = opts[:return_type] || 'PageConnectorSyncEvents'
|
396
|
+
|
397
|
+
# auth_names
|
398
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
399
|
+
|
400
|
+
new_options = opts.merge(
|
401
|
+
:header_params => header_params,
|
402
|
+
:query_params => query_params,
|
403
|
+
:form_params => form_params,
|
404
|
+
:body => post_body,
|
405
|
+
:auth_names => auth_names,
|
406
|
+
:return_type => return_type
|
407
|
+
)
|
408
|
+
|
409
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
410
|
+
if @api_client.config.debugging
|
411
|
+
@api_client.config.logger.debug "API called: ConnectorControllerApi#get_connector_sync_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
412
|
+
end
|
413
|
+
return data, status_code, headers
|
414
|
+
end
|
415
|
+
|
416
|
+
# Get inbox connectors
|
417
|
+
# List inbox connectors that sync external emails to MailSlurp inboxes
|
418
|
+
# @param [Hash] opts the optional parameters
|
419
|
+
# @option opts [Integer] :page Optional page index in connector list pagination (default to 0)
|
420
|
+
# @option opts [Integer] :size Optional page size in connector list pagination (default to 20)
|
421
|
+
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
|
422
|
+
# @option opts [DateTime] :since Filter by created at after the given timestamp
|
423
|
+
# @option opts [DateTime] :before Filter by created at before the given timestamp
|
424
|
+
# @return [PageConnector]
|
425
|
+
def get_connectors(opts = {})
|
426
|
+
data, _status_code, _headers = get_connectors_with_http_info(opts)
|
427
|
+
data
|
428
|
+
end
|
429
|
+
|
430
|
+
# Get inbox connectors
|
431
|
+
# List inbox connectors that sync external emails to MailSlurp inboxes
|
432
|
+
# @param [Hash] opts the optional parameters
|
433
|
+
# @option opts [Integer] :page Optional page index in connector list pagination
|
434
|
+
# @option opts [Integer] :size Optional page size in connector list pagination
|
435
|
+
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC
|
436
|
+
# @option opts [DateTime] :since Filter by created at after the given timestamp
|
437
|
+
# @option opts [DateTime] :before Filter by created at before the given timestamp
|
438
|
+
# @return [Array<(PageConnector, Integer, Hash)>] PageConnector data, response status code and response headers
|
439
|
+
def get_connectors_with_http_info(opts = {})
|
440
|
+
if @api_client.config.debugging
|
441
|
+
@api_client.config.logger.debug 'Calling API: ConnectorControllerApi.get_connectors ...'
|
442
|
+
end
|
443
|
+
allowable_values = ["ASC", "DESC"]
|
444
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
445
|
+
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
446
|
+
end
|
447
|
+
# resource path
|
448
|
+
local_var_path = '/connectors'
|
449
|
+
|
450
|
+
# query parameters
|
451
|
+
query_params = opts[:query_params] || {}
|
452
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
453
|
+
query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
|
454
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
455
|
+
query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
|
456
|
+
query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
|
457
|
+
|
458
|
+
# header parameters
|
459
|
+
header_params = opts[:header_params] || {}
|
460
|
+
# HTTP header 'Accept' (if needed)
|
461
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
462
|
+
|
463
|
+
# form parameters
|
464
|
+
form_params = opts[:form_params] || {}
|
465
|
+
|
466
|
+
# http body (model)
|
467
|
+
post_body = opts[:body]
|
468
|
+
|
469
|
+
# return_type
|
470
|
+
return_type = opts[:return_type] || 'PageConnector'
|
471
|
+
|
472
|
+
# auth_names
|
473
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
474
|
+
|
475
|
+
new_options = opts.merge(
|
476
|
+
:header_params => header_params,
|
477
|
+
:query_params => query_params,
|
478
|
+
:form_params => form_params,
|
479
|
+
:body => post_body,
|
480
|
+
:auth_names => auth_names,
|
481
|
+
:return_type => return_type
|
482
|
+
)
|
483
|
+
|
484
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
485
|
+
if @api_client.config.debugging
|
486
|
+
@api_client.config.logger.debug "API called: ConnectorControllerApi#get_connectors\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
487
|
+
end
|
488
|
+
return data, status_code, headers
|
489
|
+
end
|
490
|
+
|
491
|
+
# Sync an inbox connector
|
492
|
+
# @param id [String]
|
493
|
+
# @param [Hash] opts the optional parameters
|
494
|
+
# @return [ConnectorSyncRequestResult]
|
495
|
+
def sync_connector(id, opts = {})
|
496
|
+
data, _status_code, _headers = sync_connector_with_http_info(id, opts)
|
497
|
+
data
|
498
|
+
end
|
499
|
+
|
500
|
+
# Sync an inbox connector
|
501
|
+
# @param id [String]
|
502
|
+
# @param [Hash] opts the optional parameters
|
503
|
+
# @return [Array<(ConnectorSyncRequestResult, Integer, Hash)>] ConnectorSyncRequestResult data, response status code and response headers
|
504
|
+
def sync_connector_with_http_info(id, opts = {})
|
505
|
+
if @api_client.config.debugging
|
506
|
+
@api_client.config.logger.debug 'Calling API: ConnectorControllerApi.sync_connector ...'
|
507
|
+
end
|
508
|
+
# verify the required parameter 'id' is set
|
509
|
+
if @api_client.config.client_side_validation && id.nil?
|
510
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ConnectorControllerApi.sync_connector"
|
511
|
+
end
|
512
|
+
# resource path
|
513
|
+
local_var_path = '/connectors/{id}/sync'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
514
|
+
|
515
|
+
# query parameters
|
516
|
+
query_params = opts[:query_params] || {}
|
517
|
+
|
518
|
+
# header parameters
|
519
|
+
header_params = opts[:header_params] || {}
|
520
|
+
# HTTP header 'Accept' (if needed)
|
521
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
522
|
+
|
523
|
+
# form parameters
|
524
|
+
form_params = opts[:form_params] || {}
|
525
|
+
|
526
|
+
# http body (model)
|
527
|
+
post_body = opts[:body]
|
528
|
+
|
529
|
+
# return_type
|
530
|
+
return_type = opts[:return_type] || 'ConnectorSyncRequestResult'
|
531
|
+
|
532
|
+
# auth_names
|
533
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
534
|
+
|
535
|
+
new_options = opts.merge(
|
536
|
+
:header_params => header_params,
|
537
|
+
:query_params => query_params,
|
538
|
+
:form_params => form_params,
|
539
|
+
:body => post_body,
|
540
|
+
:auth_names => auth_names,
|
541
|
+
:return_type => return_type
|
542
|
+
)
|
543
|
+
|
544
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
545
|
+
if @api_client.config.debugging
|
546
|
+
@api_client.config.logger.debug "API called: ConnectorControllerApi#sync_connector\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
547
|
+
end
|
548
|
+
return data, status_code, headers
|
549
|
+
end
|
550
|
+
|
551
|
+
# Update an inbox connector
|
552
|
+
# @param id [String]
|
553
|
+
# @param create_connector_options [CreateConnectorOptions]
|
554
|
+
# @param [Hash] opts the optional parameters
|
555
|
+
# @return [ConnectorDto]
|
556
|
+
def update_connector(id, create_connector_options, opts = {})
|
557
|
+
data, _status_code, _headers = update_connector_with_http_info(id, create_connector_options, opts)
|
558
|
+
data
|
559
|
+
end
|
560
|
+
|
561
|
+
# Update an inbox connector
|
562
|
+
# @param id [String]
|
563
|
+
# @param create_connector_options [CreateConnectorOptions]
|
564
|
+
# @param [Hash] opts the optional parameters
|
565
|
+
# @return [Array<(ConnectorDto, Integer, Hash)>] ConnectorDto data, response status code and response headers
|
566
|
+
def update_connector_with_http_info(id, create_connector_options, opts = {})
|
567
|
+
if @api_client.config.debugging
|
568
|
+
@api_client.config.logger.debug 'Calling API: ConnectorControllerApi.update_connector ...'
|
569
|
+
end
|
570
|
+
# verify the required parameter 'id' is set
|
571
|
+
if @api_client.config.client_side_validation && id.nil?
|
572
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ConnectorControllerApi.update_connector"
|
573
|
+
end
|
574
|
+
# verify the required parameter 'create_connector_options' is set
|
575
|
+
if @api_client.config.client_side_validation && create_connector_options.nil?
|
576
|
+
fail ArgumentError, "Missing the required parameter 'create_connector_options' when calling ConnectorControllerApi.update_connector"
|
577
|
+
end
|
578
|
+
# resource path
|
579
|
+
local_var_path = '/connectors/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
580
|
+
|
581
|
+
# query parameters
|
582
|
+
query_params = opts[:query_params] || {}
|
583
|
+
|
584
|
+
# header parameters
|
585
|
+
header_params = opts[:header_params] || {}
|
586
|
+
# HTTP header 'Accept' (if needed)
|
587
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
588
|
+
# HTTP header 'Content-Type'
|
589
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
590
|
+
|
591
|
+
# form parameters
|
592
|
+
form_params = opts[:form_params] || {}
|
593
|
+
|
594
|
+
# http body (model)
|
595
|
+
post_body = opts[:body] || @api_client.object_to_http_body(create_connector_options)
|
596
|
+
|
597
|
+
# return_type
|
598
|
+
return_type = opts[:return_type] || 'ConnectorDto'
|
599
|
+
|
600
|
+
# auth_names
|
601
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
602
|
+
|
603
|
+
new_options = opts.merge(
|
604
|
+
:header_params => header_params,
|
605
|
+
:query_params => query_params,
|
606
|
+
:form_params => form_params,
|
607
|
+
:body => post_body,
|
608
|
+
:auth_names => auth_names,
|
609
|
+
:return_type => return_type
|
610
|
+
)
|
611
|
+
|
612
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
613
|
+
if @api_client.config.debugging
|
614
|
+
@api_client.config.logger.debug "API called: ConnectorControllerApi#update_connector\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
615
|
+
end
|
616
|
+
return data, status_code, headers
|
617
|
+
end
|
618
|
+
end
|
619
|
+
end
|