mailslurp_client 15.17.17 → 15.17.21

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