mailslurp_client 15.13.0 → 15.13.3

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: 8fc7c87ec6802e9f72e70d0d40905eed5044a2d27e4e31757b04e92ca562fb58
4
- data.tar.gz: dc3ef1bc48a69e61482469f5d7cf5b21b9cf88617aa1d9b211740e6efa0b8012
3
+ metadata.gz: baaaac736137f6154321507a0e433691e5a10dca92e11e739924157dbd216733
4
+ data.tar.gz: 4c0627e01ce7666163136a2995688535404b9443b38903926b2db684f25cc813
5
5
  SHA512:
6
- metadata.gz: f7d373481d401fe99929469da5dde544810bdf929baef20bdf294399dfb3473169bd4c1f6c71ea00c085fcf223a8a4a6b34e6f4e9a4eb681cff5fadba5bab5f8
7
- data.tar.gz: ba6712f60183de2a614a95b7e49902979c609706d8bc26b1c832a7fea121caeebf360870c056510e10c9e6e3f88ab6f3f341fcde6293ceefdda2956d8a99ca48
6
+ metadata.gz: cd1698f91d6e826651dcb85cd5009fabbcd22aec489c08ffc55baa7e8176145fef2b436553ae04f353764e080e2e5c319465c5c53f871e8d7f56905f460e7de3
7
+ data.tar.gz: a3ae628a1424442ac857946232dea5eaae5dec23573c62c47b3c721c810a99f9cf0e744abe048a13fcf19750b9f12ffb6a0c1becf7712f9a8a7bdbe604c468c0
@@ -362,6 +362,7 @@ module MailSlurpClient
362
362
  end
363
363
 
364
364
  # @param [Hash] opts the optional parameters
365
+ # @option opts [String] :phone_country Optional phone country
365
366
  # @option opts [Integer] :page Optional page index for list pagination (default to 0)
366
367
  # @option opts [Integer] :size Optional page size for list pagination (default to 20)
367
368
  # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
@@ -374,6 +375,7 @@ module MailSlurpClient
374
375
  end
375
376
 
376
377
  # @param [Hash] opts the optional parameters
378
+ # @option opts [String] :phone_country Optional phone country
377
379
  # @option opts [Integer] :page Optional page index for list pagination
378
380
  # @option opts [Integer] :size Optional page size for list pagination
379
381
  # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
@@ -384,6 +386,10 @@ module MailSlurpClient
384
386
  if @api_client.config.debugging
385
387
  @api_client.config.logger.debug 'Calling API: PhoneControllerApi.get_phone_numbers ...'
386
388
  end
389
+ allowable_values = ["US", "GB"]
390
+ if @api_client.config.client_side_validation && opts[:'phone_country'] && !allowable_values.include?(opts[:'phone_country'])
391
+ fail ArgumentError, "invalid value for \"phone_country\", must be one of #{allowable_values}"
392
+ end
387
393
  allowable_values = ["ASC", "DESC"]
388
394
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
389
395
  fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
@@ -393,6 +399,7 @@ module MailSlurpClient
393
399
 
394
400
  # query parameters
395
401
  query_params = opts[:query_params] || {}
402
+ query_params[:'phoneCountry'] = opts[:'phone_country'] if !opts[:'phone_country'].nil?
396
403
  query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
397
404
  query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
398
405
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
@@ -483,5 +490,72 @@ module MailSlurpClient
483
490
  end
484
491
  return data, status_code, headers
485
492
  end
493
+
494
+ # @param phone_number_id [String]
495
+ # @param test_phone_number_options [TestPhoneNumberOptions]
496
+ # @param [Hash] opts the optional parameters
497
+ # @option opts [String] :x_test_id
498
+ # @return [nil]
499
+ def test_phone_number_send_sms(phone_number_id, test_phone_number_options, opts = {})
500
+ test_phone_number_send_sms_with_http_info(phone_number_id, test_phone_number_options, opts)
501
+ nil
502
+ end
503
+
504
+ # @param phone_number_id [String]
505
+ # @param test_phone_number_options [TestPhoneNumberOptions]
506
+ # @param [Hash] opts the optional parameters
507
+ # @option opts [String] :x_test_id
508
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
509
+ def test_phone_number_send_sms_with_http_info(phone_number_id, test_phone_number_options, opts = {})
510
+ if @api_client.config.debugging
511
+ @api_client.config.logger.debug 'Calling API: PhoneControllerApi.test_phone_number_send_sms ...'
512
+ end
513
+ # verify the required parameter 'phone_number_id' is set
514
+ if @api_client.config.client_side_validation && phone_number_id.nil?
515
+ fail ArgumentError, "Missing the required parameter 'phone_number_id' when calling PhoneControllerApi.test_phone_number_send_sms"
516
+ end
517
+ # verify the required parameter 'test_phone_number_options' is set
518
+ if @api_client.config.client_side_validation && test_phone_number_options.nil?
519
+ fail ArgumentError, "Missing the required parameter 'test_phone_number_options' when calling PhoneControllerApi.test_phone_number_send_sms"
520
+ end
521
+ # resource path
522
+ local_var_path = '/phone/numbers/{phoneNumberId}/test'.sub('{' + 'phoneNumberId' + '}', CGI.escape(phone_number_id.to_s))
523
+
524
+ # query parameters
525
+ query_params = opts[:query_params] || {}
526
+
527
+ # header parameters
528
+ header_params = opts[:header_params] || {}
529
+ # HTTP header 'Content-Type'
530
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
531
+ header_params[:'x-test-id'] = opts[:'x_test_id'] if !opts[:'x_test_id'].nil?
532
+
533
+ # form parameters
534
+ form_params = opts[:form_params] || {}
535
+
536
+ # http body (model)
537
+ post_body = opts[:body] || @api_client.object_to_http_body(test_phone_number_options)
538
+
539
+ # return_type
540
+ return_type = opts[:return_type]
541
+
542
+ # auth_names
543
+ auth_names = opts[:auth_names] || ['API_KEY']
544
+
545
+ new_options = opts.merge(
546
+ :header_params => header_params,
547
+ :query_params => query_params,
548
+ :form_params => form_params,
549
+ :body => post_body,
550
+ :auth_names => auth_names,
551
+ :return_type => return_type
552
+ )
553
+
554
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
555
+ if @api_client.config.debugging
556
+ @api_client.config.logger.debug "API called: PhoneControllerApi#test_phone_number_send_sms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
557
+ end
558
+ return data, status_code, headers
559
+ end
486
560
  end
487
561
  end
@@ -140,7 +140,7 @@ module MailSlurpClient
140
140
  # Returns a SMS summary object with content.
141
141
  # @param sms_id [String]
142
142
  # @param [Hash] opts the optional parameters
143
- # @return [SmsMessage]
143
+ # @return [SmsDto]
144
144
  def get_sms_message(sms_id, opts = {})
145
145
  data, _status_code, _headers = get_sms_message_with_http_info(sms_id, opts)
146
146
  data
@@ -150,7 +150,7 @@ module MailSlurpClient
150
150
  # Returns a SMS summary object with content.
151
151
  # @param sms_id [String]
152
152
  # @param [Hash] opts the optional parameters
153
- # @return [Array<(SmsMessage, Integer, Hash)>] SmsMessage data, response status code and response headers
153
+ # @return [Array<(SmsDto, Integer, Hash)>] SmsDto data, response status code and response headers
154
154
  def get_sms_message_with_http_info(sms_id, opts = {})
155
155
  if @api_client.config.debugging
156
156
  @api_client.config.logger.debug 'Calling API: SmsControllerApi.get_sms_message ...'
@@ -177,7 +177,7 @@ module MailSlurpClient
177
177
  post_body = opts[:body]
178
178
 
179
179
  # return_type
180
- return_type = opts[:return_type] || 'SmsMessage'
180
+ return_type = opts[:return_type] || 'SmsDto'
181
181
 
182
182
  # auth_names
183
183
  auth_names = opts[:auth_names] || ['API_KEY']
@@ -260,6 +260,70 @@ module MailSlurpClient
260
260
  return data, status_code, headers
261
261
  end
262
262
 
263
+ # Wait for the latest SMS message to match the provided filter conditions such as body contains keyword.
264
+ # Wait until a phone number meets given conditions or return immediately if already met
265
+ # @param wait_for_single_sms_options [WaitForSingleSmsOptions]
266
+ # @param [Hash] opts the optional parameters
267
+ # @return [SmsDto]
268
+ def wait_for_latest_sms(wait_for_single_sms_options, opts = {})
269
+ data, _status_code, _headers = wait_for_latest_sms_with_http_info(wait_for_single_sms_options, opts)
270
+ data
271
+ end
272
+
273
+ # Wait for the latest SMS message to match the provided filter conditions such as body contains keyword.
274
+ # Wait until a phone number meets given conditions or return immediately if already met
275
+ # @param wait_for_single_sms_options [WaitForSingleSmsOptions]
276
+ # @param [Hash] opts the optional parameters
277
+ # @return [Array<(SmsDto, Integer, Hash)>] SmsDto data, response status code and response headers
278
+ def wait_for_latest_sms_with_http_info(wait_for_single_sms_options, opts = {})
279
+ if @api_client.config.debugging
280
+ @api_client.config.logger.debug 'Calling API: WaitForControllerApi.wait_for_latest_sms ...'
281
+ end
282
+ # verify the required parameter 'wait_for_single_sms_options' is set
283
+ if @api_client.config.client_side_validation && wait_for_single_sms_options.nil?
284
+ fail ArgumentError, "Missing the required parameter 'wait_for_single_sms_options' when calling WaitForControllerApi.wait_for_latest_sms"
285
+ end
286
+ # resource path
287
+ local_var_path = '/waitForLatestSms'
288
+
289
+ # query parameters
290
+ query_params = opts[:query_params] || {}
291
+
292
+ # header parameters
293
+ header_params = opts[:header_params] || {}
294
+ # HTTP header 'Accept' (if needed)
295
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
296
+ # HTTP header 'Content-Type'
297
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
298
+
299
+ # form parameters
300
+ form_params = opts[:form_params] || {}
301
+
302
+ # http body (model)
303
+ post_body = opts[:body] || @api_client.object_to_http_body(wait_for_single_sms_options)
304
+
305
+ # return_type
306
+ return_type = opts[:return_type] || 'SmsDto'
307
+
308
+ # auth_names
309
+ auth_names = opts[:auth_names] || ['API_KEY']
310
+
311
+ new_options = opts.merge(
312
+ :header_params => header_params,
313
+ :query_params => query_params,
314
+ :form_params => form_params,
315
+ :body => post_body,
316
+ :auth_names => auth_names,
317
+ :return_type => return_type
318
+ )
319
+
320
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
321
+ if @api_client.config.debugging
322
+ @api_client.config.logger.debug "API called: WaitForControllerApi#wait_for_latest_sms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
323
+ end
324
+ return data, status_code, headers
325
+ end
326
+
263
327
  # Wait or return list of emails that match simple matching patterns
264
328
  # Perform a search of emails in an inbox with the given patterns. If results match expected count then return or else retry the search until results are 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.
265
329
  # @param inbox_id [String] Id of the inbox we are fetching emails from
@@ -153,6 +153,76 @@ module MailSlurpClient
153
153
  return data, status_code, headers
154
154
  end
155
155
 
156
+ # Attach a WebHook URL to a phone number
157
+ # Get notified whenever a phone number receives an SMS via a WebHook URL.
158
+ # @param phone_number_id [String]
159
+ # @param create_webhook_options [CreateWebhookOptions]
160
+ # @param [Hash] opts the optional parameters
161
+ # @return [WebhookDto]
162
+ def create_webhook_for_phone_number(phone_number_id, create_webhook_options, opts = {})
163
+ data, _status_code, _headers = create_webhook_for_phone_number_with_http_info(phone_number_id, create_webhook_options, opts)
164
+ data
165
+ end
166
+
167
+ # Attach a WebHook URL to a phone number
168
+ # Get notified whenever a phone number receives an SMS via a WebHook URL.
169
+ # @param phone_number_id [String]
170
+ # @param create_webhook_options [CreateWebhookOptions]
171
+ # @param [Hash] opts the optional parameters
172
+ # @return [Array<(WebhookDto, Integer, Hash)>] WebhookDto data, response status code and response headers
173
+ def create_webhook_for_phone_number_with_http_info(phone_number_id, create_webhook_options, opts = {})
174
+ if @api_client.config.debugging
175
+ @api_client.config.logger.debug 'Calling API: WebhookControllerApi.create_webhook_for_phone_number ...'
176
+ end
177
+ # verify the required parameter 'phone_number_id' is set
178
+ if @api_client.config.client_side_validation && phone_number_id.nil?
179
+ fail ArgumentError, "Missing the required parameter 'phone_number_id' when calling WebhookControllerApi.create_webhook_for_phone_number"
180
+ end
181
+ # verify the required parameter 'create_webhook_options' is set
182
+ if @api_client.config.client_side_validation && create_webhook_options.nil?
183
+ fail ArgumentError, "Missing the required parameter 'create_webhook_options' when calling WebhookControllerApi.create_webhook_for_phone_number"
184
+ end
185
+ # resource path
186
+ local_var_path = '/phone/numbers/{phoneNumberId}/webhooks'.sub('{' + 'phoneNumberId' + '}', CGI.escape(phone_number_id.to_s))
187
+
188
+ # query parameters
189
+ query_params = opts[:query_params] || {}
190
+
191
+ # header parameters
192
+ header_params = opts[:header_params] || {}
193
+ # HTTP header 'Accept' (if needed)
194
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
195
+ # HTTP header 'Content-Type'
196
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
197
+
198
+ # form parameters
199
+ form_params = opts[:form_params] || {}
200
+
201
+ # http body (model)
202
+ post_body = opts[:body] || @api_client.object_to_http_body(create_webhook_options)
203
+
204
+ # return_type
205
+ return_type = opts[:return_type] || 'WebhookDto'
206
+
207
+ # auth_names
208
+ auth_names = opts[:auth_names] || ['API_KEY']
209
+
210
+ new_options = opts.merge(
211
+ :header_params => header_params,
212
+ :query_params => query_params,
213
+ :form_params => form_params,
214
+ :body => post_body,
215
+ :auth_names => auth_names,
216
+ :return_type => return_type
217
+ )
218
+
219
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
220
+ if @api_client.config.debugging
221
+ @api_client.config.logger.debug "API called: WebhookControllerApi#create_webhook_for_phone_number\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
222
+ end
223
+ return data, status_code, headers
224
+ end
225
+
156
226
  # Delete all webhooks
157
227
  # @param [Hash] opts the optional parameters
158
228
  # @option opts [DateTime] :before before
@@ -23,10 +23,10 @@ module MailSlurpClient
23
23
 
24
24
  attr_accessor :created_at
25
25
 
26
- attr_accessor :bounce_type
27
-
28
26
  attr_accessor :bounce_mta
29
27
 
28
+ attr_accessor :bounce_type
29
+
30
30
  # Attribute mapping from ruby-style variable name to JSON key.
31
31
  def self.attribute_map
32
32
  {
@@ -34,8 +34,8 @@ module MailSlurpClient
34
34
  :'sender' => :'sender',
35
35
  :'subject' => :'subject',
36
36
  :'created_at' => :'createdAt',
37
- :'bounce_type' => :'bounceType',
38
- :'bounce_mta' => :'bounceMta'
37
+ :'bounce_mta' => :'bounceMta',
38
+ :'bounce_type' => :'bounceType'
39
39
  }
40
40
  end
41
41
 
@@ -46,8 +46,8 @@ module MailSlurpClient
46
46
  :'sender' => :'String',
47
47
  :'subject' => :'String',
48
48
  :'created_at' => :'DateTime',
49
- :'bounce_type' => :'String',
50
- :'bounce_mta' => :'String'
49
+ :'bounce_mta' => :'String',
50
+ :'bounce_type' => :'String'
51
51
  }
52
52
  end
53
53
 
@@ -88,13 +88,13 @@ module MailSlurpClient
88
88
  self.created_at = attributes[:'created_at']
89
89
  end
90
90
 
91
- if attributes.key?(:'bounce_type')
92
- self.bounce_type = attributes[:'bounce_type']
93
- end
94
-
95
91
  if attributes.key?(:'bounce_mta')
96
92
  self.bounce_mta = attributes[:'bounce_mta']
97
93
  end
94
+
95
+ if attributes.key?(:'bounce_type')
96
+ self.bounce_type = attributes[:'bounce_type']
97
+ end
98
98
  end
99
99
 
100
100
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -129,8 +129,8 @@ module MailSlurpClient
129
129
  sender == o.sender &&
130
130
  subject == o.subject &&
131
131
  created_at == o.created_at &&
132
- bounce_type == o.bounce_type &&
133
- bounce_mta == o.bounce_mta
132
+ bounce_mta == o.bounce_mta &&
133
+ bounce_type == o.bounce_type
134
134
  end
135
135
 
136
136
  # @see the `==` method
@@ -142,7 +142,7 @@ module MailSlurpClient
142
142
  # Calculates hash code according to all attributes.
143
143
  # @return [Integer] Hash code
144
144
  def hash
145
- [id, sender, subject, created_at, bounce_type, bounce_mta].hash
145
+ [id, sender, subject, created_at, bounce_mta, bounce_type].hash
146
146
  end
147
147
 
148
148
  # Builds the object from hash
@@ -21,8 +21,6 @@ module MailSlurpClient
21
21
 
22
22
  attr_accessor :created_at
23
23
 
24
- attr_accessor :first_name
25
-
26
24
  attr_accessor :last_name
27
25
 
28
26
  attr_accessor :company
@@ -31,17 +29,19 @@ module MailSlurpClient
31
29
 
32
30
  attr_accessor :opt_out
33
31
 
32
+ attr_accessor :first_name
33
+
34
34
  # Attribute mapping from ruby-style variable name to JSON key.
35
35
  def self.attribute_map
36
36
  {
37
37
  :'id' => :'id',
38
38
  :'group_id' => :'groupId',
39
39
  :'created_at' => :'createdAt',
40
- :'first_name' => :'firstName',
41
40
  :'last_name' => :'lastName',
42
41
  :'company' => :'company',
43
42
  :'email_addresses' => :'emailAddresses',
44
- :'opt_out' => :'optOut'
43
+ :'opt_out' => :'optOut',
44
+ :'first_name' => :'firstName'
45
45
  }
46
46
  end
47
47
 
@@ -51,11 +51,11 @@ module MailSlurpClient
51
51
  :'id' => :'String',
52
52
  :'group_id' => :'String',
53
53
  :'created_at' => :'DateTime',
54
- :'first_name' => :'String',
55
54
  :'last_name' => :'String',
56
55
  :'company' => :'String',
57
56
  :'email_addresses' => :'Array<String>',
58
- :'opt_out' => :'Boolean'
57
+ :'opt_out' => :'Boolean',
58
+ :'first_name' => :'String'
59
59
  }
60
60
  end
61
61
 
@@ -92,10 +92,6 @@ module MailSlurpClient
92
92
  self.created_at = attributes[:'created_at']
93
93
  end
94
94
 
95
- if attributes.key?(:'first_name')
96
- self.first_name = attributes[:'first_name']
97
- end
98
-
99
95
  if attributes.key?(:'last_name')
100
96
  self.last_name = attributes[:'last_name']
101
97
  end
@@ -113,6 +109,10 @@ module MailSlurpClient
113
109
  if attributes.key?(:'opt_out')
114
110
  self.opt_out = attributes[:'opt_out']
115
111
  end
112
+
113
+ if attributes.key?(:'first_name')
114
+ self.first_name = attributes[:'first_name']
115
+ end
116
116
  end
117
117
 
118
118
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -151,11 +151,11 @@ module MailSlurpClient
151
151
  id == o.id &&
152
152
  group_id == o.group_id &&
153
153
  created_at == o.created_at &&
154
- first_name == o.first_name &&
155
154
  last_name == o.last_name &&
156
155
  company == o.company &&
157
156
  email_addresses == o.email_addresses &&
158
- opt_out == o.opt_out
157
+ opt_out == o.opt_out &&
158
+ first_name == o.first_name
159
159
  end
160
160
 
161
161
  # @see the `==` method
@@ -167,7 +167,7 @@ module MailSlurpClient
167
167
  # Calculates hash code according to all attributes.
168
168
  # @return [Integer] Hash code
169
169
  def hash
170
- [id, group_id, created_at, first_name, last_name, company, email_addresses, opt_out].hash
170
+ [id, group_id, created_at, last_name, company, email_addresses, opt_out, first_name].hash
171
171
  end
172
172
 
173
173
  # Builds the object from hash
@@ -21,10 +21,10 @@ module MailSlurpClient
21
21
 
22
22
  attr_accessor :subject
23
23
 
24
- attr_accessor :inbox_id
25
-
26
24
  attr_accessor :attachments
27
25
 
26
+ attr_accessor :inbox_id
27
+
28
28
  attr_accessor :to
29
29
 
30
30
  attr_accessor :created_at
@@ -35,31 +35,31 @@ module MailSlurpClient
35
35
 
36
36
  attr_accessor :domain_id
37
37
 
38
- attr_accessor :team_access
39
-
40
- attr_accessor :read
41
-
42
38
  attr_accessor :body_md5_hash
43
39
 
44
40
  attr_accessor :body_excerpt
45
41
 
42
+ attr_accessor :read
43
+
44
+ attr_accessor :team_access
45
+
46
46
  # Attribute mapping from ruby-style variable name to JSON key.
47
47
  def self.attribute_map
48
48
  {
49
49
  :'id' => :'id',
50
50
  :'from' => :'from',
51
51
  :'subject' => :'subject',
52
- :'inbox_id' => :'inboxId',
53
52
  :'attachments' => :'attachments',
53
+ :'inbox_id' => :'inboxId',
54
54
  :'to' => :'to',
55
55
  :'created_at' => :'createdAt',
56
56
  :'bcc' => :'bcc',
57
57
  :'cc' => :'cc',
58
58
  :'domain_id' => :'domainId',
59
- :'team_access' => :'teamAccess',
60
- :'read' => :'read',
61
59
  :'body_md5_hash' => :'bodyMD5Hash',
62
- :'body_excerpt' => :'bodyExcerpt'
60
+ :'body_excerpt' => :'bodyExcerpt',
61
+ :'read' => :'read',
62
+ :'team_access' => :'teamAccess'
63
63
  }
64
64
  end
65
65
 
@@ -69,17 +69,17 @@ module MailSlurpClient
69
69
  :'id' => :'String',
70
70
  :'from' => :'String',
71
71
  :'subject' => :'String',
72
- :'inbox_id' => :'String',
73
72
  :'attachments' => :'Array<String>',
73
+ :'inbox_id' => :'String',
74
74
  :'to' => :'Array<String>',
75
75
  :'created_at' => :'DateTime',
76
76
  :'bcc' => :'Array<String>',
77
77
  :'cc' => :'Array<String>',
78
78
  :'domain_id' => :'String',
79
- :'team_access' => :'Boolean',
80
- :'read' => :'Boolean',
81
79
  :'body_md5_hash' => :'String',
82
- :'body_excerpt' => :'String'
80
+ :'body_excerpt' => :'String',
81
+ :'read' => :'Boolean',
82
+ :'team_access' => :'Boolean'
83
83
  }
84
84
  end
85
85
 
@@ -116,16 +116,16 @@ module MailSlurpClient
116
116
  self.subject = attributes[:'subject']
117
117
  end
118
118
 
119
- if attributes.key?(:'inbox_id')
120
- self.inbox_id = attributes[:'inbox_id']
121
- end
122
-
123
119
  if attributes.key?(:'attachments')
124
120
  if (value = attributes[:'attachments']).is_a?(Array)
125
121
  self.attachments = value
126
122
  end
127
123
  end
128
124
 
125
+ if attributes.key?(:'inbox_id')
126
+ self.inbox_id = attributes[:'inbox_id']
127
+ end
128
+
129
129
  if attributes.key?(:'to')
130
130
  if (value = attributes[:'to']).is_a?(Array)
131
131
  self.to = value
@@ -152,14 +152,6 @@ module MailSlurpClient
152
152
  self.domain_id = attributes[:'domain_id']
153
153
  end
154
154
 
155
- if attributes.key?(:'team_access')
156
- self.team_access = attributes[:'team_access']
157
- end
158
-
159
- if attributes.key?(:'read')
160
- self.read = attributes[:'read']
161
- end
162
-
163
155
  if attributes.key?(:'body_md5_hash')
164
156
  self.body_md5_hash = attributes[:'body_md5_hash']
165
157
  end
@@ -167,6 +159,14 @@ module MailSlurpClient
167
159
  if attributes.key?(:'body_excerpt')
168
160
  self.body_excerpt = attributes[:'body_excerpt']
169
161
  end
162
+
163
+ if attributes.key?(:'read')
164
+ self.read = attributes[:'read']
165
+ end
166
+
167
+ if attributes.key?(:'team_access')
168
+ self.team_access = attributes[:'team_access']
169
+ end
170
170
  end
171
171
 
172
172
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -189,14 +189,14 @@ module MailSlurpClient
189
189
  invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
190
190
  end
191
191
 
192
- if @team_access.nil?
193
- invalid_properties.push('invalid value for "team_access", team_access cannot be nil.')
194
- end
195
-
196
192
  if @read.nil?
197
193
  invalid_properties.push('invalid value for "read", read cannot be nil.')
198
194
  end
199
195
 
196
+ if @team_access.nil?
197
+ invalid_properties.push('invalid value for "team_access", team_access cannot be nil.')
198
+ end
199
+
200
200
  invalid_properties
201
201
  end
202
202
 
@@ -207,8 +207,8 @@ module MailSlurpClient
207
207
  return false if @inbox_id.nil?
208
208
  return false if @to.nil?
209
209
  return false if @created_at.nil?
210
- return false if @team_access.nil?
211
210
  return false if @read.nil?
211
+ return false if @team_access.nil?
212
212
  true
213
213
  end
214
214
 
@@ -220,17 +220,17 @@ module MailSlurpClient
220
220
  id == o.id &&
221
221
  from == o.from &&
222
222
  subject == o.subject &&
223
- inbox_id == o.inbox_id &&
224
223
  attachments == o.attachments &&
224
+ inbox_id == o.inbox_id &&
225
225
  to == o.to &&
226
226
  created_at == o.created_at &&
227
227
  bcc == o.bcc &&
228
228
  cc == o.cc &&
229
229
  domain_id == o.domain_id &&
230
- team_access == o.team_access &&
231
- read == o.read &&
232
230
  body_md5_hash == o.body_md5_hash &&
233
- body_excerpt == o.body_excerpt
231
+ body_excerpt == o.body_excerpt &&
232
+ read == o.read &&
233
+ team_access == o.team_access
234
234
  end
235
235
 
236
236
  # @see the `==` method
@@ -242,7 +242,7 @@ module MailSlurpClient
242
242
  # Calculates hash code according to all attributes.
243
243
  # @return [Integer] Hash code
244
244
  def hash
245
- [id, from, subject, inbox_id, attachments, to, created_at, bcc, cc, domain_id, team_access, read, body_md5_hash, body_excerpt].hash
245
+ [id, from, subject, attachments, inbox_id, to, created_at, bcc, cc, domain_id, body_md5_hash, body_excerpt, read, team_access].hash
246
246
  end
247
247
 
248
248
  # Builds the object from hash