mailslurp_client 15.13.32 → 15.15.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mailslurp_client/api/api_user_controller_api.rb +0 -4
- data/lib/mailslurp_client/api/bounce_controller_api.rb +76 -0
- data/lib/mailslurp_client/api/inbox_controller_api.rb +131 -5
- data/lib/mailslurp_client/api/inbox_forwarder_controller_api.rb +145 -0
- data/lib/mailslurp_client/api/missed_email_controller_api.rb +6 -6
- data/lib/mailslurp_client/models/alias_dto.rb +5 -0
- data/lib/mailslurp_client/models/alias_projection.rb +13 -13
- data/lib/mailslurp_client/models/attachment_entity.rb +0 -1
- data/lib/mailslurp_client/models/attachment_projection.rb +3 -0
- data/lib/mailslurp_client/models/bounce_projection.rb +3 -0
- data/lib/mailslurp_client/models/bounce_recipient_projection.rb +3 -0
- data/lib/mailslurp_client/models/bounced_email_dto.rb +12 -0
- data/lib/mailslurp_client/models/bounced_recipient_dto.rb +10 -0
- data/lib/mailslurp_client/models/contact_dto.rb +7 -0
- data/lib/mailslurp_client/models/contact_projection.rb +5 -0
- data/lib/mailslurp_client/models/create_alias_options.rb +2 -0
- data/lib/mailslurp_client/models/create_contact_options.rb +1 -0
- data/lib/mailslurp_client/models/create_group_options.rb +1 -0
- data/lib/mailslurp_client/models/create_inbox_dto.rb +1 -0
- data/lib/mailslurp_client/models/create_tracking_pixel_options.rb +2 -0
- data/lib/mailslurp_client/models/create_webhook_options.rb +2 -0
- data/lib/mailslurp_client/models/describe_mail_server_domain_result.rb +1 -0
- data/lib/mailslurp_client/models/domain_dto.rb +1 -0
- data/lib/mailslurp_client/models/domain_preview.rb +1 -0
- data/lib/mailslurp_client/models/email.rb +1 -0
- data/lib/mailslurp_client/models/email_preview.rb +1 -0
- data/lib/mailslurp_client/models/email_projection.rb +35 -27
- data/lib/mailslurp_client/models/{email_validation_request.rb → email_validation_request_dto.rb} +8 -3
- data/lib/mailslurp_client/models/email_verification_result.rb +1 -0
- data/lib/mailslurp_client/models/expiration_defaults.rb +3 -0
- data/lib/mailslurp_client/models/export_options.rb +5 -0
- data/lib/mailslurp_client/models/forward_email_options.rb +20 -4
- data/lib/mailslurp_client/models/group_dto.rb +1 -0
- data/lib/mailslurp_client/models/group_projection.rb +1 -0
- data/lib/mailslurp_client/models/inbox_by_email_address_result.rb +1 -0
- data/lib/mailslurp_client/models/inbox_by_name_result.rb +1 -0
- data/lib/mailslurp_client/models/inbox_forwarder_event_projection.rb +316 -0
- data/lib/mailslurp_client/models/list_unsubscribe_recipient_projection.rb +250 -0
- data/lib/mailslurp_client/models/match_options.rb +2 -0
- data/lib/mailslurp_client/models/{missed_email.rb → missed_email_dto.rb} +16 -3
- data/lib/mailslurp_client/models/missed_email_projection.rb +3 -0
- data/lib/mailslurp_client/models/organization_inbox_projection.rb +1 -0
- data/lib/mailslurp_client/models/page_email_validation_request.rb +1 -1
- data/lib/mailslurp_client/models/page_inbox_forwarder_events.rb +308 -0
- data/lib/mailslurp_client/models/page_list_unsubscribe_recipients.rb +308 -0
- data/lib/mailslurp_client/models/phone_number_projection.rb +19 -19
- data/lib/mailslurp_client/models/recipient.rb +1 -0
- data/lib/mailslurp_client/models/reply_to_alias_email_options.rb +6 -0
- data/lib/mailslurp_client/models/reply_to_email_options.rb +8 -0
- data/lib/mailslurp_client/models/scheduled_job.rb +2 -2
- data/lib/mailslurp_client/models/scheduled_job_dto.rb +371 -0
- data/lib/mailslurp_client/models/send_email_options.rb +20 -0
- data/lib/mailslurp_client/models/sent_email_dto.rb +22 -0
- data/lib/mailslurp_client/models/sent_email_projection.rb +48 -48
- data/lib/mailslurp_client/models/simple_send_email_options.rb +3 -0
- data/lib/mailslurp_client/models/sms_projection.rb +15 -15
- data/lib/mailslurp_client/models/template_projection.rb +20 -20
- data/lib/mailslurp_client/models/thread_projection.rb +26 -26
- data/lib/mailslurp_client/models/tracking_pixel_dto.rb +4 -0
- data/lib/mailslurp_client/models/unknown_missed_email_projection.rb +13 -13
- data/lib/mailslurp_client/models/update_alias_options.rb +1 -0
- data/lib/mailslurp_client/models/update_domain_options.rb +1 -0
- data/lib/mailslurp_client/models/verify_email_address_options.rb +3 -0
- data/lib/mailslurp_client/models/wait_for_conditions.rb +8 -0
- data/lib/mailslurp_client/models/wait_for_sms_conditions.rb +8 -0
- data/lib/mailslurp_client/models/webhook_bounce_payload.rb +3 -0
- data/lib/mailslurp_client/models/webhook_bounce_recipient_payload.rb +1 -0
- data/lib/mailslurp_client/models/webhook_delivery_status_payload.rb +1 -0
- data/lib/mailslurp_client/models/webhook_email_opened_payload.rb +1 -0
- data/lib/mailslurp_client/models/webhook_email_read_payload.rb +1 -0
- data/lib/mailslurp_client/models/webhook_new_attachment_payload.rb +1 -0
- data/lib/mailslurp_client/models/webhook_new_contact_payload.rb +2 -0
- data/lib/mailslurp_client/models/webhook_new_email_payload.rb +3 -0
- data/lib/mailslurp_client/models/webhook_projection.rb +13 -13
- data/lib/mailslurp_client/models/webhook_redrive_result.rb +1 -0
- data/lib/mailslurp_client/models/webhook_result_dto.rb +6 -0
- data/lib/mailslurp_client/models/webhook_test_request.rb +1 -0
- data/lib/mailslurp_client/models/webhook_test_response.rb +2 -0
- data/lib/mailslurp_client/models/webhook_test_result.rb +1 -0
- data/lib/mailslurp_client/version.rb +1 -1
- data/lib/mailslurp_client.rb +7 -2
- metadata +9 -4
@@ -0,0 +1,316 @@
|
|
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
|
+
# Inbox forwarder event
|
17
|
+
class InboxForwarderEventProjection
|
18
|
+
attr_accessor :message
|
19
|
+
|
20
|
+
attr_accessor :id
|
21
|
+
|
22
|
+
attr_accessor :status
|
23
|
+
|
24
|
+
attr_accessor :email_id
|
25
|
+
|
26
|
+
attr_accessor :inbox_id
|
27
|
+
|
28
|
+
attr_accessor :user_id
|
29
|
+
|
30
|
+
attr_accessor :created_at
|
31
|
+
|
32
|
+
attr_accessor :forwarder_id
|
33
|
+
|
34
|
+
class EnumAttributeValidator
|
35
|
+
attr_reader :datatype
|
36
|
+
attr_reader :allowable_values
|
37
|
+
|
38
|
+
def initialize(datatype, allowable_values)
|
39
|
+
@allowable_values = allowable_values.map do |value|
|
40
|
+
case datatype.to_s
|
41
|
+
when /Integer/i
|
42
|
+
value.to_i
|
43
|
+
when /Float/i
|
44
|
+
value.to_f
|
45
|
+
else
|
46
|
+
value
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
def valid?(value)
|
52
|
+
!value || allowable_values.include?(value)
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
57
|
+
def self.attribute_map
|
58
|
+
{
|
59
|
+
:'message' => :'message',
|
60
|
+
:'id' => :'id',
|
61
|
+
:'status' => :'status',
|
62
|
+
:'email_id' => :'emailId',
|
63
|
+
:'inbox_id' => :'inboxId',
|
64
|
+
:'user_id' => :'userId',
|
65
|
+
:'created_at' => :'createdAt',
|
66
|
+
:'forwarder_id' => :'forwarderId'
|
67
|
+
}
|
68
|
+
end
|
69
|
+
|
70
|
+
# Attribute type mapping.
|
71
|
+
def self.openapi_types
|
72
|
+
{
|
73
|
+
:'message' => :'String',
|
74
|
+
:'id' => :'String',
|
75
|
+
:'status' => :'String',
|
76
|
+
:'email_id' => :'String',
|
77
|
+
:'inbox_id' => :'String',
|
78
|
+
:'user_id' => :'String',
|
79
|
+
:'created_at' => :'DateTime',
|
80
|
+
:'forwarder_id' => :'String'
|
81
|
+
}
|
82
|
+
end
|
83
|
+
|
84
|
+
# List of attributes with nullable: true
|
85
|
+
def self.openapi_nullable
|
86
|
+
Set.new([
|
87
|
+
:'message',
|
88
|
+
:'id',
|
89
|
+
:'status',
|
90
|
+
:'email_id',
|
91
|
+
:'inbox_id',
|
92
|
+
:'user_id',
|
93
|
+
:'forwarder_id'
|
94
|
+
])
|
95
|
+
end
|
96
|
+
|
97
|
+
# Initializes the object
|
98
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
99
|
+
def initialize(attributes = {})
|
100
|
+
if (!attributes.is_a?(Hash))
|
101
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::InboxForwarderEventProjection` initialize method"
|
102
|
+
end
|
103
|
+
|
104
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
105
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
106
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
107
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::InboxForwarderEventProjection`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
108
|
+
end
|
109
|
+
h[k.to_sym] = v
|
110
|
+
}
|
111
|
+
|
112
|
+
if attributes.key?(:'message')
|
113
|
+
self.message = attributes[:'message']
|
114
|
+
end
|
115
|
+
|
116
|
+
if attributes.key?(:'id')
|
117
|
+
self.id = attributes[:'id']
|
118
|
+
end
|
119
|
+
|
120
|
+
if attributes.key?(:'status')
|
121
|
+
self.status = attributes[:'status']
|
122
|
+
end
|
123
|
+
|
124
|
+
if attributes.key?(:'email_id')
|
125
|
+
self.email_id = attributes[:'email_id']
|
126
|
+
end
|
127
|
+
|
128
|
+
if attributes.key?(:'inbox_id')
|
129
|
+
self.inbox_id = attributes[:'inbox_id']
|
130
|
+
end
|
131
|
+
|
132
|
+
if attributes.key?(:'user_id')
|
133
|
+
self.user_id = attributes[:'user_id']
|
134
|
+
end
|
135
|
+
|
136
|
+
if attributes.key?(:'created_at')
|
137
|
+
self.created_at = attributes[:'created_at']
|
138
|
+
end
|
139
|
+
|
140
|
+
if attributes.key?(:'forwarder_id')
|
141
|
+
self.forwarder_id = attributes[:'forwarder_id']
|
142
|
+
end
|
143
|
+
end
|
144
|
+
|
145
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
146
|
+
# @return Array for valid properties with the reasons
|
147
|
+
def list_invalid_properties
|
148
|
+
invalid_properties = Array.new
|
149
|
+
if @created_at.nil?
|
150
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
151
|
+
end
|
152
|
+
|
153
|
+
invalid_properties
|
154
|
+
end
|
155
|
+
|
156
|
+
# Check to see if the all the properties in the model are valid
|
157
|
+
# @return true if the model is valid
|
158
|
+
def valid?
|
159
|
+
status_validator = EnumAttributeValidator.new('String', ["SUCCESS", "FAILURE"])
|
160
|
+
return false unless status_validator.valid?(@status)
|
161
|
+
return false if @created_at.nil?
|
162
|
+
true
|
163
|
+
end
|
164
|
+
|
165
|
+
# Custom attribute writer method checking allowed values (enum).
|
166
|
+
# @param [Object] status Object to be assigned
|
167
|
+
def status=(status)
|
168
|
+
validator = EnumAttributeValidator.new('String', ["SUCCESS", "FAILURE"])
|
169
|
+
unless validator.valid?(status)
|
170
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
|
171
|
+
end
|
172
|
+
@status = status
|
173
|
+
end
|
174
|
+
|
175
|
+
# Checks equality by comparing each attribute.
|
176
|
+
# @param [Object] Object to be compared
|
177
|
+
def ==(o)
|
178
|
+
return true if self.equal?(o)
|
179
|
+
self.class == o.class &&
|
180
|
+
message == o.message &&
|
181
|
+
id == o.id &&
|
182
|
+
status == o.status &&
|
183
|
+
email_id == o.email_id &&
|
184
|
+
inbox_id == o.inbox_id &&
|
185
|
+
user_id == o.user_id &&
|
186
|
+
created_at == o.created_at &&
|
187
|
+
forwarder_id == o.forwarder_id
|
188
|
+
end
|
189
|
+
|
190
|
+
# @see the `==` method
|
191
|
+
# @param [Object] Object to be compared
|
192
|
+
def eql?(o)
|
193
|
+
self == o
|
194
|
+
end
|
195
|
+
|
196
|
+
# Calculates hash code according to all attributes.
|
197
|
+
# @return [Integer] Hash code
|
198
|
+
def hash
|
199
|
+
[message, id, status, email_id, inbox_id, user_id, created_at, forwarder_id].hash
|
200
|
+
end
|
201
|
+
|
202
|
+
# Builds the object from hash
|
203
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
204
|
+
# @return [Object] Returns the model itself
|
205
|
+
def self.build_from_hash(attributes)
|
206
|
+
new.build_from_hash(attributes)
|
207
|
+
end
|
208
|
+
|
209
|
+
# Builds the object from hash
|
210
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
211
|
+
# @return [Object] Returns the model itself
|
212
|
+
def build_from_hash(attributes)
|
213
|
+
return nil unless attributes.is_a?(Hash)
|
214
|
+
self.class.openapi_types.each_pair do |key, type|
|
215
|
+
if type =~ /\AArray<(.*)>/i
|
216
|
+
# check to ensure the input is an array given that the attribute
|
217
|
+
# is documented as an array but the input is not
|
218
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
219
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
220
|
+
end
|
221
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
222
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
223
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
224
|
+
end
|
225
|
+
|
226
|
+
self
|
227
|
+
end
|
228
|
+
|
229
|
+
# Deserializes the data based on type
|
230
|
+
# @param string type Data type
|
231
|
+
# @param string value Value to be deserialized
|
232
|
+
# @return [Object] Deserialized data
|
233
|
+
def _deserialize(type, value)
|
234
|
+
case type.to_sym
|
235
|
+
when :DateTime
|
236
|
+
DateTime.parse(value)
|
237
|
+
when :Date
|
238
|
+
Date.parse(value)
|
239
|
+
when :String
|
240
|
+
value.to_s
|
241
|
+
when :Integer
|
242
|
+
value.to_i
|
243
|
+
when :Float
|
244
|
+
value.to_f
|
245
|
+
when :Boolean
|
246
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
247
|
+
true
|
248
|
+
else
|
249
|
+
false
|
250
|
+
end
|
251
|
+
when :Object
|
252
|
+
# generic object (usually a Hash), return directly
|
253
|
+
value
|
254
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
255
|
+
inner_type = Regexp.last_match[:inner_type]
|
256
|
+
value.map { |v| _deserialize(inner_type, v) }
|
257
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
258
|
+
k_type = Regexp.last_match[:k_type]
|
259
|
+
v_type = Regexp.last_match[:v_type]
|
260
|
+
{}.tap do |hash|
|
261
|
+
value.each do |k, v|
|
262
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
263
|
+
end
|
264
|
+
end
|
265
|
+
else # model
|
266
|
+
MailSlurpClient.const_get(type).build_from_hash(value)
|
267
|
+
end
|
268
|
+
end
|
269
|
+
|
270
|
+
# Returns the string representation of the object
|
271
|
+
# @return [String] String presentation of the object
|
272
|
+
def to_s
|
273
|
+
to_hash.to_s
|
274
|
+
end
|
275
|
+
|
276
|
+
# to_body is an alias to to_hash (backward compatibility)
|
277
|
+
# @return [Hash] Returns the object in the form of hash
|
278
|
+
def to_body
|
279
|
+
to_hash
|
280
|
+
end
|
281
|
+
|
282
|
+
# Returns the object in the form of hash
|
283
|
+
# @return [Hash] Returns the object in the form of hash
|
284
|
+
def to_hash
|
285
|
+
hash = {}
|
286
|
+
self.class.attribute_map.each_pair do |attr, param|
|
287
|
+
value = self.send(attr)
|
288
|
+
if value.nil?
|
289
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
290
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
291
|
+
end
|
292
|
+
|
293
|
+
hash[param] = _to_hash(value)
|
294
|
+
end
|
295
|
+
hash
|
296
|
+
end
|
297
|
+
|
298
|
+
# Outputs non-array value in the form of hash
|
299
|
+
# For object, use to_hash. Otherwise, just return the value
|
300
|
+
# @param [Object] value Any valid value
|
301
|
+
# @return [Hash] Returns the value in the form of hash
|
302
|
+
def _to_hash(value)
|
303
|
+
if value.is_a?(Array)
|
304
|
+
value.compact.map { |v| _to_hash(v) }
|
305
|
+
elsif value.is_a?(Hash)
|
306
|
+
{}.tap do |hash|
|
307
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
308
|
+
end
|
309
|
+
elsif value.respond_to? :to_hash
|
310
|
+
value.to_hash
|
311
|
+
else
|
312
|
+
value
|
313
|
+
end
|
314
|
+
end
|
315
|
+
end
|
316
|
+
end
|
@@ -0,0 +1,250 @@
|
|
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
|
+
# List unsubscribe recipient
|
17
|
+
class ListUnsubscribeRecipientProjection
|
18
|
+
attr_accessor :id
|
19
|
+
|
20
|
+
attr_accessor :email_address
|
21
|
+
|
22
|
+
attr_accessor :created_at
|
23
|
+
|
24
|
+
attr_accessor :domain_id
|
25
|
+
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
27
|
+
def self.attribute_map
|
28
|
+
{
|
29
|
+
:'id' => :'id',
|
30
|
+
:'email_address' => :'emailAddress',
|
31
|
+
:'created_at' => :'createdAt',
|
32
|
+
:'domain_id' => :'domainId'
|
33
|
+
}
|
34
|
+
end
|
35
|
+
|
36
|
+
# Attribute type mapping.
|
37
|
+
def self.openapi_types
|
38
|
+
{
|
39
|
+
:'id' => :'String',
|
40
|
+
:'email_address' => :'String',
|
41
|
+
:'created_at' => :'DateTime',
|
42
|
+
:'domain_id' => :'String'
|
43
|
+
}
|
44
|
+
end
|
45
|
+
|
46
|
+
# List of attributes with nullable: true
|
47
|
+
def self.openapi_nullable
|
48
|
+
Set.new([
|
49
|
+
:'domain_id'
|
50
|
+
])
|
51
|
+
end
|
52
|
+
|
53
|
+
# Initializes the object
|
54
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
55
|
+
def initialize(attributes = {})
|
56
|
+
if (!attributes.is_a?(Hash))
|
57
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::ListUnsubscribeRecipientProjection` initialize method"
|
58
|
+
end
|
59
|
+
|
60
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
61
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
62
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
63
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::ListUnsubscribeRecipientProjection`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
64
|
+
end
|
65
|
+
h[k.to_sym] = v
|
66
|
+
}
|
67
|
+
|
68
|
+
if attributes.key?(:'id')
|
69
|
+
self.id = attributes[:'id']
|
70
|
+
end
|
71
|
+
|
72
|
+
if attributes.key?(:'email_address')
|
73
|
+
self.email_address = attributes[:'email_address']
|
74
|
+
end
|
75
|
+
|
76
|
+
if attributes.key?(:'created_at')
|
77
|
+
self.created_at = attributes[:'created_at']
|
78
|
+
end
|
79
|
+
|
80
|
+
if attributes.key?(:'domain_id')
|
81
|
+
self.domain_id = attributes[:'domain_id']
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
86
|
+
# @return Array for valid properties with the reasons
|
87
|
+
def list_invalid_properties
|
88
|
+
invalid_properties = Array.new
|
89
|
+
if @id.nil?
|
90
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
91
|
+
end
|
92
|
+
|
93
|
+
if @email_address.nil?
|
94
|
+
invalid_properties.push('invalid value for "email_address", email_address cannot be nil.')
|
95
|
+
end
|
96
|
+
|
97
|
+
if @created_at.nil?
|
98
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
99
|
+
end
|
100
|
+
|
101
|
+
invalid_properties
|
102
|
+
end
|
103
|
+
|
104
|
+
# Check to see if the all the properties in the model are valid
|
105
|
+
# @return true if the model is valid
|
106
|
+
def valid?
|
107
|
+
return false if @id.nil?
|
108
|
+
return false if @email_address.nil?
|
109
|
+
return false if @created_at.nil?
|
110
|
+
true
|
111
|
+
end
|
112
|
+
|
113
|
+
# Checks equality by comparing each attribute.
|
114
|
+
# @param [Object] Object to be compared
|
115
|
+
def ==(o)
|
116
|
+
return true if self.equal?(o)
|
117
|
+
self.class == o.class &&
|
118
|
+
id == o.id &&
|
119
|
+
email_address == o.email_address &&
|
120
|
+
created_at == o.created_at &&
|
121
|
+
domain_id == o.domain_id
|
122
|
+
end
|
123
|
+
|
124
|
+
# @see the `==` method
|
125
|
+
# @param [Object] Object to be compared
|
126
|
+
def eql?(o)
|
127
|
+
self == o
|
128
|
+
end
|
129
|
+
|
130
|
+
# Calculates hash code according to all attributes.
|
131
|
+
# @return [Integer] Hash code
|
132
|
+
def hash
|
133
|
+
[id, email_address, created_at, domain_id].hash
|
134
|
+
end
|
135
|
+
|
136
|
+
# Builds the object from hash
|
137
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
138
|
+
# @return [Object] Returns the model itself
|
139
|
+
def self.build_from_hash(attributes)
|
140
|
+
new.build_from_hash(attributes)
|
141
|
+
end
|
142
|
+
|
143
|
+
# Builds the object from hash
|
144
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
145
|
+
# @return [Object] Returns the model itself
|
146
|
+
def build_from_hash(attributes)
|
147
|
+
return nil unless attributes.is_a?(Hash)
|
148
|
+
self.class.openapi_types.each_pair do |key, type|
|
149
|
+
if type =~ /\AArray<(.*)>/i
|
150
|
+
# check to ensure the input is an array given that the attribute
|
151
|
+
# is documented as an array but the input is not
|
152
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
153
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
154
|
+
end
|
155
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
156
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
157
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
158
|
+
end
|
159
|
+
|
160
|
+
self
|
161
|
+
end
|
162
|
+
|
163
|
+
# Deserializes the data based on type
|
164
|
+
# @param string type Data type
|
165
|
+
# @param string value Value to be deserialized
|
166
|
+
# @return [Object] Deserialized data
|
167
|
+
def _deserialize(type, value)
|
168
|
+
case type.to_sym
|
169
|
+
when :DateTime
|
170
|
+
DateTime.parse(value)
|
171
|
+
when :Date
|
172
|
+
Date.parse(value)
|
173
|
+
when :String
|
174
|
+
value.to_s
|
175
|
+
when :Integer
|
176
|
+
value.to_i
|
177
|
+
when :Float
|
178
|
+
value.to_f
|
179
|
+
when :Boolean
|
180
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
181
|
+
true
|
182
|
+
else
|
183
|
+
false
|
184
|
+
end
|
185
|
+
when :Object
|
186
|
+
# generic object (usually a Hash), return directly
|
187
|
+
value
|
188
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
189
|
+
inner_type = Regexp.last_match[:inner_type]
|
190
|
+
value.map { |v| _deserialize(inner_type, v) }
|
191
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
192
|
+
k_type = Regexp.last_match[:k_type]
|
193
|
+
v_type = Regexp.last_match[:v_type]
|
194
|
+
{}.tap do |hash|
|
195
|
+
value.each do |k, v|
|
196
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
197
|
+
end
|
198
|
+
end
|
199
|
+
else # model
|
200
|
+
MailSlurpClient.const_get(type).build_from_hash(value)
|
201
|
+
end
|
202
|
+
end
|
203
|
+
|
204
|
+
# Returns the string representation of the object
|
205
|
+
# @return [String] String presentation of the object
|
206
|
+
def to_s
|
207
|
+
to_hash.to_s
|
208
|
+
end
|
209
|
+
|
210
|
+
# to_body is an alias to to_hash (backward compatibility)
|
211
|
+
# @return [Hash] Returns the object in the form of hash
|
212
|
+
def to_body
|
213
|
+
to_hash
|
214
|
+
end
|
215
|
+
|
216
|
+
# Returns the object in the form of hash
|
217
|
+
# @return [Hash] Returns the object in the form of hash
|
218
|
+
def to_hash
|
219
|
+
hash = {}
|
220
|
+
self.class.attribute_map.each_pair do |attr, param|
|
221
|
+
value = self.send(attr)
|
222
|
+
if value.nil?
|
223
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
224
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
225
|
+
end
|
226
|
+
|
227
|
+
hash[param] = _to_hash(value)
|
228
|
+
end
|
229
|
+
hash
|
230
|
+
end
|
231
|
+
|
232
|
+
# Outputs non-array value in the form of hash
|
233
|
+
# For object, use to_hash. Otherwise, just return the value
|
234
|
+
# @param [Object] value Any valid value
|
235
|
+
# @return [Hash] Returns the value in the form of hash
|
236
|
+
def _to_hash(value)
|
237
|
+
if value.is_a?(Array)
|
238
|
+
value.compact.map { |v| _to_hash(v) }
|
239
|
+
elsif value.is_a?(Hash)
|
240
|
+
{}.tap do |hash|
|
241
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
242
|
+
end
|
243
|
+
elsif value.respond_to? :to_hash
|
244
|
+
value.to_hash
|
245
|
+
else
|
246
|
+
value
|
247
|
+
end
|
248
|
+
end
|
249
|
+
end
|
250
|
+
end
|
@@ -14,7 +14,7 @@ require 'date'
|
|
14
14
|
|
15
15
|
module MailSlurpClient
|
16
16
|
# Missed email
|
17
|
-
class
|
17
|
+
class MissedEmailDto
|
18
18
|
attr_accessor :id
|
19
19
|
|
20
20
|
attr_accessor :user_id
|
@@ -94,6 +94,14 @@ module MailSlurpClient
|
|
94
94
|
# List of attributes with nullable: true
|
95
95
|
def self.openapi_nullable
|
96
96
|
Set.new([
|
97
|
+
:'user_id',
|
98
|
+
:'subject',
|
99
|
+
:'body_excerpt',
|
100
|
+
:'from',
|
101
|
+
:'raw_url',
|
102
|
+
:'raw_key',
|
103
|
+
:'raw_bucket',
|
104
|
+
:'can_restore',
|
97
105
|
])
|
98
106
|
end
|
99
107
|
|
@@ -101,13 +109,13 @@ module MailSlurpClient
|
|
101
109
|
# @param [Hash] attributes Model attributes in the form of hash
|
102
110
|
def initialize(attributes = {})
|
103
111
|
if (!attributes.is_a?(Hash))
|
104
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::
|
112
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::MissedEmailDto` initialize method"
|
105
113
|
end
|
106
114
|
|
107
115
|
# check to see if the attribute exists and convert string to symbol for hash key
|
108
116
|
attributes = attributes.each_with_object({}) { |(k, v), h|
|
109
117
|
if (!self.class.attribute_map.key?(k.to_sym))
|
110
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::
|
118
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::MissedEmailDto`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
111
119
|
end
|
112
120
|
h[k.to_sym] = v
|
113
121
|
}
|
@@ -189,6 +197,10 @@ module MailSlurpClient
|
|
189
197
|
# @return Array for valid properties with the reasons
|
190
198
|
def list_invalid_properties
|
191
199
|
invalid_properties = Array.new
|
200
|
+
if @id.nil?
|
201
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
202
|
+
end
|
203
|
+
|
192
204
|
if @attachment_count.nil?
|
193
205
|
invalid_properties.push('invalid value for "attachment_count", attachment_count cannot be nil.')
|
194
206
|
end
|
@@ -223,6 +235,7 @@ module MailSlurpClient
|
|
223
235
|
# Check to see if the all the properties in the model are valid
|
224
236
|
# @return true if the model is valid
|
225
237
|
def valid?
|
238
|
+
return false if @id.nil?
|
226
239
|
return false if @attachment_count.nil?
|
227
240
|
return false if @to.nil?
|
228
241
|
return false if @cc.nil?
|
@@ -60,7 +60,7 @@ module MailSlurpClient
|
|
60
60
|
# Attribute type mapping.
|
61
61
|
def self.openapi_types
|
62
62
|
{
|
63
|
-
:'content' => :'Array<
|
63
|
+
:'content' => :'Array<EmailValidationRequestDto>',
|
64
64
|
:'pageable' => :'PageableObject',
|
65
65
|
:'total' => :'Integer',
|
66
66
|
:'total_elements' => :'Integer',
|