mailslurp_client 12.6.4 → 12.8.1
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/bounce_controller_api.rb +284 -0
- data/lib/mailslurp_client/api/email_controller_api.rb +7 -5
- data/lib/mailslurp_client/api/inbox_forwarder_controller_api.rb +548 -0
- data/lib/mailslurp_client/api/sent_emails_controller_api.rb +60 -0
- data/lib/mailslurp_client/models/bounce.rb +325 -0
- data/lib/mailslurp_client/models/bounce_projection.rb +234 -0
- data/lib/mailslurp_client/models/bounce_recipient.rb +262 -0
- data/lib/mailslurp_client/models/create_inbox_forwarder_options.rb +275 -0
- data/lib/mailslurp_client/models/domain_preview.rb +66 -4
- data/lib/mailslurp_client/models/inbox_forwarder_dto.rb +317 -0
- data/lib/mailslurp_client/models/inbox_forwarder_test_options.rb +211 -0
- data/lib/mailslurp_client/models/inbox_forwarder_test_result.rb +227 -0
- data/lib/mailslurp_client/models/page_bounced_email.rb +299 -0
- data/lib/mailslurp_client/models/page_bounced_recipients.rb +299 -0
- data/lib/mailslurp_client/models/page_inbox_forwarder_dto.rb +299 -0
- data/lib/mailslurp_client/models/test_new_inbox_forwarder_options.rb +225 -0
- data/lib/mailslurp_client/models/tracking_pixel_projection.rb +10 -1
- data/lib/mailslurp_client/models/webhook_projection.rb +44 -1
- data/lib/mailslurp_client/models/webhook_result_entity.rb +22 -1
- data/lib/mailslurp_client/version.rb +1 -1
- metadata +15 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 49a895adb891dc40b1bc2974fe5298e7fe05847362e9447a9bdac0873036116b
|
4
|
+
data.tar.gz: 944ba2ff57efae68ef7b1baba6ba1a78c0193f0033835b8efff92e7ed57f1007
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae0ab02f60f634753822bdb3727c2b0bf1d8a0d64c447d7617417d12c8c5f1e3776f496549f636b4feb524a598b38d001a71d358c7544b9be334430f79af7fc6
|
7
|
+
data.tar.gz: a664fc6b6042398f1871e2f10e80530ef8130f6b846129007b4d3c2f0fe7de9f07eb4554c73eb6c00beff6a3ffc20d7d1a13faa9f34963d549f031d802e3da27
|
data/lib/mailslurp_client.rb
CHANGED
@@ -23,6 +23,9 @@ require 'mailslurp_client/models/alias_projection'
|
|
23
23
|
require 'mailslurp_client/models/attachment_meta_data'
|
24
24
|
require 'mailslurp_client/models/attachment_projection'
|
25
25
|
require 'mailslurp_client/models/basic_auth_options'
|
26
|
+
require 'mailslurp_client/models/bounce'
|
27
|
+
require 'mailslurp_client/models/bounce_projection'
|
28
|
+
require 'mailslurp_client/models/bounce_recipient'
|
26
29
|
require 'mailslurp_client/models/bulk_send_email_options'
|
27
30
|
require 'mailslurp_client/models/condition_option'
|
28
31
|
require 'mailslurp_client/models/contact_dto'
|
@@ -33,6 +36,7 @@ require 'mailslurp_client/models/create_contact_options'
|
|
33
36
|
require 'mailslurp_client/models/create_domain_options'
|
34
37
|
require 'mailslurp_client/models/create_group_options'
|
35
38
|
require 'mailslurp_client/models/create_inbox_dto'
|
39
|
+
require 'mailslurp_client/models/create_inbox_forwarder_options'
|
36
40
|
require 'mailslurp_client/models/create_inbox_ruleset_options'
|
37
41
|
require 'mailslurp_client/models/create_template_options'
|
38
42
|
require 'mailslurp_client/models/create_tracking_pixel_options'
|
@@ -65,6 +69,9 @@ require 'mailslurp_client/models/group_projection'
|
|
65
69
|
require 'mailslurp_client/models/html_validation_result'
|
66
70
|
require 'mailslurp_client/models/ip_address_result'
|
67
71
|
require 'mailslurp_client/models/inbox'
|
72
|
+
require 'mailslurp_client/models/inbox_forwarder_dto'
|
73
|
+
require 'mailslurp_client/models/inbox_forwarder_test_options'
|
74
|
+
require 'mailslurp_client/models/inbox_forwarder_test_result'
|
68
75
|
require 'mailslurp_client/models/inbox_projection'
|
69
76
|
require 'mailslurp_client/models/inbox_ruleset_dto'
|
70
77
|
require 'mailslurp_client/models/inbox_ruleset_test_options'
|
@@ -78,11 +85,14 @@ require 'mailslurp_client/models/name_server_record'
|
|
78
85
|
require 'mailslurp_client/models/organization_inbox_projection'
|
79
86
|
require 'mailslurp_client/models/page_alias'
|
80
87
|
require 'mailslurp_client/models/page_attachment_entity'
|
88
|
+
require 'mailslurp_client/models/page_bounced_email'
|
89
|
+
require 'mailslurp_client/models/page_bounced_recipients'
|
81
90
|
require 'mailslurp_client/models/page_contact_projection'
|
82
91
|
require 'mailslurp_client/models/page_email_preview'
|
83
92
|
require 'mailslurp_client/models/page_email_projection'
|
84
93
|
require 'mailslurp_client/models/page_expired_inbox_record_projection'
|
85
94
|
require 'mailslurp_client/models/page_group_projection'
|
95
|
+
require 'mailslurp_client/models/page_inbox_forwarder_dto'
|
86
96
|
require 'mailslurp_client/models/page_inbox_projection'
|
87
97
|
require 'mailslurp_client/models/page_inbox_ruleset_dto'
|
88
98
|
require 'mailslurp_client/models/page_missed_email_projection'
|
@@ -106,6 +116,7 @@ require 'mailslurp_client/models/sort'
|
|
106
116
|
require 'mailslurp_client/models/template_dto'
|
107
117
|
require 'mailslurp_client/models/template_projection'
|
108
118
|
require 'mailslurp_client/models/template_variable'
|
119
|
+
require 'mailslurp_client/models/test_new_inbox_forwarder_options'
|
109
120
|
require 'mailslurp_client/models/test_new_inbox_ruleset_options'
|
110
121
|
require 'mailslurp_client/models/thread_projection'
|
111
122
|
require 'mailslurp_client/models/tracking_pixel_dto'
|
@@ -134,6 +145,7 @@ require 'mailslurp_client/models/webhook_test_result'
|
|
134
145
|
# APIs
|
135
146
|
require 'mailslurp_client/api/alias_controller_api'
|
136
147
|
require 'mailslurp_client/api/attachment_controller_api'
|
148
|
+
require 'mailslurp_client/api/bounce_controller_api'
|
137
149
|
require 'mailslurp_client/api/bulk_actions_controller_api'
|
138
150
|
require 'mailslurp_client/api/common_actions_controller_api'
|
139
151
|
require 'mailslurp_client/api/contact_controller_api'
|
@@ -144,6 +156,7 @@ require 'mailslurp_client/api/export_controller_api'
|
|
144
156
|
require 'mailslurp_client/api/form_controller_api'
|
145
157
|
require 'mailslurp_client/api/group_controller_api'
|
146
158
|
require 'mailslurp_client/api/inbox_controller_api'
|
159
|
+
require 'mailslurp_client/api/inbox_forwarder_controller_api'
|
147
160
|
require 'mailslurp_client/api/inbox_ruleset_controller_api'
|
148
161
|
require 'mailslurp_client/api/mail_server_controller_api'
|
149
162
|
require 'mailslurp_client/api/missed_email_controller_api'
|
@@ -0,0 +1,284 @@
|
|
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 BounceControllerApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Get a bounced email.
|
23
|
+
# Bounced emails are email you have sent that were rejected by a recipient
|
24
|
+
# @param id [String] ID of the bounced email to fetch
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [Bounce]
|
27
|
+
def get_bounced_email(id, opts = {})
|
28
|
+
data, _status_code, _headers = get_bounced_email_with_http_info(id, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Get a bounced email.
|
33
|
+
# Bounced emails are email you have sent that were rejected by a recipient
|
34
|
+
# @param id [String] ID of the bounced email to fetch
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(Bounce, Integer, Hash)>] Bounce data, response status code and response headers
|
37
|
+
def get_bounced_email_with_http_info(id, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: BounceControllerApi.get_bounced_email ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'id' is set
|
42
|
+
if @api_client.config.client_side_validation && id.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling BounceControllerApi.get_bounced_email"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/bounce/emails/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
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(['application/json'])
|
55
|
+
|
56
|
+
# form parameters
|
57
|
+
form_params = opts[:form_params] || {}
|
58
|
+
|
59
|
+
# http body (model)
|
60
|
+
post_body = opts[:body]
|
61
|
+
|
62
|
+
# return_type
|
63
|
+
return_type = opts[:return_type] || 'Bounce'
|
64
|
+
|
65
|
+
# auth_names
|
66
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
67
|
+
|
68
|
+
new_options = opts.merge(
|
69
|
+
:header_params => header_params,
|
70
|
+
:query_params => query_params,
|
71
|
+
:form_params => form_params,
|
72
|
+
:body => post_body,
|
73
|
+
:auth_names => auth_names,
|
74
|
+
:return_type => return_type
|
75
|
+
)
|
76
|
+
|
77
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
78
|
+
if @api_client.config.debugging
|
79
|
+
@api_client.config.logger.debug "API called: BounceControllerApi#get_bounced_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
80
|
+
end
|
81
|
+
return data, status_code, headers
|
82
|
+
end
|
83
|
+
|
84
|
+
# Get paginated list of bounced emails.
|
85
|
+
# Bounced emails are email you have sent that were rejected by a recipient
|
86
|
+
# @param [Hash] opts the optional parameters
|
87
|
+
# @option opts [Integer] :page Optional page index (default to 0)
|
88
|
+
# @option opts [Integer] :size Optional page size (default to 20)
|
89
|
+
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
|
90
|
+
# @return [PageBouncedEmail]
|
91
|
+
def get_bounced_emails(opts = {})
|
92
|
+
data, _status_code, _headers = get_bounced_emails_with_http_info(opts)
|
93
|
+
data
|
94
|
+
end
|
95
|
+
|
96
|
+
# Get paginated list of bounced emails.
|
97
|
+
# Bounced emails are email you have sent that were rejected by a recipient
|
98
|
+
# @param [Hash] opts the optional parameters
|
99
|
+
# @option opts [Integer] :page Optional page index
|
100
|
+
# @option opts [Integer] :size Optional page size
|
101
|
+
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC
|
102
|
+
# @return [Array<(PageBouncedEmail, Integer, Hash)>] PageBouncedEmail data, response status code and response headers
|
103
|
+
def get_bounced_emails_with_http_info(opts = {})
|
104
|
+
if @api_client.config.debugging
|
105
|
+
@api_client.config.logger.debug 'Calling API: BounceControllerApi.get_bounced_emails ...'
|
106
|
+
end
|
107
|
+
allowable_values = ["ASC", "DESC"]
|
108
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
109
|
+
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
110
|
+
end
|
111
|
+
# resource path
|
112
|
+
local_var_path = '/bounce/emails'
|
113
|
+
|
114
|
+
# query parameters
|
115
|
+
query_params = opts[:query_params] || {}
|
116
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
117
|
+
query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
|
118
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
119
|
+
|
120
|
+
# header parameters
|
121
|
+
header_params = opts[:header_params] || {}
|
122
|
+
# HTTP header 'Accept' (if needed)
|
123
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
124
|
+
|
125
|
+
# form parameters
|
126
|
+
form_params = opts[:form_params] || {}
|
127
|
+
|
128
|
+
# http body (model)
|
129
|
+
post_body = opts[:body]
|
130
|
+
|
131
|
+
# return_type
|
132
|
+
return_type = opts[:return_type] || 'PageBouncedEmail'
|
133
|
+
|
134
|
+
# auth_names
|
135
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
136
|
+
|
137
|
+
new_options = opts.merge(
|
138
|
+
:header_params => header_params,
|
139
|
+
:query_params => query_params,
|
140
|
+
:form_params => form_params,
|
141
|
+
:body => post_body,
|
142
|
+
:auth_names => auth_names,
|
143
|
+
:return_type => return_type
|
144
|
+
)
|
145
|
+
|
146
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
147
|
+
if @api_client.config.debugging
|
148
|
+
@api_client.config.logger.debug "API called: BounceControllerApi#get_bounced_emails\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
149
|
+
end
|
150
|
+
return data, status_code, headers
|
151
|
+
end
|
152
|
+
|
153
|
+
# Get a bounced email.
|
154
|
+
# Bounced emails are email you have sent that were rejected by a recipient
|
155
|
+
# @param id [String] ID of the bounced recipient
|
156
|
+
# @param [Hash] opts the optional parameters
|
157
|
+
# @return [BounceRecipient]
|
158
|
+
def get_bounced_recipient(id, opts = {})
|
159
|
+
data, _status_code, _headers = get_bounced_recipient_with_http_info(id, opts)
|
160
|
+
data
|
161
|
+
end
|
162
|
+
|
163
|
+
# Get a bounced email.
|
164
|
+
# Bounced emails are email you have sent that were rejected by a recipient
|
165
|
+
# @param id [String] ID of the bounced recipient
|
166
|
+
# @param [Hash] opts the optional parameters
|
167
|
+
# @return [Array<(BounceRecipient, Integer, Hash)>] BounceRecipient data, response status code and response headers
|
168
|
+
def get_bounced_recipient_with_http_info(id, opts = {})
|
169
|
+
if @api_client.config.debugging
|
170
|
+
@api_client.config.logger.debug 'Calling API: BounceControllerApi.get_bounced_recipient ...'
|
171
|
+
end
|
172
|
+
# verify the required parameter 'id' is set
|
173
|
+
if @api_client.config.client_side_validation && id.nil?
|
174
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling BounceControllerApi.get_bounced_recipient"
|
175
|
+
end
|
176
|
+
# resource path
|
177
|
+
local_var_path = '/bounce/recipients/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
178
|
+
|
179
|
+
# query parameters
|
180
|
+
query_params = opts[:query_params] || {}
|
181
|
+
|
182
|
+
# header parameters
|
183
|
+
header_params = opts[:header_params] || {}
|
184
|
+
# HTTP header 'Accept' (if needed)
|
185
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
186
|
+
|
187
|
+
# form parameters
|
188
|
+
form_params = opts[:form_params] || {}
|
189
|
+
|
190
|
+
# http body (model)
|
191
|
+
post_body = opts[:body]
|
192
|
+
|
193
|
+
# return_type
|
194
|
+
return_type = opts[:return_type] || 'BounceRecipient'
|
195
|
+
|
196
|
+
# auth_names
|
197
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
198
|
+
|
199
|
+
new_options = opts.merge(
|
200
|
+
:header_params => header_params,
|
201
|
+
:query_params => query_params,
|
202
|
+
:form_params => form_params,
|
203
|
+
:body => post_body,
|
204
|
+
:auth_names => auth_names,
|
205
|
+
:return_type => return_type
|
206
|
+
)
|
207
|
+
|
208
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
209
|
+
if @api_client.config.debugging
|
210
|
+
@api_client.config.logger.debug "API called: BounceControllerApi#get_bounced_recipient\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
211
|
+
end
|
212
|
+
return data, status_code, headers
|
213
|
+
end
|
214
|
+
|
215
|
+
# Get paginated list of bounced recipients.
|
216
|
+
# Bounced recipients are email addresses that you have sent emails to that did not accept the sent email. Once a recipient is bounced you cannot send emails to that address.
|
217
|
+
# @param [Hash] opts the optional parameters
|
218
|
+
# @option opts [Integer] :page Optional page index (default to 0)
|
219
|
+
# @option opts [Integer] :size Optional page size (default to 20)
|
220
|
+
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
|
221
|
+
# @return [PageBouncedRecipients]
|
222
|
+
def get_bounced_recipients(opts = {})
|
223
|
+
data, _status_code, _headers = get_bounced_recipients_with_http_info(opts)
|
224
|
+
data
|
225
|
+
end
|
226
|
+
|
227
|
+
# Get paginated list of bounced recipients.
|
228
|
+
# Bounced recipients are email addresses that you have sent emails to that did not accept the sent email. Once a recipient is bounced you cannot send emails to that address.
|
229
|
+
# @param [Hash] opts the optional parameters
|
230
|
+
# @option opts [Integer] :page Optional page index
|
231
|
+
# @option opts [Integer] :size Optional page size
|
232
|
+
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC
|
233
|
+
# @return [Array<(PageBouncedRecipients, Integer, Hash)>] PageBouncedRecipients data, response status code and response headers
|
234
|
+
def get_bounced_recipients_with_http_info(opts = {})
|
235
|
+
if @api_client.config.debugging
|
236
|
+
@api_client.config.logger.debug 'Calling API: BounceControllerApi.get_bounced_recipients ...'
|
237
|
+
end
|
238
|
+
allowable_values = ["ASC", "DESC"]
|
239
|
+
if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
|
240
|
+
fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
|
241
|
+
end
|
242
|
+
# resource path
|
243
|
+
local_var_path = '/bounce/recipients'
|
244
|
+
|
245
|
+
# query parameters
|
246
|
+
query_params = opts[:query_params] || {}
|
247
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
248
|
+
query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
|
249
|
+
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
250
|
+
|
251
|
+
# header parameters
|
252
|
+
header_params = opts[:header_params] || {}
|
253
|
+
# HTTP header 'Accept' (if needed)
|
254
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
255
|
+
|
256
|
+
# form parameters
|
257
|
+
form_params = opts[:form_params] || {}
|
258
|
+
|
259
|
+
# http body (model)
|
260
|
+
post_body = opts[:body]
|
261
|
+
|
262
|
+
# return_type
|
263
|
+
return_type = opts[:return_type] || 'PageBouncedRecipients'
|
264
|
+
|
265
|
+
# auth_names
|
266
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
267
|
+
|
268
|
+
new_options = opts.merge(
|
269
|
+
:header_params => header_params,
|
270
|
+
:query_params => query_params,
|
271
|
+
:form_params => form_params,
|
272
|
+
:body => post_body,
|
273
|
+
:auth_names => auth_names,
|
274
|
+
:return_type => return_type
|
275
|
+
)
|
276
|
+
|
277
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
278
|
+
if @api_client.config.debugging
|
279
|
+
@api_client.config.logger.debug "API called: BounceControllerApi#get_bounced_recipients\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
280
|
+
end
|
281
|
+
return data, status_code, headers
|
282
|
+
end
|
283
|
+
end
|
284
|
+
end
|
@@ -401,10 +401,10 @@ module MailSlurpClient
|
|
401
401
|
# @param email_id [String] ID of email
|
402
402
|
# @param forward_email_options [ForwardEmailOptions] forwardEmailOptions
|
403
403
|
# @param [Hash] opts the optional parameters
|
404
|
-
# @return [
|
404
|
+
# @return [SentEmailDto]
|
405
405
|
def forward_email(email_id, forward_email_options, opts = {})
|
406
|
-
forward_email_with_http_info(email_id, forward_email_options, opts)
|
407
|
-
|
406
|
+
data, _status_code, _headers = forward_email_with_http_info(email_id, forward_email_options, opts)
|
407
|
+
data
|
408
408
|
end
|
409
409
|
|
410
410
|
# Forward email to recipients
|
@@ -412,7 +412,7 @@ module MailSlurpClient
|
|
412
412
|
# @param email_id [String] ID of email
|
413
413
|
# @param forward_email_options [ForwardEmailOptions] forwardEmailOptions
|
414
414
|
# @param [Hash] opts the optional parameters
|
415
|
-
# @return [Array<(
|
415
|
+
# @return [Array<(SentEmailDto, Integer, Hash)>] SentEmailDto data, response status code and response headers
|
416
416
|
def forward_email_with_http_info(email_id, forward_email_options, opts = {})
|
417
417
|
if @api_client.config.debugging
|
418
418
|
@api_client.config.logger.debug 'Calling API: EmailControllerApi.forward_email ...'
|
@@ -433,6 +433,8 @@ module MailSlurpClient
|
|
433
433
|
|
434
434
|
# header parameters
|
435
435
|
header_params = opts[:header_params] || {}
|
436
|
+
# HTTP header 'Accept' (if needed)
|
437
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
436
438
|
# HTTP header 'Content-Type'
|
437
439
|
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
438
440
|
|
@@ -443,7 +445,7 @@ module MailSlurpClient
|
|
443
445
|
post_body = opts[:body] || @api_client.object_to_http_body(forward_email_options)
|
444
446
|
|
445
447
|
# return_type
|
446
|
-
return_type = opts[:return_type]
|
448
|
+
return_type = opts[:return_type] || 'SentEmailDto'
|
447
449
|
|
448
450
|
# auth_names
|
449
451
|
auth_names = opts[:auth_names] || ['API_KEY']
|
@@ -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 InboxForwarderControllerApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Create an inbox forwarder
|
23
|
+
# Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving
|
24
|
+
# @param create_inbox_forwarder_options [CreateInboxForwarderOptions] createInboxForwarderOptions
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @option opts [String] :inbox_id Inbox id to attach forwarder to
|
27
|
+
# @return [InboxForwarderDto]
|
28
|
+
def create_new_inbox_forwarder(create_inbox_forwarder_options, opts = {})
|
29
|
+
data, _status_code, _headers = create_new_inbox_forwarder_with_http_info(create_inbox_forwarder_options, opts)
|
30
|
+
data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Create an inbox forwarder
|
34
|
+
# Create a new inbox rule for forwarding, blocking, and allowing emails when sending and receiving
|
35
|
+
# @param create_inbox_forwarder_options [CreateInboxForwarderOptions] createInboxForwarderOptions
|
36
|
+
# @param [Hash] opts the optional parameters
|
37
|
+
# @option opts [String] :inbox_id Inbox id to attach forwarder to
|
38
|
+
# @return [Array<(InboxForwarderDto, Integer, Hash)>] InboxForwarderDto data, response status code and response headers
|
39
|
+
def create_new_inbox_forwarder_with_http_info(create_inbox_forwarder_options, opts = {})
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug 'Calling API: InboxForwarderControllerApi.create_new_inbox_forwarder ...'
|
42
|
+
end
|
43
|
+
# verify the required parameter 'create_inbox_forwarder_options' is set
|
44
|
+
if @api_client.config.client_side_validation && create_inbox_forwarder_options.nil?
|
45
|
+
fail ArgumentError, "Missing the required parameter 'create_inbox_forwarder_options' when calling InboxForwarderControllerApi.create_new_inbox_forwarder"
|
46
|
+
end
|
47
|
+
# resource path
|
48
|
+
local_var_path = '/forwarders'
|
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_forwarder_options)
|
66
|
+
|
67
|
+
# return_type
|
68
|
+
return_type = opts[:return_type] || 'InboxForwarderDto'
|
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: InboxForwarderControllerApi#create_new_inbox_forwarder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
85
|
+
end
|
86
|
+
return data, status_code, headers
|
87
|
+
end
|
88
|
+
|
89
|
+
# Delete an inbox forwarder
|
90
|
+
# Delete inbox forwarder
|
91
|
+
# @param id [String] ID of inbox forwarder
|
92
|
+
# @param [Hash] opts the optional parameters
|
93
|
+
# @return [nil]
|
94
|
+
def delete_inbox_forwarder(id, opts = {})
|
95
|
+
delete_inbox_forwarder_with_http_info(id, opts)
|
96
|
+
nil
|
97
|
+
end
|
98
|
+
|
99
|
+
# Delete an inbox forwarder
|
100
|
+
# Delete inbox forwarder
|
101
|
+
# @param id [String] ID of inbox forwarder
|
102
|
+
# @param [Hash] opts the optional parameters
|
103
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
104
|
+
def delete_inbox_forwarder_with_http_info(id, opts = {})
|
105
|
+
if @api_client.config.debugging
|
106
|
+
@api_client.config.logger.debug 'Calling API: InboxForwarderControllerApi.delete_inbox_forwarder ...'
|
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 InboxForwarderControllerApi.delete_inbox_forwarder"
|
111
|
+
end
|
112
|
+
# resource path
|
113
|
+
local_var_path = '/forwarders/{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: InboxForwarderControllerApi#delete_inbox_forwarder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
145
|
+
end
|
146
|
+
return data, status_code, headers
|
147
|
+
end
|
148
|
+
|
149
|
+
# Delete inbox forwarders
|
150
|
+
# Delete inbox forwarders. Accepts optional inboxId filter.
|
151
|
+
# @param [Hash] opts the optional parameters
|
152
|
+
# @option opts [String] :inbox_id Optional inbox id to attach forwarder to
|
153
|
+
# @return [nil]
|
154
|
+
def delete_inbox_forwarders(opts = {})
|
155
|
+
delete_inbox_forwarders_with_http_info(opts)
|
156
|
+
nil
|
157
|
+
end
|
158
|
+
|
159
|
+
# Delete inbox forwarders
|
160
|
+
# Delete inbox forwarders. Accepts optional inboxId filter.
|
161
|
+
# @param [Hash] opts the optional parameters
|
162
|
+
# @option opts [String] :inbox_id Optional inbox id to attach forwarder to
|
163
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
164
|
+
def delete_inbox_forwarders_with_http_info(opts = {})
|
165
|
+
if @api_client.config.debugging
|
166
|
+
@api_client.config.logger.debug 'Calling API: InboxForwarderControllerApi.delete_inbox_forwarders ...'
|
167
|
+
end
|
168
|
+
# resource path
|
169
|
+
local_var_path = '/forwarders'
|
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: InboxForwarderControllerApi#delete_inbox_forwarders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
202
|
+
end
|
203
|
+
return data, status_code, headers
|
204
|
+
end
|
205
|
+
|
206
|
+
# Get an inbox forwarder
|
207
|
+
# Get inbox ruleset
|
208
|
+
# @param id [String] ID of inbox forwarder
|
209
|
+
# @param [Hash] opts the optional parameters
|
210
|
+
# @return [InboxForwarderDto]
|
211
|
+
def get_inbox_forwarder(id, opts = {})
|
212
|
+
data, _status_code, _headers = get_inbox_forwarder_with_http_info(id, opts)
|
213
|
+
data
|
214
|
+
end
|
215
|
+
|
216
|
+
# Get an inbox forwarder
|
217
|
+
# Get inbox ruleset
|
218
|
+
# @param id [String] ID of inbox forwarder
|
219
|
+
# @param [Hash] opts the optional parameters
|
220
|
+
# @return [Array<(InboxForwarderDto, Integer, Hash)>] InboxForwarderDto data, response status code and response headers
|
221
|
+
def get_inbox_forwarder_with_http_info(id, opts = {})
|
222
|
+
if @api_client.config.debugging
|
223
|
+
@api_client.config.logger.debug 'Calling API: InboxForwarderControllerApi.get_inbox_forwarder ...'
|
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 InboxForwarderControllerApi.get_inbox_forwarder"
|
228
|
+
end
|
229
|
+
# resource path
|
230
|
+
local_var_path = '/forwarders/{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] || 'InboxForwarderDto'
|
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: InboxForwarderControllerApi#get_inbox_forwarder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
264
|
+
end
|
265
|
+
return data, status_code, headers
|
266
|
+
end
|
267
|
+
|
268
|
+
# List inbox forwarders
|
269
|
+
# List all forwarders attached to an inbox
|
270
|
+
# @param [Hash] opts the optional parameters
|
271
|
+
# @option opts [String] :inbox_id Optional inbox id to get forwarders from
|
272
|
+
# @option opts [Integer] :page Optional page index in inbox forwarder list pagination (default to 0)
|
273
|
+
# @option opts [String] :search_filter Optional search filter
|
274
|
+
# @option opts [Integer] :size Optional page size in inbox forwarder list pagination (default to 20)
|
275
|
+
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
|
276
|
+
# @return [PageInboxForwarderDto]
|
277
|
+
def get_inbox_forwarders(opts = {})
|
278
|
+
data, _status_code, _headers = get_inbox_forwarders_with_http_info(opts)
|
279
|
+
data
|
280
|
+
end
|
281
|
+
|
282
|
+
# List inbox forwarders
|
283
|
+
# List all forwarders attached to an inbox
|
284
|
+
# @param [Hash] opts the optional parameters
|
285
|
+
# @option opts [String] :inbox_id Optional inbox id to get forwarders from
|
286
|
+
# @option opts [Integer] :page Optional page index in inbox forwarder list pagination
|
287
|
+
# @option opts [String] :search_filter Optional search filter
|
288
|
+
# @option opts [Integer] :size Optional page size in inbox forwarder list pagination
|
289
|
+
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC
|
290
|
+
# @return [Array<(PageInboxForwarderDto, Integer, Hash)>] PageInboxForwarderDto data, response status code and response headers
|
291
|
+
def get_inbox_forwarders_with_http_info(opts = {})
|
292
|
+
if @api_client.config.debugging
|
293
|
+
@api_client.config.logger.debug 'Calling API: InboxForwarderControllerApi.get_inbox_forwarders ...'
|
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 = '/forwarders'
|
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] || 'PageInboxForwarderDto'
|
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: InboxForwarderControllerApi#get_inbox_forwarders\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
339
|
+
end
|
340
|
+
return data, status_code, headers
|
341
|
+
end
|
342
|
+
|
343
|
+
# Test an inbox forwarder
|
344
|
+
# Test an inbox forwarder
|
345
|
+
# @param id [String] ID of inbox forwarder
|
346
|
+
# @param inbox_forwarder_test_options [InboxForwarderTestOptions] inboxForwarderTestOptions
|
347
|
+
# @param [Hash] opts the optional parameters
|
348
|
+
# @return [InboxForwarderTestResult]
|
349
|
+
def test_inbox_forwarder(id, inbox_forwarder_test_options, opts = {})
|
350
|
+
data, _status_code, _headers = test_inbox_forwarder_with_http_info(id, inbox_forwarder_test_options, opts)
|
351
|
+
data
|
352
|
+
end
|
353
|
+
|
354
|
+
# Test an inbox forwarder
|
355
|
+
# Test an inbox forwarder
|
356
|
+
# @param id [String] ID of inbox forwarder
|
357
|
+
# @param inbox_forwarder_test_options [InboxForwarderTestOptions] inboxForwarderTestOptions
|
358
|
+
# @param [Hash] opts the optional parameters
|
359
|
+
# @return [Array<(InboxForwarderTestResult, Integer, Hash)>] InboxForwarderTestResult data, response status code and response headers
|
360
|
+
def test_inbox_forwarder_with_http_info(id, inbox_forwarder_test_options, opts = {})
|
361
|
+
if @api_client.config.debugging
|
362
|
+
@api_client.config.logger.debug 'Calling API: InboxForwarderControllerApi.test_inbox_forwarder ...'
|
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 InboxForwarderControllerApi.test_inbox_forwarder"
|
367
|
+
end
|
368
|
+
# verify the required parameter 'inbox_forwarder_test_options' is set
|
369
|
+
if @api_client.config.client_side_validation && inbox_forwarder_test_options.nil?
|
370
|
+
fail ArgumentError, "Missing the required parameter 'inbox_forwarder_test_options' when calling InboxForwarderControllerApi.test_inbox_forwarder"
|
371
|
+
end
|
372
|
+
# resource path
|
373
|
+
local_var_path = '/forwarders/{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_forwarder_test_options)
|
390
|
+
|
391
|
+
# return_type
|
392
|
+
return_type = opts[:return_type] || 'InboxForwarderTestResult'
|
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: InboxForwarderControllerApi#test_inbox_forwarder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
409
|
+
end
|
410
|
+
return data, status_code, headers
|
411
|
+
end
|
412
|
+
|
413
|
+
# Test inbox forwarders for inbox
|
414
|
+
# Test inbox forwarders for inbox
|
415
|
+
# @param inbox_id [String] ID of inbox
|
416
|
+
# @param inbox_forwarder_test_options [InboxForwarderTestOptions] inboxForwarderTestOptions
|
417
|
+
# @param [Hash] opts the optional parameters
|
418
|
+
# @return [InboxForwarderTestResult]
|
419
|
+
def test_inbox_forwarders_for_inbox(inbox_id, inbox_forwarder_test_options, opts = {})
|
420
|
+
data, _status_code, _headers = test_inbox_forwarders_for_inbox_with_http_info(inbox_id, inbox_forwarder_test_options, opts)
|
421
|
+
data
|
422
|
+
end
|
423
|
+
|
424
|
+
# Test inbox forwarders for inbox
|
425
|
+
# Test inbox forwarders for inbox
|
426
|
+
# @param inbox_id [String] ID of inbox
|
427
|
+
# @param inbox_forwarder_test_options [InboxForwarderTestOptions] inboxForwarderTestOptions
|
428
|
+
# @param [Hash] opts the optional parameters
|
429
|
+
# @return [Array<(InboxForwarderTestResult, Integer, Hash)>] InboxForwarderTestResult data, response status code and response headers
|
430
|
+
def test_inbox_forwarders_for_inbox_with_http_info(inbox_id, inbox_forwarder_test_options, opts = {})
|
431
|
+
if @api_client.config.debugging
|
432
|
+
@api_client.config.logger.debug 'Calling API: InboxForwarderControllerApi.test_inbox_forwarders_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 InboxForwarderControllerApi.test_inbox_forwarders_for_inbox"
|
437
|
+
end
|
438
|
+
# verify the required parameter 'inbox_forwarder_test_options' is set
|
439
|
+
if @api_client.config.client_side_validation && inbox_forwarder_test_options.nil?
|
440
|
+
fail ArgumentError, "Missing the required parameter 'inbox_forwarder_test_options' when calling InboxForwarderControllerApi.test_inbox_forwarders_for_inbox"
|
441
|
+
end
|
442
|
+
# resource path
|
443
|
+
local_var_path = '/forwarders'
|
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_forwarder_test_options)
|
461
|
+
|
462
|
+
# return_type
|
463
|
+
return_type = opts[:return_type] || 'InboxForwarderTestResult'
|
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: InboxForwarderControllerApi#test_inbox_forwarders_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 forwarder
|
485
|
+
# Test new inbox forwarder
|
486
|
+
# @param test_new_inbox_forwarder_options [TestNewInboxForwarderOptions] testNewInboxForwarderOptions
|
487
|
+
# @param [Hash] opts the optional parameters
|
488
|
+
# @return [InboxForwarderTestResult]
|
489
|
+
def test_new_inbox_forwarder(test_new_inbox_forwarder_options, opts = {})
|
490
|
+
data, _status_code, _headers = test_new_inbox_forwarder_with_http_info(test_new_inbox_forwarder_options, opts)
|
491
|
+
data
|
492
|
+
end
|
493
|
+
|
494
|
+
# Test new inbox forwarder
|
495
|
+
# Test new inbox forwarder
|
496
|
+
# @param test_new_inbox_forwarder_options [TestNewInboxForwarderOptions] testNewInboxForwarderOptions
|
497
|
+
# @param [Hash] opts the optional parameters
|
498
|
+
# @return [Array<(InboxForwarderTestResult, Integer, Hash)>] InboxForwarderTestResult data, response status code and response headers
|
499
|
+
def test_new_inbox_forwarder_with_http_info(test_new_inbox_forwarder_options, opts = {})
|
500
|
+
if @api_client.config.debugging
|
501
|
+
@api_client.config.logger.debug 'Calling API: InboxForwarderControllerApi.test_new_inbox_forwarder ...'
|
502
|
+
end
|
503
|
+
# verify the required parameter 'test_new_inbox_forwarder_options' is set
|
504
|
+
if @api_client.config.client_side_validation && test_new_inbox_forwarder_options.nil?
|
505
|
+
fail ArgumentError, "Missing the required parameter 'test_new_inbox_forwarder_options' when calling InboxForwarderControllerApi.test_new_inbox_forwarder"
|
506
|
+
end
|
507
|
+
# resource path
|
508
|
+
local_var_path = '/forwarders'
|
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_forwarder_options)
|
525
|
+
|
526
|
+
# return_type
|
527
|
+
return_type = opts[:return_type] || 'InboxForwarderTestResult'
|
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: InboxForwarderControllerApi#test_new_inbox_forwarder\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
544
|
+
end
|
545
|
+
return data, status_code, headers
|
546
|
+
end
|
547
|
+
end
|
548
|
+
end
|