mailslurp_client 8.4.0 → 8.5.1

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: 9005d0f3b6653725d8c99997bde969c67c85d182407200ab1df23b8105635c8a
4
- data.tar.gz: c81db7a3da9ee55e22377a5c10a52f20c550bdc2ad20c70e6ce6183cca1c12f8
3
+ metadata.gz: ed297a765d1c862f652f4522ea6f87da3484f6292bf2f47110a4b874ba4d0550
4
+ data.tar.gz: bc44070fb6718ab1a91f240ded2d025508009aa33ed8013da51f01554de31e9b
5
5
  SHA512:
6
- metadata.gz: 3910aefd959a7b28869636571e51b3a15d98073f8ff243919c3118a70a37ffbb810fd9f688ccedf47f62d5ace6be9ccc9af70d6dbeeb57ea882364676f6e8ed2
7
- data.tar.gz: ef868c5a8e1f3fd0c6c6b87d381b13d1fff3bcfe731330cc7e7e046f44cdeb520d54cf9a1db98270da6855a6b8f5ded0304e69b702157d7fc8c0167a8f3ed36b
6
+ metadata.gz: bfef0f5bcceb239f890a4afafdc2bf0dc06f4db4ad5e5540a13c660b5829a9b24fc61b6692678050f713da5043c570806fd0f4b03f62dda5a78ed85176fb961a
7
+ data.tar.gz: 0d7ca2dd658449478b0d57ff65a1857e0e5a2452ea5ebbe74901678c3bfee1eef7fc3b809d8a96310550ffab595c3383682d924556208c63bc87d63e3f56ee82
@@ -19,7 +19,6 @@ require 'mailslurp_client/configuration'
19
19
  # Models
20
20
  require 'mailslurp_client/models/alias_dto'
21
21
  require 'mailslurp_client/models/alias_projection'
22
- require 'mailslurp_client/models/alias_verification_result'
23
22
  require 'mailslurp_client/models/attachment_meta_data'
24
23
  require 'mailslurp_client/models/basic_auth_options'
25
24
  require 'mailslurp_client/models/bulk_send_email_options'
@@ -23,7 +23,7 @@ module MailSlurpClient
23
23
  # Email aliases use a MailSlurp randomly generated email address (or a custom domain inbox that you provide) to mask or proxy a real email address. Emails sent to the alias address will be forwarded to the hidden email address it was created for. If you want to send a reply use the threadId attached
24
24
  # @param create_alias_options [CreateAliasOptions] createAliasOptions
25
25
  # @param [Hash] opts the optional parameters
26
- # @return [ModelAlias]
26
+ # @return [AliasDto]
27
27
  def create_alias(create_alias_options, opts = {})
28
28
  data, _status_code, _headers = create_alias_with_http_info(create_alias_options, opts)
29
29
  data
@@ -33,7 +33,7 @@ module MailSlurpClient
33
33
  # Email aliases use a MailSlurp randomly generated email address (or a custom domain inbox that you provide) to mask or proxy a real email address. Emails sent to the alias address will be forwarded to the hidden email address it was created for. If you want to send a reply use the threadId attached
34
34
  # @param create_alias_options [CreateAliasOptions] createAliasOptions
35
35
  # @param [Hash] opts the optional parameters
36
- # @return [Array<(ModelAlias, Integer, Hash)>] ModelAlias data, response status code and response headers
36
+ # @return [Array<(AliasDto, Integer, Hash)>] AliasDto data, response status code and response headers
37
37
  def create_alias_with_http_info(create_alias_options, opts = {})
38
38
  if @api_client.config.debugging
39
39
  @api_client.config.logger.debug 'Calling API: AliasControllerApi.create_alias ...'
@@ -62,7 +62,7 @@ module MailSlurpClient
62
62
  post_body = opts[:body] || @api_client.object_to_http_body(create_alias_options)
63
63
 
64
64
  # return_type
65
- return_type = opts[:return_type] || 'ModelAlias'
65
+ return_type = opts[:return_type] || 'AliasDto'
66
66
 
67
67
  # auth_names
68
68
  auth_names = opts[:auth_names] || ['API_KEY']
@@ -203,82 +203,6 @@ module MailSlurpClient
203
203
  return data, status_code, headers
204
204
  end
205
205
 
206
- # Get validation result from alias verification
207
- # Verify an email alias email address with the verification token that was emailed to the address
208
- # @param alias_id [String] aliasId
209
- # @param email_address [String] emailAddress
210
- # @param verification_token [String] verificationToken
211
- # @param [Hash] opts the optional parameters
212
- # @return [AliasVerificationResult]
213
- def get_alias_verification(alias_id, email_address, verification_token, opts = {})
214
- data, _status_code, _headers = get_alias_verification_with_http_info(alias_id, email_address, verification_token, opts)
215
- data
216
- end
217
-
218
- # Get validation result from alias verification
219
- # Verify an email alias email address with the verification token that was emailed to the address
220
- # @param alias_id [String] aliasId
221
- # @param email_address [String] emailAddress
222
- # @param verification_token [String] verificationToken
223
- # @param [Hash] opts the optional parameters
224
- # @return [Array<(AliasVerificationResult, Integer, Hash)>] AliasVerificationResult data, response status code and response headers
225
- def get_alias_verification_with_http_info(alias_id, email_address, verification_token, opts = {})
226
- if @api_client.config.debugging
227
- @api_client.config.logger.debug 'Calling API: AliasControllerApi.get_alias_verification ...'
228
- end
229
- # verify the required parameter 'alias_id' is set
230
- if @api_client.config.client_side_validation && alias_id.nil?
231
- fail ArgumentError, "Missing the required parameter 'alias_id' when calling AliasControllerApi.get_alias_verification"
232
- end
233
- # verify the required parameter 'email_address' is set
234
- if @api_client.config.client_side_validation && email_address.nil?
235
- fail ArgumentError, "Missing the required parameter 'email_address' when calling AliasControllerApi.get_alias_verification"
236
- end
237
- # verify the required parameter 'verification_token' is set
238
- if @api_client.config.client_side_validation && verification_token.nil?
239
- fail ArgumentError, "Missing the required parameter 'verification_token' when calling AliasControllerApi.get_alias_verification"
240
- end
241
- # resource path
242
- local_var_path = '/aliases/{aliasId}/verification'.sub('{' + 'aliasId' + '}', CGI.escape(alias_id.to_s))
243
-
244
- # query parameters
245
- query_params = opts[:query_params] || {}
246
- query_params[:'emailAddress'] = email_address
247
- query_params[:'verificationToken'] = verification_token
248
-
249
- # header parameters
250
- header_params = opts[:header_params] || {}
251
- # HTTP header 'Accept' (if needed)
252
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
253
-
254
- # form parameters
255
- form_params = opts[:form_params] || {}
256
-
257
- # http body (model)
258
- post_body = opts[:body]
259
-
260
- # return_type
261
- return_type = opts[:return_type] || 'AliasVerificationResult'
262
-
263
- # auth_names
264
- auth_names = opts[:auth_names] || ['API_KEY']
265
-
266
- new_options = opts.merge(
267
- :header_params => header_params,
268
- :query_params => query_params,
269
- :form_params => form_params,
270
- :body => post_body,
271
- :auth_names => auth_names,
272
- :return_type => return_type
273
- )
274
-
275
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
276
- if @api_client.config.debugging
277
- @api_client.config.logger.debug "API called: AliasControllerApi#get_alias_verification\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
278
- end
279
- return data, status_code, headers
280
- end
281
-
282
206
  # Get all email aliases you have created
283
207
  # Get all email aliases in paginated form
284
208
  # @param [Hash] opts the optional parameters
@@ -288,6 +288,79 @@ module MailSlurpClient
288
288
  return data, status_code, headers
289
289
  end
290
290
 
291
+ # Wait for or return the first email that matches proved MatchOptions array
292
+ # Perform a search of emails in an inbox with the given patterns. If a result if found then return or else retry the search until a result is found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the `MatchOptions` object for options. An example payload is `{ matches: [{field: 'SUBJECT',should:'CONTAIN',value:'needle'}] }`. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController `getEmailContentMatch` method.
293
+ # @param match_options [MatchOptions] matchOptions
294
+ # @param [Hash] opts the optional parameters
295
+ # @option opts [String] :inbox_id Id of the inbox we are matching an email for
296
+ # @option opts [Integer] :timeout Max milliseconds to wait
297
+ # @option opts [Boolean] :unread_only Optional filter for unread only (default to false)
298
+ # @return [Email]
299
+ def wait_for_matching_first_email(match_options, opts = {})
300
+ data, _status_code, _headers = wait_for_matching_first_email_with_http_info(match_options, opts)
301
+ data
302
+ end
303
+
304
+ # Wait for or return the first email that matches proved MatchOptions array
305
+ # Perform a search of emails in an inbox with the given patterns. If a result if found then return or else retry the search until a result is found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the &#x60;MatchOptions&#x60; object for options. An example payload is &#x60;{ matches: [{field: &#39;SUBJECT&#39;,should:&#39;CONTAIN&#39;,value:&#39;needle&#39;}] }&#x60;. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController &#x60;getEmailContentMatch&#x60; method.
306
+ # @param match_options [MatchOptions] matchOptions
307
+ # @param [Hash] opts the optional parameters
308
+ # @option opts [String] :inbox_id Id of the inbox we are matching an email for
309
+ # @option opts [Integer] :timeout Max milliseconds to wait
310
+ # @option opts [Boolean] :unread_only Optional filter for unread only
311
+ # @return [Array<(Email, Integer, Hash)>] Email data, response status code and response headers
312
+ def wait_for_matching_first_email_with_http_info(match_options, opts = {})
313
+ if @api_client.config.debugging
314
+ @api_client.config.logger.debug 'Calling API: WaitForControllerApi.wait_for_matching_first_email ...'
315
+ end
316
+ # verify the required parameter 'match_options' is set
317
+ if @api_client.config.client_side_validation && match_options.nil?
318
+ fail ArgumentError, "Missing the required parameter 'match_options' when calling WaitForControllerApi.wait_for_matching_first_email"
319
+ end
320
+ # resource path
321
+ local_var_path = '/waitForMatchingFirstEmail'
322
+
323
+ # query parameters
324
+ query_params = opts[:query_params] || {}
325
+ query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
326
+ query_params[:'timeout'] = opts[:'timeout'] if !opts[:'timeout'].nil?
327
+ query_params[:'unreadOnly'] = opts[:'unread_only'] if !opts[:'unread_only'].nil?
328
+
329
+ # header parameters
330
+ header_params = opts[:header_params] || {}
331
+ # HTTP header 'Accept' (if needed)
332
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
333
+ # HTTP header 'Content-Type'
334
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
335
+
336
+ # form parameters
337
+ form_params = opts[:form_params] || {}
338
+
339
+ # http body (model)
340
+ post_body = opts[:body] || @api_client.object_to_http_body(match_options)
341
+
342
+ # return_type
343
+ return_type = opts[:return_type] || 'Email'
344
+
345
+ # auth_names
346
+ auth_names = opts[:auth_names] || ['API_KEY']
347
+
348
+ new_options = opts.merge(
349
+ :header_params => header_params,
350
+ :query_params => query_params,
351
+ :form_params => form_params,
352
+ :body => post_body,
353
+ :auth_names => auth_names,
354
+ :return_type => return_type
355
+ )
356
+
357
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
358
+ if @api_client.config.debugging
359
+ @api_client.config.logger.debug "API called: WaitForControllerApi#wait_for_matching_first_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
360
+ end
361
+ return data, status_code, headers
362
+ end
363
+
291
364
  # Wait for or fetch the email with a given index in the inbox specified
292
365
  # If nth email is already present in inbox then return it. If not hold the connection open until timeout expires or the nth email is received and returned.
293
366
  # @param [Hash] opts the optional parameters
@@ -15,43 +15,60 @@ require 'date'
15
15
  module MailSlurpClient
16
16
  # Email alias representation
17
17
  class AliasDto
18
+ attr_accessor :created_at
19
+
20
+ # The alias's email address for receiving email
21
+ attr_accessor :email_address
22
+
18
23
  attr_accessor :id
19
24
 
25
+ # Inbox that is associated with the alias
20
26
  attr_accessor :inbox_id
21
27
 
28
+ # Has the alias been verified. You must verify an alias if the masked email address has not yet been verified by your account
29
+ attr_accessor :is_verified
30
+
31
+ # The underlying email address that is hidden and will received forwarded email
32
+ attr_accessor :masked_email_address
33
+
22
34
  attr_accessor :name
23
35
 
24
- attr_accessor :pending_email_address
36
+ attr_accessor :updated_at
25
37
 
38
+ # If alias will generate response threads or not when email are received by it
26
39
  attr_accessor :use_threads
27
40
 
28
41
  attr_accessor :user_id
29
42
 
30
- attr_accessor :verified_email_address
31
-
32
43
  # Attribute mapping from ruby-style variable name to JSON key.
33
44
  def self.attribute_map
34
45
  {
46
+ :'created_at' => :'createdAt',
47
+ :'email_address' => :'emailAddress',
35
48
  :'id' => :'id',
36
49
  :'inbox_id' => :'inboxId',
50
+ :'is_verified' => :'isVerified',
51
+ :'masked_email_address' => :'maskedEmailAddress',
37
52
  :'name' => :'name',
38
- :'pending_email_address' => :'pendingEmailAddress',
53
+ :'updated_at' => :'updatedAt',
39
54
  :'use_threads' => :'useThreads',
40
- :'user_id' => :'userId',
41
- :'verified_email_address' => :'verifiedEmailAddress'
55
+ :'user_id' => :'userId'
42
56
  }
43
57
  end
44
58
 
45
59
  # Attribute type mapping.
46
60
  def self.openapi_types
47
61
  {
62
+ :'created_at' => :'DateTime',
63
+ :'email_address' => :'String',
48
64
  :'id' => :'String',
49
65
  :'inbox_id' => :'String',
66
+ :'is_verified' => :'Boolean',
67
+ :'masked_email_address' => :'String',
50
68
  :'name' => :'String',
51
- :'pending_email_address' => :'String',
69
+ :'updated_at' => :'DateTime',
52
70
  :'use_threads' => :'Boolean',
53
- :'user_id' => :'String',
54
- :'verified_email_address' => :'String'
71
+ :'user_id' => :'String'
55
72
  }
56
73
  end
57
74
 
@@ -76,6 +93,14 @@ module MailSlurpClient
76
93
  h[k.to_sym] = v
77
94
  }
78
95
 
96
+ if attributes.key?(:'created_at')
97
+ self.created_at = attributes[:'created_at']
98
+ end
99
+
100
+ if attributes.key?(:'email_address')
101
+ self.email_address = attributes[:'email_address']
102
+ end
103
+
79
104
  if attributes.key?(:'id')
80
105
  self.id = attributes[:'id']
81
106
  end
@@ -84,12 +109,20 @@ module MailSlurpClient
84
109
  self.inbox_id = attributes[:'inbox_id']
85
110
  end
86
111
 
112
+ if attributes.key?(:'is_verified')
113
+ self.is_verified = attributes[:'is_verified']
114
+ end
115
+
116
+ if attributes.key?(:'masked_email_address')
117
+ self.masked_email_address = attributes[:'masked_email_address']
118
+ end
119
+
87
120
  if attributes.key?(:'name')
88
121
  self.name = attributes[:'name']
89
122
  end
90
123
 
91
- if attributes.key?(:'pending_email_address')
92
- self.pending_email_address = attributes[:'pending_email_address']
124
+ if attributes.key?(:'updated_at')
125
+ self.updated_at = attributes[:'updated_at']
93
126
  end
94
127
 
95
128
  if attributes.key?(:'use_threads')
@@ -99,10 +132,6 @@ module MailSlurpClient
99
132
  if attributes.key?(:'user_id')
100
133
  self.user_id = attributes[:'user_id']
101
134
  end
102
-
103
- if attributes.key?(:'verified_email_address')
104
- self.verified_email_address = attributes[:'verified_email_address']
105
- end
106
135
  end
107
136
 
108
137
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -113,10 +142,6 @@ module MailSlurpClient
113
142
  invalid_properties.push('invalid value for "id", id cannot be nil.')
114
143
  end
115
144
 
116
- if @inbox_id.nil?
117
- invalid_properties.push('invalid value for "inbox_id", inbox_id cannot be nil.')
118
- end
119
-
120
145
  if @user_id.nil?
121
146
  invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
122
147
  end
@@ -128,7 +153,6 @@ module MailSlurpClient
128
153
  # @return true if the model is valid
129
154
  def valid?
130
155
  return false if @id.nil?
131
- return false if @inbox_id.nil?
132
156
  return false if @user_id.nil?
133
157
  true
134
158
  end
@@ -138,13 +162,16 @@ module MailSlurpClient
138
162
  def ==(o)
139
163
  return true if self.equal?(o)
140
164
  self.class == o.class &&
165
+ created_at == o.created_at &&
166
+ email_address == o.email_address &&
141
167
  id == o.id &&
142
168
  inbox_id == o.inbox_id &&
169
+ is_verified == o.is_verified &&
170
+ masked_email_address == o.masked_email_address &&
143
171
  name == o.name &&
144
- pending_email_address == o.pending_email_address &&
172
+ updated_at == o.updated_at &&
145
173
  use_threads == o.use_threads &&
146
- user_id == o.user_id &&
147
- verified_email_address == o.verified_email_address
174
+ user_id == o.user_id
148
175
  end
149
176
 
150
177
  # @see the `==` method
@@ -156,7 +183,7 @@ module MailSlurpClient
156
183
  # Calculates hash code according to all attributes.
157
184
  # @return [Integer] Hash code
158
185
  def hash
159
- [id, inbox_id, name, pending_email_address, use_threads, user_id, verified_email_address].hash
186
+ [created_at, email_address, id, inbox_id, is_verified, masked_email_address, name, updated_at, use_threads, user_id].hash
160
187
  end
161
188
 
162
189
  # Builds the object from hash
@@ -15,43 +15,47 @@ require 'date'
15
15
  module MailSlurpClient
16
16
  # Representation of a alias
17
17
  class AliasProjection
18
+ attr_accessor :created_at
19
+
20
+ attr_accessor :email_address
21
+
18
22
  attr_accessor :id
19
23
 
20
24
  attr_accessor :inbox_id
21
25
 
22
26
  attr_accessor :name
23
27
 
24
- attr_accessor :pending_email_address
28
+ attr_accessor :updated_at
25
29
 
26
30
  attr_accessor :use_threads
27
31
 
28
32
  attr_accessor :user_id
29
33
 
30
- attr_accessor :verified_email_address
31
-
32
34
  # Attribute mapping from ruby-style variable name to JSON key.
33
35
  def self.attribute_map
34
36
  {
37
+ :'created_at' => :'createdAt',
38
+ :'email_address' => :'emailAddress',
35
39
  :'id' => :'id',
36
40
  :'inbox_id' => :'inboxId',
37
41
  :'name' => :'name',
38
- :'pending_email_address' => :'pendingEmailAddress',
42
+ :'updated_at' => :'updatedAt',
39
43
  :'use_threads' => :'useThreads',
40
- :'user_id' => :'userId',
41
- :'verified_email_address' => :'verifiedEmailAddress'
44
+ :'user_id' => :'userId'
42
45
  }
43
46
  end
44
47
 
45
48
  # Attribute type mapping.
46
49
  def self.openapi_types
47
50
  {
51
+ :'created_at' => :'DateTime',
52
+ :'email_address' => :'String',
48
53
  :'id' => :'String',
49
54
  :'inbox_id' => :'String',
50
55
  :'name' => :'String',
51
- :'pending_email_address' => :'String',
56
+ :'updated_at' => :'DateTime',
52
57
  :'use_threads' => :'Boolean',
53
- :'user_id' => :'String',
54
- :'verified_email_address' => :'String'
58
+ :'user_id' => :'String'
55
59
  }
56
60
  end
57
61
 
@@ -76,6 +80,14 @@ module MailSlurpClient
76
80
  h[k.to_sym] = v
77
81
  }
78
82
 
83
+ if attributes.key?(:'created_at')
84
+ self.created_at = attributes[:'created_at']
85
+ end
86
+
87
+ if attributes.key?(:'email_address')
88
+ self.email_address = attributes[:'email_address']
89
+ end
90
+
79
91
  if attributes.key?(:'id')
80
92
  self.id = attributes[:'id']
81
93
  end
@@ -88,8 +100,8 @@ module MailSlurpClient
88
100
  self.name = attributes[:'name']
89
101
  end
90
102
 
91
- if attributes.key?(:'pending_email_address')
92
- self.pending_email_address = attributes[:'pending_email_address']
103
+ if attributes.key?(:'updated_at')
104
+ self.updated_at = attributes[:'updated_at']
93
105
  end
94
106
 
95
107
  if attributes.key?(:'use_threads')
@@ -99,16 +111,20 @@ module MailSlurpClient
99
111
  if attributes.key?(:'user_id')
100
112
  self.user_id = attributes[:'user_id']
101
113
  end
102
-
103
- if attributes.key?(:'verified_email_address')
104
- self.verified_email_address = attributes[:'verified_email_address']
105
- end
106
114
  end
107
115
 
108
116
  # Show invalid properties with the reasons. Usually used together with valid?
109
117
  # @return Array for valid properties with the reasons
110
118
  def list_invalid_properties
111
119
  invalid_properties = Array.new
120
+ if @created_at.nil?
121
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
122
+ end
123
+
124
+ if @email_address.nil?
125
+ invalid_properties.push('invalid value for "email_address", email_address cannot be nil.')
126
+ end
127
+
112
128
  if @id.nil?
113
129
  invalid_properties.push('invalid value for "id", id cannot be nil.')
114
130
  end
@@ -117,6 +133,10 @@ module MailSlurpClient
117
133
  invalid_properties.push('invalid value for "inbox_id", inbox_id cannot be nil.')
118
134
  end
119
135
 
136
+ if @updated_at.nil?
137
+ invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
138
+ end
139
+
120
140
  if @user_id.nil?
121
141
  invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
122
142
  end
@@ -127,8 +147,11 @@ module MailSlurpClient
127
147
  # Check to see if the all the properties in the model are valid
128
148
  # @return true if the model is valid
129
149
  def valid?
150
+ return false if @created_at.nil?
151
+ return false if @email_address.nil?
130
152
  return false if @id.nil?
131
153
  return false if @inbox_id.nil?
154
+ return false if @updated_at.nil?
132
155
  return false if @user_id.nil?
133
156
  true
134
157
  end
@@ -138,13 +161,14 @@ module MailSlurpClient
138
161
  def ==(o)
139
162
  return true if self.equal?(o)
140
163
  self.class == o.class &&
164
+ created_at == o.created_at &&
165
+ email_address == o.email_address &&
141
166
  id == o.id &&
142
167
  inbox_id == o.inbox_id &&
143
168
  name == o.name &&
144
- pending_email_address == o.pending_email_address &&
169
+ updated_at == o.updated_at &&
145
170
  use_threads == o.use_threads &&
146
- user_id == o.user_id &&
147
- verified_email_address == o.verified_email_address
171
+ user_id == o.user_id
148
172
  end
149
173
 
150
174
  # @see the `==` method
@@ -156,7 +180,7 @@ module MailSlurpClient
156
180
  # Calculates hash code according to all attributes.
157
181
  # @return [Integer] Hash code
158
182
  def hash
159
- [id, inbox_id, name, pending_email_address, use_threads, user_id, verified_email_address].hash
183
+ [created_at, email_address, id, inbox_id, name, updated_at, use_threads, user_id].hash
160
184
  end
161
185
 
162
186
  # Builds the object from hash
@@ -16,34 +16,31 @@ module MailSlurpClient
16
16
  class ModelAlias
17
17
  attr_accessor :created_at
18
18
 
19
+ attr_accessor :email_address
20
+
19
21
  attr_accessor :id
20
22
 
21
23
  attr_accessor :inbox_id
22
24
 
23
25
  attr_accessor :name
24
26
 
25
- attr_accessor :pending_email_address
26
-
27
27
  attr_accessor :updated_at
28
28
 
29
29
  attr_accessor :use_threads
30
30
 
31
31
  attr_accessor :user_id
32
32
 
33
- attr_accessor :verified_email_address
34
-
35
33
  # Attribute mapping from ruby-style variable name to JSON key.
36
34
  def self.attribute_map
37
35
  {
38
36
  :'created_at' => :'createdAt',
37
+ :'email_address' => :'emailAddress',
39
38
  :'id' => :'id',
40
39
  :'inbox_id' => :'inboxId',
41
40
  :'name' => :'name',
42
- :'pending_email_address' => :'pendingEmailAddress',
43
41
  :'updated_at' => :'updatedAt',
44
42
  :'use_threads' => :'useThreads',
45
- :'user_id' => :'userId',
46
- :'verified_email_address' => :'verifiedEmailAddress'
43
+ :'user_id' => :'userId'
47
44
  }
48
45
  end
49
46
 
@@ -51,14 +48,13 @@ module MailSlurpClient
51
48
  def self.openapi_types
52
49
  {
53
50
  :'created_at' => :'DateTime',
51
+ :'email_address' => :'String',
54
52
  :'id' => :'String',
55
53
  :'inbox_id' => :'String',
56
54
  :'name' => :'String',
57
- :'pending_email_address' => :'String',
58
55
  :'updated_at' => :'DateTime',
59
56
  :'use_threads' => :'Boolean',
60
- :'user_id' => :'String',
61
- :'verified_email_address' => :'String'
57
+ :'user_id' => :'String'
62
58
  }
63
59
  end
64
60
 
@@ -87,6 +83,10 @@ module MailSlurpClient
87
83
  self.created_at = attributes[:'created_at']
88
84
  end
89
85
 
86
+ if attributes.key?(:'email_address')
87
+ self.email_address = attributes[:'email_address']
88
+ end
89
+
90
90
  if attributes.key?(:'id')
91
91
  self.id = attributes[:'id']
92
92
  end
@@ -99,10 +99,6 @@ module MailSlurpClient
99
99
  self.name = attributes[:'name']
100
100
  end
101
101
 
102
- if attributes.key?(:'pending_email_address')
103
- self.pending_email_address = attributes[:'pending_email_address']
104
- end
105
-
106
102
  if attributes.key?(:'updated_at')
107
103
  self.updated_at = attributes[:'updated_at']
108
104
  end
@@ -114,10 +110,6 @@ module MailSlurpClient
114
110
  if attributes.key?(:'user_id')
115
111
  self.user_id = attributes[:'user_id']
116
112
  end
117
-
118
- if attributes.key?(:'verified_email_address')
119
- self.verified_email_address = attributes[:'verified_email_address']
120
- end
121
113
  end
122
114
 
123
115
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -128,6 +120,10 @@ module MailSlurpClient
128
120
  invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
129
121
  end
130
122
 
123
+ if @email_address.nil?
124
+ invalid_properties.push('invalid value for "email_address", email_address cannot be nil.')
125
+ end
126
+
131
127
  if @inbox_id.nil?
132
128
  invalid_properties.push('invalid value for "inbox_id", inbox_id cannot be nil.')
133
129
  end
@@ -147,6 +143,7 @@ module MailSlurpClient
147
143
  # @return true if the model is valid
148
144
  def valid?
149
145
  return false if @created_at.nil?
146
+ return false if @email_address.nil?
150
147
  return false if @inbox_id.nil?
151
148
  return false if @updated_at.nil?
152
149
  return false if @user_id.nil?
@@ -159,14 +156,13 @@ module MailSlurpClient
159
156
  return true if self.equal?(o)
160
157
  self.class == o.class &&
161
158
  created_at == o.created_at &&
159
+ email_address == o.email_address &&
162
160
  id == o.id &&
163
161
  inbox_id == o.inbox_id &&
164
162
  name == o.name &&
165
- pending_email_address == o.pending_email_address &&
166
163
  updated_at == o.updated_at &&
167
164
  use_threads == o.use_threads &&
168
- user_id == o.user_id &&
169
- verified_email_address == o.verified_email_address
165
+ user_id == o.user_id
170
166
  end
171
167
 
172
168
  # @see the `==` method
@@ -178,7 +174,7 @@ module MailSlurpClient
178
174
  # Calculates hash code according to all attributes.
179
175
  # @return [Integer] Hash code
180
176
  def hash
181
- [created_at, id, inbox_id, name, pending_email_address, updated_at, use_threads, user_id, verified_email_address].hash
177
+ [created_at, email_address, id, inbox_id, name, updated_at, use_threads, user_id].hash
182
178
  end
183
179
 
184
180
  # Builds the object from hash
@@ -13,6 +13,7 @@ OpenAPI Generator version: 4.3.1
13
13
  require 'date'
14
14
 
15
15
  module MailSlurpClient
16
+ # Options for replying to email with API
16
17
  class ReplyToEmailOptions
17
18
  # List of uploaded attachments to send with the reply. Optional.
18
19
  attr_accessor :attachments
@@ -39,6 +39,8 @@ module MailSlurpClient
39
39
 
40
40
  attr_accessor :is_html
41
41
 
42
+ attr_accessor :reply_to
43
+
42
44
  attr_accessor :sent_at
43
45
 
44
46
  attr_accessor :subject
@@ -62,6 +64,7 @@ module MailSlurpClient
62
64
  :'id' => :'id',
63
65
  :'inbox_id' => :'inboxId',
64
66
  :'is_html' => :'isHTML',
67
+ :'reply_to' => :'replyTo',
65
68
  :'sent_at' => :'sentAt',
66
69
  :'subject' => :'subject',
67
70
  :'to' => :'to',
@@ -82,6 +85,7 @@ module MailSlurpClient
82
85
  :'id' => :'String',
83
86
  :'inbox_id' => :'String',
84
87
  :'is_html' => :'Boolean',
88
+ :'reply_to' => :'String',
85
89
  :'sent_at' => :'DateTime',
86
90
  :'subject' => :'String',
87
91
  :'to' => :'Array<String>',
@@ -156,6 +160,10 @@ module MailSlurpClient
156
160
  self.is_html = attributes[:'is_html']
157
161
  end
158
162
 
163
+ if attributes.key?(:'reply_to')
164
+ self.reply_to = attributes[:'reply_to']
165
+ end
166
+
159
167
  if attributes.key?(:'sent_at')
160
168
  self.sent_at = attributes[:'sent_at']
161
169
  end
@@ -208,6 +216,7 @@ module MailSlurpClient
208
216
  id == o.id &&
209
217
  inbox_id == o.inbox_id &&
210
218
  is_html == o.is_html &&
219
+ reply_to == o.reply_to &&
211
220
  sent_at == o.sent_at &&
212
221
  subject == o.subject &&
213
222
  to == o.to &&
@@ -223,7 +232,7 @@ module MailSlurpClient
223
232
  # Calculates hash code according to all attributes.
224
233
  # @return [Integer] Hash code
225
234
  def hash
226
- [attachments, bcc, body, body_md5_hash, cc, charset, from, id, inbox_id, is_html, sent_at, subject, to, user_id].hash
235
+ [attachments, bcc, body, body_md5_hash, cc, charset, from, id, inbox_id, is_html, reply_to, sent_at, subject, to, user_id].hash
227
236
  end
228
237
 
229
238
  # Builds the object from hash
@@ -11,5 +11,5 @@ OpenAPI Generator version: 4.3.1
11
11
  =end
12
12
 
13
13
  module MailSlurpClient
14
- VERSION = '8.4.0'
14
+ VERSION = '8.5.1'
15
15
  end
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: 8.4.0
4
+ version: 8.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - mailslurp
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-12 00:00:00.000000000 Z
11
+ date: 2020-12-15 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.
@@ -43,7 +43,6 @@ files:
43
43
  - lib/mailslurp_client/configuration.rb
44
44
  - lib/mailslurp_client/models/alias_dto.rb
45
45
  - lib/mailslurp_client/models/alias_projection.rb
46
- - lib/mailslurp_client/models/alias_verification_result.rb
47
46
  - lib/mailslurp_client/models/attachment_meta_data.rb
48
47
  - lib/mailslurp_client/models/basic_auth_options.rb
49
48
  - lib/mailslurp_client/models/bulk_send_email_options.rb
@@ -1,234 +0,0 @@
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 AliasVerificationResult
17
- attr_accessor :alias_id
18
-
19
- attr_accessor :is_verified
20
-
21
- attr_accessor :message
22
-
23
- # Attribute mapping from ruby-style variable name to JSON key.
24
- def self.attribute_map
25
- {
26
- :'alias_id' => :'aliasId',
27
- :'is_verified' => :'isVerified',
28
- :'message' => :'message'
29
- }
30
- end
31
-
32
- # Attribute type mapping.
33
- def self.openapi_types
34
- {
35
- :'alias_id' => :'String',
36
- :'is_verified' => :'Boolean',
37
- :'message' => :'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::AliasVerificationResult` 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::AliasVerificationResult`. 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?(:'alias_id')
63
- self.alias_id = attributes[:'alias_id']
64
- end
65
-
66
- if attributes.key?(:'is_verified')
67
- self.is_verified = attributes[:'is_verified']
68
- end
69
-
70
- if attributes.key?(:'message')
71
- self.message = attributes[:'message']
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 @alias_id.nil?
80
- invalid_properties.push('invalid value for "alias_id", alias_id cannot be nil.')
81
- end
82
-
83
- if @is_verified.nil?
84
- invalid_properties.push('invalid value for "is_verified", is_verified 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 @alias_id.nil?
94
- return false if @is_verified.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
- alias_id == o.alias_id &&
104
- is_verified == o.is_verified &&
105
- message == o.message
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
- [alias_id, is_verified, message].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