mailslurp_client 15.20.0 → 15.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mailslurp_client/api/attachment_controller_api.rb +6 -0
  3. data/lib/mailslurp_client/api/bounce_controller_api.rb +79 -0
  4. data/lib/mailslurp_client/api/inbox_controller_api.rb +56 -2
  5. data/lib/mailslurp_client/api/o_auth_connection_api.rb +170 -0
  6. data/lib/mailslurp_client/api/phone_controller_api.rb +269 -1
  7. data/lib/mailslurp_client/api/user_controller_api.rb +267 -0
  8. data/lib/mailslurp_client/models/alias_projection.rb +29 -29
  9. data/lib/mailslurp_client/models/alias_thread_projection.rb +39 -39
  10. data/lib/mailslurp_client/models/attachment_projection.rb +25 -25
  11. data/lib/mailslurp_client/models/bounce_projection.rb +22 -22
  12. data/lib/mailslurp_client/models/bounce_recipient_projection.rb +10 -10
  13. data/lib/mailslurp_client/models/connector_event_projection.rb +15 -15
  14. data/lib/mailslurp_client/models/connector_projection.rb +15 -15
  15. data/lib/mailslurp_client/models/contact_projection.rb +10 -10
  16. data/lib/mailslurp_client/models/create_emergency_address_options.rb +2 -2
  17. data/lib/mailslurp_client/models/create_o_auth_connection_result.rb +211 -0
  18. data/lib/mailslurp_client/models/create_o_auth_exchange_result.rb +229 -0
  19. data/lib/mailslurp_client/models/create_phone_number_options.rb +284 -0
  20. data/lib/mailslurp_client/models/domain_dto.rb +27 -1
  21. data/lib/mailslurp_client/models/email.rb +12 -1
  22. data/lib/mailslurp_client/models/email_preview.rb +15 -5
  23. data/lib/mailslurp_client/models/email_projection.rb +42 -32
  24. data/lib/mailslurp_client/models/email_thread_projection.rb +52 -52
  25. data/lib/mailslurp_client/models/emergency_address.rb +2 -2
  26. data/lib/mailslurp_client/models/emergency_address_dto.rb +2 -2
  27. data/lib/mailslurp_client/models/entity_automation_item_projection.rb +295 -0
  28. data/lib/mailslurp_client/models/entity_event_item_projection.rb +303 -0
  29. data/lib/mailslurp_client/models/entity_favourite_item_projection.rb +296 -0
  30. data/lib/mailslurp_client/models/expired_inbox_record_projection.rb +15 -15
  31. data/lib/mailslurp_client/models/guest_portal_user_projection.rb +39 -39
  32. data/lib/mailslurp_client/models/inbox_dto.rb +2 -2
  33. data/lib/mailslurp_client/models/inbox_forwarder_event_projection.rb +10 -10
  34. data/lib/mailslurp_client/models/inbox_preview.rb +2 -2
  35. data/lib/mailslurp_client/models/inbox_replier_event_projection.rb +10 -10
  36. data/lib/mailslurp_client/models/list_unsubscribe_recipient_projection.rb +15 -15
  37. data/lib/mailslurp_client/models/missed_email_projection.rb +14 -14
  38. data/lib/mailslurp_client/models/opt_in_identity_projection.rb +29 -29
  39. data/lib/mailslurp_client/models/organization_inbox_projection.rb +2 -2
  40. data/lib/mailslurp_client/models/page_entity_automation_items.rb +309 -0
  41. data/lib/mailslurp_client/models/page_entity_event_items.rb +309 -0
  42. data/lib/mailslurp_client/models/page_entity_favourite_items.rb +309 -0
  43. data/lib/mailslurp_client/models/page_phone_message_thread_item_projection.rb +309 -0
  44. data/lib/mailslurp_client/models/page_phone_message_thread_projection.rb +309 -0
  45. data/lib/mailslurp_client/models/page_reputation_items.rb +309 -0
  46. data/lib/mailslurp_client/models/phone_message_thread_item_projection.rb +315 -0
  47. data/lib/mailslurp_client/models/phone_message_thread_projection.rb +315 -0
  48. data/lib/mailslurp_client/models/phone_number_dto.rb +2 -2
  49. data/lib/mailslurp_client/models/phone_number_projection.rb +17 -17
  50. data/lib/mailslurp_client/models/phone_plan_availability_item.rb +2 -2
  51. data/lib/mailslurp_client/models/phone_plan_dto.rb +2 -2
  52. data/lib/mailslurp_client/models/plus_address_projection.rb +29 -29
  53. data/lib/mailslurp_client/models/reputation_item_projection.rb +317 -0
  54. data/lib/mailslurp_client/models/search_inboxes_options.rb +2 -2
  55. data/lib/mailslurp_client/models/sent_email_dto.rb +12 -1
  56. data/lib/mailslurp_client/models/sent_email_projection.rb +25 -25
  57. data/lib/mailslurp_client/models/sent_sms_projection.rb +15 -15
  58. data/lib/mailslurp_client/models/sms_preview.rb +15 -1
  59. data/lib/mailslurp_client/models/sms_projection.rb +15 -15
  60. data/lib/mailslurp_client/models/template_projection.rb +15 -15
  61. data/lib/mailslurp_client/models/tracking_pixel_projection.rb +15 -15
  62. data/lib/mailslurp_client/models/unknown_missed_email_projection.rb +10 -10
  63. data/lib/mailslurp_client/models/wait_for_sms_conditions.rb +1 -1
  64. data/lib/mailslurp_client/models/webhook_projection.rb +47 -47
  65. data/lib/mailslurp_client/version.rb +1 -1
  66. data/lib/mailslurp_client.rb +16 -0
  67. metadata +18 -2
@@ -19,6 +19,273 @@ module MailSlurpClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # @param [Hash] opts the optional parameters
23
+ # @option opts [Integer] :page Optional page index (default to 0)
24
+ # @option opts [Integer] :size Optional page size (default to 20)
25
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'DESC')
26
+ # @option opts [DateTime] :since Filter by created at after the given timestamp
27
+ # @option opts [DateTime] :before Filter by created at before the given timestamp
28
+ # @option opts [String] :inbox_id Optional inbox ID
29
+ # @option opts [String] :phone_id Optional phone ID
30
+ # @option opts [String] :filter Optional automation type filter
31
+ # @return [PageEntityAutomationItems]
32
+ def get_entity_automations(opts = {})
33
+ data, _status_code, _headers = get_entity_automations_with_http_info(opts)
34
+ data
35
+ end
36
+
37
+ # @param [Hash] opts the optional parameters
38
+ # @option opts [Integer] :page Optional page index
39
+ # @option opts [Integer] :size Optional page size
40
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
41
+ # @option opts [DateTime] :since Filter by created at after the given timestamp
42
+ # @option opts [DateTime] :before Filter by created at before the given timestamp
43
+ # @option opts [String] :inbox_id Optional inbox ID
44
+ # @option opts [String] :phone_id Optional phone ID
45
+ # @option opts [String] :filter Optional automation type filter
46
+ # @return [Array<(PageEntityAutomationItems, Integer, Hash)>] PageEntityAutomationItems data, response status code and response headers
47
+ def get_entity_automations_with_http_info(opts = {})
48
+ if @api_client.config.debugging
49
+ @api_client.config.logger.debug 'Calling API: UserControllerApi.get_entity_automations ...'
50
+ end
51
+ if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] > 100
52
+ fail ArgumentError, 'invalid value for "opts[:"size"]" when calling UserControllerApi.get_entity_automations, must be smaller than or equal to 100.'
53
+ end
54
+
55
+ allowable_values = ["ASC", "DESC"]
56
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
57
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
58
+ end
59
+ allowable_values = ["INBOX_FORWARDER", "INBOX_REPLIER", "INBOX_RULESET"]
60
+ if @api_client.config.client_side_validation && opts[:'filter'] && !allowable_values.include?(opts[:'filter'])
61
+ fail ArgumentError, "invalid value for \"filter\", must be one of #{allowable_values}"
62
+ end
63
+ # resource path
64
+ local_var_path = '/user/automations'
65
+
66
+ # query parameters
67
+ query_params = opts[:query_params] || {}
68
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
69
+ query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
70
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
71
+ query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
72
+ query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
73
+ query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
74
+ query_params[:'phoneId'] = opts[:'phone_id'] if !opts[:'phone_id'].nil?
75
+ query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
76
+
77
+ # header parameters
78
+ header_params = opts[:header_params] || {}
79
+ # HTTP header 'Accept' (if needed)
80
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
81
+
82
+ # form parameters
83
+ form_params = opts[:form_params] || {}
84
+
85
+ # http body (model)
86
+ post_body = opts[:body]
87
+
88
+ # return_type
89
+ return_type = opts[:return_type] || 'PageEntityAutomationItems'
90
+
91
+ # auth_names
92
+ auth_names = opts[:auth_names] || ['API_KEY']
93
+
94
+ new_options = opts.merge(
95
+ :header_params => header_params,
96
+ :query_params => query_params,
97
+ :form_params => form_params,
98
+ :body => post_body,
99
+ :auth_names => auth_names,
100
+ :return_type => return_type
101
+ )
102
+
103
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
104
+ if @api_client.config.debugging
105
+ @api_client.config.logger.debug "API called: UserControllerApi#get_entity_automations\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
106
+ end
107
+ return data, status_code, headers
108
+ end
109
+
110
+ # @param [Hash] opts the optional parameters
111
+ # @option opts [Integer] :page Optional page index (default to 0)
112
+ # @option opts [Integer] :size Optional page size (default to 20)
113
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'DESC')
114
+ # @option opts [DateTime] :since Filter by created at after the given timestamp
115
+ # @option opts [DateTime] :before Filter by created at before the given timestamp
116
+ # @option opts [String] :inbox_id Optional inbox ID
117
+ # @option opts [String] :email_id Optional email ID
118
+ # @option opts [String] :phone_id Optional phone ID
119
+ # @option opts [String] :sms_id Optional SMS ID
120
+ # @option opts [String] :attachment_id Optional attachment ID
121
+ # @option opts [String] :filter Optional type filter
122
+ # @return [PageEntityEventItems]
123
+ def get_entity_events(opts = {})
124
+ data, _status_code, _headers = get_entity_events_with_http_info(opts)
125
+ data
126
+ end
127
+
128
+ # @param [Hash] opts the optional parameters
129
+ # @option opts [Integer] :page Optional page index
130
+ # @option opts [Integer] :size Optional page size
131
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
132
+ # @option opts [DateTime] :since Filter by created at after the given timestamp
133
+ # @option opts [DateTime] :before Filter by created at before the given timestamp
134
+ # @option opts [String] :inbox_id Optional inbox ID
135
+ # @option opts [String] :email_id Optional email ID
136
+ # @option opts [String] :phone_id Optional phone ID
137
+ # @option opts [String] :sms_id Optional SMS ID
138
+ # @option opts [String] :attachment_id Optional attachment ID
139
+ # @option opts [String] :filter Optional type filter
140
+ # @return [Array<(PageEntityEventItems, Integer, Hash)>] PageEntityEventItems data, response status code and response headers
141
+ def get_entity_events_with_http_info(opts = {})
142
+ if @api_client.config.debugging
143
+ @api_client.config.logger.debug 'Calling API: UserControllerApi.get_entity_events ...'
144
+ end
145
+ if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] > 100
146
+ fail ArgumentError, 'invalid value for "opts[:"size"]" when calling UserControllerApi.get_entity_events, must be smaller than or equal to 100.'
147
+ end
148
+
149
+ allowable_values = ["ASC", "DESC"]
150
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
151
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
152
+ end
153
+ allowable_values = ["WEBHOOK_EVENT", "INBOX_FORWARDER_EVENT", "INBOX_REPLIER_EVENT", "INBOX_RULESET_EVENT", "ALIAS_EVENT"]
154
+ if @api_client.config.client_side_validation && opts[:'filter'] && !allowable_values.include?(opts[:'filter'])
155
+ fail ArgumentError, "invalid value for \"filter\", must be one of #{allowable_values}"
156
+ end
157
+ # resource path
158
+ local_var_path = '/user/events'
159
+
160
+ # query parameters
161
+ query_params = opts[:query_params] || {}
162
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
163
+ query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
164
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
165
+ query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
166
+ query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
167
+ query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
168
+ query_params[:'emailId'] = opts[:'email_id'] if !opts[:'email_id'].nil?
169
+ query_params[:'phoneId'] = opts[:'phone_id'] if !opts[:'phone_id'].nil?
170
+ query_params[:'smsId'] = opts[:'sms_id'] if !opts[:'sms_id'].nil?
171
+ query_params[:'attachmentId'] = opts[:'attachment_id'] if !opts[:'attachment_id'].nil?
172
+ query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
173
+
174
+ # header parameters
175
+ header_params = opts[:header_params] || {}
176
+ # HTTP header 'Accept' (if needed)
177
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
178
+
179
+ # form parameters
180
+ form_params = opts[:form_params] || {}
181
+
182
+ # http body (model)
183
+ post_body = opts[:body]
184
+
185
+ # return_type
186
+ return_type = opts[:return_type] || 'PageEntityEventItems'
187
+
188
+ # auth_names
189
+ auth_names = opts[:auth_names] || ['API_KEY']
190
+
191
+ new_options = opts.merge(
192
+ :header_params => header_params,
193
+ :query_params => query_params,
194
+ :form_params => form_params,
195
+ :body => post_body,
196
+ :auth_names => auth_names,
197
+ :return_type => return_type
198
+ )
199
+
200
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
201
+ if @api_client.config.debugging
202
+ @api_client.config.logger.debug "API called: UserControllerApi#get_entity_events\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
203
+ end
204
+ return data, status_code, headers
205
+ end
206
+
207
+ # @param [Hash] opts the optional parameters
208
+ # @option opts [Integer] :page Optional page index (default to 0)
209
+ # @option opts [Integer] :size Optional page size (default to 20)
210
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'DESC')
211
+ # @option opts [DateTime] :since Filter by created at after the given timestamp
212
+ # @option opts [DateTime] :before Filter by created at before the given timestamp
213
+ # @option opts [String] :filter Optional type filter
214
+ # @return [PageEntityFavouriteItems]
215
+ def get_entity_favorites(opts = {})
216
+ data, _status_code, _headers = get_entity_favorites_with_http_info(opts)
217
+ data
218
+ end
219
+
220
+ # @param [Hash] opts the optional parameters
221
+ # @option opts [Integer] :page Optional page index
222
+ # @option opts [Integer] :size Optional page size
223
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
224
+ # @option opts [DateTime] :since Filter by created at after the given timestamp
225
+ # @option opts [DateTime] :before Filter by created at before the given timestamp
226
+ # @option opts [String] :filter Optional type filter
227
+ # @return [Array<(PageEntityFavouriteItems, Integer, Hash)>] PageEntityFavouriteItems data, response status code and response headers
228
+ def get_entity_favorites_with_http_info(opts = {})
229
+ if @api_client.config.debugging
230
+ @api_client.config.logger.debug 'Calling API: UserControllerApi.get_entity_favorites ...'
231
+ end
232
+ if @api_client.config.client_side_validation && !opts[:'size'].nil? && opts[:'size'] > 100
233
+ fail ArgumentError, 'invalid value for "opts[:"size"]" when calling UserControllerApi.get_entity_favorites, must be smaller than or equal to 100.'
234
+ end
235
+
236
+ allowable_values = ["ASC", "DESC"]
237
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
238
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
239
+ end
240
+ allowable_values = ["INBOX", "EMAIL", "ATTACHMENT", "PHONE", "SMS"]
241
+ if @api_client.config.client_side_validation && opts[:'filter'] && !allowable_values.include?(opts[:'filter'])
242
+ fail ArgumentError, "invalid value for \"filter\", must be one of #{allowable_values}"
243
+ end
244
+ # resource path
245
+ local_var_path = '/user/favorites'
246
+
247
+ # query parameters
248
+ query_params = opts[:query_params] || {}
249
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
250
+ query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
251
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
252
+ query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
253
+ query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
254
+ query_params[:'filter'] = opts[:'filter'] if !opts[:'filter'].nil?
255
+
256
+ # header parameters
257
+ header_params = opts[:header_params] || {}
258
+ # HTTP header 'Accept' (if needed)
259
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
260
+
261
+ # form parameters
262
+ form_params = opts[:form_params] || {}
263
+
264
+ # http body (model)
265
+ post_body = opts[:body]
266
+
267
+ # return_type
268
+ return_type = opts[:return_type] || 'PageEntityFavouriteItems'
269
+
270
+ # auth_names
271
+ auth_names = opts[:auth_names] || ['API_KEY']
272
+
273
+ new_options = opts.merge(
274
+ :header_params => header_params,
275
+ :query_params => query_params,
276
+ :form_params => form_params,
277
+ :body => post_body,
278
+ :auth_names => auth_names,
279
+ :return_type => return_type
280
+ )
281
+
282
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
283
+ if @api_client.config.debugging
284
+ @api_client.config.logger.debug "API called: UserControllerApi#get_entity_favorites\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
285
+ end
286
+ return data, status_code, headers
287
+ end
288
+
22
289
  # Utility function to extract properties from JSON objects in language where this is cumbersome.
23
290
  # @param property [String] JSON property name or dot separated path selector such as &#x60;a.b.c&#x60;
24
291
  # @param body [Object]
@@ -15,16 +15,16 @@ 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 :updated_at
21
-
22
18
  attr_accessor :user_id
23
19
 
24
20
  attr_accessor :email_address
25
21
 
26
22
  attr_accessor :inbox_id
27
23
 
24
+ attr_accessor :updated_at
25
+
26
+ attr_accessor :created_at
27
+
28
28
  attr_accessor :use_threads
29
29
 
30
30
  attr_accessor :name
@@ -34,11 +34,11 @@ module MailSlurpClient
34
34
  # Attribute mapping from ruby-style variable name to JSON key.
35
35
  def self.attribute_map
36
36
  {
37
- :'created_at' => :'createdAt',
38
- :'updated_at' => :'updatedAt',
39
37
  :'user_id' => :'userId',
40
38
  :'email_address' => :'emailAddress',
41
39
  :'inbox_id' => :'inboxId',
40
+ :'updated_at' => :'updatedAt',
41
+ :'created_at' => :'createdAt',
42
42
  :'use_threads' => :'useThreads',
43
43
  :'name' => :'name',
44
44
  :'id' => :'id'
@@ -48,11 +48,11 @@ module MailSlurpClient
48
48
  # Attribute type mapping.
49
49
  def self.openapi_types
50
50
  {
51
- :'created_at' => :'DateTime',
52
- :'updated_at' => :'DateTime',
53
51
  :'user_id' => :'String',
54
52
  :'email_address' => :'String',
55
53
  :'inbox_id' => :'String',
54
+ :'updated_at' => :'DateTime',
55
+ :'created_at' => :'DateTime',
56
56
  :'use_threads' => :'Boolean',
57
57
  :'name' => :'String',
58
58
  :'id' => :'String'
@@ -80,14 +80,6 @@ module MailSlurpClient
80
80
  h[k.to_sym] = v
81
81
  }
82
82
 
83
- if attributes.key?(:'created_at')
84
- self.created_at = attributes[:'created_at']
85
- end
86
-
87
- if attributes.key?(:'updated_at')
88
- self.updated_at = attributes[:'updated_at']
89
- end
90
-
91
83
  if attributes.key?(:'user_id')
92
84
  self.user_id = attributes[:'user_id']
93
85
  end
@@ -100,6 +92,14 @@ module MailSlurpClient
100
92
  self.inbox_id = attributes[:'inbox_id']
101
93
  end
102
94
 
95
+ if attributes.key?(:'updated_at')
96
+ self.updated_at = attributes[:'updated_at']
97
+ end
98
+
99
+ if attributes.key?(:'created_at')
100
+ self.created_at = attributes[:'created_at']
101
+ end
102
+
103
103
  if attributes.key?(:'use_threads')
104
104
  self.use_threads = attributes[:'use_threads']
105
105
  end
@@ -117,14 +117,6 @@ 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 @created_at.nil?
121
- invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
122
- end
123
-
124
- if @updated_at.nil?
125
- invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
126
- end
127
-
128
120
  if @user_id.nil?
129
121
  invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
130
122
  end
@@ -137,6 +129,14 @@ module MailSlurpClient
137
129
  invalid_properties.push('invalid value for "inbox_id", inbox_id cannot be nil.')
138
130
  end
139
131
 
132
+ if @updated_at.nil?
133
+ invalid_properties.push('invalid value for "updated_at", updated_at 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
+ end
139
+
140
140
  if @id.nil?
141
141
  invalid_properties.push('invalid value for "id", id cannot be nil.')
142
142
  end
@@ -147,11 +147,11 @@ 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 @created_at.nil?
151
- return false if @updated_at.nil?
152
150
  return false if @user_id.nil?
153
151
  return false if @email_address.nil?
154
152
  return false if @inbox_id.nil?
153
+ return false if @updated_at.nil?
154
+ return false if @created_at.nil?
155
155
  return false if @id.nil?
156
156
  true
157
157
  end
@@ -161,11 +161,11 @@ module MailSlurpClient
161
161
  def ==(o)
162
162
  return true if self.equal?(o)
163
163
  self.class == o.class &&
164
- created_at == o.created_at &&
165
- updated_at == o.updated_at &&
166
164
  user_id == o.user_id &&
167
165
  email_address == o.email_address &&
168
166
  inbox_id == o.inbox_id &&
167
+ updated_at == o.updated_at &&
168
+ created_at == o.created_at &&
169
169
  use_threads == o.use_threads &&
170
170
  name == o.name &&
171
171
  id == o.id
@@ -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
- [created_at, updated_at, user_id, email_address, inbox_id, use_threads, name, id].hash
183
+ [user_id, email_address, inbox_id, updated_at, created_at, use_threads, name, id].hash
184
184
  end
185
185
 
186
186
  # Builds the object from hash
@@ -15,21 +15,18 @@ require 'date'
15
15
  module MailSlurpClient
16
16
  # A thread is a message thread created for a message received by an alias
17
17
  class AliasThreadProjection
18
- # Thread subject
19
- attr_accessor :subject
20
-
21
- # Created at DateTime
22
- attr_accessor :created_at
23
-
24
- # Updated at DateTime
25
- attr_accessor :updated_at
26
-
27
18
  # User ID
28
19
  attr_accessor :user_id
29
20
 
30
21
  # Inbox ID
31
22
  attr_accessor :inbox_id
32
23
 
24
+ # Updated at DateTime
25
+ attr_accessor :updated_at
26
+
27
+ # Created at DateTime
28
+ attr_accessor :created_at
29
+
33
30
  # To recipients
34
31
  attr_accessor :to
35
32
 
@@ -42,6 +39,9 @@ module MailSlurpClient
42
39
  # Alias ID
43
40
  attr_accessor :alias_id
44
41
 
42
+ # Thread subject
43
+ attr_accessor :subject
44
+
45
45
  # Name of thread
46
46
  attr_accessor :name
47
47
 
@@ -51,15 +51,15 @@ module MailSlurpClient
51
51
  # Attribute mapping from ruby-style variable name to JSON key.
52
52
  def self.attribute_map
53
53
  {
54
- :'subject' => :'subject',
55
- :'created_at' => :'createdAt',
56
- :'updated_at' => :'updatedAt',
57
54
  :'user_id' => :'userId',
58
55
  :'inbox_id' => :'inboxId',
56
+ :'updated_at' => :'updatedAt',
57
+ :'created_at' => :'createdAt',
59
58
  :'to' => :'to',
60
59
  :'cc' => :'cc',
61
60
  :'bcc' => :'bcc',
62
61
  :'alias_id' => :'aliasId',
62
+ :'subject' => :'subject',
63
63
  :'name' => :'name',
64
64
  :'id' => :'id'
65
65
  }
@@ -68,15 +68,15 @@ module MailSlurpClient
68
68
  # Attribute type mapping.
69
69
  def self.openapi_types
70
70
  {
71
- :'subject' => :'String',
72
- :'created_at' => :'DateTime',
73
- :'updated_at' => :'DateTime',
74
71
  :'user_id' => :'String',
75
72
  :'inbox_id' => :'String',
73
+ :'updated_at' => :'DateTime',
74
+ :'created_at' => :'DateTime',
76
75
  :'to' => :'Array<String>',
77
76
  :'cc' => :'Array<String>',
78
77
  :'bcc' => :'Array<String>',
79
78
  :'alias_id' => :'String',
79
+ :'subject' => :'String',
80
80
  :'name' => :'String',
81
81
  :'id' => :'String'
82
82
  }
@@ -103,24 +103,20 @@ module MailSlurpClient
103
103
  h[k.to_sym] = v
104
104
  }
105
105
 
106
- if attributes.key?(:'subject')
107
- self.subject = attributes[:'subject']
106
+ if attributes.key?(:'user_id')
107
+ self.user_id = attributes[:'user_id']
108
108
  end
109
109
 
110
- if attributes.key?(:'created_at')
111
- self.created_at = attributes[:'created_at']
110
+ if attributes.key?(:'inbox_id')
111
+ self.inbox_id = attributes[:'inbox_id']
112
112
  end
113
113
 
114
114
  if attributes.key?(:'updated_at')
115
115
  self.updated_at = attributes[:'updated_at']
116
116
  end
117
117
 
118
- if attributes.key?(:'user_id')
119
- self.user_id = attributes[:'user_id']
120
- end
121
-
122
- if attributes.key?(:'inbox_id')
123
- self.inbox_id = attributes[:'inbox_id']
118
+ if attributes.key?(:'created_at')
119
+ self.created_at = attributes[:'created_at']
124
120
  end
125
121
 
126
122
  if attributes.key?(:'to')
@@ -145,6 +141,10 @@ module MailSlurpClient
145
141
  self.alias_id = attributes[:'alias_id']
146
142
  end
147
143
 
144
+ if attributes.key?(:'subject')
145
+ self.subject = attributes[:'subject']
146
+ end
147
+
148
148
  if attributes.key?(:'name')
149
149
  self.name = attributes[:'name']
150
150
  end
@@ -158,14 +158,6 @@ module MailSlurpClient
158
158
  # @return Array for valid properties with the reasons
159
159
  def list_invalid_properties
160
160
  invalid_properties = Array.new
161
- if @created_at.nil?
162
- invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
163
- end
164
-
165
- if @updated_at.nil?
166
- invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
167
- end
168
-
169
161
  if @user_id.nil?
170
162
  invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
171
163
  end
@@ -174,6 +166,14 @@ module MailSlurpClient
174
166
  invalid_properties.push('invalid value for "inbox_id", inbox_id cannot be nil.')
175
167
  end
176
168
 
169
+ if @updated_at.nil?
170
+ invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
171
+ end
172
+
173
+ if @created_at.nil?
174
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
175
+ end
176
+
177
177
  if @to.nil?
178
178
  invalid_properties.push('invalid value for "to", to cannot be nil.')
179
179
  end
@@ -192,10 +192,10 @@ module MailSlurpClient
192
192
  # Check to see if the all the properties in the model are valid
193
193
  # @return true if the model is valid
194
194
  def valid?
195
- return false if @created_at.nil?
196
- return false if @updated_at.nil?
197
195
  return false if @user_id.nil?
198
196
  return false if @inbox_id.nil?
197
+ return false if @updated_at.nil?
198
+ return false if @created_at.nil?
199
199
  return false if @to.nil?
200
200
  return false if @alias_id.nil?
201
201
  return false if @id.nil?
@@ -207,15 +207,15 @@ module MailSlurpClient
207
207
  def ==(o)
208
208
  return true if self.equal?(o)
209
209
  self.class == o.class &&
210
- subject == o.subject &&
211
- created_at == o.created_at &&
212
- updated_at == o.updated_at &&
213
210
  user_id == o.user_id &&
214
211
  inbox_id == o.inbox_id &&
212
+ updated_at == o.updated_at &&
213
+ created_at == o.created_at &&
215
214
  to == o.to &&
216
215
  cc == o.cc &&
217
216
  bcc == o.bcc &&
218
217
  alias_id == o.alias_id &&
218
+ subject == o.subject &&
219
219
  name == o.name &&
220
220
  id == o.id
221
221
  end
@@ -229,7 +229,7 @@ module MailSlurpClient
229
229
  # Calculates hash code according to all attributes.
230
230
  # @return [Integer] Hash code
231
231
  def hash
232
- [subject, created_at, updated_at, user_id, inbox_id, to, cc, bcc, alias_id, name, id].hash
232
+ [user_id, inbox_id, updated_at, created_at, to, cc, bcc, alias_id, subject, name, id].hash
233
233
  end
234
234
 
235
235
  # Builds the object from hash