mailslurp_client 15.17.6 → 15.17.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (26) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -0
  3. data/lib/mailslurp_client/api/connector_controller_api.rb +619 -0
  4. data/lib/mailslurp_client/models/bounce_projection.rb +15 -15
  5. data/lib/mailslurp_client/models/connector_dto.rb +407 -0
  6. data/lib/mailslurp_client/models/connector_projection.rb +346 -0
  7. data/lib/mailslurp_client/models/connector_sync_event_dto.rb +310 -0
  8. data/lib/mailslurp_client/models/connector_sync_event_projection.rb +306 -0
  9. data/lib/mailslurp_client/models/connector_sync_request_result.rb +224 -0
  10. data/lib/mailslurp_client/models/connector_sync_request_result_exception.rb +246 -0
  11. data/lib/mailslurp_client/models/connector_sync_request_result_exception_cause.rb +237 -0
  12. data/lib/mailslurp_client/models/connector_sync_request_result_exception_cause_stack_trace.rb +269 -0
  13. data/lib/mailslurp_client/models/connector_sync_request_result_exception_cause_suppressed.rb +226 -0
  14. data/lib/mailslurp_client/models/connector_sync_result.rb +222 -0
  15. data/lib/mailslurp_client/models/create_connector_imap_options.rb +267 -0
  16. data/lib/mailslurp_client/models/create_connector_options.rb +338 -0
  17. data/lib/mailslurp_client/models/email_projection.rb +10 -10
  18. data/lib/mailslurp_client/models/inbox_replier_event_projection.rb +13 -13
  19. data/lib/mailslurp_client/models/inbox_ruleset_dto.rb +1 -0
  20. data/lib/mailslurp_client/models/missed_email_projection.rb +11 -11
  21. data/lib/mailslurp_client/models/page_connector.rb +308 -0
  22. data/lib/mailslurp_client/models/page_connector_sync_events.rb +308 -0
  23. data/lib/mailslurp_client/models/thread_projection.rb +11 -11
  24. data/lib/mailslurp_client/version.rb +1 -1
  25. data/lib/mailslurp_client.rb +15 -0
  26. metadata +17 -2
@@ -0,0 +1,338 @@
1
+ =begin
2
+ #MailSlurp API
3
+
4
+ #MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository
5
+
6
+ The version of the OpenAPI document: 6.5.2
7
+ Contact: contact@mailslurp.dev
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module MailSlurpClient
16
+ class CreateConnectorOptions
17
+ attr_accessor :connector_type
18
+
19
+ attr_accessor :connector_auth_type
20
+
21
+ attr_accessor :imap_settings
22
+
23
+ attr_accessor :inbox_id
24
+
25
+ attr_accessor :sync_enabled
26
+
27
+ attr_accessor :sync_schedule_type
28
+
29
+ attr_accessor :sync_interval
30
+
31
+ class EnumAttributeValidator
32
+ attr_reader :datatype
33
+ attr_reader :allowable_values
34
+
35
+ def initialize(datatype, allowable_values)
36
+ @allowable_values = allowable_values.map do |value|
37
+ case datatype.to_s
38
+ when /Integer/i
39
+ value.to_i
40
+ when /Float/i
41
+ value.to_f
42
+ else
43
+ value
44
+ end
45
+ end
46
+ end
47
+
48
+ def valid?(value)
49
+ !value || allowable_values.include?(value)
50
+ end
51
+ end
52
+
53
+ # Attribute mapping from ruby-style variable name to JSON key.
54
+ def self.attribute_map
55
+ {
56
+ :'connector_type' => :'connectorType',
57
+ :'connector_auth_type' => :'connectorAuthType',
58
+ :'imap_settings' => :'imapSettings',
59
+ :'inbox_id' => :'inboxId',
60
+ :'sync_enabled' => :'syncEnabled',
61
+ :'sync_schedule_type' => :'syncScheduleType',
62
+ :'sync_interval' => :'syncInterval'
63
+ }
64
+ end
65
+
66
+ # Attribute type mapping.
67
+ def self.openapi_types
68
+ {
69
+ :'connector_type' => :'String',
70
+ :'connector_auth_type' => :'String',
71
+ :'imap_settings' => :'CreateConnectorImapOptions',
72
+ :'inbox_id' => :'String',
73
+ :'sync_enabled' => :'Boolean',
74
+ :'sync_schedule_type' => :'String',
75
+ :'sync_interval' => :'Integer'
76
+ }
77
+ end
78
+
79
+ # List of attributes with nullable: true
80
+ def self.openapi_nullable
81
+ Set.new([
82
+ ])
83
+ end
84
+
85
+ # Initializes the object
86
+ # @param [Hash] attributes Model attributes in the form of hash
87
+ def initialize(attributes = {})
88
+ if (!attributes.is_a?(Hash))
89
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::CreateConnectorOptions` initialize method"
90
+ end
91
+
92
+ # check to see if the attribute exists and convert string to symbol for hash key
93
+ attributes = attributes.each_with_object({}) { |(k, v), h|
94
+ if (!self.class.attribute_map.key?(k.to_sym))
95
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::CreateConnectorOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
96
+ end
97
+ h[k.to_sym] = v
98
+ }
99
+
100
+ if attributes.key?(:'connector_type')
101
+ self.connector_type = attributes[:'connector_type']
102
+ end
103
+
104
+ if attributes.key?(:'connector_auth_type')
105
+ self.connector_auth_type = attributes[:'connector_auth_type']
106
+ end
107
+
108
+ if attributes.key?(:'imap_settings')
109
+ self.imap_settings = attributes[:'imap_settings']
110
+ end
111
+
112
+ if attributes.key?(:'inbox_id')
113
+ self.inbox_id = attributes[:'inbox_id']
114
+ end
115
+
116
+ if attributes.key?(:'sync_enabled')
117
+ self.sync_enabled = attributes[:'sync_enabled']
118
+ end
119
+
120
+ if attributes.key?(:'sync_schedule_type')
121
+ self.sync_schedule_type = attributes[:'sync_schedule_type']
122
+ end
123
+
124
+ if attributes.key?(:'sync_interval')
125
+ self.sync_interval = attributes[:'sync_interval']
126
+ end
127
+ end
128
+
129
+ # Show invalid properties with the reasons. Usually used together with valid?
130
+ # @return Array for valid properties with the reasons
131
+ def list_invalid_properties
132
+ invalid_properties = Array.new
133
+ if @connector_type.nil?
134
+ invalid_properties.push('invalid value for "connector_type", connector_type cannot be nil.')
135
+ end
136
+
137
+ if @connector_auth_type.nil?
138
+ invalid_properties.push('invalid value for "connector_auth_type", connector_auth_type cannot be nil.')
139
+ end
140
+
141
+ if @sync_enabled.nil?
142
+ invalid_properties.push('invalid value for "sync_enabled", sync_enabled cannot be nil.')
143
+ end
144
+
145
+ if @sync_schedule_type.nil?
146
+ invalid_properties.push('invalid value for "sync_schedule_type", sync_schedule_type cannot be nil.')
147
+ end
148
+
149
+ invalid_properties
150
+ end
151
+
152
+ # Check to see if the all the properties in the model are valid
153
+ # @return true if the model is valid
154
+ def valid?
155
+ return false if @connector_type.nil?
156
+ connector_type_validator = EnumAttributeValidator.new('String', ["IMAP"])
157
+ return false unless connector_type_validator.valid?(@connector_type)
158
+ return false if @connector_auth_type.nil?
159
+ connector_auth_type_validator = EnumAttributeValidator.new('String', ["PLAIN_TEXT"])
160
+ return false unless connector_auth_type_validator.valid?(@connector_auth_type)
161
+ return false if @sync_enabled.nil?
162
+ return false if @sync_schedule_type.nil?
163
+ sync_schedule_type_validator = EnumAttributeValidator.new('String', ["INTERVAL"])
164
+ return false unless sync_schedule_type_validator.valid?(@sync_schedule_type)
165
+ true
166
+ end
167
+
168
+ # Custom attribute writer method checking allowed values (enum).
169
+ # @param [Object] connector_type Object to be assigned
170
+ def connector_type=(connector_type)
171
+ validator = EnumAttributeValidator.new('String', ["IMAP"])
172
+ unless validator.valid?(connector_type)
173
+ fail ArgumentError, "invalid value for \"connector_type\", must be one of #{validator.allowable_values}."
174
+ end
175
+ @connector_type = connector_type
176
+ end
177
+
178
+ # Custom attribute writer method checking allowed values (enum).
179
+ # @param [Object] connector_auth_type Object to be assigned
180
+ def connector_auth_type=(connector_auth_type)
181
+ validator = EnumAttributeValidator.new('String', ["PLAIN_TEXT"])
182
+ unless validator.valid?(connector_auth_type)
183
+ fail ArgumentError, "invalid value for \"connector_auth_type\", must be one of #{validator.allowable_values}."
184
+ end
185
+ @connector_auth_type = connector_auth_type
186
+ end
187
+
188
+ # Custom attribute writer method checking allowed values (enum).
189
+ # @param [Object] sync_schedule_type Object to be assigned
190
+ def sync_schedule_type=(sync_schedule_type)
191
+ validator = EnumAttributeValidator.new('String', ["INTERVAL"])
192
+ unless validator.valid?(sync_schedule_type)
193
+ fail ArgumentError, "invalid value for \"sync_schedule_type\", must be one of #{validator.allowable_values}."
194
+ end
195
+ @sync_schedule_type = sync_schedule_type
196
+ end
197
+
198
+ # Checks equality by comparing each attribute.
199
+ # @param [Object] Object to be compared
200
+ def ==(o)
201
+ return true if self.equal?(o)
202
+ self.class == o.class &&
203
+ connector_type == o.connector_type &&
204
+ connector_auth_type == o.connector_auth_type &&
205
+ imap_settings == o.imap_settings &&
206
+ inbox_id == o.inbox_id &&
207
+ sync_enabled == o.sync_enabled &&
208
+ sync_schedule_type == o.sync_schedule_type &&
209
+ sync_interval == o.sync_interval
210
+ end
211
+
212
+ # @see the `==` method
213
+ # @param [Object] Object to be compared
214
+ def eql?(o)
215
+ self == o
216
+ end
217
+
218
+ # Calculates hash code according to all attributes.
219
+ # @return [Integer] Hash code
220
+ def hash
221
+ [connector_type, connector_auth_type, imap_settings, inbox_id, sync_enabled, sync_schedule_type, sync_interval].hash
222
+ end
223
+
224
+ # Builds the object from hash
225
+ # @param [Hash] attributes Model attributes in the form of hash
226
+ # @return [Object] Returns the model itself
227
+ def self.build_from_hash(attributes)
228
+ new.build_from_hash(attributes)
229
+ end
230
+
231
+ # Builds the object from hash
232
+ # @param [Hash] attributes Model attributes in the form of hash
233
+ # @return [Object] Returns the model itself
234
+ def build_from_hash(attributes)
235
+ return nil unless attributes.is_a?(Hash)
236
+ self.class.openapi_types.each_pair do |key, type|
237
+ if type =~ /\AArray<(.*)>/i
238
+ # check to ensure the input is an array given that the attribute
239
+ # is documented as an array but the input is not
240
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
241
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
242
+ end
243
+ elsif !attributes[self.class.attribute_map[key]].nil?
244
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
245
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
246
+ end
247
+
248
+ self
249
+ end
250
+
251
+ # Deserializes the data based on type
252
+ # @param string type Data type
253
+ # @param string value Value to be deserialized
254
+ # @return [Object] Deserialized data
255
+ def _deserialize(type, value)
256
+ case type.to_sym
257
+ when :DateTime
258
+ DateTime.parse(value)
259
+ when :Date
260
+ Date.parse(value)
261
+ when :String
262
+ value.to_s
263
+ when :Integer
264
+ value.to_i
265
+ when :Float
266
+ value.to_f
267
+ when :Boolean
268
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
269
+ true
270
+ else
271
+ false
272
+ end
273
+ when :Object
274
+ # generic object (usually a Hash), return directly
275
+ value
276
+ when /\AArray<(?<inner_type>.+)>\z/
277
+ inner_type = Regexp.last_match[:inner_type]
278
+ value.map { |v| _deserialize(inner_type, v) }
279
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
280
+ k_type = Regexp.last_match[:k_type]
281
+ v_type = Regexp.last_match[:v_type]
282
+ {}.tap do |hash|
283
+ value.each do |k, v|
284
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
285
+ end
286
+ end
287
+ else # model
288
+ MailSlurpClient.const_get(type).build_from_hash(value)
289
+ end
290
+ end
291
+
292
+ # Returns the string representation of the object
293
+ # @return [String] String presentation of the object
294
+ def to_s
295
+ to_hash.to_s
296
+ end
297
+
298
+ # to_body is an alias to to_hash (backward compatibility)
299
+ # @return [Hash] Returns the object in the form of hash
300
+ def to_body
301
+ to_hash
302
+ end
303
+
304
+ # Returns the object in the form of hash
305
+ # @return [Hash] Returns the object in the form of hash
306
+ def to_hash
307
+ hash = {}
308
+ self.class.attribute_map.each_pair do |attr, param|
309
+ value = self.send(attr)
310
+ if value.nil?
311
+ is_nullable = self.class.openapi_nullable.include?(attr)
312
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
313
+ end
314
+
315
+ hash[param] = _to_hash(value)
316
+ end
317
+ hash
318
+ end
319
+
320
+ # Outputs non-array value in the form of hash
321
+ # For object, use to_hash. Otherwise, just return the value
322
+ # @param [Object] value Any valid value
323
+ # @return [Hash] Returns the value in the form of hash
324
+ def _to_hash(value)
325
+ if value.is_a?(Array)
326
+ value.compact.map { |v| _to_hash(v) }
327
+ elsif value.is_a?(Hash)
328
+ {}.tap do |hash|
329
+ value.each { |k, v| hash[k] = _to_hash(v) }
330
+ end
331
+ elsif value.respond_to? :to_hash
332
+ value.to_hash
333
+ else
334
+ value
335
+ end
336
+ end
337
+ end
338
+ end
@@ -19,10 +19,10 @@ module MailSlurpClient
19
19
 
20
20
  attr_accessor :from
21
21
 
22
- attr_accessor :inbox_id
23
-
24
22
  attr_accessor :subject
25
23
 
24
+ attr_accessor :inbox_id
25
+
26
26
  attr_accessor :attachments
27
27
 
28
28
  attr_accessor :created_at
@@ -48,8 +48,8 @@ module MailSlurpClient
48
48
  {
49
49
  :'id' => :'id',
50
50
  :'from' => :'from',
51
- :'inbox_id' => :'inboxId',
52
51
  :'subject' => :'subject',
52
+ :'inbox_id' => :'inboxId',
53
53
  :'attachments' => :'attachments',
54
54
  :'created_at' => :'createdAt',
55
55
  :'to' => :'to',
@@ -68,8 +68,8 @@ module MailSlurpClient
68
68
  {
69
69
  :'id' => :'String',
70
70
  :'from' => :'String',
71
- :'inbox_id' => :'String',
72
71
  :'subject' => :'String',
72
+ :'inbox_id' => :'String',
73
73
  :'attachments' => :'Array<String>',
74
74
  :'created_at' => :'DateTime',
75
75
  :'to' => :'Array<String>',
@@ -120,14 +120,14 @@ module MailSlurpClient
120
120
  self.from = attributes[:'from']
121
121
  end
122
122
 
123
- if attributes.key?(:'inbox_id')
124
- self.inbox_id = attributes[:'inbox_id']
125
- end
126
-
127
123
  if attributes.key?(:'subject')
128
124
  self.subject = attributes[:'subject']
129
125
  end
130
126
 
127
+ if attributes.key?(:'inbox_id')
128
+ self.inbox_id = attributes[:'inbox_id']
129
+ end
130
+
131
131
  if attributes.key?(:'attachments')
132
132
  if (value = attributes[:'attachments']).is_a?(Array)
133
133
  self.attachments = value
@@ -227,8 +227,8 @@ module MailSlurpClient
227
227
  self.class == o.class &&
228
228
  id == o.id &&
229
229
  from == o.from &&
230
- inbox_id == o.inbox_id &&
231
230
  subject == o.subject &&
231
+ inbox_id == o.inbox_id &&
232
232
  attachments == o.attachments &&
233
233
  created_at == o.created_at &&
234
234
  to == o.to &&
@@ -250,7 +250,7 @@ module MailSlurpClient
250
250
  # Calculates hash code according to all attributes.
251
251
  # @return [Integer] Hash code
252
252
  def hash
253
- [id, from, inbox_id, subject, attachments, created_at, to, bcc, cc, domain_id, read, body_excerpt, team_access, body_md5_hash].hash
253
+ [id, from, subject, inbox_id, attachments, created_at, to, bcc, cc, domain_id, read, body_excerpt, team_access, body_md5_hash].hash
254
254
  end
255
255
 
256
256
  # Builds the object from hash
@@ -21,14 +21,14 @@ module MailSlurpClient
21
21
 
22
22
  attr_accessor :status
23
23
 
24
+ attr_accessor :recipients
25
+
24
26
  attr_accessor :email_id
25
27
 
26
28
  attr_accessor :inbox_id
27
29
 
28
30
  attr_accessor :user_id
29
31
 
30
- attr_accessor :recipients
31
-
32
32
  attr_accessor :created_at
33
33
 
34
34
  attr_accessor :sent_id
@@ -63,10 +63,10 @@ module MailSlurpClient
63
63
  :'message' => :'message',
64
64
  :'id' => :'id',
65
65
  :'status' => :'status',
66
+ :'recipients' => :'recipients',
66
67
  :'email_id' => :'emailId',
67
68
  :'inbox_id' => :'inboxId',
68
69
  :'user_id' => :'userId',
69
- :'recipients' => :'recipients',
70
70
  :'created_at' => :'createdAt',
71
71
  :'sent_id' => :'sentId',
72
72
  :'replier_id' => :'replierId'
@@ -79,10 +79,10 @@ module MailSlurpClient
79
79
  :'message' => :'String',
80
80
  :'id' => :'String',
81
81
  :'status' => :'String',
82
+ :'recipients' => :'Array<String>',
82
83
  :'email_id' => :'String',
83
84
  :'inbox_id' => :'String',
84
85
  :'user_id' => :'String',
85
- :'recipients' => :'Array<String>',
86
86
  :'created_at' => :'DateTime',
87
87
  :'sent_id' => :'String',
88
88
  :'replier_id' => :'String'
@@ -95,10 +95,10 @@ module MailSlurpClient
95
95
  :'message',
96
96
  :'id',
97
97
  :'status',
98
+ :'recipients',
98
99
  :'email_id',
99
100
  :'inbox_id',
100
101
  :'user_id',
101
- :'recipients',
102
102
  :'sent_id',
103
103
  :'replier_id'
104
104
  ])
@@ -131,6 +131,12 @@ module MailSlurpClient
131
131
  self.status = attributes[:'status']
132
132
  end
133
133
 
134
+ if attributes.key?(:'recipients')
135
+ if (value = attributes[:'recipients']).is_a?(Array)
136
+ self.recipients = value
137
+ end
138
+ end
139
+
134
140
  if attributes.key?(:'email_id')
135
141
  self.email_id = attributes[:'email_id']
136
142
  end
@@ -143,12 +149,6 @@ module MailSlurpClient
143
149
  self.user_id = attributes[:'user_id']
144
150
  end
145
151
 
146
- if attributes.key?(:'recipients')
147
- if (value = attributes[:'recipients']).is_a?(Array)
148
- self.recipients = value
149
- end
150
- end
151
-
152
152
  if attributes.key?(:'created_at')
153
153
  self.created_at = attributes[:'created_at']
154
154
  end
@@ -200,10 +200,10 @@ module MailSlurpClient
200
200
  message == o.message &&
201
201
  id == o.id &&
202
202
  status == o.status &&
203
+ recipients == o.recipients &&
203
204
  email_id == o.email_id &&
204
205
  inbox_id == o.inbox_id &&
205
206
  user_id == o.user_id &&
206
- recipients == o.recipients &&
207
207
  created_at == o.created_at &&
208
208
  sent_id == o.sent_id &&
209
209
  replier_id == o.replier_id
@@ -218,7 +218,7 @@ module MailSlurpClient
218
218
  # Calculates hash code according to all attributes.
219
219
  # @return [Integer] Hash code
220
220
  def hash
221
- [message, id, status, email_id, inbox_id, user_id, recipients, created_at, sent_id, replier_id].hash
221
+ [message, id, status, recipients, email_id, inbox_id, user_id, created_at, sent_id, replier_id].hash
222
222
  end
223
223
 
224
224
  # Builds the object from hash
@@ -80,6 +80,7 @@ module MailSlurpClient
80
80
  # List of attributes with nullable: true
81
81
  def self.openapi_nullable
82
82
  Set.new([
83
+ :'inbox_id',
83
84
  ])
84
85
  end
85
86
 
@@ -19,10 +19,10 @@ module MailSlurpClient
19
19
 
20
20
  attr_accessor :from
21
21
 
22
- attr_accessor :user_id
23
-
24
22
  attr_accessor :subject
25
23
 
24
+ attr_accessor :user_id
25
+
26
26
  attr_accessor :created_at
27
27
 
28
28
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -30,8 +30,8 @@ module MailSlurpClient
30
30
  {
31
31
  :'id' => :'id',
32
32
  :'from' => :'from',
33
- :'user_id' => :'userId',
34
33
  :'subject' => :'subject',
34
+ :'user_id' => :'userId',
35
35
  :'created_at' => :'createdAt'
36
36
  }
37
37
  end
@@ -41,8 +41,8 @@ module MailSlurpClient
41
41
  {
42
42
  :'id' => :'String',
43
43
  :'from' => :'String',
44
- :'user_id' => :'String',
45
44
  :'subject' => :'String',
45
+ :'user_id' => :'String',
46
46
  :'created_at' => :'DateTime'
47
47
  }
48
48
  end
@@ -51,8 +51,8 @@ module MailSlurpClient
51
51
  def self.openapi_nullable
52
52
  Set.new([
53
53
  :'from',
54
- :'user_id',
55
54
  :'subject',
55
+ :'user_id',
56
56
  ])
57
57
  end
58
58
 
@@ -79,14 +79,14 @@ module MailSlurpClient
79
79
  self.from = attributes[:'from']
80
80
  end
81
81
 
82
- if attributes.key?(:'user_id')
83
- self.user_id = attributes[:'user_id']
84
- end
85
-
86
82
  if attributes.key?(:'subject')
87
83
  self.subject = attributes[:'subject']
88
84
  end
89
85
 
86
+ if attributes.key?(:'user_id')
87
+ self.user_id = attributes[:'user_id']
88
+ end
89
+
90
90
  if attributes.key?(:'created_at')
91
91
  self.created_at = attributes[:'created_at']
92
92
  end
@@ -122,8 +122,8 @@ module MailSlurpClient
122
122
  self.class == o.class &&
123
123
  id == o.id &&
124
124
  from == o.from &&
125
- user_id == o.user_id &&
126
125
  subject == o.subject &&
126
+ user_id == o.user_id &&
127
127
  created_at == o.created_at
128
128
  end
129
129
 
@@ -136,7 +136,7 @@ module MailSlurpClient
136
136
  # Calculates hash code according to all attributes.
137
137
  # @return [Integer] Hash code
138
138
  def hash
139
- [id, from, user_id, subject, created_at].hash
139
+ [id, from, subject, user_id, created_at].hash
140
140
  end
141
141
 
142
142
  # Builds the object from hash