mailslurp_client 15.7.16 → 15.8.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mailslurp_client/api/inbox_controller_api.rb +2 -2
  3. data/lib/mailslurp_client/api/template_controller_api.rb +28 -16
  4. data/lib/mailslurp_client/api/webhook_controller_api.rb +68 -10
  5. data/lib/mailslurp_client/models/abstract_webhook_payload.rb +15 -15
  6. data/lib/mailslurp_client/models/alias_projection.rb +33 -33
  7. data/lib/mailslurp_client/models/attachment_projection.rb +28 -28
  8. data/lib/mailslurp_client/models/contact_projection.rb +13 -13
  9. data/lib/mailslurp_client/models/create_template_options.rb +3 -1
  10. data/lib/mailslurp_client/models/email_projection.rb +15 -15
  11. data/lib/mailslurp_client/models/expired_inbox_record_projection.rb +19 -19
  12. data/lib/mailslurp_client/models/flush_expired_inboxes_result.rb +2 -0
  13. data/lib/mailslurp_client/models/missed_email_projection.rb +13 -13
  14. data/lib/mailslurp_client/models/page_alias.rb +19 -19
  15. data/lib/mailslurp_client/models/page_attachment_entity.rb +19 -19
  16. data/lib/mailslurp_client/models/page_bounced_email.rb +19 -19
  17. data/lib/mailslurp_client/models/page_bounced_recipients.rb +19 -19
  18. data/lib/mailslurp_client/models/page_contact_projection.rb +19 -19
  19. data/lib/mailslurp_client/models/page_email_preview.rb +19 -19
  20. data/lib/mailslurp_client/models/page_email_projection.rb +19 -19
  21. data/lib/mailslurp_client/models/page_email_validation_request.rb +19 -19
  22. data/lib/mailslurp_client/models/page_expired_inbox_record_projection.rb +19 -19
  23. data/lib/mailslurp_client/models/page_group_projection.rb +19 -19
  24. data/lib/mailslurp_client/models/page_inbox_forwarder_dto.rb +19 -19
  25. data/lib/mailslurp_client/models/page_inbox_projection.rb +19 -19
  26. data/lib/mailslurp_client/models/page_inbox_ruleset_dto.rb +19 -19
  27. data/lib/mailslurp_client/models/page_missed_email_projection.rb +19 -19
  28. data/lib/mailslurp_client/models/page_organization_inbox_projection.rb +19 -19
  29. data/lib/mailslurp_client/models/page_template_projection.rb +19 -19
  30. data/lib/mailslurp_client/models/page_thread_projection.rb +19 -19
  31. data/lib/mailslurp_client/models/page_tracking_pixel_projection.rb +19 -19
  32. data/lib/mailslurp_client/models/page_unknown_missed_email_projection.rb +19 -19
  33. data/lib/mailslurp_client/models/page_webhook_projection.rb +19 -19
  34. data/lib/mailslurp_client/models/page_webhook_result.rb +19 -19
  35. data/lib/mailslurp_client/models/sent_email_projection.rb +26 -26
  36. data/lib/mailslurp_client/models/template_dto.rb +5 -0
  37. data/lib/mailslurp_client/models/template_variable.rb +2 -0
  38. data/lib/mailslurp_client/models/thread_projection.rb +35 -24
  39. data/lib/mailslurp_client/models/tracking_pixel_projection.rb +18 -18
  40. data/lib/mailslurp_client/models/unknown_missed_email_projection.rb +13 -13
  41. data/lib/mailslurp_client/models/verify_webhook_signature_options.rb +225 -0
  42. data/lib/mailslurp_client/models/verify_webhook_signature_results.rb +211 -0
  43. data/lib/mailslurp_client/models/webhook_projection.rb +11 -11
  44. data/lib/mailslurp_client/version.rb +1 -1
  45. data/lib/mailslurp_client.rb +2 -0
  46. metadata +4 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2bdf6204c13a67023421303a8ae72ff9cc3968ae5bcb6e73315a9b8e50889a32
4
- data.tar.gz: 9267034416c67df0873c6705f8bc59e65a5d425e9da0422ece0580f13ba21a90
3
+ metadata.gz: 4c57b9ba3a7c06a9bf126689e80920a1e0eae9be28a03bdea3b724cad4ab100f
4
+ data.tar.gz: 1290b7e2f2e09d23c22f1be518b6cad3299c473f0bb5abb6b8b455c59852a5be
5
5
  SHA512:
6
- metadata.gz: 040ca454d24aac9237ac85474e5628ec9052e328f42ac49c47567430caa7f4afbe6e69dfff1242a656fe011e06e3069312a4d40c9104a2dd0995eaec4dbe2e53
7
- data.tar.gz: 135ea65e05534ddb61c53dff71557f34610a75e0e507edf7a71d37bebbabcd2924b10973cbe133f9d57dd568b65020c76b15f013e10cf7fbe6fbe5f58bc10fa2
6
+ metadata.gz: 9a3027477ae43a11e1298f6c06c69ca79ec9858732375c06b70b283d0ae4414f83367f7471ba3751c7842ff4b44aafb9c553344d6564cd65d220087639144cb6
7
+ data.tar.gz: ea9ae376f7209b22aa3c9cf54769ba16f15bda619ce2bb78e4a19f4b7b5bda04a804c8fef92114b6733327a1f323d0767eeb2cfd26aead8e1e1e0e89554d9f05
@@ -2019,7 +2019,7 @@ module MailSlurpClient
2019
2019
 
2020
2020
  # Set inbox favourited state
2021
2021
  # Set and return new favourite state for an inbox
2022
- # @param inbox_id [String]
2022
+ # @param inbox_id [String] ID of inbox to set favourite state
2023
2023
  # @param set_inbox_favourited_options [SetInboxFavouritedOptions]
2024
2024
  # @param [Hash] opts the optional parameters
2025
2025
  # @return [InboxDto]
@@ -2030,7 +2030,7 @@ module MailSlurpClient
2030
2030
 
2031
2031
  # Set inbox favourited state
2032
2032
  # Set and return new favourite state for an inbox
2033
- # @param inbox_id [String]
2033
+ # @param inbox_id [String] ID of inbox to set favourite state
2034
2034
  # @param set_inbox_favourited_options [SetInboxFavouritedOptions]
2035
2035
  # @param [Hash] opts the optional parameters
2036
2036
  # @return [Array<(InboxDto, Integer, Hash)>] InboxDto data, response status code and response headers
@@ -20,6 +20,7 @@ module MailSlurpClient
20
20
  @api_client = api_client
21
21
  end
22
22
  # Create a Template
23
+ # Create an email template with variables for use with templated transactional emails.
23
24
  # @param create_template_options [CreateTemplateOptions]
24
25
  # @param [Hash] opts the optional parameters
25
26
  # @return [TemplateDto]
@@ -29,6 +30,7 @@ module MailSlurpClient
29
30
  end
30
31
 
31
32
  # Create a Template
33
+ # Create an email template with variables for use with templated transactional emails.
32
34
  # @param create_template_options [CreateTemplateOptions]
33
35
  # @param [Hash] opts the optional parameters
34
36
  # @return [Array<(TemplateDto, Integer, Hash)>] TemplateDto data, response status code and response headers
@@ -81,8 +83,9 @@ module MailSlurpClient
81
83
  return data, status_code, headers
82
84
  end
83
85
 
84
- # Delete Template
85
- # @param template_id [String]
86
+ # Delete email template
87
+ # Delete template
88
+ # @param template_id [String] Template ID
86
89
  # @param [Hash] opts the optional parameters
87
90
  # @return [nil]
88
91
  def delete_template(template_id, opts = {})
@@ -90,8 +93,9 @@ module MailSlurpClient
90
93
  nil
91
94
  end
92
95
 
93
- # Delete Template
94
- # @param template_id [String]
96
+ # Delete email template
97
+ # Delete template
98
+ # @param template_id [String] Template ID
95
99
  # @param [Hash] opts the optional parameters
96
100
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
97
101
  def delete_template_with_http_info(template_id, opts = {})
@@ -139,7 +143,8 @@ module MailSlurpClient
139
143
  return data, status_code, headers
140
144
  end
141
145
 
142
- # Get all Templates in paginated format
146
+ # List templates
147
+ # Get all templates in paginated format
143
148
  # @param [Hash] opts the optional parameters
144
149
  # @option opts [Integer] :page Optional page index in list pagination (default to 0)
145
150
  # @option opts [Integer] :size Optional page size in list pagination (default to 20)
@@ -152,7 +157,8 @@ module MailSlurpClient
152
157
  data
153
158
  end
154
159
 
155
- # Get all Templates in paginated format
160
+ # List templates
161
+ # Get all templates in paginated format
156
162
  # @param [Hash] opts the optional parameters
157
163
  # @option opts [Integer] :page Optional page index in list pagination
158
164
  # @option opts [Integer] :size Optional page size in list pagination
@@ -212,8 +218,9 @@ module MailSlurpClient
212
218
  return data, status_code, headers
213
219
  end
214
220
 
215
- # Get Template
216
- # @param template_id [String]
221
+ # Get template
222
+ # Get email template
223
+ # @param template_id [String] Template ID
217
224
  # @param [Hash] opts the optional parameters
218
225
  # @return [TemplateDto]
219
226
  def get_template(template_id, opts = {})
@@ -221,8 +228,9 @@ module MailSlurpClient
221
228
  data
222
229
  end
223
230
 
224
- # Get Template
225
- # @param template_id [String]
231
+ # Get template
232
+ # Get email template
233
+ # @param template_id [String] Template ID
226
234
  # @param [Hash] opts the optional parameters
227
235
  # @return [Array<(TemplateDto, Integer, Hash)>] TemplateDto data, response status code and response headers
228
236
  def get_template_with_http_info(template_id, opts = {})
@@ -272,7 +280,8 @@ module MailSlurpClient
272
280
  return data, status_code, headers
273
281
  end
274
282
 
275
- # Get all Templates
283
+ # List templates
284
+ # Get all templates
276
285
  # @param [Hash] opts the optional parameters
277
286
  # @return [Array<TemplateProjection>]
278
287
  def get_templates(opts = {})
@@ -280,7 +289,8 @@ module MailSlurpClient
280
289
  data
281
290
  end
282
291
 
283
- # Get all Templates
292
+ # List templates
293
+ # Get all templates
284
294
  # @param [Hash] opts the optional parameters
285
295
  # @return [Array<(Array<TemplateProjection>, Integer, Hash)>] Array<TemplateProjection> data, response status code and response headers
286
296
  def get_templates_with_http_info(opts = {})
@@ -326,8 +336,9 @@ module MailSlurpClient
326
336
  return data, status_code, headers
327
337
  end
328
338
 
329
- # Update a Template
330
- # @param template_id [String]
339
+ # Update template
340
+ # Update email template
341
+ # @param template_id [String] Template ID
331
342
  # @param create_template_options [CreateTemplateOptions]
332
343
  # @param [Hash] opts the optional parameters
333
344
  # @return [TemplateDto]
@@ -336,8 +347,9 @@ module MailSlurpClient
336
347
  data
337
348
  end
338
349
 
339
- # Update a Template
340
- # @param template_id [String]
350
+ # Update template
351
+ # Update email template
352
+ # @param template_id [String] Template ID
341
353
  # @param create_template_options [CreateTemplateOptions]
342
354
  # @param [Hash] opts the optional parameters
343
355
  # @return [Array<(TemplateDto, Integer, Hash)>] TemplateDto data, response status code and response headers
@@ -1413,28 +1413,22 @@ module MailSlurpClient
1413
1413
  end
1414
1414
 
1415
1415
  # Get count of unseen webhook results with error status
1416
- # @param inbox_id [String]
1417
1416
  # @param [Hash] opts the optional parameters
1418
1417
  # @return [UnseenErrorCountDto]
1419
- def get_webhook_results_unseen_error_count(inbox_id, opts = {})
1420
- data, _status_code, _headers = get_webhook_results_unseen_error_count_with_http_info(inbox_id, opts)
1418
+ def get_webhook_results_unseen_error_count(opts = {})
1419
+ data, _status_code, _headers = get_webhook_results_unseen_error_count_with_http_info(opts)
1421
1420
  data
1422
1421
  end
1423
1422
 
1424
1423
  # Get count of unseen webhook results with error status
1425
- # @param inbox_id [String]
1426
1424
  # @param [Hash] opts the optional parameters
1427
1425
  # @return [Array<(UnseenErrorCountDto, Integer, Hash)>] UnseenErrorCountDto data, response status code and response headers
1428
- def get_webhook_results_unseen_error_count_with_http_info(inbox_id, opts = {})
1426
+ def get_webhook_results_unseen_error_count_with_http_info(opts = {})
1429
1427
  if @api_client.config.debugging
1430
1428
  @api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_webhook_results_unseen_error_count ...'
1431
1429
  end
1432
- # verify the required parameter 'inbox_id' is set
1433
- if @api_client.config.client_side_validation && inbox_id.nil?
1434
- fail ArgumentError, "Missing the required parameter 'inbox_id' when calling WebhookControllerApi.get_webhook_results_unseen_error_count"
1435
- end
1436
1430
  # resource path
1437
- local_var_path = '/webhooks/results/unseen-count'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))
1431
+ local_var_path = '/webhooks/results/unseen-count'
1438
1432
 
1439
1433
  # query parameters
1440
1434
  query_params = opts[:query_params] || {}
@@ -1653,5 +1647,69 @@ module MailSlurpClient
1653
1647
  end
1654
1648
  return data, status_code, headers
1655
1649
  end
1650
+
1651
+ # Verify a webhook payload signature
1652
+ # Verify a webhook payload using the messageId and signature. This allows you to be sure that MailSlurp sent the payload and not another server.
1653
+ # @param verify_webhook_signature_options [VerifyWebhookSignatureOptions]
1654
+ # @param [Hash] opts the optional parameters
1655
+ # @return [VerifyWebhookSignatureResults]
1656
+ def verify_webhook_signature(verify_webhook_signature_options, opts = {})
1657
+ data, _status_code, _headers = verify_webhook_signature_with_http_info(verify_webhook_signature_options, opts)
1658
+ data
1659
+ end
1660
+
1661
+ # Verify a webhook payload signature
1662
+ # Verify a webhook payload using the messageId and signature. This allows you to be sure that MailSlurp sent the payload and not another server.
1663
+ # @param verify_webhook_signature_options [VerifyWebhookSignatureOptions]
1664
+ # @param [Hash] opts the optional parameters
1665
+ # @return [Array<(VerifyWebhookSignatureResults, Integer, Hash)>] VerifyWebhookSignatureResults data, response status code and response headers
1666
+ def verify_webhook_signature_with_http_info(verify_webhook_signature_options, opts = {})
1667
+ if @api_client.config.debugging
1668
+ @api_client.config.logger.debug 'Calling API: WebhookControllerApi.verify_webhook_signature ...'
1669
+ end
1670
+ # verify the required parameter 'verify_webhook_signature_options' is set
1671
+ if @api_client.config.client_side_validation && verify_webhook_signature_options.nil?
1672
+ fail ArgumentError, "Missing the required parameter 'verify_webhook_signature_options' when calling WebhookControllerApi.verify_webhook_signature"
1673
+ end
1674
+ # resource path
1675
+ local_var_path = '/webhooks/verify'
1676
+
1677
+ # query parameters
1678
+ query_params = opts[:query_params] || {}
1679
+
1680
+ # header parameters
1681
+ header_params = opts[:header_params] || {}
1682
+ # HTTP header 'Accept' (if needed)
1683
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1684
+ # HTTP header 'Content-Type'
1685
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1686
+
1687
+ # form parameters
1688
+ form_params = opts[:form_params] || {}
1689
+
1690
+ # http body (model)
1691
+ post_body = opts[:body] || @api_client.object_to_http_body(verify_webhook_signature_options)
1692
+
1693
+ # return_type
1694
+ return_type = opts[:return_type] || 'VerifyWebhookSignatureResults'
1695
+
1696
+ # auth_names
1697
+ auth_names = opts[:auth_names] || ['API_KEY']
1698
+
1699
+ new_options = opts.merge(
1700
+ :header_params => header_params,
1701
+ :query_params => query_params,
1702
+ :form_params => form_params,
1703
+ :body => post_body,
1704
+ :auth_names => auth_names,
1705
+ :return_type => return_type
1706
+ )
1707
+
1708
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1709
+ if @api_client.config.debugging
1710
+ @api_client.config.logger.debug "API called: WebhookControllerApi#verify_webhook_signature\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1711
+ end
1712
+ return data, status_code, headers
1713
+ end
1656
1714
  end
1657
1715
  end
@@ -17,10 +17,10 @@ module MailSlurpClient
17
17
  class AbstractWebhookPayload
18
18
  attr_accessor :event_name
19
19
 
20
- attr_accessor :webhook_id
21
-
22
20
  attr_accessor :message_id
23
21
 
22
+ attr_accessor :webhook_id
23
+
24
24
  attr_accessor :webhook_name
25
25
 
26
26
  class EnumAttributeValidator
@@ -49,8 +49,8 @@ module MailSlurpClient
49
49
  def self.attribute_map
50
50
  {
51
51
  :'event_name' => :'eventName',
52
- :'webhook_id' => :'webhookId',
53
52
  :'message_id' => :'messageId',
53
+ :'webhook_id' => :'webhookId',
54
54
  :'webhook_name' => :'webhookName'
55
55
  }
56
56
  end
@@ -59,8 +59,8 @@ module MailSlurpClient
59
59
  def self.openapi_types
60
60
  {
61
61
  :'event_name' => :'String',
62
- :'webhook_id' => :'String',
63
62
  :'message_id' => :'String',
63
+ :'webhook_id' => :'String',
64
64
  :'webhook_name' => :'String'
65
65
  }
66
66
  end
@@ -90,14 +90,14 @@ module MailSlurpClient
90
90
  self.event_name = attributes[:'event_name']
91
91
  end
92
92
 
93
- if attributes.key?(:'webhook_id')
94
- self.webhook_id = attributes[:'webhook_id']
95
- end
96
-
97
93
  if attributes.key?(:'message_id')
98
94
  self.message_id = attributes[:'message_id']
99
95
  end
100
96
 
97
+ if attributes.key?(:'webhook_id')
98
+ self.webhook_id = attributes[:'webhook_id']
99
+ end
100
+
101
101
  if attributes.key?(:'webhook_name')
102
102
  self.webhook_name = attributes[:'webhook_name']
103
103
  end
@@ -111,14 +111,14 @@ module MailSlurpClient
111
111
  invalid_properties.push('invalid value for "event_name", event_name cannot be nil.')
112
112
  end
113
113
 
114
- if @webhook_id.nil?
115
- invalid_properties.push('invalid value for "webhook_id", webhook_id cannot be nil.')
116
- end
117
-
118
114
  if @message_id.nil?
119
115
  invalid_properties.push('invalid value for "message_id", message_id cannot be nil.')
120
116
  end
121
117
 
118
+ if @webhook_id.nil?
119
+ invalid_properties.push('invalid value for "webhook_id", webhook_id cannot be nil.')
120
+ end
121
+
122
122
  invalid_properties
123
123
  end
124
124
 
@@ -128,8 +128,8 @@ module MailSlurpClient
128
128
  return false if @event_name.nil?
129
129
  event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT"])
130
130
  return false unless event_name_validator.valid?(@event_name)
131
- return false if @webhook_id.nil?
132
131
  return false if @message_id.nil?
132
+ return false if @webhook_id.nil?
133
133
  true
134
134
  end
135
135
 
@@ -149,8 +149,8 @@ module MailSlurpClient
149
149
  return true if self.equal?(o)
150
150
  self.class == o.class &&
151
151
  event_name == o.event_name &&
152
- webhook_id == o.webhook_id &&
153
152
  message_id == o.message_id &&
153
+ webhook_id == o.webhook_id &&
154
154
  webhook_name == o.webhook_name
155
155
  end
156
156
 
@@ -163,7 +163,7 @@ module MailSlurpClient
163
163
  # Calculates hash code according to all attributes.
164
164
  # @return [Integer] Hash code
165
165
  def hash
166
- [event_name, webhook_id, message_id, webhook_name].hash
166
+ [event_name, message_id, webhook_id, webhook_name].hash
167
167
  end
168
168
 
169
169
  # Builds the object from hash
@@ -19,16 +19,16 @@ module MailSlurpClient
19
19
 
20
20
  attr_accessor :id
21
21
 
22
- attr_accessor :created_at
23
-
24
- attr_accessor :user_id
22
+ attr_accessor :inbox_id
25
23
 
26
24
  attr_accessor :email_address
27
25
 
28
- attr_accessor :inbox_id
26
+ attr_accessor :user_id
29
27
 
30
28
  attr_accessor :use_threads
31
29
 
30
+ attr_accessor :created_at
31
+
32
32
  attr_accessor :updated_at
33
33
 
34
34
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -36,11 +36,11 @@ module MailSlurpClient
36
36
  {
37
37
  :'name' => :'name',
38
38
  :'id' => :'id',
39
- :'created_at' => :'createdAt',
40
- :'user_id' => :'userId',
41
- :'email_address' => :'emailAddress',
42
39
  :'inbox_id' => :'inboxId',
40
+ :'email_address' => :'emailAddress',
41
+ :'user_id' => :'userId',
43
42
  :'use_threads' => :'useThreads',
43
+ :'created_at' => :'createdAt',
44
44
  :'updated_at' => :'updatedAt'
45
45
  }
46
46
  end
@@ -50,11 +50,11 @@ module MailSlurpClient
50
50
  {
51
51
  :'name' => :'String',
52
52
  :'id' => :'String',
53
- :'created_at' => :'DateTime',
54
- :'user_id' => :'String',
55
- :'email_address' => :'String',
56
53
  :'inbox_id' => :'String',
54
+ :'email_address' => :'String',
55
+ :'user_id' => :'String',
57
56
  :'use_threads' => :'Boolean',
57
+ :'created_at' => :'DateTime',
58
58
  :'updated_at' => :'DateTime'
59
59
  }
60
60
  end
@@ -88,26 +88,26 @@ module MailSlurpClient
88
88
  self.id = attributes[:'id']
89
89
  end
90
90
 
91
- if attributes.key?(:'created_at')
92
- self.created_at = attributes[:'created_at']
93
- end
94
-
95
- if attributes.key?(:'user_id')
96
- self.user_id = attributes[:'user_id']
91
+ if attributes.key?(:'inbox_id')
92
+ self.inbox_id = attributes[:'inbox_id']
97
93
  end
98
94
 
99
95
  if attributes.key?(:'email_address')
100
96
  self.email_address = attributes[:'email_address']
101
97
  end
102
98
 
103
- if attributes.key?(:'inbox_id')
104
- self.inbox_id = attributes[:'inbox_id']
99
+ if attributes.key?(:'user_id')
100
+ self.user_id = attributes[:'user_id']
105
101
  end
106
102
 
107
103
  if attributes.key?(:'use_threads')
108
104
  self.use_threads = attributes[:'use_threads']
109
105
  end
110
106
 
107
+ if attributes.key?(:'created_at')
108
+ self.created_at = attributes[:'created_at']
109
+ end
110
+
111
111
  if attributes.key?(:'updated_at')
112
112
  self.updated_at = attributes[:'updated_at']
113
113
  end
@@ -121,20 +121,20 @@ module MailSlurpClient
121
121
  invalid_properties.push('invalid value for "id", id cannot be nil.')
122
122
  end
123
123
 
124
- if @created_at.nil?
125
- invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
126
- end
127
-
128
- if @user_id.nil?
129
- invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
124
+ if @inbox_id.nil?
125
+ invalid_properties.push('invalid value for "inbox_id", inbox_id cannot be nil.')
130
126
  end
131
127
 
132
128
  if @email_address.nil?
133
129
  invalid_properties.push('invalid value for "email_address", email_address cannot be nil.')
134
130
  end
135
131
 
136
- if @inbox_id.nil?
137
- invalid_properties.push('invalid value for "inbox_id", inbox_id cannot be nil.')
132
+ if @user_id.nil?
133
+ invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
134
+ end
135
+
136
+ if @created_at.nil?
137
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
138
138
  end
139
139
 
140
140
  if @updated_at.nil?
@@ -148,10 +148,10 @@ module MailSlurpClient
148
148
  # @return true if the model is valid
149
149
  def valid?
150
150
  return false if @id.nil?
151
- return false if @created_at.nil?
152
- return false if @user_id.nil?
153
- return false if @email_address.nil?
154
151
  return false if @inbox_id.nil?
152
+ return false if @email_address.nil?
153
+ return false if @user_id.nil?
154
+ return false if @created_at.nil?
155
155
  return false if @updated_at.nil?
156
156
  true
157
157
  end
@@ -163,11 +163,11 @@ module MailSlurpClient
163
163
  self.class == o.class &&
164
164
  name == o.name &&
165
165
  id == o.id &&
166
- created_at == o.created_at &&
167
- user_id == o.user_id &&
168
- email_address == o.email_address &&
169
166
  inbox_id == o.inbox_id &&
167
+ email_address == o.email_address &&
168
+ user_id == o.user_id &&
170
169
  use_threads == o.use_threads &&
170
+ created_at == o.created_at &&
171
171
  updated_at == o.updated_at
172
172
  end
173
173
 
@@ -180,7 +180,7 @@ module MailSlurpClient
180
180
  # Calculates hash code according to all attributes.
181
181
  # @return [Integer] Hash code
182
182
  def hash
183
- [name, id, created_at, user_id, email_address, inbox_id, use_threads, updated_at].hash
183
+ [name, id, inbox_id, email_address, user_id, use_threads, created_at, updated_at].hash
184
184
  end
185
185
 
186
186
  # Builds the object from hash
@@ -20,28 +20,28 @@ module MailSlurpClient
20
20
  # Content length of attachment in bytes
21
21
  attr_accessor :content_length
22
22
 
23
- # Content type of attachment.
24
- attr_accessor :content_type
25
-
26
- attr_accessor :created_at
27
-
28
23
  attr_accessor :user_id
29
24
 
30
25
  # Attachment ID
31
26
  attr_accessor :attachment_id
32
27
 
28
+ attr_accessor :created_at
29
+
33
30
  attr_accessor :updated_at
34
31
 
32
+ # Content type of attachment.
33
+ attr_accessor :content_type
34
+
35
35
  # Attribute mapping from ruby-style variable name to JSON key.
36
36
  def self.attribute_map
37
37
  {
38
38
  :'name' => :'name',
39
39
  :'content_length' => :'contentLength',
40
- :'content_type' => :'contentType',
41
- :'created_at' => :'createdAt',
42
40
  :'user_id' => :'userId',
43
41
  :'attachment_id' => :'attachmentId',
44
- :'updated_at' => :'updatedAt'
42
+ :'created_at' => :'createdAt',
43
+ :'updated_at' => :'updatedAt',
44
+ :'content_type' => :'contentType'
45
45
  }
46
46
  end
47
47
 
@@ -50,11 +50,11 @@ module MailSlurpClient
50
50
  {
51
51
  :'name' => :'String',
52
52
  :'content_length' => :'Integer',
53
- :'content_type' => :'String',
54
- :'created_at' => :'DateTime',
55
53
  :'user_id' => :'String',
56
54
  :'attachment_id' => :'String',
57
- :'updated_at' => :'DateTime'
55
+ :'created_at' => :'DateTime',
56
+ :'updated_at' => :'DateTime',
57
+ :'content_type' => :'String'
58
58
  }
59
59
  end
60
60
 
@@ -87,14 +87,6 @@ module MailSlurpClient
87
87
  self.content_length = attributes[:'content_length']
88
88
  end
89
89
 
90
- if attributes.key?(:'content_type')
91
- self.content_type = attributes[:'content_type']
92
- end
93
-
94
- if attributes.key?(:'created_at')
95
- self.created_at = attributes[:'created_at']
96
- end
97
-
98
90
  if attributes.key?(:'user_id')
99
91
  self.user_id = attributes[:'user_id']
100
92
  end
@@ -103,19 +95,23 @@ module MailSlurpClient
103
95
  self.attachment_id = attributes[:'attachment_id']
104
96
  end
105
97
 
98
+ if attributes.key?(:'created_at')
99
+ self.created_at = attributes[:'created_at']
100
+ end
101
+
106
102
  if attributes.key?(:'updated_at')
107
103
  self.updated_at = attributes[:'updated_at']
108
104
  end
105
+
106
+ if attributes.key?(:'content_type')
107
+ self.content_type = attributes[:'content_type']
108
+ end
109
109
  end
110
110
 
111
111
  # Show invalid properties with the reasons. Usually used together with valid?
112
112
  # @return Array for valid properties with the reasons
113
113
  def list_invalid_properties
114
114
  invalid_properties = Array.new
115
- if @created_at.nil?
116
- invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
117
- end
118
-
119
115
  if @user_id.nil?
120
116
  invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
121
117
  end
@@ -124,6 +120,10 @@ module MailSlurpClient
124
120
  invalid_properties.push('invalid value for "attachment_id", attachment_id cannot be nil.')
125
121
  end
126
122
 
123
+ if @created_at.nil?
124
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
125
+ end
126
+
127
127
  if @updated_at.nil?
128
128
  invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
129
129
  end
@@ -134,9 +134,9 @@ module MailSlurpClient
134
134
  # Check to see if the all the properties in the model are valid
135
135
  # @return true if the model is valid
136
136
  def valid?
137
- return false if @created_at.nil?
138
137
  return false if @user_id.nil?
139
138
  return false if @attachment_id.nil?
139
+ return false if @created_at.nil?
140
140
  return false if @updated_at.nil?
141
141
  true
142
142
  end
@@ -148,11 +148,11 @@ module MailSlurpClient
148
148
  self.class == o.class &&
149
149
  name == o.name &&
150
150
  content_length == o.content_length &&
151
- content_type == o.content_type &&
152
- created_at == o.created_at &&
153
151
  user_id == o.user_id &&
154
152
  attachment_id == o.attachment_id &&
155
- updated_at == o.updated_at
153
+ created_at == o.created_at &&
154
+ updated_at == o.updated_at &&
155
+ content_type == o.content_type
156
156
  end
157
157
 
158
158
  # @see the `==` method
@@ -164,7 +164,7 @@ module MailSlurpClient
164
164
  # Calculates hash code according to all attributes.
165
165
  # @return [Integer] Hash code
166
166
  def hash
167
- [name, content_length, content_type, created_at, user_id, attachment_id, updated_at].hash
167
+ [name, content_length, user_id, attachment_id, created_at, updated_at, content_type].hash
168
168
  end
169
169
 
170
170
  # Builds the object from hash