mailslurp_client 15.17.41 → 15.18.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (25) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mailslurp_client/api/email_controller_api.rb +62 -0
  3. data/lib/mailslurp_client/api/tools_controller_api.rb +175 -0
  4. data/lib/mailslurp_client/models/alias_projection.rb +19 -19
  5. data/lib/mailslurp_client/models/bounce_recipient_projection.rb +11 -11
  6. data/lib/mailslurp_client/models/check_email_body_results.rb +259 -0
  7. data/lib/mailslurp_client/models/connector_projection.rb +15 -15
  8. data/lib/mailslurp_client/models/email_projection.rb +10 -10
  9. data/lib/mailslurp_client/models/expired_inbox_record_projection.rb +15 -15
  10. data/lib/mailslurp_client/models/fake_email_dto.rb +305 -0
  11. data/lib/mailslurp_client/models/fake_email_preview.rb +291 -0
  12. data/lib/mailslurp_client/models/fake_email_result.rb +206 -0
  13. data/lib/mailslurp_client/models/image_issue.rb +282 -0
  14. data/lib/mailslurp_client/models/imap_smtp_access_details.rb +15 -4
  15. data/lib/mailslurp_client/models/inbox_forwarder_event_projection.rb +11 -11
  16. data/lib/mailslurp_client/models/inbox_replier_event_projection.rb +21 -21
  17. data/lib/mailslurp_client/models/link_issue.rb +282 -0
  18. data/lib/mailslurp_client/models/new_fake_email_address_result.rb +211 -0
  19. data/lib/mailslurp_client/models/sent_email_projection.rb +38 -38
  20. data/lib/mailslurp_client/models/spelling_issue.rb +287 -0
  21. data/lib/mailslurp_client/models/thread_projection.rb +16 -16
  22. data/lib/mailslurp_client/models/tracking_pixel_projection.rb +13 -13
  23. data/lib/mailslurp_client/version.rb +1 -1
  24. data/lib/mailslurp_client.rb +8 -0
  25. metadata +10 -2
@@ -0,0 +1,305 @@
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 FakeEmailDto
17
+ attr_accessor :id
18
+
19
+ attr_accessor :email_address
20
+
21
+ attr_accessor :sender
22
+
23
+ attr_accessor :recipients
24
+
25
+ attr_accessor :subject
26
+
27
+ attr_accessor :preview
28
+
29
+ attr_accessor :body
30
+
31
+ attr_accessor :seen
32
+
33
+ attr_accessor :created_at
34
+
35
+ # Attribute mapping from ruby-style variable name to JSON key.
36
+ def self.attribute_map
37
+ {
38
+ :'id' => :'id',
39
+ :'email_address' => :'emailAddress',
40
+ :'sender' => :'sender',
41
+ :'recipients' => :'recipients',
42
+ :'subject' => :'subject',
43
+ :'preview' => :'preview',
44
+ :'body' => :'body',
45
+ :'seen' => :'seen',
46
+ :'created_at' => :'createdAt'
47
+ }
48
+ end
49
+
50
+ # Attribute type mapping.
51
+ def self.openapi_types
52
+ {
53
+ :'id' => :'String',
54
+ :'email_address' => :'String',
55
+ :'sender' => :'Sender',
56
+ :'recipients' => :'EmailRecipients',
57
+ :'subject' => :'String',
58
+ :'preview' => :'String',
59
+ :'body' => :'String',
60
+ :'seen' => :'Boolean',
61
+ :'created_at' => :'DateTime'
62
+ }
63
+ end
64
+
65
+ # List of attributes with nullable: true
66
+ def self.openapi_nullable
67
+ Set.new([
68
+ :'sender',
69
+ :'recipients',
70
+ ])
71
+ end
72
+
73
+ # Initializes the object
74
+ # @param [Hash] attributes Model attributes in the form of hash
75
+ def initialize(attributes = {})
76
+ if (!attributes.is_a?(Hash))
77
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::FakeEmailDto` initialize method"
78
+ end
79
+
80
+ # check to see if the attribute exists and convert string to symbol for hash key
81
+ attributes = attributes.each_with_object({}) { |(k, v), h|
82
+ if (!self.class.attribute_map.key?(k.to_sym))
83
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::FakeEmailDto`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
84
+ end
85
+ h[k.to_sym] = v
86
+ }
87
+
88
+ if attributes.key?(:'id')
89
+ self.id = attributes[:'id']
90
+ end
91
+
92
+ if attributes.key?(:'email_address')
93
+ self.email_address = attributes[:'email_address']
94
+ end
95
+
96
+ if attributes.key?(:'sender')
97
+ self.sender = attributes[:'sender']
98
+ end
99
+
100
+ if attributes.key?(:'recipients')
101
+ self.recipients = attributes[:'recipients']
102
+ end
103
+
104
+ if attributes.key?(:'subject')
105
+ self.subject = attributes[:'subject']
106
+ end
107
+
108
+ if attributes.key?(:'preview')
109
+ self.preview = attributes[:'preview']
110
+ end
111
+
112
+ if attributes.key?(:'body')
113
+ self.body = attributes[:'body']
114
+ end
115
+
116
+ if attributes.key?(:'seen')
117
+ self.seen = attributes[:'seen']
118
+ end
119
+
120
+ if attributes.key?(:'created_at')
121
+ self.created_at = attributes[:'created_at']
122
+ end
123
+ end
124
+
125
+ # Show invalid properties with the reasons. Usually used together with valid?
126
+ # @return Array for valid properties with the reasons
127
+ def list_invalid_properties
128
+ invalid_properties = Array.new
129
+ if @id.nil?
130
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
131
+ end
132
+
133
+ if @email_address.nil?
134
+ invalid_properties.push('invalid value for "email_address", email_address cannot be nil.')
135
+ end
136
+
137
+ if @body.nil?
138
+ invalid_properties.push('invalid value for "body", body cannot be nil.')
139
+ end
140
+
141
+ if @seen.nil?
142
+ invalid_properties.push('invalid value for "seen", seen cannot be nil.')
143
+ end
144
+
145
+ if @created_at.nil?
146
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
147
+ end
148
+
149
+ invalid_properties
150
+ end
151
+
152
+ # Check to see if the all the properties in the model are valid
153
+ # @return true if the model is valid
154
+ def valid?
155
+ return false if @id.nil?
156
+ return false if @email_address.nil?
157
+ return false if @body.nil?
158
+ return false if @seen.nil?
159
+ return false if @created_at.nil?
160
+ true
161
+ end
162
+
163
+ # Checks equality by comparing each attribute.
164
+ # @param [Object] Object to be compared
165
+ def ==(o)
166
+ return true if self.equal?(o)
167
+ self.class == o.class &&
168
+ id == o.id &&
169
+ email_address == o.email_address &&
170
+ sender == o.sender &&
171
+ recipients == o.recipients &&
172
+ subject == o.subject &&
173
+ preview == o.preview &&
174
+ body == o.body &&
175
+ seen == o.seen &&
176
+ created_at == o.created_at
177
+ end
178
+
179
+ # @see the `==` method
180
+ # @param [Object] Object to be compared
181
+ def eql?(o)
182
+ self == o
183
+ end
184
+
185
+ # Calculates hash code according to all attributes.
186
+ # @return [Integer] Hash code
187
+ def hash
188
+ [id, email_address, sender, recipients, subject, preview, body, seen, created_at].hash
189
+ end
190
+
191
+ # Builds the object from hash
192
+ # @param [Hash] attributes Model attributes in the form of hash
193
+ # @return [Object] Returns the model itself
194
+ def self.build_from_hash(attributes)
195
+ new.build_from_hash(attributes)
196
+ end
197
+
198
+ # Builds the object from hash
199
+ # @param [Hash] attributes Model attributes in the form of hash
200
+ # @return [Object] Returns the model itself
201
+ def build_from_hash(attributes)
202
+ return nil unless attributes.is_a?(Hash)
203
+ self.class.openapi_types.each_pair do |key, type|
204
+ if type =~ /\AArray<(.*)>/i
205
+ # check to ensure the input is an array given that the attribute
206
+ # is documented as an array but the input is not
207
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
208
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
209
+ end
210
+ elsif !attributes[self.class.attribute_map[key]].nil?
211
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
212
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
213
+ end
214
+
215
+ self
216
+ end
217
+
218
+ # Deserializes the data based on type
219
+ # @param string type Data type
220
+ # @param string value Value to be deserialized
221
+ # @return [Object] Deserialized data
222
+ def _deserialize(type, value)
223
+ case type.to_sym
224
+ when :DateTime
225
+ DateTime.parse(value)
226
+ when :Date
227
+ Date.parse(value)
228
+ when :String
229
+ value.to_s
230
+ when :Integer
231
+ value.to_i
232
+ when :Float
233
+ value.to_f
234
+ when :Boolean
235
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
236
+ true
237
+ else
238
+ false
239
+ end
240
+ when :Object
241
+ # generic object (usually a Hash), return directly
242
+ value
243
+ when /\AArray<(?<inner_type>.+)>\z/
244
+ inner_type = Regexp.last_match[:inner_type]
245
+ value.map { |v| _deserialize(inner_type, v) }
246
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
247
+ k_type = Regexp.last_match[:k_type]
248
+ v_type = Regexp.last_match[:v_type]
249
+ {}.tap do |hash|
250
+ value.each do |k, v|
251
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
252
+ end
253
+ end
254
+ else # model
255
+ MailSlurpClient.const_get(type).build_from_hash(value)
256
+ end
257
+ end
258
+
259
+ # Returns the string representation of the object
260
+ # @return [String] String presentation of the object
261
+ def to_s
262
+ to_hash.to_s
263
+ end
264
+
265
+ # to_body is an alias to to_hash (backward compatibility)
266
+ # @return [Hash] Returns the object in the form of hash
267
+ def to_body
268
+ to_hash
269
+ end
270
+
271
+ # Returns the object in the form of hash
272
+ # @return [Hash] Returns the object in the form of hash
273
+ def to_hash
274
+ hash = {}
275
+ self.class.attribute_map.each_pair do |attr, param|
276
+ value = self.send(attr)
277
+ if value.nil?
278
+ is_nullable = self.class.openapi_nullable.include?(attr)
279
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
280
+ end
281
+
282
+ hash[param] = _to_hash(value)
283
+ end
284
+ hash
285
+ end
286
+
287
+ # Outputs non-array value in the form of hash
288
+ # For object, use to_hash. Otherwise, just return the value
289
+ # @param [Object] value Any valid value
290
+ # @return [Hash] Returns the value in the form of hash
291
+ def _to_hash(value)
292
+ if value.is_a?(Array)
293
+ value.compact.map { |v| _to_hash(v) }
294
+ elsif value.is_a?(Hash)
295
+ {}.tap do |hash|
296
+ value.each { |k, v| hash[k] = _to_hash(v) }
297
+ end
298
+ elsif value.respond_to? :to_hash
299
+ value.to_hash
300
+ else
301
+ value
302
+ end
303
+ end
304
+ end
305
+ end
@@ -0,0 +1,291 @@
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 FakeEmailPreview
17
+ attr_accessor :id
18
+
19
+ attr_accessor :email_address
20
+
21
+ attr_accessor :sender
22
+
23
+ attr_accessor :recipients
24
+
25
+ attr_accessor :subject
26
+
27
+ attr_accessor :preview
28
+
29
+ attr_accessor :created_at
30
+
31
+ attr_accessor :seen
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ def self.attribute_map
35
+ {
36
+ :'id' => :'id',
37
+ :'email_address' => :'emailAddress',
38
+ :'sender' => :'sender',
39
+ :'recipients' => :'recipients',
40
+ :'subject' => :'subject',
41
+ :'preview' => :'preview',
42
+ :'created_at' => :'createdAt',
43
+ :'seen' => :'seen'
44
+ }
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ def self.openapi_types
49
+ {
50
+ :'id' => :'String',
51
+ :'email_address' => :'String',
52
+ :'sender' => :'Sender',
53
+ :'recipients' => :'EmailRecipients',
54
+ :'subject' => :'String',
55
+ :'preview' => :'String',
56
+ :'created_at' => :'DateTime',
57
+ :'seen' => :'Boolean'
58
+ }
59
+ end
60
+
61
+ # List of attributes with nullable: true
62
+ def self.openapi_nullable
63
+ Set.new([
64
+ :'sender',
65
+ :'recipients',
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::FakeEmailPreview` 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::FakeEmailPreview`. 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?(:'id')
85
+ self.id = attributes[:'id']
86
+ end
87
+
88
+ if attributes.key?(:'email_address')
89
+ self.email_address = attributes[:'email_address']
90
+ end
91
+
92
+ if attributes.key?(:'sender')
93
+ self.sender = attributes[:'sender']
94
+ end
95
+
96
+ if attributes.key?(:'recipients')
97
+ self.recipients = attributes[:'recipients']
98
+ end
99
+
100
+ if attributes.key?(:'subject')
101
+ self.subject = attributes[:'subject']
102
+ end
103
+
104
+ if attributes.key?(:'preview')
105
+ self.preview = attributes[:'preview']
106
+ end
107
+
108
+ if attributes.key?(:'created_at')
109
+ self.created_at = attributes[:'created_at']
110
+ end
111
+
112
+ if attributes.key?(:'seen')
113
+ self.seen = attributes[:'seen']
114
+ end
115
+ end
116
+
117
+ # Show invalid properties with the reasons. Usually used together with valid?
118
+ # @return Array for valid properties with the reasons
119
+ def list_invalid_properties
120
+ invalid_properties = Array.new
121
+ if @id.nil?
122
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
123
+ end
124
+
125
+ if @email_address.nil?
126
+ invalid_properties.push('invalid value for "email_address", email_address cannot be nil.')
127
+ end
128
+
129
+ if @created_at.nil?
130
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
131
+ end
132
+
133
+ if @seen.nil?
134
+ invalid_properties.push('invalid value for "seen", seen cannot be nil.')
135
+ end
136
+
137
+ invalid_properties
138
+ end
139
+
140
+ # Check to see if the all the properties in the model are valid
141
+ # @return true if the model is valid
142
+ def valid?
143
+ return false if @id.nil?
144
+ return false if @email_address.nil?
145
+ return false if @created_at.nil?
146
+ return false if @seen.nil?
147
+ true
148
+ end
149
+
150
+ # Checks equality by comparing each attribute.
151
+ # @param [Object] Object to be compared
152
+ def ==(o)
153
+ return true if self.equal?(o)
154
+ self.class == o.class &&
155
+ id == o.id &&
156
+ email_address == o.email_address &&
157
+ sender == o.sender &&
158
+ recipients == o.recipients &&
159
+ subject == o.subject &&
160
+ preview == o.preview &&
161
+ created_at == o.created_at &&
162
+ seen == o.seen
163
+ end
164
+
165
+ # @see the `==` method
166
+ # @param [Object] Object to be compared
167
+ def eql?(o)
168
+ self == o
169
+ end
170
+
171
+ # Calculates hash code according to all attributes.
172
+ # @return [Integer] Hash code
173
+ def hash
174
+ [id, email_address, sender, recipients, subject, preview, created_at, seen].hash
175
+ end
176
+
177
+ # Builds the object from hash
178
+ # @param [Hash] attributes Model attributes in the form of hash
179
+ # @return [Object] Returns the model itself
180
+ def self.build_from_hash(attributes)
181
+ new.build_from_hash(attributes)
182
+ end
183
+
184
+ # Builds the object from hash
185
+ # @param [Hash] attributes Model attributes in the form of hash
186
+ # @return [Object] Returns the model itself
187
+ def build_from_hash(attributes)
188
+ return nil unless attributes.is_a?(Hash)
189
+ self.class.openapi_types.each_pair do |key, type|
190
+ if type =~ /\AArray<(.*)>/i
191
+ # check to ensure the input is an array given that the attribute
192
+ # is documented as an array but the input is not
193
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
194
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
195
+ end
196
+ elsif !attributes[self.class.attribute_map[key]].nil?
197
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
198
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
199
+ end
200
+
201
+ self
202
+ end
203
+
204
+ # Deserializes the data based on type
205
+ # @param string type Data type
206
+ # @param string value Value to be deserialized
207
+ # @return [Object] Deserialized data
208
+ def _deserialize(type, value)
209
+ case type.to_sym
210
+ when :DateTime
211
+ DateTime.parse(value)
212
+ when :Date
213
+ Date.parse(value)
214
+ when :String
215
+ value.to_s
216
+ when :Integer
217
+ value.to_i
218
+ when :Float
219
+ value.to_f
220
+ when :Boolean
221
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
222
+ true
223
+ else
224
+ false
225
+ end
226
+ when :Object
227
+ # generic object (usually a Hash), return directly
228
+ value
229
+ when /\AArray<(?<inner_type>.+)>\z/
230
+ inner_type = Regexp.last_match[:inner_type]
231
+ value.map { |v| _deserialize(inner_type, v) }
232
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
233
+ k_type = Regexp.last_match[:k_type]
234
+ v_type = Regexp.last_match[:v_type]
235
+ {}.tap do |hash|
236
+ value.each do |k, v|
237
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
238
+ end
239
+ end
240
+ else # model
241
+ MailSlurpClient.const_get(type).build_from_hash(value)
242
+ end
243
+ end
244
+
245
+ # Returns the string representation of the object
246
+ # @return [String] String presentation of the object
247
+ def to_s
248
+ to_hash.to_s
249
+ end
250
+
251
+ # to_body is an alias to to_hash (backward compatibility)
252
+ # @return [Hash] Returns the object in the form of hash
253
+ def to_body
254
+ to_hash
255
+ end
256
+
257
+ # Returns the object in the form of hash
258
+ # @return [Hash] Returns the object in the form of hash
259
+ def to_hash
260
+ hash = {}
261
+ self.class.attribute_map.each_pair do |attr, param|
262
+ value = self.send(attr)
263
+ if value.nil?
264
+ is_nullable = self.class.openapi_nullable.include?(attr)
265
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
266
+ end
267
+
268
+ hash[param] = _to_hash(value)
269
+ end
270
+ hash
271
+ end
272
+
273
+ # Outputs non-array value in the form of hash
274
+ # For object, use to_hash. Otherwise, just return the value
275
+ # @param [Object] value Any valid value
276
+ # @return [Hash] Returns the value in the form of hash
277
+ def _to_hash(value)
278
+ if value.is_a?(Array)
279
+ value.compact.map { |v| _to_hash(v) }
280
+ elsif value.is_a?(Hash)
281
+ {}.tap do |hash|
282
+ value.each { |k, v| hash[k] = _to_hash(v) }
283
+ end
284
+ elsif value.respond_to? :to_hash
285
+ value.to_hash
286
+ else
287
+ value
288
+ end
289
+ end
290
+ end
291
+ end