mailslurp_client 16.1.5 → 16.2.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.
@@ -0,0 +1,271 @@
1
+ =begin
2
+ #MailSlurp API
3
+
4
+ #MailSlurp is an API for sending and receiving emails and SMS from dynamically allocated email addresses and phone numbers. 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 CreateTotpDeviceOtpAuthUrlOptions
17
+ attr_accessor :otp_auth_url
18
+
19
+ attr_accessor :name
20
+
21
+ attr_accessor :username
22
+
23
+ attr_accessor :issuer
24
+
25
+ attr_accessor :digits
26
+
27
+ attr_accessor :period
28
+
29
+ attr_accessor :algorithm
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ def self.attribute_map
33
+ {
34
+ :'otp_auth_url' => :'otpAuthUrl',
35
+ :'name' => :'name',
36
+ :'username' => :'username',
37
+ :'issuer' => :'issuer',
38
+ :'digits' => :'digits',
39
+ :'period' => :'period',
40
+ :'algorithm' => :'algorithm'
41
+ }
42
+ end
43
+
44
+ # Attribute type mapping.
45
+ def self.openapi_types
46
+ {
47
+ :'otp_auth_url' => :'String',
48
+ :'name' => :'String',
49
+ :'username' => :'String',
50
+ :'issuer' => :'String',
51
+ :'digits' => :'Integer',
52
+ :'period' => :'Integer',
53
+ :'algorithm' => :'String'
54
+ }
55
+ end
56
+
57
+ # List of attributes with nullable: true
58
+ def self.openapi_nullable
59
+ Set.new([
60
+ :'name',
61
+ :'username',
62
+ :'issuer',
63
+ :'digits',
64
+ :'period',
65
+ :'algorithm'
66
+ ])
67
+ end
68
+
69
+ # Initializes the object
70
+ # @param [Hash] attributes Model attributes in the form of hash
71
+ def initialize(attributes = {})
72
+ if (!attributes.is_a?(Hash))
73
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::CreateTotpDeviceOtpAuthUrlOptions` initialize method"
74
+ end
75
+
76
+ # check to see if the attribute exists and convert string to symbol for hash key
77
+ attributes = attributes.each_with_object({}) { |(k, v), h|
78
+ if (!self.class.attribute_map.key?(k.to_sym))
79
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::CreateTotpDeviceOtpAuthUrlOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
80
+ end
81
+ h[k.to_sym] = v
82
+ }
83
+
84
+ if attributes.key?(:'otp_auth_url')
85
+ self.otp_auth_url = attributes[:'otp_auth_url']
86
+ end
87
+
88
+ if attributes.key?(:'name')
89
+ self.name = attributes[:'name']
90
+ end
91
+
92
+ if attributes.key?(:'username')
93
+ self.username = attributes[:'username']
94
+ end
95
+
96
+ if attributes.key?(:'issuer')
97
+ self.issuer = attributes[:'issuer']
98
+ end
99
+
100
+ if attributes.key?(:'digits')
101
+ self.digits = attributes[:'digits']
102
+ end
103
+
104
+ if attributes.key?(:'period')
105
+ self.period = attributes[:'period']
106
+ end
107
+
108
+ if attributes.key?(:'algorithm')
109
+ self.algorithm = attributes[:'algorithm']
110
+ end
111
+ end
112
+
113
+ # Show invalid properties with the reasons. Usually used together with valid?
114
+ # @return Array for valid properties with the reasons
115
+ def list_invalid_properties
116
+ invalid_properties = Array.new
117
+ if @otp_auth_url.nil?
118
+ invalid_properties.push('invalid value for "otp_auth_url", otp_auth_url cannot be nil.')
119
+ end
120
+
121
+ invalid_properties
122
+ end
123
+
124
+ # Check to see if the all the properties in the model are valid
125
+ # @return true if the model is valid
126
+ def valid?
127
+ return false if @otp_auth_url.nil?
128
+ true
129
+ end
130
+
131
+ # Checks equality by comparing each attribute.
132
+ # @param [Object] Object to be compared
133
+ def ==(o)
134
+ return true if self.equal?(o)
135
+ self.class == o.class &&
136
+ otp_auth_url == o.otp_auth_url &&
137
+ name == o.name &&
138
+ username == o.username &&
139
+ issuer == o.issuer &&
140
+ digits == o.digits &&
141
+ period == o.period &&
142
+ algorithm == o.algorithm
143
+ end
144
+
145
+ # @see the `==` method
146
+ # @param [Object] Object to be compared
147
+ def eql?(o)
148
+ self == o
149
+ end
150
+
151
+ # Calculates hash code according to all attributes.
152
+ # @return [Integer] Hash code
153
+ def hash
154
+ [otp_auth_url, name, username, issuer, digits, period, algorithm].hash
155
+ end
156
+
157
+ # Builds the object from hash
158
+ # @param [Hash] attributes Model attributes in the form of hash
159
+ # @return [Object] Returns the model itself
160
+ def self.build_from_hash(attributes)
161
+ new.build_from_hash(attributes)
162
+ end
163
+
164
+ # Builds the object from hash
165
+ # @param [Hash] attributes Model attributes in the form of hash
166
+ # @return [Object] Returns the model itself
167
+ def build_from_hash(attributes)
168
+ return nil unless attributes.is_a?(Hash)
169
+ self.class.openapi_types.each_pair do |key, type|
170
+ if type =~ /\AArray<(.*)>/i
171
+ # check to ensure the input is an array given that the attribute
172
+ # is documented as an array but the input is not
173
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
174
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
175
+ end
176
+ elsif !attributes[self.class.attribute_map[key]].nil?
177
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
178
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
179
+ end
180
+
181
+ self
182
+ end
183
+
184
+ # Deserializes the data based on type
185
+ # @param string type Data type
186
+ # @param string value Value to be deserialized
187
+ # @return [Object] Deserialized data
188
+ def _deserialize(type, value)
189
+ case type.to_sym
190
+ when :DateTime
191
+ DateTime.parse(value)
192
+ when :Date
193
+ Date.parse(value)
194
+ when :String
195
+ value.to_s
196
+ when :Integer
197
+ value.to_i
198
+ when :Float
199
+ value.to_f
200
+ when :Boolean
201
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
202
+ true
203
+ else
204
+ false
205
+ end
206
+ when :Object
207
+ # generic object (usually a Hash), return directly
208
+ value
209
+ when /\AArray<(?<inner_type>.+)>\z/
210
+ inner_type = Regexp.last_match[:inner_type]
211
+ value.map { |v| _deserialize(inner_type, v) }
212
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
213
+ k_type = Regexp.last_match[:k_type]
214
+ v_type = Regexp.last_match[:v_type]
215
+ {}.tap do |hash|
216
+ value.each do |k, v|
217
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
218
+ end
219
+ end
220
+ else # model
221
+ MailSlurpClient.const_get(type).build_from_hash(value)
222
+ end
223
+ end
224
+
225
+ # Returns the string representation of the object
226
+ # @return [String] String presentation of the object
227
+ def to_s
228
+ to_hash.to_s
229
+ end
230
+
231
+ # to_body is an alias to to_hash (backward compatibility)
232
+ # @return [Hash] Returns the object in the form of hash
233
+ def to_body
234
+ to_hash
235
+ end
236
+
237
+ # Returns the object in the form of hash
238
+ # @return [Hash] Returns the object in the form of hash
239
+ def to_hash
240
+ hash = {}
241
+ self.class.attribute_map.each_pair do |attr, param|
242
+ value = self.send(attr)
243
+ if value.nil?
244
+ is_nullable = self.class.openapi_nullable.include?(attr)
245
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
246
+ end
247
+
248
+ hash[param] = _to_hash(value)
249
+ end
250
+ hash
251
+ end
252
+
253
+ # Outputs non-array value in the form of hash
254
+ # For object, use to_hash. Otherwise, just return the value
255
+ # @param [Object] value Any valid value
256
+ # @return [Hash] Returns the value in the form of hash
257
+ def _to_hash(value)
258
+ if value.is_a?(Array)
259
+ value.compact.map { |v| _to_hash(v) }
260
+ elsif value.is_a?(Hash)
261
+ {}.tap do |hash|
262
+ value.each { |k, v| hash[k] = _to_hash(v) }
263
+ end
264
+ elsif value.respond_to? :to_hash
265
+ value.to_hash
266
+ else
267
+ value
268
+ end
269
+ end
270
+ end
271
+ end
@@ -114,10 +114,10 @@ module MailSlurpClient
114
114
  # Size of raw email message in bytes
115
115
  attr_accessor :size_bytes
116
116
 
117
- attr_accessor :html
118
-
119
117
  attr_accessor :xamp_html
120
118
 
119
+ attr_accessor :html
120
+
121
121
  # Attribute mapping from ruby-style variable name to JSON key.
122
122
  def self.attribute_map
123
123
  {
@@ -155,8 +155,8 @@ module MailSlurpClient
155
155
  :'in_reply_to' => :'inReplyTo',
156
156
  :'favourite' => :'favourite',
157
157
  :'size_bytes' => :'sizeBytes',
158
- :'html' => :'html',
159
- :'xamp_html' => :'xampHtml'
158
+ :'xamp_html' => :'xampHtml',
159
+ :'html' => :'html'
160
160
  }
161
161
  end
162
162
 
@@ -197,8 +197,8 @@ module MailSlurpClient
197
197
  :'in_reply_to' => :'String',
198
198
  :'favourite' => :'Boolean',
199
199
  :'size_bytes' => :'Integer',
200
- :'html' => :'Boolean',
201
- :'xamp_html' => :'Boolean'
200
+ :'xamp_html' => :'Boolean',
201
+ :'html' => :'Boolean'
202
202
  }
203
203
  end
204
204
 
@@ -399,13 +399,13 @@ module MailSlurpClient
399
399
  self.size_bytes = attributes[:'size_bytes']
400
400
  end
401
401
 
402
- if attributes.key?(:'html')
403
- self.html = attributes[:'html']
404
- end
405
-
406
402
  if attributes.key?(:'xamp_html')
407
403
  self.xamp_html = attributes[:'xamp_html']
408
404
  end
405
+
406
+ if attributes.key?(:'html')
407
+ self.html = attributes[:'html']
408
+ end
409
409
  end
410
410
 
411
411
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -500,8 +500,8 @@ module MailSlurpClient
500
500
  in_reply_to == o.in_reply_to &&
501
501
  favourite == o.favourite &&
502
502
  size_bytes == o.size_bytes &&
503
- html == o.html &&
504
- xamp_html == o.xamp_html
503
+ xamp_html == o.xamp_html &&
504
+ html == o.html
505
505
  end
506
506
 
507
507
  # @see the `==` method
@@ -513,7 +513,7 @@ module MailSlurpClient
513
513
  # Calculates hash code according to all attributes.
514
514
  # @return [Integer] Hash code
515
515
  def hash
516
- [id, user_id, inbox_id, domain_id, to, from, sender, recipients, reply_to, cc, bcc, headers, headers_map, attachments, subject, body, body_excerpt, text_excerpt, body_md5_hash, is_html, charset, analysis, created_at, updated_at, read, team_access, is_x_amp_html, body_part_content_types, external_id, message_id, thread_id, in_reply_to, favourite, size_bytes, html, xamp_html].hash
516
+ [id, user_id, inbox_id, domain_id, to, from, sender, recipients, reply_to, cc, bcc, headers, headers_map, attachments, subject, body, body_excerpt, text_excerpt, body_md5_hash, is_html, charset, analysis, created_at, updated_at, read, team_access, is_x_amp_html, body_part_content_types, external_id, message_id, thread_id, in_reply_to, favourite, size_bytes, xamp_html, html].hash
517
517
  end
518
518
 
519
519
  # Builds the object from hash
@@ -15,14 +15,16 @@ 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
+
18
20
  attr_accessor :sender
19
21
 
20
22
  attr_accessor :recipients
21
23
 
22
- attr_accessor :inbox_id
23
-
24
24
  attr_accessor :attachments
25
25
 
26
+ attr_accessor :inbox_id
27
+
26
28
  attr_accessor :created_at
27
29
 
28
30
  attr_accessor :to
@@ -55,8 +57,6 @@ module MailSlurpClient
55
57
 
56
58
  attr_accessor :team_access
57
59
 
58
- attr_accessor :subject
59
-
60
60
  attr_accessor :id
61
61
 
62
62
  attr_accessor :thread_id
@@ -66,10 +66,11 @@ module MailSlurpClient
66
66
  # Attribute mapping from ruby-style variable name to JSON key.
67
67
  def self.attribute_map
68
68
  {
69
+ :'subject' => :'subject',
69
70
  :'sender' => :'sender',
70
71
  :'recipients' => :'recipients',
71
- :'inbox_id' => :'inboxId',
72
72
  :'attachments' => :'attachments',
73
+ :'inbox_id' => :'inboxId',
73
74
  :'created_at' => :'createdAt',
74
75
  :'to' => :'to',
75
76
  :'cc' => :'cc',
@@ -86,7 +87,6 @@ module MailSlurpClient
86
87
  :'body_part_content_types' => :'bodyPartContentTypes',
87
88
  :'body_md5_hash' => :'bodyMD5Hash',
88
89
  :'team_access' => :'teamAccess',
89
- :'subject' => :'subject',
90
90
  :'id' => :'id',
91
91
  :'thread_id' => :'threadId',
92
92
  :'from' => :'from'
@@ -96,10 +96,11 @@ module MailSlurpClient
96
96
  # Attribute type mapping.
97
97
  def self.openapi_types
98
98
  {
99
+ :'subject' => :'String',
99
100
  :'sender' => :'Sender',
100
101
  :'recipients' => :'EmailRecipients',
101
- :'inbox_id' => :'String',
102
102
  :'attachments' => :'Array<String>',
103
+ :'inbox_id' => :'String',
103
104
  :'created_at' => :'DateTime',
104
105
  :'to' => :'Array<String>',
105
106
  :'cc' => :'Array<String>',
@@ -116,7 +117,6 @@ module MailSlurpClient
116
117
  :'body_part_content_types' => :'Array<String>',
117
118
  :'body_md5_hash' => :'String',
118
119
  :'team_access' => :'Boolean',
119
- :'subject' => :'String',
120
120
  :'id' => :'String',
121
121
  :'thread_id' => :'String',
122
122
  :'from' => :'String'
@@ -126,6 +126,7 @@ module MailSlurpClient
126
126
  # List of attributes with nullable: true
127
127
  def self.openapi_nullable
128
128
  Set.new([
129
+ :'subject',
129
130
  :'sender',
130
131
  :'recipients',
131
132
  :'attachments',
@@ -141,7 +142,6 @@ module MailSlurpClient
141
142
  :'text_excerpt',
142
143
  :'body_part_content_types',
143
144
  :'body_md5_hash',
144
- :'subject',
145
145
  :'thread_id',
146
146
  :'from'
147
147
  ])
@@ -162,6 +162,10 @@ module MailSlurpClient
162
162
  h[k.to_sym] = v
163
163
  }
164
164
 
165
+ if attributes.key?(:'subject')
166
+ self.subject = attributes[:'subject']
167
+ end
168
+
165
169
  if attributes.key?(:'sender')
166
170
  self.sender = attributes[:'sender']
167
171
  end
@@ -170,16 +174,16 @@ module MailSlurpClient
170
174
  self.recipients = attributes[:'recipients']
171
175
  end
172
176
 
173
- if attributes.key?(:'inbox_id')
174
- self.inbox_id = attributes[:'inbox_id']
175
- end
176
-
177
177
  if attributes.key?(:'attachments')
178
178
  if (value = attributes[:'attachments']).is_a?(Array)
179
179
  self.attachments = value
180
180
  end
181
181
  end
182
182
 
183
+ if attributes.key?(:'inbox_id')
184
+ self.inbox_id = attributes[:'inbox_id']
185
+ end
186
+
183
187
  if attributes.key?(:'created_at')
184
188
  self.created_at = attributes[:'created_at']
185
189
  end
@@ -252,10 +256,6 @@ module MailSlurpClient
252
256
  self.team_access = attributes[:'team_access']
253
257
  end
254
258
 
255
- if attributes.key?(:'subject')
256
- self.subject = attributes[:'subject']
257
- end
258
-
259
259
  if attributes.key?(:'id')
260
260
  self.id = attributes[:'id']
261
261
  end
@@ -317,10 +317,11 @@ module MailSlurpClient
317
317
  def ==(o)
318
318
  return true if self.equal?(o)
319
319
  self.class == o.class &&
320
+ subject == o.subject &&
320
321
  sender == o.sender &&
321
322
  recipients == o.recipients &&
322
- inbox_id == o.inbox_id &&
323
323
  attachments == o.attachments &&
324
+ inbox_id == o.inbox_id &&
324
325
  created_at == o.created_at &&
325
326
  to == o.to &&
326
327
  cc == o.cc &&
@@ -337,7 +338,6 @@ module MailSlurpClient
337
338
  body_part_content_types == o.body_part_content_types &&
338
339
  body_md5_hash == o.body_md5_hash &&
339
340
  team_access == o.team_access &&
340
- subject == o.subject &&
341
341
  id == o.id &&
342
342
  thread_id == o.thread_id &&
343
343
  from == o.from
@@ -352,7 +352,7 @@ module MailSlurpClient
352
352
  # Calculates hash code according to all attributes.
353
353
  # @return [Integer] Hash code
354
354
  def hash
355
- [sender, recipients, inbox_id, attachments, created_at, to, cc, bcc, message_id, domain_id, favourite, plus_address, size_bytes, in_reply_to, read, body_excerpt, text_excerpt, body_part_content_types, body_md5_hash, team_access, subject, id, thread_id, from].hash
355
+ [subject, sender, recipients, attachments, inbox_id, created_at, to, cc, bcc, message_id, domain_id, favourite, plus_address, size_bytes, in_reply_to, read, body_excerpt, text_excerpt, body_part_content_types, body_md5_hash, team_access, id, thread_id, from].hash
356
356
  end
357
357
 
358
358
  # Builds the object from hash
@@ -15,6 +15,9 @@ require 'date'
15
15
  module MailSlurpClient
16
16
  # An email thread is a message thread created for a email based on Message-ID, In-Reply-To, and References headers
17
17
  class EmailThreadProjection
18
+ # Thread topic subject
19
+ attr_accessor :subject
20
+
18
21
  attr_accessor :sender
19
22
 
20
23
  attr_accessor :recipients
@@ -63,9 +66,6 @@ module MailSlurpClient
63
66
 
64
67
  attr_accessor :last_sender
65
68
 
66
- # Thread topic subject
67
- attr_accessor :subject
68
-
69
69
  # ID of email thread
70
70
  attr_accessor :id
71
71
 
@@ -75,6 +75,7 @@ module MailSlurpClient
75
75
  # Attribute mapping from ruby-style variable name to JSON key.
76
76
  def self.attribute_map
77
77
  {
78
+ :'subject' => :'subject',
78
79
  :'sender' => :'sender',
79
80
  :'recipients' => :'recipients',
80
81
  :'inbox_id' => :'inboxId',
@@ -92,7 +93,6 @@ module MailSlurpClient
92
93
  :'last_created_at' => :'lastCreatedAt',
93
94
  :'last_from' => :'lastFrom',
94
95
  :'last_sender' => :'lastSender',
95
- :'subject' => :'subject',
96
96
  :'id' => :'id',
97
97
  :'from' => :'from'
98
98
  }
@@ -101,6 +101,7 @@ module MailSlurpClient
101
101
  # Attribute type mapping.
102
102
  def self.openapi_types
103
103
  {
104
+ :'subject' => :'String',
104
105
  :'sender' => :'SenderProjection',
105
106
  :'recipients' => :'EmailRecipientsProjection',
106
107
  :'inbox_id' => :'String',
@@ -118,7 +119,6 @@ module MailSlurpClient
118
119
  :'last_created_at' => :'DateTime',
119
120
  :'last_from' => :'String',
120
121
  :'last_sender' => :'SenderProjection',
121
- :'subject' => :'String',
122
122
  :'id' => :'String',
123
123
  :'from' => :'String'
124
124
  }
@@ -145,6 +145,10 @@ module MailSlurpClient
145
145
  h[k.to_sym] = v
146
146
  }
147
147
 
148
+ if attributes.key?(:'subject')
149
+ self.subject = attributes[:'subject']
150
+ end
151
+
148
152
  if attributes.key?(:'sender')
149
153
  self.sender = attributes[:'sender']
150
154
  end
@@ -219,10 +223,6 @@ module MailSlurpClient
219
223
  self.last_sender = attributes[:'last_sender']
220
224
  end
221
225
 
222
- if attributes.key?(:'subject')
223
- self.subject = attributes[:'subject']
224
- end
225
-
226
226
  if attributes.key?(:'id')
227
227
  self.id = attributes[:'id']
228
228
  end
@@ -290,6 +290,7 @@ module MailSlurpClient
290
290
  def ==(o)
291
291
  return true if self.equal?(o)
292
292
  self.class == o.class &&
293
+ subject == o.subject &&
293
294
  sender == o.sender &&
294
295
  recipients == o.recipients &&
295
296
  inbox_id == o.inbox_id &&
@@ -307,7 +308,6 @@ module MailSlurpClient
307
308
  last_created_at == o.last_created_at &&
308
309
  last_from == o.last_from &&
309
310
  last_sender == o.last_sender &&
310
- subject == o.subject &&
311
311
  id == o.id &&
312
312
  from == o.from
313
313
  end
@@ -321,7 +321,7 @@ module MailSlurpClient
321
321
  # Calculates hash code according to all attributes.
322
322
  # @return [Integer] Hash code
323
323
  def hash
324
- [sender, recipients, inbox_id, user_id, updated_at, created_at, to, cc, bcc, has_attachments, unread, message_count, last_body_excerpt, last_text_excerpt, last_created_at, last_from, last_sender, subject, id, from].hash
324
+ [subject, sender, recipients, inbox_id, user_id, updated_at, created_at, to, cc, bcc, has_attachments, unread, message_count, last_body_excerpt, last_text_excerpt, last_created_at, last_from, last_sender, id, from].hash
325
325
  end
326
326
 
327
327
  # Builds the object from hash
@@ -15,12 +15,12 @@ require 'date'
15
15
  module MailSlurpClient
16
16
  # Missed email data
17
17
  class MissedEmailProjection
18
+ attr_accessor :subject
19
+
18
20
  attr_accessor :user_id
19
21
 
20
22
  attr_accessor :created_at
21
23
 
22
- attr_accessor :subject
23
-
24
24
  attr_accessor :id
25
25
 
26
26
  attr_accessor :from
@@ -28,9 +28,9 @@ module MailSlurpClient
28
28
  # Attribute mapping from ruby-style variable name to JSON key.
29
29
  def self.attribute_map
30
30
  {
31
+ :'subject' => :'subject',
31
32
  :'user_id' => :'userId',
32
33
  :'created_at' => :'createdAt',
33
- :'subject' => :'subject',
34
34
  :'id' => :'id',
35
35
  :'from' => :'from'
36
36
  }
@@ -39,9 +39,9 @@ module MailSlurpClient
39
39
  # Attribute type mapping.
40
40
  def self.openapi_types
41
41
  {
42
+ :'subject' => :'String',
42
43
  :'user_id' => :'String',
43
44
  :'created_at' => :'DateTime',
44
- :'subject' => :'String',
45
45
  :'id' => :'String',
46
46
  :'from' => :'String'
47
47
  }
@@ -50,8 +50,8 @@ module MailSlurpClient
50
50
  # List of attributes with nullable: true
51
51
  def self.openapi_nullable
52
52
  Set.new([
53
- :'user_id',
54
53
  :'subject',
54
+ :'user_id',
55
55
  :'from'
56
56
  ])
57
57
  end
@@ -71,6 +71,10 @@ module MailSlurpClient
71
71
  h[k.to_sym] = v
72
72
  }
73
73
 
74
+ if attributes.key?(:'subject')
75
+ self.subject = attributes[:'subject']
76
+ end
77
+
74
78
  if attributes.key?(:'user_id')
75
79
  self.user_id = attributes[:'user_id']
76
80
  end
@@ -79,10 +83,6 @@ module MailSlurpClient
79
83
  self.created_at = attributes[:'created_at']
80
84
  end
81
85
 
82
- if attributes.key?(:'subject')
83
- self.subject = attributes[:'subject']
84
- end
85
-
86
86
  if attributes.key?(:'id')
87
87
  self.id = attributes[:'id']
88
88
  end
@@ -120,9 +120,9 @@ module MailSlurpClient
120
120
  def ==(o)
121
121
  return true if self.equal?(o)
122
122
  self.class == o.class &&
123
+ subject == o.subject &&
123
124
  user_id == o.user_id &&
124
125
  created_at == o.created_at &&
125
- subject == o.subject &&
126
126
  id == o.id &&
127
127
  from == o.from
128
128
  end
@@ -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
- [user_id, created_at, subject, id, from].hash
139
+ [subject, user_id, created_at, id, from].hash
140
140
  end
141
141
 
142
142
  # Builds the object from hash