mailslurp_client 11.6.24 → 11.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '081b7317d252dff75972fd881262f3ad979774f0635bf40191abbdf84f32d0ed'
4
- data.tar.gz: f43c47ffcb9db5bb8eff7e3d7d06a19a9e5176880901a1db79e41d026b7f6334
3
+ metadata.gz: 550a88d809d0f491954c55a8f46f2390e467c14e92ec49dabe13de4d7c07ab27
4
+ data.tar.gz: 929c369c715deaed6d372f1fe49b49f9a3977eaec936c2f1b2c337cfc8987b40
5
5
  SHA512:
6
- metadata.gz: 73aea464b91079029a4dd86ca95bd023ed1801ea84e91f5a7da017b656dfd299370169ae0209e620a8dc0159669de223f1a3b6f9e1bfb02c5da7c9f19dceb6ee
7
- data.tar.gz: 741e7ec0507ce92245d1034505929ca1ea8abf6c597a66b689cb9e056747d012b98bd37c7bd69fd4695b392adafbaf15a4a934e932229f624154ace02cdfba30
6
+ metadata.gz: 7db503af72065a717b5c87dcedcc37c61ce3254d0be99458657946de8b0e75f7793a8640fc4b6fc3d1bec60704f56808324cb50d081defd580858b014273547b
7
+ data.tar.gz: 006c444269145dc22add6527be5c2c80fc8c1a67b9d77baf06d8a4326163596462f0e517d97d6b093f1680eced74d85998979a41d2e7d22a9574af5f86a387e6
@@ -61,6 +61,8 @@ require 'mailslurp_client/models/inbox'
61
61
  require 'mailslurp_client/models/inbox_projection'
62
62
  require 'mailslurp_client/models/match_option'
63
63
  require 'mailslurp_client/models/match_options'
64
+ require 'mailslurp_client/models/missed_email'
65
+ require 'mailslurp_client/models/missed_email_projection'
64
66
  require 'mailslurp_client/models/model_alias'
65
67
  require 'mailslurp_client/models/name_server_record'
66
68
  require 'mailslurp_client/models/organization_inbox_projection'
@@ -71,6 +73,7 @@ require 'mailslurp_client/models/page_email_projection'
71
73
  require 'mailslurp_client/models/page_expired_inbox_record_projection'
72
74
  require 'mailslurp_client/models/page_group_projection'
73
75
  require 'mailslurp_client/models/page_inbox_projection'
76
+ require 'mailslurp_client/models/page_missed_email_projection'
74
77
  require 'mailslurp_client/models/page_organization_inbox_projection'
75
78
  require 'mailslurp_client/models/page_sent_email_projection'
76
79
  require 'mailslurp_client/models/page_template_projection'
@@ -119,6 +122,7 @@ require 'mailslurp_client/api/form_controller_api'
119
122
  require 'mailslurp_client/api/group_controller_api'
120
123
  require 'mailslurp_client/api/inbox_controller_api'
121
124
  require 'mailslurp_client/api/mail_server_controller_api'
125
+ require 'mailslurp_client/api/missed_email_controller_api'
122
126
  require 'mailslurp_client/api/sent_emails_controller_api'
123
127
  require 'mailslurp_client/api/template_controller_api'
124
128
  require 'mailslurp_client/api/wait_for_controller_api'
@@ -0,0 +1,149 @@
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 MissedEmailControllerApi
17
+ attr_accessor :api_client
18
+
19
+ def initialize(api_client = ApiClient.default)
20
+ @api_client = api_client
21
+ end
22
+ # Get all MissedEmails in paginated format
23
+ # @param [Hash] opts the optional parameters
24
+ # @option opts [Integer] :page Optional page index in inbox list pagination (default to 0)
25
+ # @option opts [Integer] :size Optional page size in inbox list pagination (default to 20)
26
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
27
+ # @return [PageMissedEmailProjection]
28
+ def get_all_missed_emails(opts = {})
29
+ data, _status_code, _headers = get_all_missed_emails_with_http_info(opts)
30
+ data
31
+ end
32
+
33
+ # Get all MissedEmails in paginated format
34
+ # @param [Hash] opts the optional parameters
35
+ # @option opts [Integer] :page Optional page index in inbox list pagination
36
+ # @option opts [Integer] :size Optional page size in inbox list pagination
37
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
38
+ # @return [Array<(PageMissedEmailProjection, Integer, Hash)>] PageMissedEmailProjection data, response status code and response headers
39
+ def get_all_missed_emails_with_http_info(opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: MissedEmailControllerApi.get_all_missed_emails ...'
42
+ end
43
+ allowable_values = ["ASC", "DESC"]
44
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
45
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
46
+ end
47
+ # resource path
48
+ local_var_path = '/missed-emails'
49
+
50
+ # query parameters
51
+ query_params = opts[:query_params] || {}
52
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
53
+ query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
54
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
55
+
56
+ # header parameters
57
+ header_params = opts[:header_params] || {}
58
+ # HTTP header 'Accept' (if needed)
59
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
60
+
61
+ # form parameters
62
+ form_params = opts[:form_params] || {}
63
+
64
+ # http body (model)
65
+ post_body = opts[:body]
66
+
67
+ # return_type
68
+ return_type = opts[:return_type] || 'PageMissedEmailProjection'
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(:GET, local_var_path, new_options)
83
+ if @api_client.config.debugging
84
+ @api_client.config.logger.debug "API called: MissedEmailControllerApi#get_all_missed_emails\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
85
+ end
86
+ return data, status_code, headers
87
+ end
88
+
89
+ # Get MissedEmail
90
+ # @param missed_email_id [String] MissedEmailId
91
+ # @param [Hash] opts the optional parameters
92
+ # @return [MissedEmail]
93
+ def get_missed_email(missed_email_id, opts = {})
94
+ data, _status_code, _headers = get_missed_email_with_http_info(missed_email_id, opts)
95
+ data
96
+ end
97
+
98
+ # Get MissedEmail
99
+ # @param missed_email_id [String] MissedEmailId
100
+ # @param [Hash] opts the optional parameters
101
+ # @return [Array<(MissedEmail, Integer, Hash)>] MissedEmail data, response status code and response headers
102
+ def get_missed_email_with_http_info(missed_email_id, opts = {})
103
+ if @api_client.config.debugging
104
+ @api_client.config.logger.debug 'Calling API: MissedEmailControllerApi.get_missed_email ...'
105
+ end
106
+ # verify the required parameter 'missed_email_id' is set
107
+ if @api_client.config.client_side_validation && missed_email_id.nil?
108
+ fail ArgumentError, "Missing the required parameter 'missed_email_id' when calling MissedEmailControllerApi.get_missed_email"
109
+ end
110
+ # resource path
111
+ local_var_path = '/missed-emails/{MissedEmailId}'.sub('{' + 'MissedEmailId' + '}', CGI.escape(missed_email_id.to_s))
112
+
113
+ # query parameters
114
+ query_params = opts[:query_params] || {}
115
+
116
+ # header parameters
117
+ header_params = opts[:header_params] || {}
118
+ # HTTP header 'Accept' (if needed)
119
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
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] || 'MissedEmail'
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(:GET, local_var_path, new_options)
143
+ if @api_client.config.debugging
144
+ @api_client.config.logger.debug "API called: MissedEmailControllerApi#get_missed_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
145
+ end
146
+ return data, status_code, headers
147
+ end
148
+ end
149
+ end
@@ -0,0 +1,344 @@
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 MissedEmail
17
+ attr_accessor :attachment_count
18
+
19
+ attr_accessor :bcc
20
+
21
+ attr_accessor :body_excerpt
22
+
23
+ attr_accessor :cc
24
+
25
+ attr_accessor :created_at
26
+
27
+ attr_accessor :id
28
+
29
+ attr_accessor :inbox_ids
30
+
31
+ attr_accessor :subject
32
+
33
+ attr_accessor :to
34
+
35
+ attr_accessor :updated_at
36
+
37
+ attr_accessor :user_id
38
+
39
+ # Attribute mapping from ruby-style variable name to JSON key.
40
+ def self.attribute_map
41
+ {
42
+ :'attachment_count' => :'attachmentCount',
43
+ :'bcc' => :'bcc',
44
+ :'body_excerpt' => :'bodyExcerpt',
45
+ :'cc' => :'cc',
46
+ :'created_at' => :'createdAt',
47
+ :'id' => :'id',
48
+ :'inbox_ids' => :'inboxIds',
49
+ :'subject' => :'subject',
50
+ :'to' => :'to',
51
+ :'updated_at' => :'updatedAt',
52
+ :'user_id' => :'userId'
53
+ }
54
+ end
55
+
56
+ # Attribute type mapping.
57
+ def self.openapi_types
58
+ {
59
+ :'attachment_count' => :'Integer',
60
+ :'bcc' => :'Array<String>',
61
+ :'body_excerpt' => :'String',
62
+ :'cc' => :'Array<String>',
63
+ :'created_at' => :'DateTime',
64
+ :'id' => :'String',
65
+ :'inbox_ids' => :'Array<String>',
66
+ :'subject' => :'String',
67
+ :'to' => :'Array<String>',
68
+ :'updated_at' => :'DateTime',
69
+ :'user_id' => :'String'
70
+ }
71
+ end
72
+
73
+ # List of attributes with nullable: true
74
+ def self.openapi_nullable
75
+ Set.new([
76
+ ])
77
+ end
78
+
79
+ # Initializes the object
80
+ # @param [Hash] attributes Model attributes in the form of hash
81
+ def initialize(attributes = {})
82
+ if (!attributes.is_a?(Hash))
83
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::MissedEmail` initialize method"
84
+ end
85
+
86
+ # check to see if the attribute exists and convert string to symbol for hash key
87
+ attributes = attributes.each_with_object({}) { |(k, v), h|
88
+ if (!self.class.attribute_map.key?(k.to_sym))
89
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::MissedEmail`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
90
+ end
91
+ h[k.to_sym] = v
92
+ }
93
+
94
+ if attributes.key?(:'attachment_count')
95
+ self.attachment_count = attributes[:'attachment_count']
96
+ end
97
+
98
+ if attributes.key?(:'bcc')
99
+ if (value = attributes[:'bcc']).is_a?(Array)
100
+ self.bcc = value
101
+ end
102
+ end
103
+
104
+ if attributes.key?(:'body_excerpt')
105
+ self.body_excerpt = attributes[:'body_excerpt']
106
+ end
107
+
108
+ if attributes.key?(:'cc')
109
+ if (value = attributes[:'cc']).is_a?(Array)
110
+ self.cc = value
111
+ end
112
+ end
113
+
114
+ if attributes.key?(:'created_at')
115
+ self.created_at = attributes[:'created_at']
116
+ end
117
+
118
+ if attributes.key?(:'id')
119
+ self.id = attributes[:'id']
120
+ end
121
+
122
+ if attributes.key?(:'inbox_ids')
123
+ if (value = attributes[:'inbox_ids']).is_a?(Array)
124
+ self.inbox_ids = value
125
+ end
126
+ end
127
+
128
+ if attributes.key?(:'subject')
129
+ self.subject = attributes[:'subject']
130
+ end
131
+
132
+ if attributes.key?(:'to')
133
+ if (value = attributes[:'to']).is_a?(Array)
134
+ self.to = value
135
+ end
136
+ end
137
+
138
+ if attributes.key?(:'updated_at')
139
+ self.updated_at = attributes[:'updated_at']
140
+ end
141
+
142
+ if attributes.key?(:'user_id')
143
+ self.user_id = attributes[:'user_id']
144
+ end
145
+ end
146
+
147
+ # Show invalid properties with the reasons. Usually used together with valid?
148
+ # @return Array for valid properties with the reasons
149
+ def list_invalid_properties
150
+ invalid_properties = Array.new
151
+ if @attachment_count.nil?
152
+ invalid_properties.push('invalid value for "attachment_count", attachment_count cannot be nil.')
153
+ end
154
+
155
+ if @bcc.nil?
156
+ invalid_properties.push('invalid value for "bcc", bcc cannot be nil.')
157
+ end
158
+
159
+ if @cc.nil?
160
+ invalid_properties.push('invalid value for "cc", cc cannot be nil.')
161
+ end
162
+
163
+ if @created_at.nil?
164
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
165
+ end
166
+
167
+ if @inbox_ids.nil?
168
+ invalid_properties.push('invalid value for "inbox_ids", inbox_ids cannot be nil.')
169
+ end
170
+
171
+ if @to.nil?
172
+ invalid_properties.push('invalid value for "to", to cannot be nil.')
173
+ end
174
+
175
+ if @updated_at.nil?
176
+ invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
177
+ end
178
+
179
+ if @user_id.nil?
180
+ invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
181
+ end
182
+
183
+ invalid_properties
184
+ end
185
+
186
+ # Check to see if the all the properties in the model are valid
187
+ # @return true if the model is valid
188
+ def valid?
189
+ return false if @attachment_count.nil?
190
+ return false if @bcc.nil?
191
+ return false if @cc.nil?
192
+ return false if @created_at.nil?
193
+ return false if @inbox_ids.nil?
194
+ return false if @to.nil?
195
+ return false if @updated_at.nil?
196
+ return false if @user_id.nil?
197
+ true
198
+ end
199
+
200
+ # Checks equality by comparing each attribute.
201
+ # @param [Object] Object to be compared
202
+ def ==(o)
203
+ return true if self.equal?(o)
204
+ self.class == o.class &&
205
+ attachment_count == o.attachment_count &&
206
+ bcc == o.bcc &&
207
+ body_excerpt == o.body_excerpt &&
208
+ cc == o.cc &&
209
+ created_at == o.created_at &&
210
+ id == o.id &&
211
+ inbox_ids == o.inbox_ids &&
212
+ subject == o.subject &&
213
+ to == o.to &&
214
+ updated_at == o.updated_at &&
215
+ user_id == o.user_id
216
+ end
217
+
218
+ # @see the `==` method
219
+ # @param [Object] Object to be compared
220
+ def eql?(o)
221
+ self == o
222
+ end
223
+
224
+ # Calculates hash code according to all attributes.
225
+ # @return [Integer] Hash code
226
+ def hash
227
+ [attachment_count, bcc, body_excerpt, cc, created_at, id, inbox_ids, subject, to, updated_at, user_id].hash
228
+ end
229
+
230
+ # Builds the object from hash
231
+ # @param [Hash] attributes Model attributes in the form of hash
232
+ # @return [Object] Returns the model itself
233
+ def self.build_from_hash(attributes)
234
+ new.build_from_hash(attributes)
235
+ end
236
+
237
+ # Builds the object from hash
238
+ # @param [Hash] attributes Model attributes in the form of hash
239
+ # @return [Object] Returns the model itself
240
+ def build_from_hash(attributes)
241
+ return nil unless attributes.is_a?(Hash)
242
+ self.class.openapi_types.each_pair do |key, type|
243
+ if type =~ /\AArray<(.*)>/i
244
+ # check to ensure the input is an array given that the attribute
245
+ # is documented as an array but the input is not
246
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
247
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
248
+ end
249
+ elsif !attributes[self.class.attribute_map[key]].nil?
250
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
251
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
252
+ end
253
+
254
+ self
255
+ end
256
+
257
+ # Deserializes the data based on type
258
+ # @param string type Data type
259
+ # @param string value Value to be deserialized
260
+ # @return [Object] Deserialized data
261
+ def _deserialize(type, value)
262
+ case type.to_sym
263
+ when :DateTime
264
+ DateTime.parse(value)
265
+ when :Date
266
+ Date.parse(value)
267
+ when :String
268
+ value.to_s
269
+ when :Integer
270
+ value.to_i
271
+ when :Float
272
+ value.to_f
273
+ when :Boolean
274
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
275
+ true
276
+ else
277
+ false
278
+ end
279
+ when :Object
280
+ # generic object (usually a Hash), return directly
281
+ value
282
+ when /\AArray<(?<inner_type>.+)>\z/
283
+ inner_type = Regexp.last_match[:inner_type]
284
+ value.map { |v| _deserialize(inner_type, v) }
285
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
286
+ k_type = Regexp.last_match[:k_type]
287
+ v_type = Regexp.last_match[:v_type]
288
+ {}.tap do |hash|
289
+ value.each do |k, v|
290
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
291
+ end
292
+ end
293
+ else # model
294
+ MailSlurpClient.const_get(type).build_from_hash(value)
295
+ end
296
+ end
297
+
298
+ # Returns the string representation of the object
299
+ # @return [String] String presentation of the object
300
+ def to_s
301
+ to_hash.to_s
302
+ end
303
+
304
+ # to_body is an alias to to_hash (backward compatibility)
305
+ # @return [Hash] Returns the object in the form of hash
306
+ def to_body
307
+ to_hash
308
+ end
309
+
310
+ # Returns the object in the form of hash
311
+ # @return [Hash] Returns the object in the form of hash
312
+ def to_hash
313
+ hash = {}
314
+ self.class.attribute_map.each_pair do |attr, param|
315
+ value = self.send(attr)
316
+ if value.nil?
317
+ is_nullable = self.class.openapi_nullable.include?(attr)
318
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
319
+ end
320
+
321
+ hash[param] = _to_hash(value)
322
+ end
323
+ hash
324
+ end
325
+
326
+ # Outputs non-array value in the form of hash
327
+ # For object, use to_hash. Otherwise, just return the value
328
+ # @param [Object] value Any valid value
329
+ # @return [Hash] Returns the value in the form of hash
330
+ def _to_hash(value)
331
+ if value.is_a?(Array)
332
+ value.compact.map { |v| _to_hash(v) }
333
+ elsif value.is_a?(Hash)
334
+ {}.tap do |hash|
335
+ value.each { |k, v| hash[k] = _to_hash(v) }
336
+ end
337
+ elsif value.respond_to? :to_hash
338
+ value.to_hash
339
+ else
340
+ value
341
+ end
342
+ end
343
+ end
344
+ end
@@ -0,0 +1,234 @@
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 MissedEmailProjection
17
+ attr_accessor :id
18
+
19
+ attr_accessor :subject
20
+
21
+ attr_accessor :user_id
22
+
23
+ # Attribute mapping from ruby-style variable name to JSON key.
24
+ def self.attribute_map
25
+ {
26
+ :'id' => :'id',
27
+ :'subject' => :'subject',
28
+ :'user_id' => :'userId'
29
+ }
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.openapi_types
34
+ {
35
+ :'id' => :'String',
36
+ :'subject' => :'String',
37
+ :'user_id' => :'String'
38
+ }
39
+ end
40
+
41
+ # List of attributes with nullable: true
42
+ def self.openapi_nullable
43
+ Set.new([
44
+ ])
45
+ end
46
+
47
+ # Initializes the object
48
+ # @param [Hash] attributes Model attributes in the form of hash
49
+ def initialize(attributes = {})
50
+ if (!attributes.is_a?(Hash))
51
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::MissedEmailProjection` initialize method"
52
+ end
53
+
54
+ # check to see if the attribute exists and convert string to symbol for hash key
55
+ attributes = attributes.each_with_object({}) { |(k, v), h|
56
+ if (!self.class.attribute_map.key?(k.to_sym))
57
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::MissedEmailProjection`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
58
+ end
59
+ h[k.to_sym] = v
60
+ }
61
+
62
+ if attributes.key?(:'id')
63
+ self.id = attributes[:'id']
64
+ end
65
+
66
+ if attributes.key?(:'subject')
67
+ self.subject = attributes[:'subject']
68
+ end
69
+
70
+ if attributes.key?(:'user_id')
71
+ self.user_id = attributes[:'user_id']
72
+ end
73
+ end
74
+
75
+ # Show invalid properties with the reasons. Usually used together with valid?
76
+ # @return Array for valid properties with the reasons
77
+ def list_invalid_properties
78
+ invalid_properties = Array.new
79
+ if @id.nil?
80
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
81
+ end
82
+
83
+ if @user_id.nil?
84
+ invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
85
+ end
86
+
87
+ invalid_properties
88
+ end
89
+
90
+ # Check to see if the all the properties in the model are valid
91
+ # @return true if the model is valid
92
+ def valid?
93
+ return false if @id.nil?
94
+ return false if @user_id.nil?
95
+ true
96
+ end
97
+
98
+ # Checks equality by comparing each attribute.
99
+ # @param [Object] Object to be compared
100
+ def ==(o)
101
+ return true if self.equal?(o)
102
+ self.class == o.class &&
103
+ id == o.id &&
104
+ subject == o.subject &&
105
+ user_id == o.user_id
106
+ end
107
+
108
+ # @see the `==` method
109
+ # @param [Object] Object to be compared
110
+ def eql?(o)
111
+ self == o
112
+ end
113
+
114
+ # Calculates hash code according to all attributes.
115
+ # @return [Integer] Hash code
116
+ def hash
117
+ [id, subject, user_id].hash
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 self.build_from_hash(attributes)
124
+ new.build_from_hash(attributes)
125
+ end
126
+
127
+ # Builds the object from hash
128
+ # @param [Hash] attributes Model attributes in the form of hash
129
+ # @return [Object] Returns the model itself
130
+ def build_from_hash(attributes)
131
+ return nil unless attributes.is_a?(Hash)
132
+ self.class.openapi_types.each_pair do |key, type|
133
+ if type =~ /\AArray<(.*)>/i
134
+ # check to ensure the input is an array given that the attribute
135
+ # is documented as an array but the input is not
136
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
137
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
138
+ end
139
+ elsif !attributes[self.class.attribute_map[key]].nil?
140
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
141
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
142
+ end
143
+
144
+ self
145
+ end
146
+
147
+ # Deserializes the data based on type
148
+ # @param string type Data type
149
+ # @param string value Value to be deserialized
150
+ # @return [Object] Deserialized data
151
+ def _deserialize(type, value)
152
+ case type.to_sym
153
+ when :DateTime
154
+ DateTime.parse(value)
155
+ when :Date
156
+ Date.parse(value)
157
+ when :String
158
+ value.to_s
159
+ when :Integer
160
+ value.to_i
161
+ when :Float
162
+ value.to_f
163
+ when :Boolean
164
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
165
+ true
166
+ else
167
+ false
168
+ end
169
+ when :Object
170
+ # generic object (usually a Hash), return directly
171
+ value
172
+ when /\AArray<(?<inner_type>.+)>\z/
173
+ inner_type = Regexp.last_match[:inner_type]
174
+ value.map { |v| _deserialize(inner_type, v) }
175
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
176
+ k_type = Regexp.last_match[:k_type]
177
+ v_type = Regexp.last_match[:v_type]
178
+ {}.tap do |hash|
179
+ value.each do |k, v|
180
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
181
+ end
182
+ end
183
+ else # model
184
+ MailSlurpClient.const_get(type).build_from_hash(value)
185
+ end
186
+ end
187
+
188
+ # Returns the string representation of the object
189
+ # @return [String] String presentation of the object
190
+ def to_s
191
+ to_hash.to_s
192
+ end
193
+
194
+ # to_body is an alias to to_hash (backward compatibility)
195
+ # @return [Hash] Returns the object in the form of hash
196
+ def to_body
197
+ to_hash
198
+ end
199
+
200
+ # Returns the object in the form of hash
201
+ # @return [Hash] Returns the object in the form of hash
202
+ def to_hash
203
+ hash = {}
204
+ self.class.attribute_map.each_pair do |attr, param|
205
+ value = self.send(attr)
206
+ if value.nil?
207
+ is_nullable = self.class.openapi_nullable.include?(attr)
208
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
209
+ end
210
+
211
+ hash[param] = _to_hash(value)
212
+ end
213
+ hash
214
+ end
215
+
216
+ # Outputs non-array value in the form of hash
217
+ # For object, use to_hash. Otherwise, just return the value
218
+ # @param [Object] value Any valid value
219
+ # @return [Hash] Returns the value in the form of hash
220
+ def _to_hash(value)
221
+ if value.is_a?(Array)
222
+ value.compact.map { |v| _to_hash(v) }
223
+ elsif value.is_a?(Hash)
224
+ {}.tap do |hash|
225
+ value.each { |k, v| hash[k] = _to_hash(v) }
226
+ end
227
+ elsif value.respond_to? :to_hash
228
+ value.to_hash
229
+ else
230
+ value
231
+ end
232
+ end
233
+ end
234
+ end
@@ -13,7 +13,7 @@ OpenAPI Generator version: 4.3.1
13
13
  require 'date'
14
14
 
15
15
  module MailSlurpClient
16
- # Paginated email alias results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full inbox entity use the projection ID with individual method calls.
16
+ # Paginated email alias results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls.
17
17
  class PageAlias
18
18
  attr_accessor :content
19
19
 
@@ -13,7 +13,7 @@ OpenAPI Generator version: 4.3.1
13
13
  require 'date'
14
14
 
15
15
  module MailSlurpClient
16
- # Paginated contact results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full inbox entity use the projection ID with individual method calls.
16
+ # Paginated contact results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls.
17
17
  class PageContactProjection
18
18
  attr_accessor :content
19
19
 
@@ -13,7 +13,7 @@ OpenAPI Generator version: 4.3.1
13
13
  require 'date'
14
14
 
15
15
  module MailSlurpClient
16
- # Paginated expired inbox results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full inbox entity use the projection ID with individual method calls.
16
+ # Paginated expired inbox results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls.
17
17
  class PageExpiredInboxRecordProjection
18
18
  attr_accessor :content
19
19
 
@@ -13,7 +13,7 @@ OpenAPI Generator version: 4.3.1
13
13
  require 'date'
14
14
 
15
15
  module MailSlurpClient
16
- # Paginated contact group results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full inbox entity use the projection ID with individual method calls.
16
+ # Paginated missed email results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls.
17
17
  class PageGroupProjection
18
18
  attr_accessor :content
19
19
 
@@ -13,7 +13,7 @@ OpenAPI Generator version: 4.3.1
13
13
  require 'date'
14
14
 
15
15
  module MailSlurpClient
16
- # Paginated inbox results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full inbox entity use the projection ID with individual method calls.
16
+ # Paginated inbox results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls.
17
17
  class PageInboxProjection
18
18
  attr_accessor :content
19
19
 
@@ -0,0 +1,299 @@
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
+ # Paginated MissedEmail results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls.
17
+ class PageMissedEmailProjection
18
+ attr_accessor :content
19
+
20
+ attr_accessor :empty
21
+
22
+ attr_accessor :first
23
+
24
+ attr_accessor :last
25
+
26
+ attr_accessor :number
27
+
28
+ attr_accessor :number_of_elements
29
+
30
+ attr_accessor :pageable
31
+
32
+ attr_accessor :size
33
+
34
+ attr_accessor :sort
35
+
36
+ attr_accessor :total_elements
37
+
38
+ attr_accessor :total_pages
39
+
40
+ # Attribute mapping from ruby-style variable name to JSON key.
41
+ def self.attribute_map
42
+ {
43
+ :'content' => :'content',
44
+ :'empty' => :'empty',
45
+ :'first' => :'first',
46
+ :'last' => :'last',
47
+ :'number' => :'number',
48
+ :'number_of_elements' => :'numberOfElements',
49
+ :'pageable' => :'pageable',
50
+ :'size' => :'size',
51
+ :'sort' => :'sort',
52
+ :'total_elements' => :'totalElements',
53
+ :'total_pages' => :'totalPages'
54
+ }
55
+ end
56
+
57
+ # Attribute type mapping.
58
+ def self.openapi_types
59
+ {
60
+ :'content' => :'Array<MissedEmailProjection>',
61
+ :'empty' => :'Boolean',
62
+ :'first' => :'Boolean',
63
+ :'last' => :'Boolean',
64
+ :'number' => :'Integer',
65
+ :'number_of_elements' => :'Integer',
66
+ :'pageable' => :'Pageable',
67
+ :'size' => :'Integer',
68
+ :'sort' => :'Sort',
69
+ :'total_elements' => :'Integer',
70
+ :'total_pages' => :'Integer'
71
+ }
72
+ end
73
+
74
+ # List of attributes with nullable: true
75
+ def self.openapi_nullable
76
+ Set.new([
77
+ ])
78
+ end
79
+
80
+ # Initializes the object
81
+ # @param [Hash] attributes Model attributes in the form of hash
82
+ def initialize(attributes = {})
83
+ if (!attributes.is_a?(Hash))
84
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::PageMissedEmailProjection` initialize method"
85
+ end
86
+
87
+ # check to see if the attribute exists and convert string to symbol for hash key
88
+ attributes = attributes.each_with_object({}) { |(k, v), h|
89
+ if (!self.class.attribute_map.key?(k.to_sym))
90
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::PageMissedEmailProjection`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
91
+ end
92
+ h[k.to_sym] = v
93
+ }
94
+
95
+ if attributes.key?(:'content')
96
+ if (value = attributes[:'content']).is_a?(Array)
97
+ self.content = value
98
+ end
99
+ end
100
+
101
+ if attributes.key?(:'empty')
102
+ self.empty = attributes[:'empty']
103
+ end
104
+
105
+ if attributes.key?(:'first')
106
+ self.first = attributes[:'first']
107
+ end
108
+
109
+ if attributes.key?(:'last')
110
+ self.last = attributes[:'last']
111
+ end
112
+
113
+ if attributes.key?(:'number')
114
+ self.number = attributes[:'number']
115
+ end
116
+
117
+ if attributes.key?(:'number_of_elements')
118
+ self.number_of_elements = attributes[:'number_of_elements']
119
+ end
120
+
121
+ if attributes.key?(:'pageable')
122
+ self.pageable = attributes[:'pageable']
123
+ end
124
+
125
+ if attributes.key?(:'size')
126
+ self.size = attributes[:'size']
127
+ end
128
+
129
+ if attributes.key?(:'sort')
130
+ self.sort = attributes[:'sort']
131
+ end
132
+
133
+ if attributes.key?(:'total_elements')
134
+ self.total_elements = attributes[:'total_elements']
135
+ end
136
+
137
+ if attributes.key?(:'total_pages')
138
+ self.total_pages = attributes[:'total_pages']
139
+ end
140
+ end
141
+
142
+ # Show invalid properties with the reasons. Usually used together with valid?
143
+ # @return Array for valid properties with the reasons
144
+ def list_invalid_properties
145
+ invalid_properties = Array.new
146
+ invalid_properties
147
+ end
148
+
149
+ # Check to see if the all the properties in the model are valid
150
+ # @return true if the model is valid
151
+ def valid?
152
+ true
153
+ end
154
+
155
+ # Checks equality by comparing each attribute.
156
+ # @param [Object] Object to be compared
157
+ def ==(o)
158
+ return true if self.equal?(o)
159
+ self.class == o.class &&
160
+ content == o.content &&
161
+ empty == o.empty &&
162
+ first == o.first &&
163
+ last == o.last &&
164
+ number == o.number &&
165
+ number_of_elements == o.number_of_elements &&
166
+ pageable == o.pageable &&
167
+ size == o.size &&
168
+ sort == o.sort &&
169
+ total_elements == o.total_elements &&
170
+ total_pages == o.total_pages
171
+ end
172
+
173
+ # @see the `==` method
174
+ # @param [Object] Object to be compared
175
+ def eql?(o)
176
+ self == o
177
+ end
178
+
179
+ # Calculates hash code according to all attributes.
180
+ # @return [Integer] Hash code
181
+ def hash
182
+ [content, empty, first, last, number, number_of_elements, pageable, size, sort, total_elements, total_pages].hash
183
+ end
184
+
185
+ # Builds the object from hash
186
+ # @param [Hash] attributes Model attributes in the form of hash
187
+ # @return [Object] Returns the model itself
188
+ def self.build_from_hash(attributes)
189
+ new.build_from_hash(attributes)
190
+ end
191
+
192
+ # Builds the object from hash
193
+ # @param [Hash] attributes Model attributes in the form of hash
194
+ # @return [Object] Returns the model itself
195
+ def build_from_hash(attributes)
196
+ return nil unless attributes.is_a?(Hash)
197
+ self.class.openapi_types.each_pair do |key, type|
198
+ if type =~ /\AArray<(.*)>/i
199
+ # check to ensure the input is an array given that the attribute
200
+ # is documented as an array but the input is not
201
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
202
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
203
+ end
204
+ elsif !attributes[self.class.attribute_map[key]].nil?
205
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
206
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
207
+ end
208
+
209
+ self
210
+ end
211
+
212
+ # Deserializes the data based on type
213
+ # @param string type Data type
214
+ # @param string value Value to be deserialized
215
+ # @return [Object] Deserialized data
216
+ def _deserialize(type, value)
217
+ case type.to_sym
218
+ when :DateTime
219
+ DateTime.parse(value)
220
+ when :Date
221
+ Date.parse(value)
222
+ when :String
223
+ value.to_s
224
+ when :Integer
225
+ value.to_i
226
+ when :Float
227
+ value.to_f
228
+ when :Boolean
229
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
230
+ true
231
+ else
232
+ false
233
+ end
234
+ when :Object
235
+ # generic object (usually a Hash), return directly
236
+ value
237
+ when /\AArray<(?<inner_type>.+)>\z/
238
+ inner_type = Regexp.last_match[:inner_type]
239
+ value.map { |v| _deserialize(inner_type, v) }
240
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
241
+ k_type = Regexp.last_match[:k_type]
242
+ v_type = Regexp.last_match[:v_type]
243
+ {}.tap do |hash|
244
+ value.each do |k, v|
245
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
246
+ end
247
+ end
248
+ else # model
249
+ MailSlurpClient.const_get(type).build_from_hash(value)
250
+ end
251
+ end
252
+
253
+ # Returns the string representation of the object
254
+ # @return [String] String presentation of the object
255
+ def to_s
256
+ to_hash.to_s
257
+ end
258
+
259
+ # to_body is an alias to to_hash (backward compatibility)
260
+ # @return [Hash] Returns the object in the form of hash
261
+ def to_body
262
+ to_hash
263
+ end
264
+
265
+ # Returns the object in the form of hash
266
+ # @return [Hash] Returns the object in the form of hash
267
+ def to_hash
268
+ hash = {}
269
+ self.class.attribute_map.each_pair do |attr, param|
270
+ value = self.send(attr)
271
+ if value.nil?
272
+ is_nullable = self.class.openapi_nullable.include?(attr)
273
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
274
+ end
275
+
276
+ hash[param] = _to_hash(value)
277
+ end
278
+ hash
279
+ end
280
+
281
+ # Outputs non-array value in the form of hash
282
+ # For object, use to_hash. Otherwise, just return the value
283
+ # @param [Object] value Any valid value
284
+ # @return [Hash] Returns the value in the form of hash
285
+ def _to_hash(value)
286
+ if value.is_a?(Array)
287
+ value.compact.map { |v| _to_hash(v) }
288
+ elsif value.is_a?(Hash)
289
+ {}.tap do |hash|
290
+ value.each { |k, v| hash[k] = _to_hash(v) }
291
+ end
292
+ elsif value.respond_to? :to_hash
293
+ value.to_hash
294
+ else
295
+ value
296
+ end
297
+ end
298
+ end
299
+ end
@@ -13,7 +13,7 @@ OpenAPI Generator version: 4.3.1
13
13
  require 'date'
14
14
 
15
15
  module MailSlurpClient
16
- # Paginated organization inbox results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full inbox entity use the projection ID with individual method calls.
16
+ # Paginated organization inbox results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls.
17
17
  class PageOrganizationInboxProjection
18
18
  attr_accessor :content
19
19
 
@@ -13,7 +13,7 @@ OpenAPI Generator version: 4.3.1
13
13
  require 'date'
14
14
 
15
15
  module MailSlurpClient
16
- # Paginated email template results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full inbox entity use the projection ID with individual method calls.
16
+ # Paginated email template results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls.
17
17
  class PageTemplateProjection
18
18
  attr_accessor :content
19
19
 
@@ -13,7 +13,7 @@ OpenAPI Generator version: 4.3.1
13
13
  require 'date'
14
14
 
15
15
  module MailSlurpClient
16
- # Paginated webhook results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full inbox entity use the projection ID with individual method calls.
16
+ # Paginated webhook results. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full entity use the projection ID with individual method calls.
17
17
  class PageWebhookProjection
18
18
  attr_accessor :content
19
19
 
@@ -11,5 +11,5 @@ OpenAPI Generator version: 4.3.1
11
11
  =end
12
12
 
13
13
  module MailSlurpClient
14
- VERSION = '11.6.24'
14
+ VERSION = '11.7.0'
15
15
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mailslurp_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 11.6.24
4
+ version: 11.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - mailslurp
@@ -35,6 +35,7 @@ files:
35
35
  - lib/mailslurp_client/api/group_controller_api.rb
36
36
  - lib/mailslurp_client/api/inbox_controller_api.rb
37
37
  - lib/mailslurp_client/api/mail_server_controller_api.rb
38
+ - lib/mailslurp_client/api/missed_email_controller_api.rb
38
39
  - lib/mailslurp_client/api/sent_emails_controller_api.rb
39
40
  - lib/mailslurp_client/api/template_controller_api.rb
40
41
  - lib/mailslurp_client/api/wait_for_controller_api.rb
@@ -86,6 +87,8 @@ files:
86
87
  - lib/mailslurp_client/models/ip_address_result.rb
87
88
  - lib/mailslurp_client/models/match_option.rb
88
89
  - lib/mailslurp_client/models/match_options.rb
90
+ - lib/mailslurp_client/models/missed_email.rb
91
+ - lib/mailslurp_client/models/missed_email_projection.rb
89
92
  - lib/mailslurp_client/models/model_alias.rb
90
93
  - lib/mailslurp_client/models/name_server_record.rb
91
94
  - lib/mailslurp_client/models/organization_inbox_projection.rb
@@ -96,6 +99,7 @@ files:
96
99
  - lib/mailslurp_client/models/page_expired_inbox_record_projection.rb
97
100
  - lib/mailslurp_client/models/page_group_projection.rb
98
101
  - lib/mailslurp_client/models/page_inbox_projection.rb
102
+ - lib/mailslurp_client/models/page_missed_email_projection.rb
99
103
  - lib/mailslurp_client/models/page_organization_inbox_projection.rb
100
104
  - lib/mailslurp_client/models/page_sent_email_projection.rb
101
105
  - lib/mailslurp_client/models/page_template_projection.rb