mailslurp_client 15.17.17 → 15.17.22

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