mailslurp_client 14.0.1 → 14.0.2
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/api/inbox_controller_api.rb +59 -0
- data/lib/mailslurp_client/api/webhook_controller_api.rb +118 -0
- data/lib/mailslurp_client/models/create_inbox_forwarder_options.rb +17 -28
- data/lib/mailslurp_client/models/expiration_defaults.rb +18 -4
- data/lib/mailslurp_client/models/flush_expired_inboxes_result.rb +227 -0
- data/lib/mailslurp_client/models/{inbox_projection.rb → inbox_preview.rb} +22 -24
- data/lib/mailslurp_client/models/page_inbox_projection.rb +1 -1
- data/lib/mailslurp_client/models/unseen_error_count_dto.rb +211 -0
- data/lib/mailslurp_client/models/webhook_result_dto.rb +10 -1
- data/lib/mailslurp_client/version.rb +1 -1
- data/lib/mailslurp_client.rb +3 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e81354b4449a6c4f70f25da766079166810b19b956e16f6c29aa0c76045f7a5
|
4
|
+
data.tar.gz: 8c0eb2e502e21241a34038de92e7733d11164119d5c9f99645d658dc75f349f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c0542608667b0447250e0995e4dfc22a6475c146c74431f0100db3927bdebd082210e99832914affed9d7ca0a9dd39f3ff0d92c8972381d8b53dcc7cc7904f0
|
7
|
+
data.tar.gz: 99c4d611efc6e3f62d1140fb7a9b898977861dc2f0c9a630095a12d0205612d41b7a619970be863129f2a3fba2cab309124ba9c47704d0c112eda1b340175a55
|
@@ -411,6 +411,65 @@ module MailSlurpClient
|
|
411
411
|
return data, status_code, headers
|
412
412
|
end
|
413
413
|
|
414
|
+
# Remove expired inboxes
|
415
|
+
# Remove any expired inboxes for your account (instead of waiting for scheduled removal on server)
|
416
|
+
# @param [Hash] opts the optional parameters
|
417
|
+
# @option opts [DateTime] :before Optional expired at before flag to flush expired inboxes that have expired before the given time
|
418
|
+
# @return [FlushExpiredInboxesResult]
|
419
|
+
def flush_expired(opts = {})
|
420
|
+
data, _status_code, _headers = flush_expired_with_http_info(opts)
|
421
|
+
data
|
422
|
+
end
|
423
|
+
|
424
|
+
# Remove expired inboxes
|
425
|
+
# Remove any expired inboxes for your account (instead of waiting for scheduled removal on server)
|
426
|
+
# @param [Hash] opts the optional parameters
|
427
|
+
# @option opts [DateTime] :before Optional expired at before flag to flush expired inboxes that have expired before the given time
|
428
|
+
# @return [Array<(FlushExpiredInboxesResult, Integer, Hash)>] FlushExpiredInboxesResult data, response status code and response headers
|
429
|
+
def flush_expired_with_http_info(opts = {})
|
430
|
+
if @api_client.config.debugging
|
431
|
+
@api_client.config.logger.debug 'Calling API: InboxControllerApi.flush_expired ...'
|
432
|
+
end
|
433
|
+
# resource path
|
434
|
+
local_var_path = '/inboxes/expired'
|
435
|
+
|
436
|
+
# query parameters
|
437
|
+
query_params = opts[:query_params] || {}
|
438
|
+
query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
|
439
|
+
|
440
|
+
# header parameters
|
441
|
+
header_params = opts[:header_params] || {}
|
442
|
+
# HTTP header 'Accept' (if needed)
|
443
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
444
|
+
|
445
|
+
# form parameters
|
446
|
+
form_params = opts[:form_params] || {}
|
447
|
+
|
448
|
+
# http body (model)
|
449
|
+
post_body = opts[:body]
|
450
|
+
|
451
|
+
# return_type
|
452
|
+
return_type = opts[:return_type] || 'FlushExpiredInboxesResult'
|
453
|
+
|
454
|
+
# auth_names
|
455
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
456
|
+
|
457
|
+
new_options = opts.merge(
|
458
|
+
:header_params => header_params,
|
459
|
+
:query_params => query_params,
|
460
|
+
:form_params => form_params,
|
461
|
+
:body => post_body,
|
462
|
+
:auth_names => auth_names,
|
463
|
+
:return_type => return_type
|
464
|
+
)
|
465
|
+
|
466
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
467
|
+
if @api_client.config.debugging
|
468
|
+
@api_client.config.logger.debug "API called: InboxControllerApi#flush_expired\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
469
|
+
end
|
470
|
+
return data, status_code, headers
|
471
|
+
end
|
472
|
+
|
414
473
|
# List All Inboxes Paginated
|
415
474
|
# List inboxes in paginated form. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). You Can also filter by whether an inbox is favorited or use email address pattern. This method is the recommended way to query inboxes. The alternative `getInboxes` method returns a full list of inboxes but is limited to 100 results.
|
416
475
|
# @param [Hash] opts the optional parameters
|
@@ -89,6 +89,58 @@ module MailSlurpClient
|
|
89
89
|
return data, status_code, headers
|
90
90
|
end
|
91
91
|
|
92
|
+
# Delete all webhooks
|
93
|
+
# @param [Hash] opts the optional parameters
|
94
|
+
# @return [nil]
|
95
|
+
def delete_all_webhooks(opts = {})
|
96
|
+
delete_all_webhooks_with_http_info(opts)
|
97
|
+
nil
|
98
|
+
end
|
99
|
+
|
100
|
+
# Delete all webhooks
|
101
|
+
# @param [Hash] opts the optional parameters
|
102
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
103
|
+
def delete_all_webhooks_with_http_info(opts = {})
|
104
|
+
if @api_client.config.debugging
|
105
|
+
@api_client.config.logger.debug 'Calling API: WebhookControllerApi.delete_all_webhooks ...'
|
106
|
+
end
|
107
|
+
# resource path
|
108
|
+
local_var_path = '/webhooks'
|
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: WebhookControllerApi#delete_all_webhooks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
140
|
+
end
|
141
|
+
return data, status_code, headers
|
142
|
+
end
|
143
|
+
|
92
144
|
# Delete and disable a Webhook for an Inbox
|
93
145
|
# @param inbox_id [String] inboxId
|
94
146
|
# @param webhook_id [String] webhookId
|
@@ -161,6 +213,7 @@ module MailSlurpClient
|
|
161
213
|
# @option opts [DateTime] :since Filter by created at after the given timestamp
|
162
214
|
# @option opts [Integer] :size Optional page size in list pagination (default to 20)
|
163
215
|
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
|
216
|
+
# @option opts [Boolean] :unseen_only Filter for unseen exceptions only
|
164
217
|
# @return [PageWebhookResult]
|
165
218
|
def get_all_webhook_results(opts = {})
|
166
219
|
data, _status_code, _headers = get_all_webhook_results_with_http_info(opts)
|
@@ -175,6 +228,7 @@ module MailSlurpClient
|
|
175
228
|
# @option opts [DateTime] :since Filter by created at after the given timestamp
|
176
229
|
# @option opts [Integer] :size Optional page size in list pagination
|
177
230
|
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC
|
231
|
+
# @option opts [Boolean] :unseen_only Filter for unseen exceptions only
|
178
232
|
# @return [Array<(PageWebhookResult, Integer, Hash)>] PageWebhookResult data, response status code and response headers
|
179
233
|
def get_all_webhook_results_with_http_info(opts = {})
|
180
234
|
if @api_client.config.debugging
|
@@ -195,6 +249,7 @@ module MailSlurpClient
|
|
195
249
|
query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
|
196
250
|
query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
|
197
251
|
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
252
|
+
query_params[:'unseenOnly'] = opts[:'unseen_only'] if !opts[:'unseen_only'].nil?
|
198
253
|
|
199
254
|
# header parameters
|
200
255
|
header_params = opts[:header_params] || {}
|
@@ -969,6 +1024,7 @@ module MailSlurpClient
|
|
969
1024
|
# @option opts [DateTime] :since Filter by created at after the given timestamp
|
970
1025
|
# @option opts [Integer] :size Optional page size in list pagination (default to 20)
|
971
1026
|
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
|
1027
|
+
# @option opts [Boolean] :unseen_only Filter for unseen exceptions only
|
972
1028
|
# @return [PageWebhookResult]
|
973
1029
|
def get_webhook_results(webhook_id, opts = {})
|
974
1030
|
data, _status_code, _headers = get_webhook_results_with_http_info(webhook_id, opts)
|
@@ -984,6 +1040,7 @@ module MailSlurpClient
|
|
984
1040
|
# @option opts [DateTime] :since Filter by created at after the given timestamp
|
985
1041
|
# @option opts [Integer] :size Optional page size in list pagination
|
986
1042
|
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC
|
1043
|
+
# @option opts [Boolean] :unseen_only Filter for unseen exceptions only
|
987
1044
|
# @return [Array<(PageWebhookResult, Integer, Hash)>] PageWebhookResult data, response status code and response headers
|
988
1045
|
def get_webhook_results_with_http_info(webhook_id, opts = {})
|
989
1046
|
if @api_client.config.debugging
|
@@ -1008,6 +1065,7 @@ module MailSlurpClient
|
|
1008
1065
|
query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
|
1009
1066
|
query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
|
1010
1067
|
query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
|
1068
|
+
query_params[:'unseenOnly'] = opts[:'unseen_only'] if !opts[:'unseen_only'].nil?
|
1011
1069
|
|
1012
1070
|
# header parameters
|
1013
1071
|
header_params = opts[:header_params] || {}
|
@@ -1042,6 +1100,66 @@ module MailSlurpClient
|
|
1042
1100
|
return data, status_code, headers
|
1043
1101
|
end
|
1044
1102
|
|
1103
|
+
# Get count of unseen webhook results with error status
|
1104
|
+
# @param inbox_id [String] inboxId
|
1105
|
+
# @param [Hash] opts the optional parameters
|
1106
|
+
# @return [UnseenErrorCountDto]
|
1107
|
+
def get_webhook_results_unseen_error_count(inbox_id, opts = {})
|
1108
|
+
data, _status_code, _headers = get_webhook_results_unseen_error_count_with_http_info(inbox_id, opts)
|
1109
|
+
data
|
1110
|
+
end
|
1111
|
+
|
1112
|
+
# Get count of unseen webhook results with error status
|
1113
|
+
# @param inbox_id [String] inboxId
|
1114
|
+
# @param [Hash] opts the optional parameters
|
1115
|
+
# @return [Array<(UnseenErrorCountDto, Integer, Hash)>] UnseenErrorCountDto data, response status code and response headers
|
1116
|
+
def get_webhook_results_unseen_error_count_with_http_info(inbox_id, opts = {})
|
1117
|
+
if @api_client.config.debugging
|
1118
|
+
@api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_webhook_results_unseen_error_count ...'
|
1119
|
+
end
|
1120
|
+
# verify the required parameter 'inbox_id' is set
|
1121
|
+
if @api_client.config.client_side_validation && inbox_id.nil?
|
1122
|
+
fail ArgumentError, "Missing the required parameter 'inbox_id' when calling WebhookControllerApi.get_webhook_results_unseen_error_count"
|
1123
|
+
end
|
1124
|
+
# resource path
|
1125
|
+
local_var_path = '/webhooks/results/unseen-count'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))
|
1126
|
+
|
1127
|
+
# query parameters
|
1128
|
+
query_params = opts[:query_params] || {}
|
1129
|
+
|
1130
|
+
# header parameters
|
1131
|
+
header_params = opts[:header_params] || {}
|
1132
|
+
# HTTP header 'Accept' (if needed)
|
1133
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1134
|
+
|
1135
|
+
# form parameters
|
1136
|
+
form_params = opts[:form_params] || {}
|
1137
|
+
|
1138
|
+
# http body (model)
|
1139
|
+
post_body = opts[:body]
|
1140
|
+
|
1141
|
+
# return_type
|
1142
|
+
return_type = opts[:return_type] || 'UnseenErrorCountDto'
|
1143
|
+
|
1144
|
+
# auth_names
|
1145
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
1146
|
+
|
1147
|
+
new_options = opts.merge(
|
1148
|
+
:header_params => header_params,
|
1149
|
+
:query_params => query_params,
|
1150
|
+
:form_params => form_params,
|
1151
|
+
:body => post_body,
|
1152
|
+
:auth_names => auth_names,
|
1153
|
+
:return_type => return_type
|
1154
|
+
)
|
1155
|
+
|
1156
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
1157
|
+
if @api_client.config.debugging
|
1158
|
+
@api_client.config.logger.debug "API called: WebhookControllerApi#get_webhook_results_unseen_error_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1159
|
+
end
|
1160
|
+
return data, status_code, headers
|
1161
|
+
end
|
1162
|
+
|
1045
1163
|
# Get all webhooks for an Inbox
|
1046
1164
|
# @param inbox_id [String] inboxId
|
1047
1165
|
# @param [Hash] opts the optional parameters
|
@@ -13,13 +13,17 @@ OpenAPI Generator version: 4.3.1
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module MailSlurpClient
|
16
|
+
# Options for creating an inbox forwarder
|
16
17
|
class CreateInboxForwarderOptions
|
18
|
+
# Field to match against to trigger inbox forwarding for inbound email
|
17
19
|
attr_accessor :field
|
18
20
|
|
19
|
-
|
20
|
-
|
21
|
+
# Email addresses to forward an email to if it matches the field and match criteria of the forwarder
|
21
22
|
attr_accessor :forward_to_recipients
|
22
23
|
|
24
|
+
# String or wildcard style match for field specified when evaluating forwarding rules
|
25
|
+
attr_accessor :match
|
26
|
+
|
23
27
|
class EnumAttributeValidator
|
24
28
|
attr_reader :datatype
|
25
29
|
attr_reader :allowable_values
|
@@ -46,8 +50,8 @@ module MailSlurpClient
|
|
46
50
|
def self.attribute_map
|
47
51
|
{
|
48
52
|
:'field' => :'field',
|
49
|
-
:'
|
50
|
-
:'
|
53
|
+
:'forward_to_recipients' => :'forwardToRecipients',
|
54
|
+
:'match' => :'match'
|
51
55
|
}
|
52
56
|
end
|
53
57
|
|
@@ -55,8 +59,8 @@ module MailSlurpClient
|
|
55
59
|
def self.openapi_types
|
56
60
|
{
|
57
61
|
:'field' => :'String',
|
58
|
-
:'
|
59
|
-
:'
|
62
|
+
:'forward_to_recipients' => :'Array<String>',
|
63
|
+
:'match' => :'String'
|
60
64
|
}
|
61
65
|
end
|
62
66
|
|
@@ -85,44 +89,29 @@ module MailSlurpClient
|
|
85
89
|
self.field = attributes[:'field']
|
86
90
|
end
|
87
91
|
|
88
|
-
if attributes.key?(:'match')
|
89
|
-
self.match = attributes[:'match']
|
90
|
-
end
|
91
|
-
|
92
92
|
if attributes.key?(:'forward_to_recipients')
|
93
93
|
if (value = attributes[:'forward_to_recipients']).is_a?(Array)
|
94
94
|
self.forward_to_recipients = value
|
95
95
|
end
|
96
96
|
end
|
97
|
+
|
98
|
+
if attributes.key?(:'match')
|
99
|
+
self.match = attributes[:'match']
|
100
|
+
end
|
97
101
|
end
|
98
102
|
|
99
103
|
# Show invalid properties with the reasons. Usually used together with valid?
|
100
104
|
# @return Array for valid properties with the reasons
|
101
105
|
def list_invalid_properties
|
102
106
|
invalid_properties = Array.new
|
103
|
-
if @field.nil?
|
104
|
-
invalid_properties.push('invalid value for "field", field cannot be nil.')
|
105
|
-
end
|
106
|
-
|
107
|
-
if @match.nil?
|
108
|
-
invalid_properties.push('invalid value for "match", match cannot be nil.')
|
109
|
-
end
|
110
|
-
|
111
|
-
if @forward_to_recipients.nil?
|
112
|
-
invalid_properties.push('invalid value for "forward_to_recipients", forward_to_recipients cannot be nil.')
|
113
|
-
end
|
114
|
-
|
115
107
|
invalid_properties
|
116
108
|
end
|
117
109
|
|
118
110
|
# Check to see if the all the properties in the model are valid
|
119
111
|
# @return true if the model is valid
|
120
112
|
def valid?
|
121
|
-
return false if @field.nil?
|
122
113
|
field_validator = EnumAttributeValidator.new('String', ["RECIPIENTS", "SENDER", "SUBJECT", "ATTACHMENTS"])
|
123
114
|
return false unless field_validator.valid?(@field)
|
124
|
-
return false if @match.nil?
|
125
|
-
return false if @forward_to_recipients.nil?
|
126
115
|
true
|
127
116
|
end
|
128
117
|
|
@@ -142,8 +131,8 @@ module MailSlurpClient
|
|
142
131
|
return true if self.equal?(o)
|
143
132
|
self.class == o.class &&
|
144
133
|
field == o.field &&
|
145
|
-
|
146
|
-
|
134
|
+
forward_to_recipients == o.forward_to_recipients &&
|
135
|
+
match == o.match
|
147
136
|
end
|
148
137
|
|
149
138
|
# @see the `==` method
|
@@ -155,7 +144,7 @@ module MailSlurpClient
|
|
155
144
|
# Calculates hash code according to all attributes.
|
156
145
|
# @return [Integer] Hash code
|
157
146
|
def hash
|
158
|
-
[field,
|
147
|
+
[field, forward_to_recipients, match].hash
|
159
148
|
end
|
160
149
|
|
161
150
|
# Builds the object from hash
|
@@ -23,13 +23,16 @@ module MailSlurpClient
|
|
23
23
|
|
24
24
|
attr_accessor :max_expiration_millis
|
25
25
|
|
26
|
+
attr_accessor :next_inbox_allows_permanent
|
27
|
+
|
26
28
|
# Attribute mapping from ruby-style variable name to JSON key.
|
27
29
|
def self.attribute_map
|
28
30
|
{
|
29
31
|
:'can_permanent_inbox' => :'canPermanentInbox',
|
30
32
|
:'default_expiration_millis' => :'defaultExpirationMillis',
|
31
33
|
:'default_expires_at' => :'defaultExpiresAt',
|
32
|
-
:'max_expiration_millis' => :'maxExpirationMillis'
|
34
|
+
:'max_expiration_millis' => :'maxExpirationMillis',
|
35
|
+
:'next_inbox_allows_permanent' => :'nextInboxAllowsPermanent'
|
33
36
|
}
|
34
37
|
end
|
35
38
|
|
@@ -39,7 +42,8 @@ module MailSlurpClient
|
|
39
42
|
:'can_permanent_inbox' => :'Boolean',
|
40
43
|
:'default_expiration_millis' => :'Integer',
|
41
44
|
:'default_expires_at' => :'DateTime',
|
42
|
-
:'max_expiration_millis' => :'Integer'
|
45
|
+
:'max_expiration_millis' => :'Integer',
|
46
|
+
:'next_inbox_allows_permanent' => :'Boolean'
|
43
47
|
}
|
44
48
|
end
|
45
49
|
|
@@ -79,6 +83,10 @@ module MailSlurpClient
|
|
79
83
|
if attributes.key?(:'max_expiration_millis')
|
80
84
|
self.max_expiration_millis = attributes[:'max_expiration_millis']
|
81
85
|
end
|
86
|
+
|
87
|
+
if attributes.key?(:'next_inbox_allows_permanent')
|
88
|
+
self.next_inbox_allows_permanent = attributes[:'next_inbox_allows_permanent']
|
89
|
+
end
|
82
90
|
end
|
83
91
|
|
84
92
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -89,6 +97,10 @@ module MailSlurpClient
|
|
89
97
|
invalid_properties.push('invalid value for "can_permanent_inbox", can_permanent_inbox cannot be nil.')
|
90
98
|
end
|
91
99
|
|
100
|
+
if @next_inbox_allows_permanent.nil?
|
101
|
+
invalid_properties.push('invalid value for "next_inbox_allows_permanent", next_inbox_allows_permanent cannot be nil.')
|
102
|
+
end
|
103
|
+
|
92
104
|
invalid_properties
|
93
105
|
end
|
94
106
|
|
@@ -96,6 +108,7 @@ module MailSlurpClient
|
|
96
108
|
# @return true if the model is valid
|
97
109
|
def valid?
|
98
110
|
return false if @can_permanent_inbox.nil?
|
111
|
+
return false if @next_inbox_allows_permanent.nil?
|
99
112
|
true
|
100
113
|
end
|
101
114
|
|
@@ -107,7 +120,8 @@ module MailSlurpClient
|
|
107
120
|
can_permanent_inbox == o.can_permanent_inbox &&
|
108
121
|
default_expiration_millis == o.default_expiration_millis &&
|
109
122
|
default_expires_at == o.default_expires_at &&
|
110
|
-
max_expiration_millis == o.max_expiration_millis
|
123
|
+
max_expiration_millis == o.max_expiration_millis &&
|
124
|
+
next_inbox_allows_permanent == o.next_inbox_allows_permanent
|
111
125
|
end
|
112
126
|
|
113
127
|
# @see the `==` method
|
@@ -119,7 +133,7 @@ module MailSlurpClient
|
|
119
133
|
# Calculates hash code according to all attributes.
|
120
134
|
# @return [Integer] Hash code
|
121
135
|
def hash
|
122
|
-
[can_permanent_inbox, default_expiration_millis, default_expires_at, max_expiration_millis].hash
|
136
|
+
[can_permanent_inbox, default_expiration_millis, default_expires_at, max_expiration_millis, next_inbox_allows_permanent].hash
|
123
137
|
end
|
124
138
|
|
125
139
|
# Builds the object from hash
|
@@ -0,0 +1,227 @@
|
|
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 'date'
|
14
|
+
|
15
|
+
module MailSlurpClient
|
16
|
+
class FlushExpiredInboxesResult
|
17
|
+
attr_accessor :expire_before
|
18
|
+
|
19
|
+
attr_accessor :inbox_ids
|
20
|
+
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
22
|
+
def self.attribute_map
|
23
|
+
{
|
24
|
+
:'expire_before' => :'expireBefore',
|
25
|
+
:'inbox_ids' => :'inboxIds'
|
26
|
+
}
|
27
|
+
end
|
28
|
+
|
29
|
+
# Attribute type mapping.
|
30
|
+
def self.openapi_types
|
31
|
+
{
|
32
|
+
:'expire_before' => :'DateTime',
|
33
|
+
:'inbox_ids' => :'Array<String>'
|
34
|
+
}
|
35
|
+
end
|
36
|
+
|
37
|
+
# List of attributes with nullable: true
|
38
|
+
def self.openapi_nullable
|
39
|
+
Set.new([
|
40
|
+
])
|
41
|
+
end
|
42
|
+
|
43
|
+
# Initializes the object
|
44
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
45
|
+
def initialize(attributes = {})
|
46
|
+
if (!attributes.is_a?(Hash))
|
47
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::FlushExpiredInboxesResult` initialize method"
|
48
|
+
end
|
49
|
+
|
50
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
51
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
52
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
53
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::FlushExpiredInboxesResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
54
|
+
end
|
55
|
+
h[k.to_sym] = v
|
56
|
+
}
|
57
|
+
|
58
|
+
if attributes.key?(:'expire_before')
|
59
|
+
self.expire_before = attributes[:'expire_before']
|
60
|
+
end
|
61
|
+
|
62
|
+
if attributes.key?(:'inbox_ids')
|
63
|
+
if (value = attributes[:'inbox_ids']).is_a?(Array)
|
64
|
+
self.inbox_ids = value
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
70
|
+
# @return Array for valid properties with the reasons
|
71
|
+
def list_invalid_properties
|
72
|
+
invalid_properties = Array.new
|
73
|
+
if @expire_before.nil?
|
74
|
+
invalid_properties.push('invalid value for "expire_before", expire_before cannot be nil.')
|
75
|
+
end
|
76
|
+
|
77
|
+
if @inbox_ids.nil?
|
78
|
+
invalid_properties.push('invalid value for "inbox_ids", inbox_ids cannot be nil.')
|
79
|
+
end
|
80
|
+
|
81
|
+
invalid_properties
|
82
|
+
end
|
83
|
+
|
84
|
+
# Check to see if the all the properties in the model are valid
|
85
|
+
# @return true if the model is valid
|
86
|
+
def valid?
|
87
|
+
return false if @expire_before.nil?
|
88
|
+
return false if @inbox_ids.nil?
|
89
|
+
true
|
90
|
+
end
|
91
|
+
|
92
|
+
# Checks equality by comparing each attribute.
|
93
|
+
# @param [Object] Object to be compared
|
94
|
+
def ==(o)
|
95
|
+
return true if self.equal?(o)
|
96
|
+
self.class == o.class &&
|
97
|
+
expire_before == o.expire_before &&
|
98
|
+
inbox_ids == o.inbox_ids
|
99
|
+
end
|
100
|
+
|
101
|
+
# @see the `==` method
|
102
|
+
# @param [Object] Object to be compared
|
103
|
+
def eql?(o)
|
104
|
+
self == o
|
105
|
+
end
|
106
|
+
|
107
|
+
# Calculates hash code according to all attributes.
|
108
|
+
# @return [Integer] Hash code
|
109
|
+
def hash
|
110
|
+
[expire_before, inbox_ids].hash
|
111
|
+
end
|
112
|
+
|
113
|
+
# Builds the object from hash
|
114
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
115
|
+
# @return [Object] Returns the model itself
|
116
|
+
def self.build_from_hash(attributes)
|
117
|
+
new.build_from_hash(attributes)
|
118
|
+
end
|
119
|
+
|
120
|
+
# Builds the object from hash
|
121
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
122
|
+
# @return [Object] Returns the model itself
|
123
|
+
def build_from_hash(attributes)
|
124
|
+
return nil unless attributes.is_a?(Hash)
|
125
|
+
self.class.openapi_types.each_pair do |key, type|
|
126
|
+
if type =~ /\AArray<(.*)>/i
|
127
|
+
# check to ensure the input is an array given that the attribute
|
128
|
+
# is documented as an array but the input is not
|
129
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
130
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
131
|
+
end
|
132
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
133
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
134
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
135
|
+
end
|
136
|
+
|
137
|
+
self
|
138
|
+
end
|
139
|
+
|
140
|
+
# Deserializes the data based on type
|
141
|
+
# @param string type Data type
|
142
|
+
# @param string value Value to be deserialized
|
143
|
+
# @return [Object] Deserialized data
|
144
|
+
def _deserialize(type, value)
|
145
|
+
case type.to_sym
|
146
|
+
when :DateTime
|
147
|
+
DateTime.parse(value)
|
148
|
+
when :Date
|
149
|
+
Date.parse(value)
|
150
|
+
when :String
|
151
|
+
value.to_s
|
152
|
+
when :Integer
|
153
|
+
value.to_i
|
154
|
+
when :Float
|
155
|
+
value.to_f
|
156
|
+
when :Boolean
|
157
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
158
|
+
true
|
159
|
+
else
|
160
|
+
false
|
161
|
+
end
|
162
|
+
when :Object
|
163
|
+
# generic object (usually a Hash), return directly
|
164
|
+
value
|
165
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
166
|
+
inner_type = Regexp.last_match[:inner_type]
|
167
|
+
value.map { |v| _deserialize(inner_type, v) }
|
168
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
169
|
+
k_type = Regexp.last_match[:k_type]
|
170
|
+
v_type = Regexp.last_match[:v_type]
|
171
|
+
{}.tap do |hash|
|
172
|
+
value.each do |k, v|
|
173
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
174
|
+
end
|
175
|
+
end
|
176
|
+
else # model
|
177
|
+
MailSlurpClient.const_get(type).build_from_hash(value)
|
178
|
+
end
|
179
|
+
end
|
180
|
+
|
181
|
+
# Returns the string representation of the object
|
182
|
+
# @return [String] String presentation of the object
|
183
|
+
def to_s
|
184
|
+
to_hash.to_s
|
185
|
+
end
|
186
|
+
|
187
|
+
# to_body is an alias to to_hash (backward compatibility)
|
188
|
+
# @return [Hash] Returns the object in the form of hash
|
189
|
+
def to_body
|
190
|
+
to_hash
|
191
|
+
end
|
192
|
+
|
193
|
+
# Returns the object in the form of hash
|
194
|
+
# @return [Hash] Returns the object in the form of hash
|
195
|
+
def to_hash
|
196
|
+
hash = {}
|
197
|
+
self.class.attribute_map.each_pair do |attr, param|
|
198
|
+
value = self.send(attr)
|
199
|
+
if value.nil?
|
200
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
201
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
202
|
+
end
|
203
|
+
|
204
|
+
hash[param] = _to_hash(value)
|
205
|
+
end
|
206
|
+
hash
|
207
|
+
end
|
208
|
+
|
209
|
+
# Outputs non-array value in the form of hash
|
210
|
+
# For object, use to_hash. Otherwise, just return the value
|
211
|
+
# @param [Object] value Any valid value
|
212
|
+
# @return [Hash] Returns the value in the form of hash
|
213
|
+
def _to_hash(value)
|
214
|
+
if value.is_a?(Array)
|
215
|
+
value.compact.map { |v| _to_hash(v) }
|
216
|
+
elsif value.is_a?(Hash)
|
217
|
+
{}.tap do |hash|
|
218
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
219
|
+
end
|
220
|
+
elsif value.respond_to? :to_hash
|
221
|
+
value.to_hash
|
222
|
+
else
|
223
|
+
value
|
224
|
+
end
|
225
|
+
end
|
226
|
+
end
|
227
|
+
end
|
@@ -13,21 +13,32 @@ OpenAPI Generator version: 4.3.1
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module MailSlurpClient
|
16
|
-
class
|
16
|
+
class InboxPreview
|
17
|
+
# When the inbox was created. Time stamps are in ISO DateTime Format `yyyy-MM-dd'T'HH:mm:ss.SSSXXX` e.g. `2000-10-31T01:30:00.000-05:00`.
|
17
18
|
attr_accessor :created_at
|
18
19
|
|
20
|
+
# The inbox's email address. Inbox projections and previews may not include the email address. To view the email address fetch the inbox entity directly. Send an email to this address and the inbox will receive and store it for you. Note the email address in MailSlurp match characters exactly and are case sensitive so `+123` additions are considered different addresses. To retrieve the email use the Inbox and Email Controller endpoints with the inbox ID.
|
19
21
|
attr_accessor :email_address
|
20
22
|
|
23
|
+
# Inbox expiration time. When, if ever, the inbox should expire and be deleted. If null then this inbox is permanent and the emails in it won't be deleted. This is the default behavior unless expiration date is set. If an expiration date is set and the time is reached MailSlurp will expire the inbox and move it to an expired inbox entity. You can still access the emails belonging to it but it can no longer send or receive email.
|
24
|
+
attr_accessor :expires_at
|
25
|
+
|
26
|
+
# Is the inbox a favorite inbox. Make an inbox a favorite is typically done in the dashboard for quick access or filtering
|
21
27
|
attr_accessor :favourite
|
22
28
|
|
29
|
+
# ID of the inbox. The ID is a UUID-V4 format string. Use the inboxId for calls to Inbox and Email Controller endpoints. See the emailAddress property for the email address or the inbox. To get emails in an inbox use the WaitFor and Inbox Controller methods `waitForLatestEmail` and `getEmails` methods respectively. Inboxes can be used with aliases to forward emails automatically.
|
23
30
|
attr_accessor :id
|
24
31
|
|
32
|
+
# Type of inbox - either HTTP (default) or SMTP. HTTP inboxes are great for testing. SMTP inboxes are processed by a custom SMTP mail server and are better for public facing inboxes that receive emails from Gmail and other large providers. If using a custom domain the domain type must match the inbox type. Use an SMTP domain for SMTP inboxes that includes an MX record pointing to `10 mx.mailslurp.com` for inbound messages.
|
25
33
|
attr_accessor :inbox_type
|
26
34
|
|
35
|
+
# Name of the inbox and used as the sender name when sending emails .Displayed in the dashboard for easier search
|
27
36
|
attr_accessor :name
|
28
37
|
|
38
|
+
# Tags that inbox has been tagged with. Tags can be added to inboxes to group different inboxes within an account. You can also search for inboxes by tag in the dashboard UI.
|
29
39
|
attr_accessor :tags
|
30
40
|
|
41
|
+
# Does inbox permit team access for organization team members. If so team users can use inbox and emails associated with it. See the team access guide at https://www.mailslurp.com/guides/team-email-account-sharing/
|
31
42
|
attr_accessor :team_access
|
32
43
|
|
33
44
|
class EnumAttributeValidator
|
@@ -57,6 +68,7 @@ module MailSlurpClient
|
|
57
68
|
{
|
58
69
|
:'created_at' => :'createdAt',
|
59
70
|
:'email_address' => :'emailAddress',
|
71
|
+
:'expires_at' => :'expiresAt',
|
60
72
|
:'favourite' => :'favourite',
|
61
73
|
:'id' => :'id',
|
62
74
|
:'inbox_type' => :'inboxType',
|
@@ -71,6 +83,7 @@ module MailSlurpClient
|
|
71
83
|
{
|
72
84
|
:'created_at' => :'DateTime',
|
73
85
|
:'email_address' => :'String',
|
86
|
+
:'expires_at' => :'String',
|
74
87
|
:'favourite' => :'Boolean',
|
75
88
|
:'id' => :'String',
|
76
89
|
:'inbox_type' => :'String',
|
@@ -90,13 +103,13 @@ module MailSlurpClient
|
|
90
103
|
# @param [Hash] attributes Model attributes in the form of hash
|
91
104
|
def initialize(attributes = {})
|
92
105
|
if (!attributes.is_a?(Hash))
|
93
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::
|
106
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::InboxPreview` initialize method"
|
94
107
|
end
|
95
108
|
|
96
109
|
# check to see if the attribute exists and convert string to symbol for hash key
|
97
110
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
98
111
|
if (!self.class.attribute_map.key?(k.to_sym))
|
99
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::
|
112
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::InboxPreview`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
100
113
|
end
|
101
114
|
h[k.to_sym] = v
|
102
115
|
}
|
@@ -109,6 +122,10 @@ module MailSlurpClient
|
|
109
122
|
self.email_address = attributes[:'email_address']
|
110
123
|
end
|
111
124
|
|
125
|
+
if attributes.key?(:'expires_at')
|
126
|
+
self.expires_at = attributes[:'expires_at']
|
127
|
+
end
|
128
|
+
|
112
129
|
if attributes.key?(:'favourite')
|
113
130
|
self.favourite = attributes[:'favourite']
|
114
131
|
end
|
@@ -140,34 +157,14 @@ module MailSlurpClient
|
|
140
157
|
# @return Array for valid properties with the reasons
|
141
158
|
def list_invalid_properties
|
142
159
|
invalid_properties = Array.new
|
143
|
-
if @created_at.nil?
|
144
|
-
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
145
|
-
end
|
146
|
-
|
147
|
-
if @favourite.nil?
|
148
|
-
invalid_properties.push('invalid value for "favourite", favourite cannot be nil.')
|
149
|
-
end
|
150
|
-
|
151
|
-
if @id.nil?
|
152
|
-
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
153
|
-
end
|
154
|
-
|
155
|
-
if @team_access.nil?
|
156
|
-
invalid_properties.push('invalid value for "team_access", team_access cannot be nil.')
|
157
|
-
end
|
158
|
-
|
159
160
|
invalid_properties
|
160
161
|
end
|
161
162
|
|
162
163
|
# Check to see if the all the properties in the model are valid
|
163
164
|
# @return true if the model is valid
|
164
165
|
def valid?
|
165
|
-
return false if @created_at.nil?
|
166
|
-
return false if @favourite.nil?
|
167
|
-
return false if @id.nil?
|
168
166
|
inbox_type_validator = EnumAttributeValidator.new('String', ["HTTP_INBOX", "SMTP_INBOX"])
|
169
167
|
return false unless inbox_type_validator.valid?(@inbox_type)
|
170
|
-
return false if @team_access.nil?
|
171
168
|
true
|
172
169
|
end
|
173
170
|
|
@@ -188,6 +185,7 @@ module MailSlurpClient
|
|
188
185
|
self.class == o.class &&
|
189
186
|
created_at == o.created_at &&
|
190
187
|
email_address == o.email_address &&
|
188
|
+
expires_at == o.expires_at &&
|
191
189
|
favourite == o.favourite &&
|
192
190
|
id == o.id &&
|
193
191
|
inbox_type == o.inbox_type &&
|
@@ -205,7 +203,7 @@ module MailSlurpClient
|
|
205
203
|
# Calculates hash code according to all attributes.
|
206
204
|
# @return [Integer] Hash code
|
207
205
|
def hash
|
208
|
-
[created_at, email_address, favourite, id, inbox_type, name, tags, team_access].hash
|
206
|
+
[created_at, email_address, expires_at, favourite, id, inbox_type, name, tags, team_access].hash
|
209
207
|
end
|
210
208
|
|
211
209
|
# Builds the object from hash
|
@@ -0,0 +1,211 @@
|
|
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 'date'
|
14
|
+
|
15
|
+
module MailSlurpClient
|
16
|
+
class UnseenErrorCountDto
|
17
|
+
attr_accessor :count
|
18
|
+
|
19
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
20
|
+
def self.attribute_map
|
21
|
+
{
|
22
|
+
:'count' => :'count'
|
23
|
+
}
|
24
|
+
end
|
25
|
+
|
26
|
+
# Attribute type mapping.
|
27
|
+
def self.openapi_types
|
28
|
+
{
|
29
|
+
:'count' => :'Integer'
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
# List of attributes with nullable: true
|
34
|
+
def self.openapi_nullable
|
35
|
+
Set.new([
|
36
|
+
])
|
37
|
+
end
|
38
|
+
|
39
|
+
# Initializes the object
|
40
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
41
|
+
def initialize(attributes = {})
|
42
|
+
if (!attributes.is_a?(Hash))
|
43
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::UnseenErrorCountDto` initialize method"
|
44
|
+
end
|
45
|
+
|
46
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
47
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
48
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
49
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::UnseenErrorCountDto`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
50
|
+
end
|
51
|
+
h[k.to_sym] = v
|
52
|
+
}
|
53
|
+
|
54
|
+
if attributes.key?(:'count')
|
55
|
+
self.count = attributes[:'count']
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
60
|
+
# @return Array for valid properties with the reasons
|
61
|
+
def list_invalid_properties
|
62
|
+
invalid_properties = Array.new
|
63
|
+
if @count.nil?
|
64
|
+
invalid_properties.push('invalid value for "count", count cannot be nil.')
|
65
|
+
end
|
66
|
+
|
67
|
+
invalid_properties
|
68
|
+
end
|
69
|
+
|
70
|
+
# Check to see if the all the properties in the model are valid
|
71
|
+
# @return true if the model is valid
|
72
|
+
def valid?
|
73
|
+
return false if @count.nil?
|
74
|
+
true
|
75
|
+
end
|
76
|
+
|
77
|
+
# Checks equality by comparing each attribute.
|
78
|
+
# @param [Object] Object to be compared
|
79
|
+
def ==(o)
|
80
|
+
return true if self.equal?(o)
|
81
|
+
self.class == o.class &&
|
82
|
+
count == o.count
|
83
|
+
end
|
84
|
+
|
85
|
+
# @see the `==` method
|
86
|
+
# @param [Object] Object to be compared
|
87
|
+
def eql?(o)
|
88
|
+
self == o
|
89
|
+
end
|
90
|
+
|
91
|
+
# Calculates hash code according to all attributes.
|
92
|
+
# @return [Integer] Hash code
|
93
|
+
def hash
|
94
|
+
[count].hash
|
95
|
+
end
|
96
|
+
|
97
|
+
# Builds the object from hash
|
98
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
99
|
+
# @return [Object] Returns the model itself
|
100
|
+
def self.build_from_hash(attributes)
|
101
|
+
new.build_from_hash(attributes)
|
102
|
+
end
|
103
|
+
|
104
|
+
# Builds the object from hash
|
105
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
106
|
+
# @return [Object] Returns the model itself
|
107
|
+
def build_from_hash(attributes)
|
108
|
+
return nil unless attributes.is_a?(Hash)
|
109
|
+
self.class.openapi_types.each_pair do |key, type|
|
110
|
+
if type =~ /\AArray<(.*)>/i
|
111
|
+
# check to ensure the input is an array given that the attribute
|
112
|
+
# is documented as an array but the input is not
|
113
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
114
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
115
|
+
end
|
116
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
117
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
118
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
119
|
+
end
|
120
|
+
|
121
|
+
self
|
122
|
+
end
|
123
|
+
|
124
|
+
# Deserializes the data based on type
|
125
|
+
# @param string type Data type
|
126
|
+
# @param string value Value to be deserialized
|
127
|
+
# @return [Object] Deserialized data
|
128
|
+
def _deserialize(type, value)
|
129
|
+
case type.to_sym
|
130
|
+
when :DateTime
|
131
|
+
DateTime.parse(value)
|
132
|
+
when :Date
|
133
|
+
Date.parse(value)
|
134
|
+
when :String
|
135
|
+
value.to_s
|
136
|
+
when :Integer
|
137
|
+
value.to_i
|
138
|
+
when :Float
|
139
|
+
value.to_f
|
140
|
+
when :Boolean
|
141
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
142
|
+
true
|
143
|
+
else
|
144
|
+
false
|
145
|
+
end
|
146
|
+
when :Object
|
147
|
+
# generic object (usually a Hash), return directly
|
148
|
+
value
|
149
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
150
|
+
inner_type = Regexp.last_match[:inner_type]
|
151
|
+
value.map { |v| _deserialize(inner_type, v) }
|
152
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
153
|
+
k_type = Regexp.last_match[:k_type]
|
154
|
+
v_type = Regexp.last_match[:v_type]
|
155
|
+
{}.tap do |hash|
|
156
|
+
value.each do |k, v|
|
157
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
158
|
+
end
|
159
|
+
end
|
160
|
+
else # model
|
161
|
+
MailSlurpClient.const_get(type).build_from_hash(value)
|
162
|
+
end
|
163
|
+
end
|
164
|
+
|
165
|
+
# Returns the string representation of the object
|
166
|
+
# @return [String] String presentation of the object
|
167
|
+
def to_s
|
168
|
+
to_hash.to_s
|
169
|
+
end
|
170
|
+
|
171
|
+
# to_body is an alias to to_hash (backward compatibility)
|
172
|
+
# @return [Hash] Returns the object in the form of hash
|
173
|
+
def to_body
|
174
|
+
to_hash
|
175
|
+
end
|
176
|
+
|
177
|
+
# Returns the object in the form of hash
|
178
|
+
# @return [Hash] Returns the object in the form of hash
|
179
|
+
def to_hash
|
180
|
+
hash = {}
|
181
|
+
self.class.attribute_map.each_pair do |attr, param|
|
182
|
+
value = self.send(attr)
|
183
|
+
if value.nil?
|
184
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
185
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
186
|
+
end
|
187
|
+
|
188
|
+
hash[param] = _to_hash(value)
|
189
|
+
end
|
190
|
+
hash
|
191
|
+
end
|
192
|
+
|
193
|
+
# Outputs non-array value in the form of hash
|
194
|
+
# For object, use to_hash. Otherwise, just return the value
|
195
|
+
# @param [Object] value Any valid value
|
196
|
+
# @return [Hash] Returns the value in the form of hash
|
197
|
+
def _to_hash(value)
|
198
|
+
if value.is_a?(Array)
|
199
|
+
value.compact.map { |v| _to_hash(v) }
|
200
|
+
elsif value.is_a?(Hash)
|
201
|
+
{}.tap do |hash|
|
202
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
203
|
+
end
|
204
|
+
elsif value.respond_to? :to_hash
|
205
|
+
value.to_hash
|
206
|
+
else
|
207
|
+
value
|
208
|
+
end
|
209
|
+
end
|
210
|
+
end
|
211
|
+
end
|
@@ -34,6 +34,8 @@ module MailSlurpClient
|
|
34
34
|
|
35
35
|
attr_accessor :result_type
|
36
36
|
|
37
|
+
attr_accessor :seen
|
38
|
+
|
37
39
|
attr_accessor :updated_at
|
38
40
|
|
39
41
|
attr_accessor :user_id
|
@@ -79,6 +81,7 @@ module MailSlurpClient
|
|
79
81
|
:'response_status' => :'responseStatus',
|
80
82
|
:'response_time_millis' => :'responseTimeMillis',
|
81
83
|
:'result_type' => :'resultType',
|
84
|
+
:'seen' => :'seen',
|
82
85
|
:'updated_at' => :'updatedAt',
|
83
86
|
:'user_id' => :'userId',
|
84
87
|
:'webhook_event' => :'webhookEvent',
|
@@ -100,6 +103,7 @@ module MailSlurpClient
|
|
100
103
|
:'response_status' => :'Integer',
|
101
104
|
:'response_time_millis' => :'Integer',
|
102
105
|
:'result_type' => :'String',
|
106
|
+
:'seen' => :'Boolean',
|
103
107
|
:'updated_at' => :'DateTime',
|
104
108
|
:'user_id' => :'String',
|
105
109
|
:'webhook_event' => :'String',
|
@@ -169,6 +173,10 @@ module MailSlurpClient
|
|
169
173
|
self.result_type = attributes[:'result_type']
|
170
174
|
end
|
171
175
|
|
176
|
+
if attributes.key?(:'seen')
|
177
|
+
self.seen = attributes[:'seen']
|
178
|
+
end
|
179
|
+
|
172
180
|
if attributes.key?(:'updated_at')
|
173
181
|
self.updated_at = attributes[:'updated_at']
|
174
182
|
end
|
@@ -304,6 +312,7 @@ module MailSlurpClient
|
|
304
312
|
response_status == o.response_status &&
|
305
313
|
response_time_millis == o.response_time_millis &&
|
306
314
|
result_type == o.result_type &&
|
315
|
+
seen == o.seen &&
|
307
316
|
updated_at == o.updated_at &&
|
308
317
|
user_id == o.user_id &&
|
309
318
|
webhook_event == o.webhook_event &&
|
@@ -320,7 +329,7 @@ module MailSlurpClient
|
|
320
329
|
# Calculates hash code according to all attributes.
|
321
330
|
# @return [Integer] Hash code
|
322
331
|
def hash
|
323
|
-
[created_at, http_method, id, inbox_id, message_id, redrive_id, response_body_extract, response_status, response_time_millis, result_type, updated_at, user_id, webhook_event, webhook_id, webhook_url].hash
|
332
|
+
[created_at, http_method, id, inbox_id, message_id, redrive_id, response_body_extract, response_status, response_time_millis, result_type, seen, updated_at, user_id, webhook_event, webhook_id, webhook_url].hash
|
324
333
|
end
|
325
334
|
|
326
335
|
# Builds the object from hash
|
data/lib/mailslurp_client.rb
CHANGED
@@ -66,6 +66,7 @@ require 'mailslurp_client/models/expired_inbox_dto'
|
|
66
66
|
require 'mailslurp_client/models/expired_inbox_record_projection'
|
67
67
|
require 'mailslurp_client/models/export_link'
|
68
68
|
require 'mailslurp_client/models/export_options'
|
69
|
+
require 'mailslurp_client/models/flush_expired_inboxes_result'
|
69
70
|
require 'mailslurp_client/models/forward_email_options'
|
70
71
|
require 'mailslurp_client/models/gravatar_url'
|
71
72
|
require 'mailslurp_client/models/group_contacts_dto'
|
@@ -77,7 +78,7 @@ require 'mailslurp_client/models/inbox'
|
|
77
78
|
require 'mailslurp_client/models/inbox_forwarder_dto'
|
78
79
|
require 'mailslurp_client/models/inbox_forwarder_test_options'
|
79
80
|
require 'mailslurp_client/models/inbox_forwarder_test_result'
|
80
|
-
require 'mailslurp_client/models/
|
81
|
+
require 'mailslurp_client/models/inbox_preview'
|
81
82
|
require 'mailslurp_client/models/inbox_ruleset_dto'
|
82
83
|
require 'mailslurp_client/models/inbox_ruleset_test_options'
|
83
84
|
require 'mailslurp_client/models/inbox_ruleset_test_result'
|
@@ -131,6 +132,7 @@ require 'mailslurp_client/models/tracking_pixel_dto'
|
|
131
132
|
require 'mailslurp_client/models/tracking_pixel_projection'
|
132
133
|
require 'mailslurp_client/models/unknown_missed_email_projection'
|
133
134
|
require 'mailslurp_client/models/unread_count'
|
135
|
+
require 'mailslurp_client/models/unseen_error_count_dto'
|
134
136
|
require 'mailslurp_client/models/update_alias_options'
|
135
137
|
require 'mailslurp_client/models/update_domain_options'
|
136
138
|
require 'mailslurp_client/models/update_group_contacts'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mailslurp_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 14.0.
|
4
|
+
version: 14.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mailslurp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-10-05 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Create emails addresses in Ruby then send and receive real emails and
|
14
14
|
attachments. See https://www.mailslurp.com/docs/ruby/ for full Ruby documentation.
|
@@ -97,6 +97,7 @@ files:
|
|
97
97
|
- lib/mailslurp_client/models/expired_inbox_record_projection.rb
|
98
98
|
- lib/mailslurp_client/models/export_link.rb
|
99
99
|
- lib/mailslurp_client/models/export_options.rb
|
100
|
+
- lib/mailslurp_client/models/flush_expired_inboxes_result.rb
|
100
101
|
- lib/mailslurp_client/models/forward_email_options.rb
|
101
102
|
- lib/mailslurp_client/models/gravatar_url.rb
|
102
103
|
- lib/mailslurp_client/models/group_contacts_dto.rb
|
@@ -107,7 +108,7 @@ files:
|
|
107
108
|
- lib/mailslurp_client/models/inbox_forwarder_dto.rb
|
108
109
|
- lib/mailslurp_client/models/inbox_forwarder_test_options.rb
|
109
110
|
- lib/mailslurp_client/models/inbox_forwarder_test_result.rb
|
110
|
-
- lib/mailslurp_client/models/
|
111
|
+
- lib/mailslurp_client/models/inbox_preview.rb
|
111
112
|
- lib/mailslurp_client/models/inbox_ruleset_dto.rb
|
112
113
|
- lib/mailslurp_client/models/inbox_ruleset_test_options.rb
|
113
114
|
- lib/mailslurp_client/models/inbox_ruleset_test_result.rb
|
@@ -162,6 +163,7 @@ files:
|
|
162
163
|
- lib/mailslurp_client/models/tracking_pixel_projection.rb
|
163
164
|
- lib/mailslurp_client/models/unknown_missed_email_projection.rb
|
164
165
|
- lib/mailslurp_client/models/unread_count.rb
|
166
|
+
- lib/mailslurp_client/models/unseen_error_count_dto.rb
|
165
167
|
- lib/mailslurp_client/models/update_alias_options.rb
|
166
168
|
- lib/mailslurp_client/models/update_domain_options.rb
|
167
169
|
- lib/mailslurp_client/models/update_group_contacts.rb
|