mailslurp_client 11.8.10 → 11.9.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 +1 -0
- data/lib/mailslurp_client/api/attachment_controller_api.rb +186 -0
- data/lib/mailslurp_client/api/email_controller_api.rb +30 -30
- data/lib/mailslurp_client/api/inbox_controller_api.rb +66 -12
- data/lib/mailslurp_client/api/wait_for_controller_api.rb +8 -8
- data/lib/mailslurp_client/api/webhook_controller_api.rb +60 -6
- data/lib/mailslurp_client/models/attachment_meta_data.rb +2 -2
- data/lib/mailslurp_client/models/create_domain_options.rb +48 -4
- data/lib/mailslurp_client/models/create_inbox_dto.rb +45 -1
- data/lib/mailslurp_client/models/download_attachment_dto.rb +3 -3
- data/lib/mailslurp_client/models/email.rb +8 -7
- data/lib/mailslurp_client/models/email_preview.rb +3 -3
- data/lib/mailslurp_client/models/webhook_dto.rb +1 -1
- data/lib/mailslurp_client/models/webhook_payload.rb +370 -0
- data/lib/mailslurp_client/version.rb +1 -1
- metadata +3 -2
@@ -19,7 +19,7 @@ module MailSlurpClient
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
-
# Create an
|
22
|
+
# Create an inbox email address. An inbox has a real email address and can send and receive emails.
|
23
23
|
# Create a new inbox and with a randomized email address to send and receive from. Pass emailAddress parameter if you wish to use a specific email address. Creating an inbox is required before sending or receiving emails. If writing tests it is recommended that you create a new inbox during each test method so that it is unique and empty.
|
24
24
|
# @param [Hash] opts the optional parameters
|
25
25
|
# @option opts [Boolean] :allow_team_access Grant team access to this inbox and the emails that belong to it for team members of your organization.
|
@@ -37,7 +37,7 @@ module MailSlurpClient
|
|
37
37
|
data
|
38
38
|
end
|
39
39
|
|
40
|
-
# Create an
|
40
|
+
# Create an inbox email address. An inbox has a real email address and can send and receive emails.
|
41
41
|
# Create a new inbox and with a randomized email address to send and receive from. Pass emailAddress parameter if you wish to use a specific email address. Creating an inbox is required before sending or receiving emails. If writing tests it is recommended that you create a new inbox during each test method so that it is unique and empty.
|
42
42
|
# @param [Hash] opts the optional parameters
|
43
43
|
# @option opts [Boolean] :allow_team_access Grant team access to this inbox and the emails that belong to it for team members of your organization.
|
@@ -102,7 +102,61 @@ module MailSlurpClient
|
|
102
102
|
return data, status_code, headers
|
103
103
|
end
|
104
104
|
|
105
|
-
# Create an inbox with
|
105
|
+
# Create an inbox with default options. Uses MailSlurp domain pool address and is private.
|
106
|
+
# @param [Hash] opts the optional parameters
|
107
|
+
# @return [Inbox]
|
108
|
+
def create_inbox_with_defaults(opts = {})
|
109
|
+
data, _status_code, _headers = create_inbox_with_defaults_with_http_info(opts)
|
110
|
+
data
|
111
|
+
end
|
112
|
+
|
113
|
+
# Create an inbox with default options. Uses MailSlurp domain pool address and is private.
|
114
|
+
# @param [Hash] opts the optional parameters
|
115
|
+
# @return [Array<(Inbox, Integer, Hash)>] Inbox data, response status code and response headers
|
116
|
+
def create_inbox_with_defaults_with_http_info(opts = {})
|
117
|
+
if @api_client.config.debugging
|
118
|
+
@api_client.config.logger.debug 'Calling API: InboxControllerApi.create_inbox_with_defaults ...'
|
119
|
+
end
|
120
|
+
# resource path
|
121
|
+
local_var_path = '/inboxes/withDefaults'
|
122
|
+
|
123
|
+
# query parameters
|
124
|
+
query_params = opts[:query_params] || {}
|
125
|
+
|
126
|
+
# header parameters
|
127
|
+
header_params = opts[:header_params] || {}
|
128
|
+
# HTTP header 'Accept' (if needed)
|
129
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
130
|
+
|
131
|
+
# form parameters
|
132
|
+
form_params = opts[:form_params] || {}
|
133
|
+
|
134
|
+
# http body (model)
|
135
|
+
post_body = opts[:body]
|
136
|
+
|
137
|
+
# return_type
|
138
|
+
return_type = opts[:return_type] || 'Inbox'
|
139
|
+
|
140
|
+
# auth_names
|
141
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
142
|
+
|
143
|
+
new_options = opts.merge(
|
144
|
+
:header_params => header_params,
|
145
|
+
:query_params => query_params,
|
146
|
+
:form_params => form_params,
|
147
|
+
:body => post_body,
|
148
|
+
:auth_names => auth_names,
|
149
|
+
:return_type => return_type
|
150
|
+
)
|
151
|
+
|
152
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
153
|
+
if @api_client.config.debugging
|
154
|
+
@api_client.config.logger.debug "API called: InboxControllerApi#create_inbox_with_defaults\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
155
|
+
end
|
156
|
+
return data, status_code, headers
|
157
|
+
end
|
158
|
+
|
159
|
+
# Create an inbox with options. Extended options for inbox creation.
|
106
160
|
# Additional endpoint that allows inbox creation with request body options. Can be more flexible that other methods for some clients.
|
107
161
|
# @param create_inbox_dto [CreateInboxDto] createInboxDto
|
108
162
|
# @param [Hash] opts the optional parameters
|
@@ -112,7 +166,7 @@ module MailSlurpClient
|
|
112
166
|
data
|
113
167
|
end
|
114
168
|
|
115
|
-
# Create an inbox with
|
169
|
+
# Create an inbox with options. Extended options for inbox creation.
|
116
170
|
# Additional endpoint that allows inbox creation with request body options. Can be more flexible that other methods for some clients.
|
117
171
|
# @param create_inbox_dto [CreateInboxDto] createInboxDto
|
118
172
|
# @param [Hash] opts the optional parameters
|
@@ -445,7 +499,7 @@ module MailSlurpClient
|
|
445
499
|
return data, status_code, headers
|
446
500
|
end
|
447
501
|
|
448
|
-
# Get Inbox
|
502
|
+
# Get Inbox. Returns properties of an inbox.
|
449
503
|
# Returns an inbox's properties, including its email address and ID.
|
450
504
|
# @param inbox_id [String] inboxId
|
451
505
|
# @param [Hash] opts the optional parameters
|
@@ -455,7 +509,7 @@ module MailSlurpClient
|
|
455
509
|
data
|
456
510
|
end
|
457
511
|
|
458
|
-
# Get Inbox
|
512
|
+
# Get Inbox. Returns properties of an inbox.
|
459
513
|
# Returns an inbox's properties, including its email address and ID.
|
460
514
|
# @param inbox_id [String] inboxId
|
461
515
|
# @param [Hash] opts the optional parameters
|
@@ -713,7 +767,7 @@ module MailSlurpClient
|
|
713
767
|
return data, status_code, headers
|
714
768
|
end
|
715
769
|
|
716
|
-
# List Inboxes
|
770
|
+
# List Inboxes and email eddresses
|
717
771
|
# List the inboxes you have created. Note use of the more advanced `getAllEmails` is recommended. You can provide a limit and sort parameter.
|
718
772
|
# @param [Hash] opts the optional parameters
|
719
773
|
# @option opts [Integer] :size Optional result size limit. Note an automatic limit of 100 results is applied. See the paginated `getAllEmails` for larger queries. (default to 100)
|
@@ -724,7 +778,7 @@ module MailSlurpClient
|
|
724
778
|
data
|
725
779
|
end
|
726
780
|
|
727
|
-
# List Inboxes
|
781
|
+
# List Inboxes and email eddresses
|
728
782
|
# List the inboxes you have created. Note use of the more advanced `getAllEmails` is recommended. You can provide a limit and sort parameter.
|
729
783
|
# @param [Hash] opts the optional parameters
|
730
784
|
# @option opts [Integer] :size Optional result size limit. Note an automatic limit of 100 results is applied. See the paginated `getAllEmails` for larger queries.
|
@@ -913,7 +967,7 @@ module MailSlurpClient
|
|
913
967
|
end
|
914
968
|
|
915
969
|
# Send email and return sent confirmation
|
916
|
-
# Sister method for standard `sendEmail` method with the benefit of returning a `SentEmail` entity confirming the successful sending of the email with link
|
970
|
+
# Sister method for standard `sendEmail` method with the benefit of returning a `SentEmail` entity confirming the successful sending of the email with a link to the sent object created for it.
|
917
971
|
# @param inbox_id [String] ID of the inbox you want to send the email from
|
918
972
|
# @param [Hash] opts the optional parameters
|
919
973
|
# @option opts [SendEmailOptions] :send_email_options Options for the email
|
@@ -924,7 +978,7 @@ module MailSlurpClient
|
|
924
978
|
end
|
925
979
|
|
926
980
|
# Send email and return sent confirmation
|
927
|
-
# Sister method for standard `sendEmail` method with the benefit of returning a `SentEmail` entity confirming the successful sending of the email with link
|
981
|
+
# Sister method for standard `sendEmail` method with the benefit of returning a `SentEmail` entity confirming the successful sending of the email with a link to the sent object created for it.
|
928
982
|
# @param inbox_id [String] ID of the inbox you want to send the email from
|
929
983
|
# @param [Hash] opts the optional parameters
|
930
984
|
# @option opts [SendEmailOptions] :send_email_options Options for the email
|
@@ -1048,7 +1102,7 @@ module MailSlurpClient
|
|
1048
1102
|
return data, status_code, headers
|
1049
1103
|
end
|
1050
1104
|
|
1051
|
-
# Update Inbox
|
1105
|
+
# Update Inbox. Change name and description. Email address is not editable.
|
1052
1106
|
# Update editable fields on an inbox
|
1053
1107
|
# @param inbox_id [String] inboxId
|
1054
1108
|
# @param update_inbox_options [UpdateInboxOptions] updateInboxOptions
|
@@ -1059,7 +1113,7 @@ module MailSlurpClient
|
|
1059
1113
|
data
|
1060
1114
|
end
|
1061
1115
|
|
1062
|
-
# Update Inbox
|
1116
|
+
# Update Inbox. Change name and description. Email address is not editable.
|
1063
1117
|
# Update editable fields on an inbox
|
1064
1118
|
# @param inbox_id [String] inboxId
|
1065
1119
|
# @param update_inbox_options [UpdateInboxOptions] updateInboxOptions
|
@@ -19,20 +19,20 @@ module MailSlurpClient
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
-
# Wait for
|
22
|
+
# Wait for an email to match the provided filter conditions such as subject contains keyword.
|
23
23
|
# Generic waitFor method that will wait until an inbox meets given conditions or return immediately if already met
|
24
24
|
# @param [Hash] opts the optional parameters
|
25
|
-
# @option opts [WaitForConditions] :wait_for_conditions Conditions to
|
25
|
+
# @option opts [WaitForConditions] :wait_for_conditions Conditions to apply to emails that you are waiting for
|
26
26
|
# @return [Array<EmailPreview>]
|
27
27
|
def wait_for(opts = {})
|
28
28
|
data, _status_code, _headers = wait_for_with_http_info(opts)
|
29
29
|
data
|
30
30
|
end
|
31
31
|
|
32
|
-
# Wait for
|
32
|
+
# Wait for an email to match the provided filter conditions such as subject contains keyword.
|
33
33
|
# Generic waitFor method that will wait until an inbox meets given conditions or return immediately if already met
|
34
34
|
# @param [Hash] opts the optional parameters
|
35
|
-
# @option opts [WaitForConditions] :wait_for_conditions Conditions to
|
35
|
+
# @option opts [WaitForConditions] :wait_for_conditions Conditions to apply to emails that you are waiting for
|
36
36
|
# @return [Array<(Array<EmailPreview>, Integer, Hash)>] Array<EmailPreview> data, response status code and response headers
|
37
37
|
def wait_for_with_http_info(opts = {})
|
38
38
|
if @api_client.config.debugging
|
@@ -79,7 +79,7 @@ module MailSlurpClient
|
|
79
79
|
return data, status_code, headers
|
80
80
|
end
|
81
81
|
|
82
|
-
# Wait for and return count number of emails
|
82
|
+
# Wait for and return count number of emails. Hold connection until inbox count matches expected or timeout occurs
|
83
83
|
# If inbox contains count or more emails at time of request then return count worth of emails. If not wait until the count is reached and return those or return an error if timeout is exceeded.
|
84
84
|
# @param [Hash] opts the optional parameters
|
85
85
|
# @option opts [Integer] :count Number of emails to wait for. Must be greater that 1
|
@@ -92,7 +92,7 @@ module MailSlurpClient
|
|
92
92
|
data
|
93
93
|
end
|
94
94
|
|
95
|
-
# Wait for and return count number of emails
|
95
|
+
# Wait for and return count number of emails. Hold connection until inbox count matches expected or timeout occurs
|
96
96
|
# If inbox contains count or more emails at time of request then return count worth of emails. If not wait until the count is reached and return those or return an error if timeout is exceeded.
|
97
97
|
# @param [Hash] opts the optional parameters
|
98
98
|
# @option opts [Integer] :count Number of emails to wait for. Must be greater that 1
|
@@ -361,7 +361,7 @@ module MailSlurpClient
|
|
361
361
|
return data, status_code, headers
|
362
362
|
end
|
363
363
|
|
364
|
-
# Wait for or fetch the email with a given index in the inbox specified
|
364
|
+
# Wait for or fetch the email with a given index in the inbox specified. IF indx doesn't exist waits for it to exist or timeout to occur.
|
365
365
|
# If nth email is already present in inbox then return it. If not hold the connection open until timeout expires or the nth email is received and returned.
|
366
366
|
# @param [Hash] opts the optional parameters
|
367
367
|
# @option opts [String] :inbox_id Id of the inbox you are fetching emails from
|
@@ -374,7 +374,7 @@ module MailSlurpClient
|
|
374
374
|
data
|
375
375
|
end
|
376
376
|
|
377
|
-
# Wait for or fetch the email with a given index in the inbox specified
|
377
|
+
# Wait for or fetch the email with a given index in the inbox specified. IF indx doesn't exist waits for it to exist or timeout to occur.
|
378
378
|
# If nth email is already present in inbox then return it. If not hold the connection open until timeout expires or the nth email is received and returned.
|
379
379
|
# @param [Hash] opts the optional parameters
|
380
380
|
# @option opts [String] :inbox_id Id of the inbox you are fetching emails from
|
@@ -156,8 +156,8 @@ module MailSlurpClient
|
|
156
156
|
# List Webhooks Paginated
|
157
157
|
# List webhooks in paginated form. Allows for page index, page size, and sort direction.
|
158
158
|
# @param [Hash] opts the optional parameters
|
159
|
-
# @option opts [Integer] :page Optional page index in
|
160
|
-
# @option opts [Integer] :size Optional page size in
|
159
|
+
# @option opts [Integer] :page Optional page index in list pagination (default to 0)
|
160
|
+
# @option opts [Integer] :size Optional page size in list pagination (default to 20)
|
161
161
|
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
|
162
162
|
# @return [PageWebhookProjection]
|
163
163
|
def get_all_webhooks(opts = {})
|
@@ -168,8 +168,8 @@ module MailSlurpClient
|
|
168
168
|
# List Webhooks Paginated
|
169
169
|
# List webhooks in paginated form. Allows for page index, page size, and sort direction.
|
170
170
|
# @param [Hash] opts the optional parameters
|
171
|
-
# @option opts [Integer] :page Optional page index in
|
172
|
-
# @option opts [Integer] :size Optional page size in
|
171
|
+
# @option opts [Integer] :page Optional page index in list pagination
|
172
|
+
# @option opts [Integer] :size Optional page size in list pagination
|
173
173
|
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC
|
174
174
|
# @return [Array<(PageWebhookProjection, Integer, Hash)>] PageWebhookProjection data, response status code and response headers
|
175
175
|
def get_all_webhooks_with_http_info(opts = {})
|
@@ -222,6 +222,60 @@ module MailSlurpClient
|
|
222
222
|
return data, status_code, headers
|
223
223
|
end
|
224
224
|
|
225
|
+
# Get test webhook payload example
|
226
|
+
# @param [Hash] opts the optional parameters
|
227
|
+
# @return [WebhookPayload]
|
228
|
+
def get_test_webhook_payload(opts = {})
|
229
|
+
data, _status_code, _headers = get_test_webhook_payload_with_http_info(opts)
|
230
|
+
data
|
231
|
+
end
|
232
|
+
|
233
|
+
# Get test webhook payload example
|
234
|
+
# @param [Hash] opts the optional parameters
|
235
|
+
# @return [Array<(WebhookPayload, Integer, Hash)>] WebhookPayload data, response status code and response headers
|
236
|
+
def get_test_webhook_payload_with_http_info(opts = {})
|
237
|
+
if @api_client.config.debugging
|
238
|
+
@api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_test_webhook_payload ...'
|
239
|
+
end
|
240
|
+
# resource path
|
241
|
+
local_var_path = '/webhooks/test'
|
242
|
+
|
243
|
+
# query parameters
|
244
|
+
query_params = opts[:query_params] || {}
|
245
|
+
|
246
|
+
# header parameters
|
247
|
+
header_params = opts[:header_params] || {}
|
248
|
+
# HTTP header 'Accept' (if needed)
|
249
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
250
|
+
|
251
|
+
# form parameters
|
252
|
+
form_params = opts[:form_params] || {}
|
253
|
+
|
254
|
+
# http body (model)
|
255
|
+
post_body = opts[:body]
|
256
|
+
|
257
|
+
# return_type
|
258
|
+
return_type = opts[:return_type] || 'WebhookPayload'
|
259
|
+
|
260
|
+
# auth_names
|
261
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
262
|
+
|
263
|
+
new_options = opts.merge(
|
264
|
+
:header_params => header_params,
|
265
|
+
:query_params => query_params,
|
266
|
+
:form_params => form_params,
|
267
|
+
:body => post_body,
|
268
|
+
:auth_names => auth_names,
|
269
|
+
:return_type => return_type
|
270
|
+
)
|
271
|
+
|
272
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
273
|
+
if @api_client.config.debugging
|
274
|
+
@api_client.config.logger.debug "API called: WebhookControllerApi#get_test_webhook_payload\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
275
|
+
end
|
276
|
+
return data, status_code, headers
|
277
|
+
end
|
278
|
+
|
225
279
|
# Get a webhook for an Inbox
|
226
280
|
# @param webhook_id [String] webhookId
|
227
281
|
# @param [Hash] opts the optional parameters
|
@@ -282,7 +336,7 @@ module MailSlurpClient
|
|
282
336
|
return data, status_code, headers
|
283
337
|
end
|
284
338
|
|
285
|
-
# Get all
|
339
|
+
# Get all webhooks for an Inbox
|
286
340
|
# @param inbox_id [String] inboxId
|
287
341
|
# @param [Hash] opts the optional parameters
|
288
342
|
# @return [Array<WebhookDto>]
|
@@ -291,7 +345,7 @@ module MailSlurpClient
|
|
291
345
|
data
|
292
346
|
end
|
293
347
|
|
294
|
-
# Get all
|
348
|
+
# Get all webhooks for an Inbox
|
295
349
|
# @param inbox_id [String] inboxId
|
296
350
|
# @param [Hash] opts the optional parameters
|
297
351
|
# @return [Array<(Array<WebhookDto>, Integer, Hash)>] Array<WebhookDto> data, response status code and response headers
|
@@ -18,13 +18,13 @@ module MailSlurpClient
|
|
18
18
|
# Size of attachment in bytes
|
19
19
|
attr_accessor :content_length
|
20
20
|
|
21
|
-
# Content type of attachment
|
21
|
+
# Content type of attachment such as `image/png`
|
22
22
|
attr_accessor :content_type
|
23
23
|
|
24
24
|
# ID of attachment
|
25
25
|
attr_accessor :id
|
26
26
|
|
27
|
-
# Name of attachment
|
27
|
+
# Name of attachment if given
|
28
28
|
attr_accessor :name
|
29
29
|
|
30
30
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -24,12 +24,38 @@ module MailSlurpClient
|
|
24
24
|
# The top level domain you wish to use with MailSlurp. Do not specify subdomain just the top level. So `test.com` covers all subdomains such as `mail.test.com`. Don't include a protocol such as `http://`. Once added you must complete the verification steps by adding the returned records to your domain.
|
25
25
|
attr_accessor :domain
|
26
26
|
|
27
|
+
# Domain type to create. HTTP or SMTP domain. HTTP domain uses MailSlurps SES MX records. SMTP uses a custom SMTP server MX record
|
28
|
+
attr_accessor :domain_type
|
29
|
+
|
30
|
+
class EnumAttributeValidator
|
31
|
+
attr_reader :datatype
|
32
|
+
attr_reader :allowable_values
|
33
|
+
|
34
|
+
def initialize(datatype, allowable_values)
|
35
|
+
@allowable_values = allowable_values.map do |value|
|
36
|
+
case datatype.to_s
|
37
|
+
when /Integer/i
|
38
|
+
value.to_i
|
39
|
+
when /Float/i
|
40
|
+
value.to_f
|
41
|
+
else
|
42
|
+
value
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
def valid?(value)
|
48
|
+
!value || allowable_values.include?(value)
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
27
52
|
# Attribute mapping from ruby-style variable name to JSON key.
|
28
53
|
def self.attribute_map
|
29
54
|
{
|
30
55
|
:'created_catch_all_inbox' => :'createdCatchAllInbox',
|
31
56
|
:'description' => :'description',
|
32
|
-
:'domain' => :'domain'
|
57
|
+
:'domain' => :'domain',
|
58
|
+
:'domain_type' => :'domainType'
|
33
59
|
}
|
34
60
|
end
|
35
61
|
|
@@ -38,7 +64,8 @@ module MailSlurpClient
|
|
38
64
|
{
|
39
65
|
:'created_catch_all_inbox' => :'Boolean',
|
40
66
|
:'description' => :'String',
|
41
|
-
:'domain' => :'String'
|
67
|
+
:'domain' => :'String',
|
68
|
+
:'domain_type' => :'String'
|
42
69
|
}
|
43
70
|
end
|
44
71
|
|
@@ -74,6 +101,10 @@ module MailSlurpClient
|
|
74
101
|
if attributes.key?(:'domain')
|
75
102
|
self.domain = attributes[:'domain']
|
76
103
|
end
|
104
|
+
|
105
|
+
if attributes.key?(:'domain_type')
|
106
|
+
self.domain_type = attributes[:'domain_type']
|
107
|
+
end
|
77
108
|
end
|
78
109
|
|
79
110
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -86,9 +117,21 @@ module MailSlurpClient
|
|
86
117
|
# Check to see if the all the properties in the model are valid
|
87
118
|
# @return true if the model is valid
|
88
119
|
def valid?
|
120
|
+
domain_type_validator = EnumAttributeValidator.new('String', ["HTTP_INBOX", "SMTP_DOMAIN"])
|
121
|
+
return false unless domain_type_validator.valid?(@domain_type)
|
89
122
|
true
|
90
123
|
end
|
91
124
|
|
125
|
+
# Custom attribute writer method checking allowed values (enum).
|
126
|
+
# @param [Object] domain_type Object to be assigned
|
127
|
+
def domain_type=(domain_type)
|
128
|
+
validator = EnumAttributeValidator.new('String', ["HTTP_INBOX", "SMTP_DOMAIN"])
|
129
|
+
unless validator.valid?(domain_type)
|
130
|
+
fail ArgumentError, "invalid value for \"domain_type\", must be one of #{validator.allowable_values}."
|
131
|
+
end
|
132
|
+
@domain_type = domain_type
|
133
|
+
end
|
134
|
+
|
92
135
|
# Checks equality by comparing each attribute.
|
93
136
|
# @param [Object] Object to be compared
|
94
137
|
def ==(o)
|
@@ -96,7 +139,8 @@ module MailSlurpClient
|
|
96
139
|
self.class == o.class &&
|
97
140
|
created_catch_all_inbox == o.created_catch_all_inbox &&
|
98
141
|
description == o.description &&
|
99
|
-
domain == o.domain
|
142
|
+
domain == o.domain &&
|
143
|
+
domain_type == o.domain_type
|
100
144
|
end
|
101
145
|
|
102
146
|
# @see the `==` method
|
@@ -108,7 +152,7 @@ module MailSlurpClient
|
|
108
152
|
# Calculates hash code according to all attributes.
|
109
153
|
# @return [Integer] Hash code
|
110
154
|
def hash
|
111
|
-
[created_catch_all_inbox, description, domain].hash
|
155
|
+
[created_catch_all_inbox, description, domain, domain_type].hash
|
112
156
|
end
|
113
157
|
|
114
158
|
# Builds the object from hash
|
@@ -33,6 +33,9 @@ module MailSlurpClient
|
|
33
33
|
# Is the inbox favorited. Favouriting inboxes is typically done in the dashboard for quick access or filtering
|
34
34
|
attr_accessor :favourite
|
35
35
|
|
36
|
+
# HTTP or SMTP inbox
|
37
|
+
attr_accessor :inbox_type
|
38
|
+
|
36
39
|
# Optional name of the inbox. Displayed in the dashboard for easier search
|
37
40
|
attr_accessor :name
|
38
41
|
|
@@ -42,6 +45,28 @@ module MailSlurpClient
|
|
42
45
|
# Use the MailSlurp domain name pool with this inbox when creating the email address. Defaults to null. If enabled the inbox will be an email address with a domain randomly chosen from a list of the MailSlurp domains. This is useful when the default `@mailslurp.com` email addresses used with inboxes are blocked or considered spam by a provider or receiving service. When domain pool is enabled an email address will be generated ending in `@mailslurp.{world,info,xyz,...}` . This means a TLD is randomly selecting from a list of `.biz`, `.info`, `.xyz` etc to add variance to the generated email addresses. When null or false MailSlurp uses the default behavior of `@mailslurp.com` or custom email address provided by the emailAddress field.
|
43
46
|
attr_accessor :use_domain_pool
|
44
47
|
|
48
|
+
class EnumAttributeValidator
|
49
|
+
attr_reader :datatype
|
50
|
+
attr_reader :allowable_values
|
51
|
+
|
52
|
+
def initialize(datatype, allowable_values)
|
53
|
+
@allowable_values = allowable_values.map do |value|
|
54
|
+
case datatype.to_s
|
55
|
+
when /Integer/i
|
56
|
+
value.to_i
|
57
|
+
when /Float/i
|
58
|
+
value.to_f
|
59
|
+
else
|
60
|
+
value
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
def valid?(value)
|
66
|
+
!value || allowable_values.include?(value)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
45
70
|
# Attribute mapping from ruby-style variable name to JSON key.
|
46
71
|
def self.attribute_map
|
47
72
|
{
|
@@ -51,6 +76,7 @@ module MailSlurpClient
|
|
51
76
|
:'expires_at' => :'expiresAt',
|
52
77
|
:'expires_in' => :'expiresIn',
|
53
78
|
:'favourite' => :'favourite',
|
79
|
+
:'inbox_type' => :'inboxType',
|
54
80
|
:'name' => :'name',
|
55
81
|
:'tags' => :'tags',
|
56
82
|
:'use_domain_pool' => :'useDomainPool'
|
@@ -66,6 +92,7 @@ module MailSlurpClient
|
|
66
92
|
:'expires_at' => :'DateTime',
|
67
93
|
:'expires_in' => :'Integer',
|
68
94
|
:'favourite' => :'Boolean',
|
95
|
+
:'inbox_type' => :'String',
|
69
96
|
:'name' => :'String',
|
70
97
|
:'tags' => :'Array<String>',
|
71
98
|
:'use_domain_pool' => :'Boolean'
|
@@ -117,6 +144,10 @@ module MailSlurpClient
|
|
117
144
|
self.favourite = attributes[:'favourite']
|
118
145
|
end
|
119
146
|
|
147
|
+
if attributes.key?(:'inbox_type')
|
148
|
+
self.inbox_type = attributes[:'inbox_type']
|
149
|
+
end
|
150
|
+
|
120
151
|
if attributes.key?(:'name')
|
121
152
|
self.name = attributes[:'name']
|
122
153
|
end
|
@@ -142,9 +173,21 @@ module MailSlurpClient
|
|
142
173
|
# Check to see if the all the properties in the model are valid
|
143
174
|
# @return true if the model is valid
|
144
175
|
def valid?
|
176
|
+
inbox_type_validator = EnumAttributeValidator.new('String', ["HTTP_INBOX", "SMTP_INBOX"])
|
177
|
+
return false unless inbox_type_validator.valid?(@inbox_type)
|
145
178
|
true
|
146
179
|
end
|
147
180
|
|
181
|
+
# Custom attribute writer method checking allowed values (enum).
|
182
|
+
# @param [Object] inbox_type Object to be assigned
|
183
|
+
def inbox_type=(inbox_type)
|
184
|
+
validator = EnumAttributeValidator.new('String', ["HTTP_INBOX", "SMTP_INBOX"])
|
185
|
+
unless validator.valid?(inbox_type)
|
186
|
+
fail ArgumentError, "invalid value for \"inbox_type\", must be one of #{validator.allowable_values}."
|
187
|
+
end
|
188
|
+
@inbox_type = inbox_type
|
189
|
+
end
|
190
|
+
|
148
191
|
# Checks equality by comparing each attribute.
|
149
192
|
# @param [Object] Object to be compared
|
150
193
|
def ==(o)
|
@@ -156,6 +199,7 @@ module MailSlurpClient
|
|
156
199
|
expires_at == o.expires_at &&
|
157
200
|
expires_in == o.expires_in &&
|
158
201
|
favourite == o.favourite &&
|
202
|
+
inbox_type == o.inbox_type &&
|
159
203
|
name == o.name &&
|
160
204
|
tags == o.tags &&
|
161
205
|
use_domain_pool == o.use_domain_pool
|
@@ -170,7 +214,7 @@ module MailSlurpClient
|
|
170
214
|
# Calculates hash code according to all attributes.
|
171
215
|
# @return [Integer] Hash code
|
172
216
|
def hash
|
173
|
-
[allow_team_access, description, email_address, expires_at, expires_in, favourite, name, tags, use_domain_pool].hash
|
217
|
+
[allow_team_access, description, email_address, expires_at, expires_in, favourite, inbox_type, name, tags, use_domain_pool].hash
|
174
218
|
end
|
175
219
|
|
176
220
|
# Builds the object from hash
|