mailslurp_client 15.17.24 → 15.17.26

Sign up to get free protection for your applications and to get access to all the features.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mailslurp_client/api/email_controller_api.rb +64 -0
  3. data/lib/mailslurp_client/api/inbox_controller_api.rb +64 -0
  4. data/lib/mailslurp_client/models/alias_projection.rb +15 -15
  5. data/lib/mailslurp_client/models/bounce_projection.rb +11 -11
  6. data/lib/mailslurp_client/models/connector_projection.rb +15 -15
  7. data/lib/mailslurp_client/models/email_projection.rb +21 -21
  8. data/lib/mailslurp_client/models/inbox_forwarder_event_projection.rb +11 -11
  9. data/lib/mailslurp_client/models/inbox_replier_event_projection.rb +11 -11
  10. data/lib/mailslurp_client/models/missed_email_projection.rb +11 -11
  11. data/lib/mailslurp_client/models/page_alias.rb +16 -17
  12. data/lib/mailslurp_client/models/page_attachment_entity.rb +16 -17
  13. data/lib/mailslurp_client/models/page_bounced_email.rb +16 -17
  14. data/lib/mailslurp_client/models/page_bounced_recipients.rb +16 -17
  15. data/lib/mailslurp_client/models/page_complaint.rb +16 -17
  16. data/lib/mailslurp_client/models/page_connector.rb +16 -17
  17. data/lib/mailslurp_client/models/page_connector_sync_events.rb +16 -17
  18. data/lib/mailslurp_client/models/page_contact_projection.rb +16 -17
  19. data/lib/mailslurp_client/models/page_delivery_status.rb +16 -17
  20. data/lib/mailslurp_client/models/page_email_preview.rb +16 -17
  21. data/lib/mailslurp_client/models/page_email_projection.rb +21 -12
  22. data/lib/mailslurp_client/models/page_email_validation_request.rb +16 -17
  23. data/lib/mailslurp_client/models/page_expired_inbox_record_projection.rb +16 -17
  24. data/lib/mailslurp_client/models/page_group_projection.rb +16 -17
  25. data/lib/mailslurp_client/models/page_inbox_forwarder_dto.rb +16 -17
  26. data/lib/mailslurp_client/models/page_inbox_forwarder_events.rb +16 -17
  27. data/lib/mailslurp_client/models/page_inbox_projection.rb +16 -17
  28. data/lib/mailslurp_client/models/page_inbox_replier_dto.rb +16 -17
  29. data/lib/mailslurp_client/models/page_inbox_replier_events.rb +16 -17
  30. data/lib/mailslurp_client/models/page_inbox_ruleset_dto.rb +16 -17
  31. data/lib/mailslurp_client/models/page_list_unsubscribe_recipients.rb +16 -17
  32. data/lib/mailslurp_client/models/page_missed_email_projection.rb +16 -17
  33. data/lib/mailslurp_client/models/page_organization_inbox_projection.rb +16 -17
  34. data/lib/mailslurp_client/models/page_phone_number_projection.rb +16 -17
  35. data/lib/mailslurp_client/models/page_scheduled_jobs.rb +16 -17
  36. data/lib/mailslurp_client/models/page_sent_email_projection.rb +69 -34
  37. data/lib/mailslurp_client/models/page_sent_email_with_queue_projection.rb +69 -34
  38. data/lib/mailslurp_client/models/page_sms_projection.rb +16 -17
  39. data/lib/mailslurp_client/models/page_template_projection.rb +16 -17
  40. data/lib/mailslurp_client/models/page_thread_projection.rb +16 -17
  41. data/lib/mailslurp_client/models/page_tracking_pixel_projection.rb +16 -17
  42. data/lib/mailslurp_client/models/page_unknown_missed_email_projection.rb +16 -17
  43. data/lib/mailslurp_client/models/page_webhook_projection.rb +16 -17
  44. data/lib/mailslurp_client/models/page_webhook_result.rb +16 -17
  45. data/lib/mailslurp_client/models/pageable_object.rb +10 -10
  46. data/lib/mailslurp_client/models/search_emails_options.rb +328 -0
  47. data/lib/mailslurp_client/models/search_inboxes_options.rb +376 -0
  48. data/lib/mailslurp_client/models/send_with_queue_result.rb +1 -0
  49. data/lib/mailslurp_client/models/sent_email_projection.rb +17 -16
  50. data/lib/mailslurp_client/models/thread_projection.rb +23 -23
  51. data/lib/mailslurp_client/models/tracking_pixel_projection.rb +10 -10
  52. data/lib/mailslurp_client/models/unknown_missed_email_projection.rb +10 -10
  53. data/lib/mailslurp_client/version.rb +1 -1
  54. data/lib/mailslurp_client.rb +2 -0
  55. metadata +4 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 99978a46a96b4204b28a127447fded7dff2c2b24080324f2fdad86bb9458af09
4
- data.tar.gz: 73816834c85b73ad98beddc512609599d0eb427a21f26e162611fe45cf7bcdac
3
+ metadata.gz: 962543de3268cc22b25947c5493aa6a2a977f5bb0b2c85a80c9259975f35b1e3
4
+ data.tar.gz: c12985a8264080271749a81da9967cb1fe7d9805c7db9eb22614d4eaca5fce0e
5
5
  SHA512:
6
- metadata.gz: 7b641786cc473ae378ec04d14c5161e2b9d91338f0f90aa14c92ed8c40bd88dd8b6c53c4679ab27ce426984dd3b78ec11072d517acb05a625645a2272206ad31
7
- data.tar.gz: 67ab483b9f7cead055adfb4fbce09ff804bbfb58cde962bc639daefa48132ed376364ac4fd2369e2682628632c0af6665126eed167b8fe32c0082e9948bf9e11
6
+ metadata.gz: 13e41d587d6d1e27dcf4361132e577fce0c08391d0cd36d11613979d5f7c88e81d1740d52940822e5358890da1b381777b9251f4422437cc115f0785739f6a9d
7
+ data.tar.gz: aa5652afc2d0170a63eeae3976f2b3c9d8f207dc5ca6ab847882c3e0f158a83a8f5da967554b75261dd42729452b8174500dd76f7ccfe4f3b5737d80939345e4
@@ -2281,6 +2281,70 @@ module MailSlurpClient
2281
2281
  return data, status_code, headers
2282
2282
  end
2283
2283
 
2284
+ # Get all emails by search criteria. Return in paginated form.
2285
+ # Search emails by given criteria return matches in paginated format. Searches against email recipients, sender, subject, email address and ID. Does not search email body
2286
+ # @param search_emails_options [SearchEmailsOptions]
2287
+ # @param [Hash] opts the optional parameters
2288
+ # @return [PageEmailProjection]
2289
+ def search_emails(search_emails_options, opts = {})
2290
+ data, _status_code, _headers = search_emails_with_http_info(search_emails_options, opts)
2291
+ data
2292
+ end
2293
+
2294
+ # Get all emails by search criteria. Return in paginated form.
2295
+ # Search emails by given criteria return matches in paginated format. Searches against email recipients, sender, subject, email address and ID. Does not search email body
2296
+ # @param search_emails_options [SearchEmailsOptions]
2297
+ # @param [Hash] opts the optional parameters
2298
+ # @return [Array<(PageEmailProjection, Integer, Hash)>] PageEmailProjection data, response status code and response headers
2299
+ def search_emails_with_http_info(search_emails_options, opts = {})
2300
+ if @api_client.config.debugging
2301
+ @api_client.config.logger.debug 'Calling API: EmailControllerApi.search_emails ...'
2302
+ end
2303
+ # verify the required parameter 'search_emails_options' is set
2304
+ if @api_client.config.client_side_validation && search_emails_options.nil?
2305
+ fail ArgumentError, "Missing the required parameter 'search_emails_options' when calling EmailControllerApi.search_emails"
2306
+ end
2307
+ # resource path
2308
+ local_var_path = '/emails/search'
2309
+
2310
+ # query parameters
2311
+ query_params = opts[:query_params] || {}
2312
+
2313
+ # header parameters
2314
+ header_params = opts[:header_params] || {}
2315
+ # HTTP header 'Accept' (if needed)
2316
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
2317
+ # HTTP header 'Content-Type'
2318
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2319
+
2320
+ # form parameters
2321
+ form_params = opts[:form_params] || {}
2322
+
2323
+ # http body (model)
2324
+ post_body = opts[:body] || @api_client.object_to_http_body(search_emails_options)
2325
+
2326
+ # return_type
2327
+ return_type = opts[:return_type] || 'PageEmailProjection'
2328
+
2329
+ # auth_names
2330
+ auth_names = opts[:auth_names] || ['API_KEY']
2331
+
2332
+ new_options = opts.merge(
2333
+ :header_params => header_params,
2334
+ :query_params => query_params,
2335
+ :form_params => form_params,
2336
+ :body => post_body,
2337
+ :auth_names => auth_names,
2338
+ :return_type => return_type
2339
+ )
2340
+
2341
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2342
+ if @api_client.config.debugging
2343
+ @api_client.config.logger.debug "API called: EmailControllerApi#search_emails\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2344
+ end
2345
+ return data, status_code, headers
2346
+ end
2347
+
2284
2348
  # Send email
2285
2349
  # Alias for `InboxController.sendEmail` method - see original method for full details. Sends an email from a given inbox that you have created. If no inbox is supplied a random inbox will be created for you and used to send the email.
2286
2350
  # @param send_email_options [SendEmailOptions]
@@ -2493,6 +2493,70 @@ module MailSlurpClient
2493
2493
  return data, status_code, headers
2494
2494
  end
2495
2495
 
2496
+ # Search all inboxes and return matching inboxes
2497
+ # Search inboxes and return in paginated form. The results are available on the `content` property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). You Can also filter by whether an inbox is favorited or use email address pattern. This method is the recommended way to query inboxes. The alternative `getInboxes` method returns a full list of inboxes but is limited to 100 results.
2498
+ # @param search_inboxes_options [SearchInboxesOptions]
2499
+ # @param [Hash] opts the optional parameters
2500
+ # @return [PageInboxProjection]
2501
+ def search_inboxes(search_inboxes_options, opts = {})
2502
+ data, _status_code, _headers = search_inboxes_with_http_info(search_inboxes_options, opts)
2503
+ data
2504
+ end
2505
+
2506
+ # Search all inboxes and return matching inboxes
2507
+ # Search inboxes and return in paginated form. The results are available on the &#x60;content&#x60; property of the returned object. This method allows for page index (zero based), page size (how many results to return), and a sort direction (based on createdAt time). You Can also filter by whether an inbox is favorited or use email address pattern. This method is the recommended way to query inboxes. The alternative &#x60;getInboxes&#x60; method returns a full list of inboxes but is limited to 100 results.
2508
+ # @param search_inboxes_options [SearchInboxesOptions]
2509
+ # @param [Hash] opts the optional parameters
2510
+ # @return [Array<(PageInboxProjection, Integer, Hash)>] PageInboxProjection data, response status code and response headers
2511
+ def search_inboxes_with_http_info(search_inboxes_options, opts = {})
2512
+ if @api_client.config.debugging
2513
+ @api_client.config.logger.debug 'Calling API: InboxControllerApi.search_inboxes ...'
2514
+ end
2515
+ # verify the required parameter 'search_inboxes_options' is set
2516
+ if @api_client.config.client_side_validation && search_inboxes_options.nil?
2517
+ fail ArgumentError, "Missing the required parameter 'search_inboxes_options' when calling InboxControllerApi.search_inboxes"
2518
+ end
2519
+ # resource path
2520
+ local_var_path = '/inboxes/search'
2521
+
2522
+ # query parameters
2523
+ query_params = opts[:query_params] || {}
2524
+
2525
+ # header parameters
2526
+ header_params = opts[:header_params] || {}
2527
+ # HTTP header 'Accept' (if needed)
2528
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
2529
+ # HTTP header 'Content-Type'
2530
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2531
+
2532
+ # form parameters
2533
+ form_params = opts[:form_params] || {}
2534
+
2535
+ # http body (model)
2536
+ post_body = opts[:body] || @api_client.object_to_http_body(search_inboxes_options)
2537
+
2538
+ # return_type
2539
+ return_type = opts[:return_type] || 'PageInboxProjection'
2540
+
2541
+ # auth_names
2542
+ auth_names = opts[:auth_names] || ['API_KEY']
2543
+
2544
+ new_options = opts.merge(
2545
+ :header_params => header_params,
2546
+ :query_params => query_params,
2547
+ :form_params => form_params,
2548
+ :body => post_body,
2549
+ :auth_names => auth_names,
2550
+ :return_type => return_type
2551
+ )
2552
+
2553
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2554
+ if @api_client.config.debugging
2555
+ @api_client.config.logger.debug "API called: InboxControllerApi#search_inboxes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2556
+ end
2557
+ return data, status_code, headers
2558
+ end
2559
+
2496
2560
  # Send Email
2497
2561
  # Send an email from an inbox's email address. The request body should contain the `SendEmailOptions` that include recipients, attachments, body etc. See `SendEmailOptions` for all available properties. Note the `inboxId` refers to the inbox's id not the inbox's email address. See https://www.mailslurp.com/guides/ for more information on how to send emails. This method does not return a sent email entity due to legacy reasons. To send and get a sent email as returned response use the sister method `sendEmailAndConfirm`.
2498
2562
  # @param inbox_id [String] ID of the inbox you want to send the email from
@@ -15,12 +15,12 @@ require 'date'
15
15
  module MailSlurpClient
16
16
  # Representation of a alias
17
17
  class AliasProjection
18
+ attr_accessor :inbox_id
19
+
18
20
  attr_accessor :email_address
19
21
 
20
22
  attr_accessor :user_id
21
23
 
22
- attr_accessor :inbox_id
23
-
24
24
  attr_accessor :use_threads
25
25
 
26
26
  attr_accessor :created_at
@@ -34,9 +34,9 @@ module MailSlurpClient
34
34
  # Attribute mapping from ruby-style variable name to JSON key.
35
35
  def self.attribute_map
36
36
  {
37
+ :'inbox_id' => :'inboxId',
37
38
  :'email_address' => :'emailAddress',
38
39
  :'user_id' => :'userId',
39
- :'inbox_id' => :'inboxId',
40
40
  :'use_threads' => :'useThreads',
41
41
  :'created_at' => :'createdAt',
42
42
  :'updated_at' => :'updatedAt',
@@ -48,9 +48,9 @@ module MailSlurpClient
48
48
  # Attribute type mapping.
49
49
  def self.openapi_types
50
50
  {
51
+ :'inbox_id' => :'String',
51
52
  :'email_address' => :'String',
52
53
  :'user_id' => :'String',
53
- :'inbox_id' => :'String',
54
54
  :'use_threads' => :'Boolean',
55
55
  :'created_at' => :'DateTime',
56
56
  :'updated_at' => :'DateTime',
@@ -80,6 +80,10 @@ module MailSlurpClient
80
80
  h[k.to_sym] = v
81
81
  }
82
82
 
83
+ if attributes.key?(:'inbox_id')
84
+ self.inbox_id = attributes[:'inbox_id']
85
+ end
86
+
83
87
  if attributes.key?(:'email_address')
84
88
  self.email_address = attributes[:'email_address']
85
89
  end
@@ -88,10 +92,6 @@ module MailSlurpClient
88
92
  self.user_id = attributes[:'user_id']
89
93
  end
90
94
 
91
- if attributes.key?(:'inbox_id')
92
- self.inbox_id = attributes[:'inbox_id']
93
- end
94
-
95
95
  if attributes.key?(:'use_threads')
96
96
  self.use_threads = attributes[:'use_threads']
97
97
  end
@@ -117,6 +117,10 @@ module MailSlurpClient
117
117
  # @return Array for valid properties with the reasons
118
118
  def list_invalid_properties
119
119
  invalid_properties = Array.new
120
+ if @inbox_id.nil?
121
+ invalid_properties.push('invalid value for "inbox_id", inbox_id cannot be nil.')
122
+ end
123
+
120
124
  if @email_address.nil?
121
125
  invalid_properties.push('invalid value for "email_address", email_address cannot be nil.')
122
126
  end
@@ -125,10 +129,6 @@ module MailSlurpClient
125
129
  invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
126
130
  end
127
131
 
128
- if @inbox_id.nil?
129
- invalid_properties.push('invalid value for "inbox_id", inbox_id cannot be nil.')
130
- end
131
-
132
132
  if @created_at.nil?
133
133
  invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
134
134
  end
@@ -147,9 +147,9 @@ module MailSlurpClient
147
147
  # Check to see if the all the properties in the model are valid
148
148
  # @return true if the model is valid
149
149
  def valid?
150
+ return false if @inbox_id.nil?
150
151
  return false if @email_address.nil?
151
152
  return false if @user_id.nil?
152
- return false if @inbox_id.nil?
153
153
  return false if @created_at.nil?
154
154
  return false if @updated_at.nil?
155
155
  return false if @id.nil?
@@ -161,9 +161,9 @@ module MailSlurpClient
161
161
  def ==(o)
162
162
  return true if self.equal?(o)
163
163
  self.class == o.class &&
164
+ inbox_id == o.inbox_id &&
164
165
  email_address == o.email_address &&
165
166
  user_id == o.user_id &&
166
- inbox_id == o.inbox_id &&
167
167
  use_threads == o.use_threads &&
168
168
  created_at == o.created_at &&
169
169
  updated_at == o.updated_at &&
@@ -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
- [email_address, user_id, inbox_id, use_threads, created_at, updated_at, name, id].hash
183
+ [inbox_id, email_address, user_id, use_threads, created_at, updated_at, name, id].hash
184
184
  end
185
185
 
186
186
  # Builds the object from hash
@@ -15,8 +15,6 @@ require 'date'
15
15
  module MailSlurpClient
16
16
  # Bounced email event
17
17
  class BounceProjection
18
- attr_accessor :subject
19
-
20
18
  attr_accessor :sender
21
19
 
22
20
  attr_accessor :bounce_type
@@ -25,16 +23,18 @@ module MailSlurpClient
25
23
 
26
24
  attr_accessor :created_at
27
25
 
26
+ attr_accessor :subject
27
+
28
28
  attr_accessor :id
29
29
 
30
30
  # Attribute mapping from ruby-style variable name to JSON key.
31
31
  def self.attribute_map
32
32
  {
33
- :'subject' => :'subject',
34
33
  :'sender' => :'sender',
35
34
  :'bounce_type' => :'bounceType',
36
35
  :'bounce_mta' => :'bounceMta',
37
36
  :'created_at' => :'createdAt',
37
+ :'subject' => :'subject',
38
38
  :'id' => :'id'
39
39
  }
40
40
  end
@@ -42,11 +42,11 @@ module MailSlurpClient
42
42
  # Attribute type mapping.
43
43
  def self.openapi_types
44
44
  {
45
- :'subject' => :'String',
46
45
  :'sender' => :'String',
47
46
  :'bounce_type' => :'String',
48
47
  :'bounce_mta' => :'String',
49
48
  :'created_at' => :'DateTime',
49
+ :'subject' => :'String',
50
50
  :'id' => :'String'
51
51
  }
52
52
  end
@@ -54,9 +54,9 @@ module MailSlurpClient
54
54
  # List of attributes with nullable: true
55
55
  def self.openapi_nullable
56
56
  Set.new([
57
- :'subject',
58
57
  :'bounce_type',
59
58
  :'bounce_mta',
59
+ :'subject',
60
60
  ])
61
61
  end
62
62
 
@@ -75,10 +75,6 @@ module MailSlurpClient
75
75
  h[k.to_sym] = v
76
76
  }
77
77
 
78
- if attributes.key?(:'subject')
79
- self.subject = attributes[:'subject']
80
- end
81
-
82
78
  if attributes.key?(:'sender')
83
79
  self.sender = attributes[:'sender']
84
80
  end
@@ -95,6 +91,10 @@ module MailSlurpClient
95
91
  self.created_at = attributes[:'created_at']
96
92
  end
97
93
 
94
+ if attributes.key?(:'subject')
95
+ self.subject = attributes[:'subject']
96
+ end
97
+
98
98
  if attributes.key?(:'id')
99
99
  self.id = attributes[:'id']
100
100
  end
@@ -128,11 +128,11 @@ module MailSlurpClient
128
128
  def ==(o)
129
129
  return true if self.equal?(o)
130
130
  self.class == o.class &&
131
- subject == o.subject &&
132
131
  sender == o.sender &&
133
132
  bounce_type == o.bounce_type &&
134
133
  bounce_mta == o.bounce_mta &&
135
134
  created_at == o.created_at &&
135
+ subject == o.subject &&
136
136
  id == o.id
137
137
  end
138
138
 
@@ -145,7 +145,7 @@ module MailSlurpClient
145
145
  # Calculates hash code according to all attributes.
146
146
  # @return [Integer] Hash code
147
147
  def hash
148
- [subject, sender, bounce_type, bounce_mta, created_at, id].hash
148
+ [sender, bounce_type, bounce_mta, created_at, subject, id].hash
149
149
  end
150
150
 
151
151
  # Builds the object from hash
@@ -15,10 +15,10 @@ require 'date'
15
15
  module MailSlurpClient
16
16
  # Connector
17
17
  class ConnectorProjection
18
- attr_accessor :user_id
19
-
20
18
  attr_accessor :inbox_id
21
19
 
20
+ attr_accessor :user_id
21
+
22
22
  attr_accessor :sync_enabled
23
23
 
24
24
  attr_accessor :connector_type
@@ -56,8 +56,8 @@ module MailSlurpClient
56
56
  # Attribute mapping from ruby-style variable name to JSON key.
57
57
  def self.attribute_map
58
58
  {
59
- :'user_id' => :'userId',
60
59
  :'inbox_id' => :'inboxId',
60
+ :'user_id' => :'userId',
61
61
  :'sync_enabled' => :'syncEnabled',
62
62
  :'connector_type' => :'connectorType',
63
63
  :'sync_schedule_type' => :'syncScheduleType',
@@ -70,8 +70,8 @@ module MailSlurpClient
70
70
  # Attribute type mapping.
71
71
  def self.openapi_types
72
72
  {
73
- :'user_id' => :'String',
74
73
  :'inbox_id' => :'String',
74
+ :'user_id' => :'String',
75
75
  :'sync_enabled' => :'Boolean',
76
76
  :'connector_type' => :'String',
77
77
  :'sync_schedule_type' => :'String',
@@ -102,14 +102,14 @@ module MailSlurpClient
102
102
  h[k.to_sym] = v
103
103
  }
104
104
 
105
- if attributes.key?(:'user_id')
106
- self.user_id = attributes[:'user_id']
107
- end
108
-
109
105
  if attributes.key?(:'inbox_id')
110
106
  self.inbox_id = attributes[:'inbox_id']
111
107
  end
112
108
 
109
+ if attributes.key?(:'user_id')
110
+ self.user_id = attributes[:'user_id']
111
+ end
112
+
113
113
  if attributes.key?(:'sync_enabled')
114
114
  self.sync_enabled = attributes[:'sync_enabled']
115
115
  end
@@ -139,14 +139,14 @@ module MailSlurpClient
139
139
  # @return Array for valid properties with the reasons
140
140
  def list_invalid_properties
141
141
  invalid_properties = Array.new
142
- if @user_id.nil?
143
- invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
144
- end
145
-
146
142
  if @inbox_id.nil?
147
143
  invalid_properties.push('invalid value for "inbox_id", inbox_id cannot be nil.')
148
144
  end
149
145
 
146
+ if @user_id.nil?
147
+ invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
148
+ end
149
+
150
150
  if @sync_enabled.nil?
151
151
  invalid_properties.push('invalid value for "sync_enabled", sync_enabled cannot be nil.')
152
152
  end
@@ -169,8 +169,8 @@ module MailSlurpClient
169
169
  # Check to see if the all the properties in the model are valid
170
170
  # @return true if the model is valid
171
171
  def valid?
172
- return false if @user_id.nil?
173
172
  return false if @inbox_id.nil?
173
+ return false if @user_id.nil?
174
174
  return false if @sync_enabled.nil?
175
175
  return false if @connector_type.nil?
176
176
  connector_type_validator = EnumAttributeValidator.new('String', ["IMAP"])
@@ -207,8 +207,8 @@ module MailSlurpClient
207
207
  def ==(o)
208
208
  return true if self.equal?(o)
209
209
  self.class == o.class &&
210
- user_id == o.user_id &&
211
210
  inbox_id == o.inbox_id &&
211
+ user_id == o.user_id &&
212
212
  sync_enabled == o.sync_enabled &&
213
213
  connector_type == o.connector_type &&
214
214
  sync_schedule_type == o.sync_schedule_type &&
@@ -226,7 +226,7 @@ module MailSlurpClient
226
226
  # Calculates hash code according to all attributes.
227
227
  # @return [Integer] Hash code
228
228
  def hash
229
- [user_id, inbox_id, sync_enabled, connector_type, sync_schedule_type, sync_interval, created_at, id].hash
229
+ [inbox_id, user_id, sync_enabled, connector_type, sync_schedule_type, sync_interval, created_at, id].hash
230
230
  end
231
231
 
232
232
  # Builds the object from hash
@@ -15,20 +15,18 @@ require 'date'
15
15
  module MailSlurpClient
16
16
  # A compact representation of a full email. Used in list endpoints to keep response sizes low. Body and attachments are not included. To get all fields of the email use the `getEmail` method with the email projection's ID. See `EmailDto` for documentation on projection properties.
17
17
  class EmailProjection
18
- attr_accessor :subject
19
-
20
18
  attr_accessor :attachments
21
19
 
22
20
  attr_accessor :inbox_id
23
21
 
24
22
  attr_accessor :to
25
23
 
24
+ attr_accessor :domain_id
25
+
26
26
  attr_accessor :bcc
27
27
 
28
28
  attr_accessor :cc
29
29
 
30
- attr_accessor :domain_id
31
-
32
30
  attr_accessor :read
33
31
 
34
32
  attr_accessor :body_excerpt
@@ -41,6 +39,8 @@ module MailSlurpClient
41
39
 
42
40
  attr_accessor :created_at
43
41
 
42
+ attr_accessor :subject
43
+
44
44
  attr_accessor :id
45
45
 
46
46
  attr_accessor :from
@@ -48,19 +48,19 @@ module MailSlurpClient
48
48
  # Attribute mapping from ruby-style variable name to JSON key.
49
49
  def self.attribute_map
50
50
  {
51
- :'subject' => :'subject',
52
51
  :'attachments' => :'attachments',
53
52
  :'inbox_id' => :'inboxId',
54
53
  :'to' => :'to',
54
+ :'domain_id' => :'domainId',
55
55
  :'bcc' => :'bcc',
56
56
  :'cc' => :'cc',
57
- :'domain_id' => :'domainId',
58
57
  :'read' => :'read',
59
58
  :'body_excerpt' => :'bodyExcerpt',
60
59
  :'team_access' => :'teamAccess',
61
60
  :'body_md5_hash' => :'bodyMD5Hash',
62
61
  :'text_excerpt' => :'textExcerpt',
63
62
  :'created_at' => :'createdAt',
63
+ :'subject' => :'subject',
64
64
  :'id' => :'id',
65
65
  :'from' => :'from'
66
66
  }
@@ -69,19 +69,19 @@ module MailSlurpClient
69
69
  # Attribute type mapping.
70
70
  def self.openapi_types
71
71
  {
72
- :'subject' => :'String',
73
72
  :'attachments' => :'Array<String>',
74
73
  :'inbox_id' => :'String',
75
74
  :'to' => :'Array<String>',
75
+ :'domain_id' => :'String',
76
76
  :'bcc' => :'Array<String>',
77
77
  :'cc' => :'Array<String>',
78
- :'domain_id' => :'String',
79
78
  :'read' => :'Boolean',
80
79
  :'body_excerpt' => :'String',
81
80
  :'team_access' => :'Boolean',
82
81
  :'body_md5_hash' => :'String',
83
82
  :'text_excerpt' => :'String',
84
83
  :'created_at' => :'DateTime',
84
+ :'subject' => :'String',
85
85
  :'id' => :'String',
86
86
  :'from' => :'String'
87
87
  }
@@ -90,14 +90,14 @@ module MailSlurpClient
90
90
  # List of attributes with nullable: true
91
91
  def self.openapi_nullable
92
92
  Set.new([
93
- :'subject',
94
93
  :'attachments',
94
+ :'domain_id',
95
95
  :'bcc',
96
96
  :'cc',
97
- :'domain_id',
98
97
  :'body_excerpt',
99
98
  :'body_md5_hash',
100
99
  :'text_excerpt',
100
+ :'subject',
101
101
  :'from'
102
102
  ])
103
103
  end
@@ -117,10 +117,6 @@ module MailSlurpClient
117
117
  h[k.to_sym] = v
118
118
  }
119
119
 
120
- if attributes.key?(:'subject')
121
- self.subject = attributes[:'subject']
122
- end
123
-
124
120
  if attributes.key?(:'attachments')
125
121
  if (value = attributes[:'attachments']).is_a?(Array)
126
122
  self.attachments = value
@@ -137,6 +133,10 @@ module MailSlurpClient
137
133
  end
138
134
  end
139
135
 
136
+ if attributes.key?(:'domain_id')
137
+ self.domain_id = attributes[:'domain_id']
138
+ end
139
+
140
140
  if attributes.key?(:'bcc')
141
141
  if (value = attributes[:'bcc']).is_a?(Array)
142
142
  self.bcc = value
@@ -149,10 +149,6 @@ module MailSlurpClient
149
149
  end
150
150
  end
151
151
 
152
- if attributes.key?(:'domain_id')
153
- self.domain_id = attributes[:'domain_id']
154
- end
155
-
156
152
  if attributes.key?(:'read')
157
153
  self.read = attributes[:'read']
158
154
  end
@@ -177,6 +173,10 @@ module MailSlurpClient
177
173
  self.created_at = attributes[:'created_at']
178
174
  end
179
175
 
176
+ if attributes.key?(:'subject')
177
+ self.subject = attributes[:'subject']
178
+ end
179
+
180
180
  if attributes.key?(:'id')
181
181
  self.id = attributes[:'id']
182
182
  end
@@ -234,19 +234,19 @@ module MailSlurpClient
234
234
  def ==(o)
235
235
  return true if self.equal?(o)
236
236
  self.class == o.class &&
237
- subject == o.subject &&
238
237
  attachments == o.attachments &&
239
238
  inbox_id == o.inbox_id &&
240
239
  to == o.to &&
240
+ domain_id == o.domain_id &&
241
241
  bcc == o.bcc &&
242
242
  cc == o.cc &&
243
- domain_id == o.domain_id &&
244
243
  read == o.read &&
245
244
  body_excerpt == o.body_excerpt &&
246
245
  team_access == o.team_access &&
247
246
  body_md5_hash == o.body_md5_hash &&
248
247
  text_excerpt == o.text_excerpt &&
249
248
  created_at == o.created_at &&
249
+ subject == o.subject &&
250
250
  id == o.id &&
251
251
  from == o.from
252
252
  end
@@ -260,7 +260,7 @@ module MailSlurpClient
260
260
  # Calculates hash code according to all attributes.
261
261
  # @return [Integer] Hash code
262
262
  def hash
263
- [subject, attachments, inbox_id, to, bcc, cc, domain_id, read, body_excerpt, team_access, body_md5_hash, text_excerpt, created_at, id, from].hash
263
+ [attachments, inbox_id, to, domain_id, bcc, cc, read, body_excerpt, team_access, body_md5_hash, text_excerpt, created_at, subject, id, from].hash
264
264
  end
265
265
 
266
266
  # Builds the object from hash