mailslurp_client 15.11.1 → 15.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mailslurp_client/api/api_user_controller_api.rb +74 -0
  3. data/lib/mailslurp_client/api/inbox_controller_api.rb +63 -0
  4. data/lib/mailslurp_client/api/template_controller_api.rb +124 -0
  5. data/lib/mailslurp_client/models/bounce_projection.rb +31 -4
  6. data/lib/mailslurp_client/models/{bounce_recipient.rb → bounce_recipient_projection.rb} +35 -36
  7. data/lib/mailslurp_client/models/bounced_email_dto.rb +19 -1
  8. data/lib/mailslurp_client/models/bounced_recipient_dto.rb +37 -1
  9. data/lib/mailslurp_client/models/email_projection.rb +10 -10
  10. data/lib/mailslurp_client/models/inbox_by_name_result.rb +221 -0
  11. data/lib/mailslurp_client/models/inbox_dto.rb +11 -1
  12. data/lib/mailslurp_client/models/page_alias.rb +10 -10
  13. data/lib/mailslurp_client/models/page_attachment_entity.rb +10 -10
  14. data/lib/mailslurp_client/models/page_bounced_email.rb +10 -10
  15. data/lib/mailslurp_client/models/page_bounced_recipients.rb +11 -11
  16. data/lib/mailslurp_client/models/page_contact_projection.rb +10 -10
  17. data/lib/mailslurp_client/models/page_email_preview.rb +10 -10
  18. data/lib/mailslurp_client/models/page_email_projection.rb +10 -10
  19. data/lib/mailslurp_client/models/page_email_validation_request.rb +10 -10
  20. data/lib/mailslurp_client/models/page_expired_inbox_record_projection.rb +10 -10
  21. data/lib/mailslurp_client/models/page_group_projection.rb +10 -10
  22. data/lib/mailslurp_client/models/page_inbox_forwarder_dto.rb +10 -10
  23. data/lib/mailslurp_client/models/page_inbox_projection.rb +10 -10
  24. data/lib/mailslurp_client/models/page_inbox_ruleset_dto.rb +10 -10
  25. data/lib/mailslurp_client/models/page_missed_email_projection.rb +10 -10
  26. data/lib/mailslurp_client/models/page_organization_inbox_projection.rb +10 -10
  27. data/lib/mailslurp_client/models/page_phone_number_projection.rb +10 -10
  28. data/lib/mailslurp_client/models/page_sent_email_projection.rb +16 -16
  29. data/lib/mailslurp_client/models/page_sent_email_with_queue_projection.rb +16 -16
  30. data/lib/mailslurp_client/models/page_sms_projection.rb +10 -10
  31. data/lib/mailslurp_client/models/page_template_projection.rb +10 -10
  32. data/lib/mailslurp_client/models/page_thread_projection.rb +10 -10
  33. data/lib/mailslurp_client/models/page_tracking_pixel_projection.rb +10 -10
  34. data/lib/mailslurp_client/models/page_unknown_missed_email_projection.rb +10 -10
  35. data/lib/mailslurp_client/models/page_webhook_projection.rb +10 -10
  36. data/lib/mailslurp_client/models/page_webhook_result.rb +10 -10
  37. data/lib/mailslurp_client/models/sent_email_projection.rb +24 -24
  38. data/lib/mailslurp_client/models/template_preview.rb +211 -0
  39. data/lib/mailslurp_client/models/tracking_pixel_projection.rb +13 -13
  40. data/lib/mailslurp_client/models/user_info_dto.rb +334 -0
  41. data/lib/mailslurp_client/version.rb +1 -1
  42. data/lib/mailslurp_client.rb +5 -1
  43. metadata +7 -3
@@ -23,10 +23,10 @@ module MailSlurpClient
23
23
 
24
24
  attr_accessor :last
25
25
 
26
- attr_accessor :total_elements
27
-
28
26
  attr_accessor :total_pages
29
27
 
28
+ attr_accessor :total_elements
29
+
30
30
  attr_accessor :size
31
31
 
32
32
  attr_accessor :number
@@ -46,8 +46,8 @@ module MailSlurpClient
46
46
  :'pageable' => :'pageable',
47
47
  :'total' => :'total',
48
48
  :'last' => :'last',
49
- :'total_elements' => :'totalElements',
50
49
  :'total_pages' => :'totalPages',
50
+ :'total_elements' => :'totalElements',
51
51
  :'size' => :'size',
52
52
  :'number' => :'number',
53
53
  :'sort' => :'sort',
@@ -64,8 +64,8 @@ module MailSlurpClient
64
64
  :'pageable' => :'PageableObject',
65
65
  :'total' => :'Integer',
66
66
  :'last' => :'Boolean',
67
- :'total_elements' => :'Integer',
68
67
  :'total_pages' => :'Integer',
68
+ :'total_elements' => :'Integer',
69
69
  :'size' => :'Integer',
70
70
  :'number' => :'Integer',
71
71
  :'sort' => :'Sort',
@@ -114,14 +114,14 @@ module MailSlurpClient
114
114
  self.last = attributes[:'last']
115
115
  end
116
116
 
117
- if attributes.key?(:'total_elements')
118
- self.total_elements = attributes[:'total_elements']
119
- end
120
-
121
117
  if attributes.key?(:'total_pages')
122
118
  self.total_pages = attributes[:'total_pages']
123
119
  end
124
120
 
121
+ if attributes.key?(:'total_elements')
122
+ self.total_elements = attributes[:'total_elements']
123
+ end
124
+
125
125
  if attributes.key?(:'size')
126
126
  self.size = attributes[:'size']
127
127
  end
@@ -169,8 +169,8 @@ module MailSlurpClient
169
169
  pageable == o.pageable &&
170
170
  total == o.total &&
171
171
  last == o.last &&
172
- total_elements == o.total_elements &&
173
172
  total_pages == o.total_pages &&
173
+ total_elements == o.total_elements &&
174
174
  size == o.size &&
175
175
  number == o.number &&
176
176
  sort == o.sort &&
@@ -188,7 +188,7 @@ module MailSlurpClient
188
188
  # Calculates hash code according to all attributes.
189
189
  # @return [Integer] Hash code
190
190
  def hash
191
- [content, pageable, total, last, total_elements, total_pages, size, number, sort, first, number_of_elements, empty].hash
191
+ [content, pageable, total, last, total_pages, total_elements, size, number, sort, first, number_of_elements, empty].hash
192
192
  end
193
193
 
194
194
  # Builds the object from hash
@@ -23,10 +23,10 @@ module MailSlurpClient
23
23
 
24
24
  attr_accessor :last
25
25
 
26
- attr_accessor :total_elements
27
-
28
26
  attr_accessor :total_pages
29
27
 
28
+ attr_accessor :total_elements
29
+
30
30
  attr_accessor :size
31
31
 
32
32
  attr_accessor :number
@@ -46,8 +46,8 @@ module MailSlurpClient
46
46
  :'pageable' => :'pageable',
47
47
  :'total' => :'total',
48
48
  :'last' => :'last',
49
- :'total_elements' => :'totalElements',
50
49
  :'total_pages' => :'totalPages',
50
+ :'total_elements' => :'totalElements',
51
51
  :'size' => :'size',
52
52
  :'number' => :'number',
53
53
  :'sort' => :'sort',
@@ -64,8 +64,8 @@ module MailSlurpClient
64
64
  :'pageable' => :'PageableObject',
65
65
  :'total' => :'Integer',
66
66
  :'last' => :'Boolean',
67
- :'total_elements' => :'Integer',
68
67
  :'total_pages' => :'Integer',
68
+ :'total_elements' => :'Integer',
69
69
  :'size' => :'Integer',
70
70
  :'number' => :'Integer',
71
71
  :'sort' => :'Sort',
@@ -114,14 +114,14 @@ module MailSlurpClient
114
114
  self.last = attributes[:'last']
115
115
  end
116
116
 
117
- if attributes.key?(:'total_elements')
118
- self.total_elements = attributes[:'total_elements']
119
- end
120
-
121
117
  if attributes.key?(:'total_pages')
122
118
  self.total_pages = attributes[:'total_pages']
123
119
  end
124
120
 
121
+ if attributes.key?(:'total_elements')
122
+ self.total_elements = attributes[:'total_elements']
123
+ end
124
+
125
125
  if attributes.key?(:'size')
126
126
  self.size = attributes[:'size']
127
127
  end
@@ -169,8 +169,8 @@ module MailSlurpClient
169
169
  pageable == o.pageable &&
170
170
  total == o.total &&
171
171
  last == o.last &&
172
- total_elements == o.total_elements &&
173
172
  total_pages == o.total_pages &&
173
+ total_elements == o.total_elements &&
174
174
  size == o.size &&
175
175
  number == o.number &&
176
176
  sort == o.sort &&
@@ -188,7 +188,7 @@ module MailSlurpClient
188
188
  # Calculates hash code according to all attributes.
189
189
  # @return [Integer] Hash code
190
190
  def hash
191
- [content, pageable, total, last, total_elements, total_pages, size, number, sort, first, number_of_elements, empty].hash
191
+ [content, pageable, total, last, total_pages, total_elements, size, number, sort, first, number_of_elements, empty].hash
192
192
  end
193
193
 
194
194
  # Builds the object from hash
@@ -23,10 +23,10 @@ module MailSlurpClient
23
23
 
24
24
  attr_accessor :last
25
25
 
26
- attr_accessor :total_elements
27
-
28
26
  attr_accessor :total_pages
29
27
 
28
+ attr_accessor :total_elements
29
+
30
30
  attr_accessor :size
31
31
 
32
32
  attr_accessor :number
@@ -46,8 +46,8 @@ module MailSlurpClient
46
46
  :'pageable' => :'pageable',
47
47
  :'total' => :'total',
48
48
  :'last' => :'last',
49
- :'total_elements' => :'totalElements',
50
49
  :'total_pages' => :'totalPages',
50
+ :'total_elements' => :'totalElements',
51
51
  :'size' => :'size',
52
52
  :'number' => :'number',
53
53
  :'sort' => :'sort',
@@ -64,8 +64,8 @@ module MailSlurpClient
64
64
  :'pageable' => :'PageableObject',
65
65
  :'total' => :'Integer',
66
66
  :'last' => :'Boolean',
67
- :'total_elements' => :'Integer',
68
67
  :'total_pages' => :'Integer',
68
+ :'total_elements' => :'Integer',
69
69
  :'size' => :'Integer',
70
70
  :'number' => :'Integer',
71
71
  :'sort' => :'Sort',
@@ -114,14 +114,14 @@ module MailSlurpClient
114
114
  self.last = attributes[:'last']
115
115
  end
116
116
 
117
- if attributes.key?(:'total_elements')
118
- self.total_elements = attributes[:'total_elements']
119
- end
120
-
121
117
  if attributes.key?(:'total_pages')
122
118
  self.total_pages = attributes[:'total_pages']
123
119
  end
124
120
 
121
+ if attributes.key?(:'total_elements')
122
+ self.total_elements = attributes[:'total_elements']
123
+ end
124
+
125
125
  if attributes.key?(:'size')
126
126
  self.size = attributes[:'size']
127
127
  end
@@ -169,8 +169,8 @@ module MailSlurpClient
169
169
  pageable == o.pageable &&
170
170
  total == o.total &&
171
171
  last == o.last &&
172
- total_elements == o.total_elements &&
173
172
  total_pages == o.total_pages &&
173
+ total_elements == o.total_elements &&
174
174
  size == o.size &&
175
175
  number == o.number &&
176
176
  sort == o.sort &&
@@ -188,7 +188,7 @@ module MailSlurpClient
188
188
  # Calculates hash code according to all attributes.
189
189
  # @return [Integer] Hash code
190
190
  def hash
191
- [content, pageable, total, last, total_elements, total_pages, size, number, sort, first, number_of_elements, empty].hash
191
+ [content, pageable, total, last, total_pages, total_elements, size, number, sort, first, number_of_elements, empty].hash
192
192
  end
193
193
 
194
194
  # Builds the object from hash
@@ -23,13 +23,13 @@ module MailSlurpClient
23
23
 
24
24
  attr_accessor :subject
25
25
 
26
- attr_accessor :inbox_id
26
+ attr_accessor :created_at
27
27
 
28
28
  attr_accessor :attachments
29
29
 
30
- attr_accessor :to
30
+ attr_accessor :inbox_id
31
31
 
32
- attr_accessor :created_at
32
+ attr_accessor :to
33
33
 
34
34
  attr_accessor :bcc
35
35
 
@@ -46,10 +46,10 @@ module MailSlurpClient
46
46
  :'from' => :'from',
47
47
  :'user_id' => :'userId',
48
48
  :'subject' => :'subject',
49
- :'inbox_id' => :'inboxId',
49
+ :'created_at' => :'createdAt',
50
50
  :'attachments' => :'attachments',
51
+ :'inbox_id' => :'inboxId',
51
52
  :'to' => :'to',
52
- :'created_at' => :'createdAt',
53
53
  :'bcc' => :'bcc',
54
54
  :'cc' => :'cc',
55
55
  :'body_md5_hash' => :'bodyMD5Hash',
@@ -64,10 +64,10 @@ module MailSlurpClient
64
64
  :'from' => :'String',
65
65
  :'user_id' => :'String',
66
66
  :'subject' => :'String',
67
- :'inbox_id' => :'String',
67
+ :'created_at' => :'DateTime',
68
68
  :'attachments' => :'Array<String>',
69
+ :'inbox_id' => :'String',
69
70
  :'to' => :'Array<String>',
70
- :'created_at' => :'DateTime',
71
71
  :'bcc' => :'Array<String>',
72
72
  :'cc' => :'Array<String>',
73
73
  :'body_md5_hash' => :'String',
@@ -112,8 +112,8 @@ module MailSlurpClient
112
112
  self.subject = attributes[:'subject']
113
113
  end
114
114
 
115
- if attributes.key?(:'inbox_id')
116
- self.inbox_id = attributes[:'inbox_id']
115
+ if attributes.key?(:'created_at')
116
+ self.created_at = attributes[:'created_at']
117
117
  end
118
118
 
119
119
  if attributes.key?(:'attachments')
@@ -122,16 +122,16 @@ module MailSlurpClient
122
122
  end
123
123
  end
124
124
 
125
+ if attributes.key?(:'inbox_id')
126
+ self.inbox_id = attributes[:'inbox_id']
127
+ end
128
+
125
129
  if attributes.key?(:'to')
126
130
  if (value = attributes[:'to']).is_a?(Array)
127
131
  self.to = value
128
132
  end
129
133
  end
130
134
 
131
- if attributes.key?(:'created_at')
132
- self.created_at = attributes[:'created_at']
133
- end
134
-
135
135
  if attributes.key?(:'bcc')
136
136
  if (value = attributes[:'bcc']).is_a?(Array)
137
137
  self.bcc = value
@@ -165,20 +165,20 @@ module MailSlurpClient
165
165
  invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
166
166
  end
167
167
 
168
- if @inbox_id.nil?
169
- invalid_properties.push('invalid value for "inbox_id", inbox_id cannot be nil.')
168
+ if @created_at.nil?
169
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
170
170
  end
171
171
 
172
172
  if @attachments.nil?
173
173
  invalid_properties.push('invalid value for "attachments", attachments cannot be nil.')
174
174
  end
175
175
 
176
- if @to.nil?
177
- invalid_properties.push('invalid value for "to", to cannot be nil.')
176
+ if @inbox_id.nil?
177
+ invalid_properties.push('invalid value for "inbox_id", inbox_id cannot be nil.')
178
178
  end
179
179
 
180
- if @created_at.nil?
181
- invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
180
+ if @to.nil?
181
+ invalid_properties.push('invalid value for "to", to cannot be nil.')
182
182
  end
183
183
 
184
184
  if @bcc.nil?
@@ -201,10 +201,10 @@ module MailSlurpClient
201
201
  def valid?
202
202
  return false if @id.nil?
203
203
  return false if @user_id.nil?
204
- return false if @inbox_id.nil?
204
+ return false if @created_at.nil?
205
205
  return false if @attachments.nil?
206
+ return false if @inbox_id.nil?
206
207
  return false if @to.nil?
207
- return false if @created_at.nil?
208
208
  return false if @bcc.nil?
209
209
  return false if @cc.nil?
210
210
  return false if @virtual_send.nil?
@@ -220,10 +220,10 @@ module MailSlurpClient
220
220
  from == o.from &&
221
221
  user_id == o.user_id &&
222
222
  subject == o.subject &&
223
- inbox_id == o.inbox_id &&
223
+ created_at == o.created_at &&
224
224
  attachments == o.attachments &&
225
+ inbox_id == o.inbox_id &&
225
226
  to == o.to &&
226
- created_at == o.created_at &&
227
227
  bcc == o.bcc &&
228
228
  cc == o.cc &&
229
229
  body_md5_hash == o.body_md5_hash &&
@@ -239,7 +239,7 @@ module MailSlurpClient
239
239
  # Calculates hash code according to all attributes.
240
240
  # @return [Integer] Hash code
241
241
  def hash
242
- [id, from, user_id, subject, inbox_id, attachments, to, created_at, bcc, cc, body_md5_hash, virtual_send].hash
242
+ [id, from, user_id, subject, created_at, attachments, inbox_id, to, bcc, cc, body_md5_hash, virtual_send].hash
243
243
  end
244
244
 
245
245
  # Builds the object from hash
@@ -0,0 +1,211 @@
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 TemplatePreview
17
+ attr_accessor :preview
18
+
19
+ # Attribute mapping from ruby-style variable name to JSON key.
20
+ def self.attribute_map
21
+ {
22
+ :'preview' => :'preview'
23
+ }
24
+ end
25
+
26
+ # Attribute type mapping.
27
+ def self.openapi_types
28
+ {
29
+ :'preview' => :'String'
30
+ }
31
+ end
32
+
33
+ # List of attributes with nullable: true
34
+ def self.openapi_nullable
35
+ Set.new([
36
+ ])
37
+ end
38
+
39
+ # Initializes the object
40
+ # @param [Hash] attributes Model attributes in the form of hash
41
+ def initialize(attributes = {})
42
+ if (!attributes.is_a?(Hash))
43
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::TemplatePreview` initialize method"
44
+ end
45
+
46
+ # check to see if the attribute exists and convert string to symbol for hash key
47
+ attributes = attributes.each_with_object({}) { |(k, v), h|
48
+ if (!self.class.attribute_map.key?(k.to_sym))
49
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::TemplatePreview`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
50
+ end
51
+ h[k.to_sym] = v
52
+ }
53
+
54
+ if attributes.key?(:'preview')
55
+ self.preview = attributes[:'preview']
56
+ end
57
+ end
58
+
59
+ # Show invalid properties with the reasons. Usually used together with valid?
60
+ # @return Array for valid properties with the reasons
61
+ def list_invalid_properties
62
+ invalid_properties = Array.new
63
+ if @preview.nil?
64
+ invalid_properties.push('invalid value for "preview", preview cannot be nil.')
65
+ end
66
+
67
+ invalid_properties
68
+ end
69
+
70
+ # Check to see if the all the properties in the model are valid
71
+ # @return true if the model is valid
72
+ def valid?
73
+ return false if @preview.nil?
74
+ true
75
+ end
76
+
77
+ # Checks equality by comparing each attribute.
78
+ # @param [Object] Object to be compared
79
+ def ==(o)
80
+ return true if self.equal?(o)
81
+ self.class == o.class &&
82
+ preview == o.preview
83
+ end
84
+
85
+ # @see the `==` method
86
+ # @param [Object] Object to be compared
87
+ def eql?(o)
88
+ self == o
89
+ end
90
+
91
+ # Calculates hash code according to all attributes.
92
+ # @return [Integer] Hash code
93
+ def hash
94
+ [preview].hash
95
+ end
96
+
97
+ # Builds the object from hash
98
+ # @param [Hash] attributes Model attributes in the form of hash
99
+ # @return [Object] Returns the model itself
100
+ def self.build_from_hash(attributes)
101
+ new.build_from_hash(attributes)
102
+ end
103
+
104
+ # Builds the object from hash
105
+ # @param [Hash] attributes Model attributes in the form of hash
106
+ # @return [Object] Returns the model itself
107
+ def build_from_hash(attributes)
108
+ return nil unless attributes.is_a?(Hash)
109
+ self.class.openapi_types.each_pair do |key, type|
110
+ if type =~ /\AArray<(.*)>/i
111
+ # check to ensure the input is an array given that the attribute
112
+ # is documented as an array but the input is not
113
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
114
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
115
+ end
116
+ elsif !attributes[self.class.attribute_map[key]].nil?
117
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
118
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
119
+ end
120
+
121
+ self
122
+ end
123
+
124
+ # Deserializes the data based on type
125
+ # @param string type Data type
126
+ # @param string value Value to be deserialized
127
+ # @return [Object] Deserialized data
128
+ def _deserialize(type, value)
129
+ case type.to_sym
130
+ when :DateTime
131
+ DateTime.parse(value)
132
+ when :Date
133
+ Date.parse(value)
134
+ when :String
135
+ value.to_s
136
+ when :Integer
137
+ value.to_i
138
+ when :Float
139
+ value.to_f
140
+ when :Boolean
141
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
142
+ true
143
+ else
144
+ false
145
+ end
146
+ when :Object
147
+ # generic object (usually a Hash), return directly
148
+ value
149
+ when /\AArray<(?<inner_type>.+)>\z/
150
+ inner_type = Regexp.last_match[:inner_type]
151
+ value.map { |v| _deserialize(inner_type, v) }
152
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
153
+ k_type = Regexp.last_match[:k_type]
154
+ v_type = Regexp.last_match[:v_type]
155
+ {}.tap do |hash|
156
+ value.each do |k, v|
157
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
158
+ end
159
+ end
160
+ else # model
161
+ MailSlurpClient.const_get(type).build_from_hash(value)
162
+ end
163
+ end
164
+
165
+ # Returns the string representation of the object
166
+ # @return [String] String presentation of the object
167
+ def to_s
168
+ to_hash.to_s
169
+ end
170
+
171
+ # to_body is an alias to to_hash (backward compatibility)
172
+ # @return [Hash] Returns the object in the form of hash
173
+ def to_body
174
+ to_hash
175
+ end
176
+
177
+ # Returns the object in the form of hash
178
+ # @return [Hash] Returns the object in the form of hash
179
+ def to_hash
180
+ hash = {}
181
+ self.class.attribute_map.each_pair do |attr, param|
182
+ value = self.send(attr)
183
+ if value.nil?
184
+ is_nullable = self.class.openapi_nullable.include?(attr)
185
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
186
+ end
187
+
188
+ hash[param] = _to_hash(value)
189
+ end
190
+ hash
191
+ end
192
+
193
+ # Outputs non-array value in the form of hash
194
+ # For object, use to_hash. Otherwise, just return the value
195
+ # @param [Object] value Any valid value
196
+ # @return [Hash] Returns the value in the form of hash
197
+ def _to_hash(value)
198
+ if value.is_a?(Array)
199
+ value.compact.map { |v| _to_hash(v) }
200
+ elsif value.is_a?(Hash)
201
+ {}.tap do |hash|
202
+ value.each { |k, v| hash[k] = _to_hash(v) }
203
+ end
204
+ elsif value.respond_to? :to_hash
205
+ value.to_hash
206
+ else
207
+ value
208
+ end
209
+ end
210
+ end
211
+ end
@@ -23,6 +23,8 @@ module MailSlurpClient
23
23
 
24
24
  attr_accessor :inbox_id
25
25
 
26
+ attr_accessor :sent_email_id
27
+
26
28
  attr_accessor :created_at
27
29
 
28
30
  attr_accessor :recipient
@@ -31,8 +33,6 @@ module MailSlurpClient
31
33
 
32
34
  attr_accessor :seen_at
33
35
 
34
- attr_accessor :sent_email_id
35
-
36
36
  # Attribute mapping from ruby-style variable name to JSON key.
37
37
  def self.attribute_map
38
38
  {
@@ -40,11 +40,11 @@ module MailSlurpClient
40
40
  :'id' => :'id',
41
41
  :'user_id' => :'userId',
42
42
  :'inbox_id' => :'inboxId',
43
+ :'sent_email_id' => :'sentEmailId',
43
44
  :'created_at' => :'createdAt',
44
45
  :'recipient' => :'recipient',
45
46
  :'seen' => :'seen',
46
- :'seen_at' => :'seenAt',
47
- :'sent_email_id' => :'sentEmailId'
47
+ :'seen_at' => :'seenAt'
48
48
  }
49
49
  end
50
50
 
@@ -55,11 +55,11 @@ module MailSlurpClient
55
55
  :'id' => :'String',
56
56
  :'user_id' => :'String',
57
57
  :'inbox_id' => :'String',
58
+ :'sent_email_id' => :'String',
58
59
  :'created_at' => :'DateTime',
59
60
  :'recipient' => :'String',
60
61
  :'seen' => :'Boolean',
61
- :'seen_at' => :'DateTime',
62
- :'sent_email_id' => :'String'
62
+ :'seen_at' => :'DateTime'
63
63
  }
64
64
  end
65
65
 
@@ -100,6 +100,10 @@ module MailSlurpClient
100
100
  self.inbox_id = attributes[:'inbox_id']
101
101
  end
102
102
 
103
+ if attributes.key?(:'sent_email_id')
104
+ self.sent_email_id = attributes[:'sent_email_id']
105
+ end
106
+
103
107
  if attributes.key?(:'created_at')
104
108
  self.created_at = attributes[:'created_at']
105
109
  end
@@ -115,10 +119,6 @@ module MailSlurpClient
115
119
  if attributes.key?(:'seen_at')
116
120
  self.seen_at = attributes[:'seen_at']
117
121
  end
118
-
119
- if attributes.key?(:'sent_email_id')
120
- self.sent_email_id = attributes[:'sent_email_id']
121
- end
122
122
  end
123
123
 
124
124
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -163,11 +163,11 @@ module MailSlurpClient
163
163
  id == o.id &&
164
164
  user_id == o.user_id &&
165
165
  inbox_id == o.inbox_id &&
166
+ sent_email_id == o.sent_email_id &&
166
167
  created_at == o.created_at &&
167
168
  recipient == o.recipient &&
168
169
  seen == o.seen &&
169
- seen_at == o.seen_at &&
170
- sent_email_id == o.sent_email_id
170
+ seen_at == o.seen_at
171
171
  end
172
172
 
173
173
  # @see the `==` method
@@ -179,7 +179,7 @@ module MailSlurpClient
179
179
  # Calculates hash code according to all attributes.
180
180
  # @return [Integer] Hash code
181
181
  def hash
182
- [name, id, user_id, inbox_id, created_at, recipient, seen, seen_at, sent_email_id].hash
182
+ [name, id, user_id, inbox_id, sent_email_id, created_at, recipient, seen, seen_at].hash
183
183
  end
184
184
 
185
185
  # Builds the object from hash