mailslurp_client 16.2.0 → 16.2.3
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.
- checksums.yaml +4 -4
- data/lib/mailslurp_client/api/ai_controller_api.rb +193 -79
- data/lib/mailslurp_client/api/attachment_controller_api.rb +6 -3
- data/lib/mailslurp_client/api/email_controller_api.rb +3 -0
- data/lib/mailslurp_client/api/form_controller_api.rb +8 -9
- data/lib/mailslurp_client/api/inbox_controller_api.rb +28 -2
- data/lib/mailslurp_client/api/mfa_controller_api.rb +88 -13
- data/lib/mailslurp_client/api/sms_controller_api.rb +3 -0
- data/lib/mailslurp_client/api/webhook_controller_api.rb +63 -9
- data/lib/mailslurp_client/models/abstract_webhook_payload.rb +2 -2
- data/lib/mailslurp_client/models/{ai_tranform_create_options.rb → ai_transform_create_options.rb} +31 -7
- data/lib/mailslurp_client/models/ai_transform_dto.rb +1 -0
- data/lib/mailslurp_client/models/ai_transform_mapping_dto.rb +18 -9
- data/lib/mailslurp_client/models/ai_transform_mapping_projection.rb +15 -6
- data/lib/mailslurp_client/models/ai_transform_projection.rb +16 -1
- data/lib/mailslurp_client/models/ai_transform_result_dto.rb +5 -1
- data/lib/mailslurp_client/models/{ai_transform_result_projection.rb → ai_transform_result_projection_dto.rb} +56 -53
- data/lib/mailslurp_client/models/alias_thread_projection.rb +11 -11
- data/lib/mailslurp_client/models/bounce_projection.rb +11 -11
- data/lib/mailslurp_client/models/conditional_structured_content_result.rb +221 -0
- data/lib/mailslurp_client/models/create_ai_transformer_mapping_options.rb +5 -10
- data/lib/mailslurp_client/models/create_domain_options.rb +19 -0
- data/lib/mailslurp_client/models/create_inbox_forwarder_options.rb +19 -0
- data/lib/mailslurp_client/models/create_inbox_replier_options.rb +19 -0
- data/lib/mailslurp_client/models/create_inbox_ruleset_options.rb +2 -2
- data/lib/mailslurp_client/models/create_totp_device_base32_secret_key_options.rb +306 -0
- data/lib/mailslurp_client/models/create_totp_device_custom_options.rb +306 -0
- data/lib/mailslurp_client/models/create_totp_device_otp_auth_url_options.rb +35 -0
- data/lib/mailslurp_client/models/create_webhook_options.rb +2 -2
- data/lib/mailslurp_client/models/describe_domain_options.rb +19 -0
- data/lib/mailslurp_client/models/dns_lookup_options.rb +19 -0
- data/lib/mailslurp_client/models/email.rb +13 -13
- data/lib/mailslurp_client/models/email_projection.rb +18 -18
- data/lib/mailslurp_client/models/email_thread_projection.rb +17 -17
- data/lib/mailslurp_client/models/entity_automation_item_projection.rb +10 -10
- data/lib/mailslurp_client/models/expiration_defaults.rb +1 -0
- data/lib/mailslurp_client/models/fake_email_dto.rb +1 -0
- data/lib/mailslurp_client/models/generate_structured_content_attachment_options.rb +1 -0
- data/lib/mailslurp_client/models/generate_structured_content_email_options.rb +1 -0
- data/lib/mailslurp_client/models/generate_structured_content_sms_options.rb +1 -0
- data/lib/mailslurp_client/models/inbox_exists_dto.rb +26 -4
- data/lib/mailslurp_client/models/inbox_ruleset_dto.rb +2 -2
- data/lib/mailslurp_client/models/inline_object.rb +58 -12
- data/lib/mailslurp_client/models/inline_object1.rb +211 -0
- data/lib/mailslurp_client/models/invoke_transformer_options.rb +329 -0
- data/lib/mailslurp_client/models/match_option.rb +19 -0
- data/lib/mailslurp_client/models/missed_email_dto.rb +1 -0
- data/lib/mailslurp_client/models/missed_email_projection.rb +11 -11
- data/lib/mailslurp_client/models/page_ai_transform_result_projection.rb +1 -1
- data/lib/mailslurp_client/models/pageable_object.rb +10 -10
- data/lib/mailslurp_client/models/phone_message_thread_item_projection.rb +19 -19
- data/lib/mailslurp_client/models/phone_message_thread_projection.rb +15 -25
- data/lib/mailslurp_client/models/sent_email_projection.rb +38 -53
- data/lib/mailslurp_client/models/sms_match_option.rb +19 -0
- data/lib/mailslurp_client/models/sms_preview.rb +4 -0
- data/lib/mailslurp_client/models/structured_output_schema.rb +12 -9
- data/lib/mailslurp_client/models/unknown_missed_email_projection.rb +10 -10
- data/lib/mailslurp_client/models/update_inbox_replier_options.rb +19 -0
- data/lib/mailslurp_client/models/upload_attachment_options.rb +19 -0
- data/lib/mailslurp_client/models/webhook_bounce_payload.rb +2 -2
- data/lib/mailslurp_client/models/webhook_bounce_recipient_payload.rb +2 -2
- data/lib/mailslurp_client/models/webhook_delivery_status_payload.rb +2 -2
- data/lib/mailslurp_client/models/webhook_dto.rb +2 -2
- data/lib/mailslurp_client/models/webhook_email_opened_payload.rb +2 -2
- data/lib/mailslurp_client/models/webhook_email_read_payload.rb +2 -2
- data/lib/mailslurp_client/models/webhook_new_ai_transform_result_payload.rb +389 -0
- data/lib/mailslurp_client/models/webhook_new_attachment_payload.rb +2 -2
- data/lib/mailslurp_client/models/webhook_new_contact_payload.rb +2 -2
- data/lib/mailslurp_client/models/webhook_new_email_payload.rb +2 -2
- data/lib/mailslurp_client/models/webhook_new_sms_payload.rb +2 -2
- data/lib/mailslurp_client/models/webhook_projection.rb +2 -2
- data/lib/mailslurp_client/models/webhook_result_dto.rb +2 -2
- data/lib/mailslurp_client/version.rb +1 -1
- data/lib/mailslurp_client.rb +8 -2
- metadata +10 -4
@@ -0,0 +1,306 @@
|
|
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 CreateTotpDeviceCustomOptions
|
17
|
+
# The base32 encoded secret provided by the identity provider for the TOTP device.
|
18
|
+
attr_accessor :secret
|
19
|
+
|
20
|
+
# Name for labeling the TOTP device
|
21
|
+
attr_accessor :name
|
22
|
+
|
23
|
+
# Optional username for the TOTP device
|
24
|
+
attr_accessor :username
|
25
|
+
|
26
|
+
# Optional issuer override for the TOTP device
|
27
|
+
attr_accessor :issuer
|
28
|
+
|
29
|
+
# Optional number of digits in TOTP code
|
30
|
+
attr_accessor :digits
|
31
|
+
|
32
|
+
# Optional period in seconds for TOTP code expiration
|
33
|
+
attr_accessor :period
|
34
|
+
|
35
|
+
# Optional algorithm override
|
36
|
+
attr_accessor :algorithm
|
37
|
+
|
38
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
39
|
+
def self.attribute_map
|
40
|
+
{
|
41
|
+
:'secret' => :'secret',
|
42
|
+
:'name' => :'name',
|
43
|
+
:'username' => :'username',
|
44
|
+
:'issuer' => :'issuer',
|
45
|
+
:'digits' => :'digits',
|
46
|
+
:'period' => :'period',
|
47
|
+
:'algorithm' => :'algorithm'
|
48
|
+
}
|
49
|
+
end
|
50
|
+
|
51
|
+
# Attribute type mapping.
|
52
|
+
def self.openapi_types
|
53
|
+
{
|
54
|
+
:'secret' => :'String',
|
55
|
+
:'name' => :'String',
|
56
|
+
:'username' => :'String',
|
57
|
+
:'issuer' => :'String',
|
58
|
+
:'digits' => :'Integer',
|
59
|
+
:'period' => :'Integer',
|
60
|
+
:'algorithm' => :'String'
|
61
|
+
}
|
62
|
+
end
|
63
|
+
|
64
|
+
# List of attributes with nullable: true
|
65
|
+
def self.openapi_nullable
|
66
|
+
Set.new([
|
67
|
+
:'name',
|
68
|
+
:'username',
|
69
|
+
:'issuer',
|
70
|
+
:'digits',
|
71
|
+
:'period',
|
72
|
+
:'algorithm'
|
73
|
+
])
|
74
|
+
end
|
75
|
+
|
76
|
+
# Initializes the object
|
77
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
78
|
+
def initialize(attributes = {})
|
79
|
+
if (!attributes.is_a?(Hash))
|
80
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::CreateTotpDeviceCustomOptions` initialize method"
|
81
|
+
end
|
82
|
+
|
83
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
84
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
85
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
86
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::CreateTotpDeviceCustomOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
87
|
+
end
|
88
|
+
h[k.to_sym] = v
|
89
|
+
}
|
90
|
+
|
91
|
+
if attributes.key?(:'secret')
|
92
|
+
self.secret = attributes[:'secret']
|
93
|
+
end
|
94
|
+
|
95
|
+
if attributes.key?(:'name')
|
96
|
+
self.name = attributes[:'name']
|
97
|
+
end
|
98
|
+
|
99
|
+
if attributes.key?(:'username')
|
100
|
+
self.username = attributes[:'username']
|
101
|
+
end
|
102
|
+
|
103
|
+
if attributes.key?(:'issuer')
|
104
|
+
self.issuer = attributes[:'issuer']
|
105
|
+
end
|
106
|
+
|
107
|
+
if attributes.key?(:'digits')
|
108
|
+
self.digits = attributes[:'digits']
|
109
|
+
else
|
110
|
+
self.digits = 6
|
111
|
+
end
|
112
|
+
|
113
|
+
if attributes.key?(:'period')
|
114
|
+
self.period = attributes[:'period']
|
115
|
+
else
|
116
|
+
self.period = 30
|
117
|
+
end
|
118
|
+
|
119
|
+
if attributes.key?(:'algorithm')
|
120
|
+
self.algorithm = attributes[:'algorithm']
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
124
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
125
|
+
# @return Array for valid properties with the reasons
|
126
|
+
def list_invalid_properties
|
127
|
+
invalid_properties = Array.new
|
128
|
+
if @secret.nil?
|
129
|
+
invalid_properties.push('invalid value for "secret", secret cannot be nil.')
|
130
|
+
end
|
131
|
+
|
132
|
+
if !@digits.nil? && @digits > 255
|
133
|
+
invalid_properties.push('invalid value for "digits", must be smaller than or equal to 255.')
|
134
|
+
end
|
135
|
+
|
136
|
+
if !@digits.nil? && @digits < 0
|
137
|
+
invalid_properties.push('invalid value for "digits", must be greater than or equal to 0.')
|
138
|
+
end
|
139
|
+
|
140
|
+
invalid_properties
|
141
|
+
end
|
142
|
+
|
143
|
+
# Check to see if the all the properties in the model are valid
|
144
|
+
# @return true if the model is valid
|
145
|
+
def valid?
|
146
|
+
return false if @secret.nil?
|
147
|
+
return false if !@digits.nil? && @digits > 255
|
148
|
+
return false if !@digits.nil? && @digits < 0
|
149
|
+
true
|
150
|
+
end
|
151
|
+
|
152
|
+
# Custom attribute writer method with validation
|
153
|
+
# @param [Object] digits Value to be assigned
|
154
|
+
def digits=(digits)
|
155
|
+
if !digits.nil? && digits > 255
|
156
|
+
fail ArgumentError, 'invalid value for "digits", must be smaller than or equal to 255.'
|
157
|
+
end
|
158
|
+
|
159
|
+
if !digits.nil? && digits < 0
|
160
|
+
fail ArgumentError, 'invalid value for "digits", must be greater than or equal to 0.'
|
161
|
+
end
|
162
|
+
|
163
|
+
@digits = digits
|
164
|
+
end
|
165
|
+
|
166
|
+
# Checks equality by comparing each attribute.
|
167
|
+
# @param [Object] Object to be compared
|
168
|
+
def ==(o)
|
169
|
+
return true if self.equal?(o)
|
170
|
+
self.class == o.class &&
|
171
|
+
secret == o.secret &&
|
172
|
+
name == o.name &&
|
173
|
+
username == o.username &&
|
174
|
+
issuer == o.issuer &&
|
175
|
+
digits == o.digits &&
|
176
|
+
period == o.period &&
|
177
|
+
algorithm == o.algorithm
|
178
|
+
end
|
179
|
+
|
180
|
+
# @see the `==` method
|
181
|
+
# @param [Object] Object to be compared
|
182
|
+
def eql?(o)
|
183
|
+
self == o
|
184
|
+
end
|
185
|
+
|
186
|
+
# Calculates hash code according to all attributes.
|
187
|
+
# @return [Integer] Hash code
|
188
|
+
def hash
|
189
|
+
[secret, name, username, issuer, digits, period, algorithm].hash
|
190
|
+
end
|
191
|
+
|
192
|
+
# Builds the object from hash
|
193
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
194
|
+
# @return [Object] Returns the model itself
|
195
|
+
def self.build_from_hash(attributes)
|
196
|
+
new.build_from_hash(attributes)
|
197
|
+
end
|
198
|
+
|
199
|
+
# Builds the object from hash
|
200
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
201
|
+
# @return [Object] Returns the model itself
|
202
|
+
def build_from_hash(attributes)
|
203
|
+
return nil unless attributes.is_a?(Hash)
|
204
|
+
self.class.openapi_types.each_pair do |key, type|
|
205
|
+
if type =~ /\AArray<(.*)>/i
|
206
|
+
# check to ensure the input is an array given that the attribute
|
207
|
+
# is documented as an array but the input is not
|
208
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
209
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
210
|
+
end
|
211
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
212
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
213
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
214
|
+
end
|
215
|
+
|
216
|
+
self
|
217
|
+
end
|
218
|
+
|
219
|
+
# Deserializes the data based on type
|
220
|
+
# @param string type Data type
|
221
|
+
# @param string value Value to be deserialized
|
222
|
+
# @return [Object] Deserialized data
|
223
|
+
def _deserialize(type, value)
|
224
|
+
case type.to_sym
|
225
|
+
when :DateTime
|
226
|
+
DateTime.parse(value)
|
227
|
+
when :Date
|
228
|
+
Date.parse(value)
|
229
|
+
when :String
|
230
|
+
value.to_s
|
231
|
+
when :Integer
|
232
|
+
value.to_i
|
233
|
+
when :Float
|
234
|
+
value.to_f
|
235
|
+
when :Boolean
|
236
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
237
|
+
true
|
238
|
+
else
|
239
|
+
false
|
240
|
+
end
|
241
|
+
when :Object
|
242
|
+
# generic object (usually a Hash), return directly
|
243
|
+
value
|
244
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
245
|
+
inner_type = Regexp.last_match[:inner_type]
|
246
|
+
value.map { |v| _deserialize(inner_type, v) }
|
247
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
248
|
+
k_type = Regexp.last_match[:k_type]
|
249
|
+
v_type = Regexp.last_match[:v_type]
|
250
|
+
{}.tap do |hash|
|
251
|
+
value.each do |k, v|
|
252
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
253
|
+
end
|
254
|
+
end
|
255
|
+
else # model
|
256
|
+
MailSlurpClient.const_get(type).build_from_hash(value)
|
257
|
+
end
|
258
|
+
end
|
259
|
+
|
260
|
+
# Returns the string representation of the object
|
261
|
+
# @return [String] String presentation of the object
|
262
|
+
def to_s
|
263
|
+
to_hash.to_s
|
264
|
+
end
|
265
|
+
|
266
|
+
# to_body is an alias to to_hash (backward compatibility)
|
267
|
+
# @return [Hash] Returns the object in the form of hash
|
268
|
+
def to_body
|
269
|
+
to_hash
|
270
|
+
end
|
271
|
+
|
272
|
+
# Returns the object in the form of hash
|
273
|
+
# @return [Hash] Returns the object in the form of hash
|
274
|
+
def to_hash
|
275
|
+
hash = {}
|
276
|
+
self.class.attribute_map.each_pair do |attr, param|
|
277
|
+
value = self.send(attr)
|
278
|
+
if value.nil?
|
279
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
280
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
281
|
+
end
|
282
|
+
|
283
|
+
hash[param] = _to_hash(value)
|
284
|
+
end
|
285
|
+
hash
|
286
|
+
end
|
287
|
+
|
288
|
+
# Outputs non-array value in the form of hash
|
289
|
+
# For object, use to_hash. Otherwise, just return the value
|
290
|
+
# @param [Object] value Any valid value
|
291
|
+
# @return [Hash] Returns the value in the form of hash
|
292
|
+
def _to_hash(value)
|
293
|
+
if value.is_a?(Array)
|
294
|
+
value.compact.map { |v| _to_hash(v) }
|
295
|
+
elsif value.is_a?(Hash)
|
296
|
+
{}.tap do |hash|
|
297
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
298
|
+
end
|
299
|
+
elsif value.respond_to? :to_hash
|
300
|
+
value.to_hash
|
301
|
+
else
|
302
|
+
value
|
303
|
+
end
|
304
|
+
end
|
305
|
+
end
|
306
|
+
end
|
@@ -14,18 +14,25 @@ require 'date'
|
|
14
14
|
|
15
15
|
module MailSlurpClient
|
16
16
|
class CreateTotpDeviceOtpAuthUrlOptions
|
17
|
+
# OTP Auth URI for connecting a TOTP device.
|
17
18
|
attr_accessor :otp_auth_url
|
18
19
|
|
20
|
+
# Name for labeling the TOTP device
|
19
21
|
attr_accessor :name
|
20
22
|
|
23
|
+
# Optional username for the TOTP device
|
21
24
|
attr_accessor :username
|
22
25
|
|
26
|
+
# Optional issuer override for the TOTP device
|
23
27
|
attr_accessor :issuer
|
24
28
|
|
29
|
+
# Optional number of digits in TOTP code
|
25
30
|
attr_accessor :digits
|
26
31
|
|
32
|
+
# Optional period in seconds for TOTP code expiration
|
27
33
|
attr_accessor :period
|
28
34
|
|
35
|
+
# Optional algorithm override
|
29
36
|
attr_accessor :algorithm
|
30
37
|
|
31
38
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -99,10 +106,14 @@ module MailSlurpClient
|
|
99
106
|
|
100
107
|
if attributes.key?(:'digits')
|
101
108
|
self.digits = attributes[:'digits']
|
109
|
+
else
|
110
|
+
self.digits = 6
|
102
111
|
end
|
103
112
|
|
104
113
|
if attributes.key?(:'period')
|
105
114
|
self.period = attributes[:'period']
|
115
|
+
else
|
116
|
+
self.period = 30
|
106
117
|
end
|
107
118
|
|
108
119
|
if attributes.key?(:'algorithm')
|
@@ -118,6 +129,14 @@ module MailSlurpClient
|
|
118
129
|
invalid_properties.push('invalid value for "otp_auth_url", otp_auth_url cannot be nil.')
|
119
130
|
end
|
120
131
|
|
132
|
+
if !@digits.nil? && @digits > 255
|
133
|
+
invalid_properties.push('invalid value for "digits", must be smaller than or equal to 255.')
|
134
|
+
end
|
135
|
+
|
136
|
+
if !@digits.nil? && @digits < 0
|
137
|
+
invalid_properties.push('invalid value for "digits", must be greater than or equal to 0.')
|
138
|
+
end
|
139
|
+
|
121
140
|
invalid_properties
|
122
141
|
end
|
123
142
|
|
@@ -125,9 +144,25 @@ module MailSlurpClient
|
|
125
144
|
# @return true if the model is valid
|
126
145
|
def valid?
|
127
146
|
return false if @otp_auth_url.nil?
|
147
|
+
return false if !@digits.nil? && @digits > 255
|
148
|
+
return false if !@digits.nil? && @digits < 0
|
128
149
|
true
|
129
150
|
end
|
130
151
|
|
152
|
+
# Custom attribute writer method with validation
|
153
|
+
# @param [Object] digits Value to be assigned
|
154
|
+
def digits=(digits)
|
155
|
+
if !digits.nil? && digits > 255
|
156
|
+
fail ArgumentError, 'invalid value for "digits", must be smaller than or equal to 255.'
|
157
|
+
end
|
158
|
+
|
159
|
+
if !digits.nil? && digits < 0
|
160
|
+
fail ArgumentError, 'invalid value for "digits", must be greater than or equal to 0.'
|
161
|
+
end
|
162
|
+
|
163
|
+
@digits = digits
|
164
|
+
end
|
165
|
+
|
131
166
|
# Checks equality by comparing each attribute.
|
132
167
|
# @param [Object] Object to be compared
|
133
168
|
def ==(o)
|
@@ -186,7 +186,7 @@ module MailSlurpClient
|
|
186
186
|
# @return true if the model is valid
|
187
187
|
def valid?
|
188
188
|
return false if @url.nil?
|
189
|
-
event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS", "NEW_GUEST_USER"])
|
189
|
+
event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_AI_TRANSFORM_RESULT", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS", "NEW_GUEST_USER"])
|
190
190
|
return false unless event_name_validator.valid?(@event_name)
|
191
191
|
true
|
192
192
|
end
|
@@ -194,7 +194,7 @@ module MailSlurpClient
|
|
194
194
|
# Custom attribute writer method checking allowed values (enum).
|
195
195
|
# @param [Object] event_name Object to be assigned
|
196
196
|
def event_name=(event_name)
|
197
|
-
validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS", "NEW_GUEST_USER"])
|
197
|
+
validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_AI_TRANSFORM_RESULT", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS", "NEW_GUEST_USER"])
|
198
198
|
unless validator.valid?(event_name)
|
199
199
|
fail ArgumentError, "invalid value for \"event_name\", must be one of #{validator.allowable_values}."
|
200
200
|
end
|
@@ -65,6 +65,10 @@ module MailSlurpClient
|
|
65
65
|
invalid_properties.push('invalid value for "domain", domain cannot be nil.')
|
66
66
|
end
|
67
67
|
|
68
|
+
if @domain.to_s.length < 1
|
69
|
+
invalid_properties.push('invalid value for "domain", the character length must be great than or equal to 1.')
|
70
|
+
end
|
71
|
+
|
68
72
|
invalid_properties
|
69
73
|
end
|
70
74
|
|
@@ -72,9 +76,24 @@ module MailSlurpClient
|
|
72
76
|
# @return true if the model is valid
|
73
77
|
def valid?
|
74
78
|
return false if @domain.nil?
|
79
|
+
return false if @domain.to_s.length < 1
|
75
80
|
true
|
76
81
|
end
|
77
82
|
|
83
|
+
# Custom attribute writer method with validation
|
84
|
+
# @param [Object] domain Value to be assigned
|
85
|
+
def domain=(domain)
|
86
|
+
if domain.nil?
|
87
|
+
fail ArgumentError, 'domain cannot be nil'
|
88
|
+
end
|
89
|
+
|
90
|
+
if domain.to_s.length < 1
|
91
|
+
fail ArgumentError, 'invalid value for "domain", the character length must be great than or equal to 1.'
|
92
|
+
end
|
93
|
+
|
94
|
+
@domain = domain
|
95
|
+
end
|
96
|
+
|
78
97
|
# Checks equality by comparing each attribute.
|
79
98
|
# @param [Object] Object to be compared
|
80
99
|
def ==(o)
|
@@ -108,6 +108,10 @@ module MailSlurpClient
|
|
108
108
|
invalid_properties.push('invalid value for "hostname", hostname cannot be nil.')
|
109
109
|
end
|
110
110
|
|
111
|
+
if @hostname.to_s.length < 1
|
112
|
+
invalid_properties.push('invalid value for "hostname", the character length must be great than or equal to 1.')
|
113
|
+
end
|
114
|
+
|
111
115
|
if @record_types.nil?
|
112
116
|
invalid_properties.push('invalid value for "record_types", record_types cannot be nil.')
|
113
117
|
end
|
@@ -123,11 +127,26 @@ module MailSlurpClient
|
|
123
127
|
# @return true if the model is valid
|
124
128
|
def valid?
|
125
129
|
return false if @hostname.nil?
|
130
|
+
return false if @hostname.to_s.length < 1
|
126
131
|
return false if @record_types.nil?
|
127
132
|
return false if @omit_final_dns_dot.nil?
|
128
133
|
true
|
129
134
|
end
|
130
135
|
|
136
|
+
# Custom attribute writer method with validation
|
137
|
+
# @param [Object] hostname Value to be assigned
|
138
|
+
def hostname=(hostname)
|
139
|
+
if hostname.nil?
|
140
|
+
fail ArgumentError, 'hostname cannot be nil'
|
141
|
+
end
|
142
|
+
|
143
|
+
if hostname.to_s.length < 1
|
144
|
+
fail ArgumentError, 'invalid value for "hostname", the character length must be great than or equal to 1.'
|
145
|
+
end
|
146
|
+
|
147
|
+
@hostname = hostname
|
148
|
+
end
|
149
|
+
|
131
150
|
# Checks equality by comparing each attribute.
|
132
151
|
# @param [Object] Object to be compared
|
133
152
|
def ==(o)
|
@@ -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 :xamp_html
|
118
|
-
|
119
117
|
attr_accessor :html
|
120
118
|
|
119
|
+
attr_accessor :xamp_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
|
-
:'
|
159
|
-
:'
|
158
|
+
:'html' => :'html',
|
159
|
+
:'xamp_html' => :'xampHtml'
|
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
|
-
:'
|
201
|
-
:'
|
200
|
+
:'html' => :'Boolean',
|
201
|
+
:'xamp_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?(:'xamp_html')
|
403
|
-
self.xamp_html = attributes[:'xamp_html']
|
404
|
-
end
|
405
|
-
|
406
402
|
if attributes.key?(:'html')
|
407
403
|
self.html = attributes[:'html']
|
408
404
|
end
|
405
|
+
|
406
|
+
if attributes.key?(:'xamp_html')
|
407
|
+
self.xamp_html = attributes[:'xamp_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
|
-
|
504
|
-
|
503
|
+
html == o.html &&
|
504
|
+
xamp_html == o.xamp_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,
|
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
|
517
517
|
end
|
518
518
|
|
519
519
|
# Builds the object from hash
|
@@ -15,12 +15,10 @@ 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 :
|
18
|
+
attr_accessor :recipients
|
19
19
|
|
20
20
|
attr_accessor :sender
|
21
21
|
|
22
|
-
attr_accessor :recipients
|
23
|
-
|
24
22
|
attr_accessor :attachments
|
25
23
|
|
26
24
|
attr_accessor :inbox_id
|
@@ -57,6 +55,8 @@ module MailSlurpClient
|
|
57
55
|
|
58
56
|
attr_accessor :team_access
|
59
57
|
|
58
|
+
attr_accessor :subject
|
59
|
+
|
60
60
|
attr_accessor :id
|
61
61
|
|
62
62
|
attr_accessor :thread_id
|
@@ -66,9 +66,8 @@ 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',
|
70
|
-
:'sender' => :'sender',
|
71
69
|
:'recipients' => :'recipients',
|
70
|
+
:'sender' => :'sender',
|
72
71
|
:'attachments' => :'attachments',
|
73
72
|
:'inbox_id' => :'inboxId',
|
74
73
|
:'created_at' => :'createdAt',
|
@@ -87,6 +86,7 @@ module MailSlurpClient
|
|
87
86
|
:'body_part_content_types' => :'bodyPartContentTypes',
|
88
87
|
:'body_md5_hash' => :'bodyMD5Hash',
|
89
88
|
:'team_access' => :'teamAccess',
|
89
|
+
:'subject' => :'subject',
|
90
90
|
:'id' => :'id',
|
91
91
|
:'thread_id' => :'threadId',
|
92
92
|
:'from' => :'from'
|
@@ -96,9 +96,8 @@ module MailSlurpClient
|
|
96
96
|
# Attribute type mapping.
|
97
97
|
def self.openapi_types
|
98
98
|
{
|
99
|
-
:'subject' => :'String',
|
100
|
-
:'sender' => :'Sender',
|
101
99
|
:'recipients' => :'EmailRecipients',
|
100
|
+
:'sender' => :'Sender',
|
102
101
|
:'attachments' => :'Array<String>',
|
103
102
|
:'inbox_id' => :'String',
|
104
103
|
:'created_at' => :'DateTime',
|
@@ -117,6 +116,7 @@ module MailSlurpClient
|
|
117
116
|
:'body_part_content_types' => :'Array<String>',
|
118
117
|
:'body_md5_hash' => :'String',
|
119
118
|
:'team_access' => :'Boolean',
|
119
|
+
:'subject' => :'String',
|
120
120
|
:'id' => :'String',
|
121
121
|
:'thread_id' => :'String',
|
122
122
|
:'from' => :'String'
|
@@ -126,9 +126,8 @@ module MailSlurpClient
|
|
126
126
|
# List of attributes with nullable: true
|
127
127
|
def self.openapi_nullable
|
128
128
|
Set.new([
|
129
|
-
:'subject',
|
130
|
-
:'sender',
|
131
129
|
:'recipients',
|
130
|
+
:'sender',
|
132
131
|
:'attachments',
|
133
132
|
:'cc',
|
134
133
|
:'bcc',
|
@@ -142,6 +141,7 @@ module MailSlurpClient
|
|
142
141
|
:'text_excerpt',
|
143
142
|
:'body_part_content_types',
|
144
143
|
:'body_md5_hash',
|
144
|
+
:'subject',
|
145
145
|
:'thread_id',
|
146
146
|
:'from'
|
147
147
|
])
|
@@ -162,18 +162,14 @@ module MailSlurpClient
|
|
162
162
|
h[k.to_sym] = v
|
163
163
|
}
|
164
164
|
|
165
|
-
if attributes.key?(:'
|
166
|
-
self.
|
165
|
+
if attributes.key?(:'recipients')
|
166
|
+
self.recipients = attributes[:'recipients']
|
167
167
|
end
|
168
168
|
|
169
169
|
if attributes.key?(:'sender')
|
170
170
|
self.sender = attributes[:'sender']
|
171
171
|
end
|
172
172
|
|
173
|
-
if attributes.key?(:'recipients')
|
174
|
-
self.recipients = attributes[:'recipients']
|
175
|
-
end
|
176
|
-
|
177
173
|
if attributes.key?(:'attachments')
|
178
174
|
if (value = attributes[:'attachments']).is_a?(Array)
|
179
175
|
self.attachments = value
|
@@ -256,6 +252,10 @@ module MailSlurpClient
|
|
256
252
|
self.team_access = attributes[:'team_access']
|
257
253
|
end
|
258
254
|
|
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,9 +317,8 @@ module MailSlurpClient
|
|
317
317
|
def ==(o)
|
318
318
|
return true if self.equal?(o)
|
319
319
|
self.class == o.class &&
|
320
|
-
subject == o.subject &&
|
321
|
-
sender == o.sender &&
|
322
320
|
recipients == o.recipients &&
|
321
|
+
sender == o.sender &&
|
323
322
|
attachments == o.attachments &&
|
324
323
|
inbox_id == o.inbox_id &&
|
325
324
|
created_at == o.created_at &&
|
@@ -338,6 +337,7 @@ module MailSlurpClient
|
|
338
337
|
body_part_content_types == o.body_part_content_types &&
|
339
338
|
body_md5_hash == o.body_md5_hash &&
|
340
339
|
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
|
-
[
|
355
|
+
[recipients, sender, 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, subject, id, thread_id, from].hash
|
356
356
|
end
|
357
357
|
|
358
358
|
# Builds the object from hash
|