mailslurp_client 5.0.0 → 7.2.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mailslurp_client.rb +72 -7
  3. metadata +14 -271
  4. data/Gemfile +0 -8
  5. data/Gemfile.lock +0 -79
  6. data/LICENSE +0 -22
  7. data/README.md +0 -139
  8. data/Rakefile +0 -10
  9. data/docs/BasicAuthOptions.md +0 -9
  10. data/docs/BulkSendEmailOptions.md +0 -9
  11. data/docs/CommonOperationsApi.md +0 -499
  12. data/docs/CreateWebhookOptions.md +0 -10
  13. data/docs/Email.md +0 -24
  14. data/docs/EmailAnalysis.md +0 -12
  15. data/docs/EmailPreview.md +0 -13
  16. data/docs/ExtraOperationsApi.md +0 -1021
  17. data/docs/ForwardEmailOptions.md +0 -11
  18. data/docs/Inbox.md +0 -11
  19. data/docs/MatchOption.md +0 -10
  20. data/docs/MatchOptions.md +0 -8
  21. data/docs/SendEmailOptions.md +0 -18
  22. data/docs/UploadAttachmentOptions.md +0 -10
  23. data/docs/Webhook.md +0 -13
  24. data/git_push.sh +0 -55
  25. data/lib/mailslurp_client/api/common_operations_api.rb +0 -502
  26. data/lib/mailslurp_client/api/extra_operations_api.rb +0 -1054
  27. data/lib/mailslurp_client/api_client.rb +0 -389
  28. data/lib/mailslurp_client/api_error.rb +0 -38
  29. data/lib/mailslurp_client/configuration.rb +0 -251
  30. data/lib/mailslurp_client/models/basic_auth_options.rb +0 -202
  31. data/lib/mailslurp_client/models/bulk_send_email_options.rb +0 -201
  32. data/lib/mailslurp_client/models/create_webhook_options.rb +0 -202
  33. data/lib/mailslurp_client/models/email.rb +0 -368
  34. data/lib/mailslurp_client/models/email_analysis.rb +0 -245
  35. data/lib/mailslurp_client/models/email_preview.rb +0 -250
  36. data/lib/mailslurp_client/models/forward_email_options.rb +0 -222
  37. data/lib/mailslurp_client/models/inbox.rb +0 -212
  38. data/lib/mailslurp_client/models/match_option.rb +0 -250
  39. data/lib/mailslurp_client/models/match_options.rb +0 -187
  40. data/lib/mailslurp_client/models/send_email_options.rb +0 -297
  41. data/lib/mailslurp_client/models/upload_attachment_options.rb +0 -205
  42. data/lib/mailslurp_client/models/webhook.rb +0 -242
  43. data/lib/mailslurp_client/version.rb +0 -15
  44. data/mailslurp_client.gemspec +0 -45
  45. data/spec/api/common_operations_api_spec.rb +0 -95
  46. data/spec/api/extra_operations_api_spec.rb +0 -231
  47. data/spec/api_client_spec.rb +0 -226
  48. data/spec/configuration_spec.rb +0 -42
  49. data/spec/models/basic_auth_options_spec.rb +0 -47
  50. data/spec/models/bulk_send_email_options_spec.rb +0 -47
  51. data/spec/models/create_webhook_options_spec.rb +0 -53
  52. data/spec/models/email_analysis_spec.rb +0 -65
  53. data/spec/models/email_preview_spec.rb +0 -47
  54. data/spec/models/email_spec.rb +0 -125
  55. data/spec/models/forward_email_options_spec.rb +0 -59
  56. data/spec/models/inbox_spec.rb +0 -59
  57. data/spec/models/match_option_spec.rb +0 -61
  58. data/spec/models/match_options_spec.rb +0 -41
  59. data/spec/models/send_email_options_spec.rb +0 -89
  60. data/spec/models/upload_attachment_options_spec.rb +0 -53
  61. data/spec/models/webhook_spec.rb +0 -71
  62. data/spec/spec_helper.rb +0 -111
@@ -1,368 +0,0 @@
1
- =begin
2
- #MailSlurp API
3
-
4
- #For documentation see [developer guide](https://www.mailslurp.com/developers). [Create an account](https://app.mailslurp.com) in the MailSlurp Dashboard to [view your API Key](https://app). For all bugs, feature requests, or help please [see support](https://www.mailslurp.com/support/).
5
-
6
- OpenAPI spec version: 0.0.1-alpha
7
- Contact: contact@mailslurp.dev
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 3.3.4
10
-
11
- =end
12
-
13
- require 'date'
14
-
15
- module MailSlurpClient
16
- # Representation of an email
17
- class Email
18
- attr_accessor :analysis
19
-
20
- attr_accessor :attachments
21
-
22
- attr_accessor :bcc
23
-
24
- attr_accessor :body
25
-
26
- attr_accessor :cc
27
-
28
- attr_accessor :charset
29
-
30
- attr_accessor :created_at
31
-
32
- attr_accessor :from
33
-
34
- attr_accessor :headers
35
-
36
- attr_accessor :html
37
-
38
- attr_accessor :id
39
-
40
- attr_accessor :inbox_id
41
-
42
- attr_accessor :raw_url
43
-
44
- attr_accessor :subject
45
-
46
- attr_accessor :to
47
-
48
- attr_accessor :updated_at
49
-
50
- attr_accessor :user_id
51
-
52
- # Attribute mapping from ruby-style variable name to JSON key.
53
- def self.attribute_map
54
- {
55
- :'analysis' => :'analysis',
56
- :'attachments' => :'attachments',
57
- :'bcc' => :'bcc',
58
- :'body' => :'body',
59
- :'cc' => :'cc',
60
- :'charset' => :'charset',
61
- :'created_at' => :'createdAt',
62
- :'from' => :'from',
63
- :'headers' => :'headers',
64
- :'html' => :'html',
65
- :'id' => :'id',
66
- :'inbox_id' => :'inboxId',
67
- :'raw_url' => :'rawUrl',
68
- :'subject' => :'subject',
69
- :'to' => :'to',
70
- :'updated_at' => :'updatedAt',
71
- :'user_id' => :'userId'
72
- }
73
- end
74
-
75
- # Attribute type mapping.
76
- def self.openapi_types
77
- {
78
- :'analysis' => :'EmailAnalysis',
79
- :'attachments' => :'Array<String>',
80
- :'bcc' => :'Array<String>',
81
- :'body' => :'String',
82
- :'cc' => :'Array<String>',
83
- :'charset' => :'String',
84
- :'created_at' => :'DateTime',
85
- :'from' => :'String',
86
- :'headers' => :'Hash<String, String>',
87
- :'html' => :'BOOLEAN',
88
- :'id' => :'String',
89
- :'inbox_id' => :'String',
90
- :'raw_url' => :'String',
91
- :'subject' => :'String',
92
- :'to' => :'Array<String>',
93
- :'updated_at' => :'DateTime',
94
- :'user_id' => :'String'
95
- }
96
- end
97
-
98
- # Initializes the object
99
- # @param [Hash] attributes Model attributes in the form of hash
100
- def initialize(attributes = {})
101
- return unless attributes.is_a?(Hash)
102
-
103
- # convert string to symbol for hash key
104
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
105
-
106
- if attributes.has_key?(:'analysis')
107
- self.analysis = attributes[:'analysis']
108
- end
109
-
110
- if attributes.has_key?(:'attachments')
111
- if (value = attributes[:'attachments']).is_a?(Array)
112
- self.attachments = value
113
- end
114
- end
115
-
116
- if attributes.has_key?(:'bcc')
117
- if (value = attributes[:'bcc']).is_a?(Array)
118
- self.bcc = value
119
- end
120
- end
121
-
122
- if attributes.has_key?(:'body')
123
- self.body = attributes[:'body']
124
- end
125
-
126
- if attributes.has_key?(:'cc')
127
- if (value = attributes[:'cc']).is_a?(Array)
128
- self.cc = value
129
- end
130
- end
131
-
132
- if attributes.has_key?(:'charset')
133
- self.charset = attributes[:'charset']
134
- end
135
-
136
- if attributes.has_key?(:'createdAt')
137
- self.created_at = attributes[:'createdAt']
138
- end
139
-
140
- if attributes.has_key?(:'from')
141
- self.from = attributes[:'from']
142
- end
143
-
144
- if attributes.has_key?(:'headers')
145
- if (value = attributes[:'headers']).is_a?(Hash)
146
- self.headers = value
147
- end
148
- end
149
-
150
- if attributes.has_key?(:'html')
151
- self.html = attributes[:'html']
152
- end
153
-
154
- if attributes.has_key?(:'id')
155
- self.id = attributes[:'id']
156
- end
157
-
158
- if attributes.has_key?(:'inboxId')
159
- self.inbox_id = attributes[:'inboxId']
160
- end
161
-
162
- if attributes.has_key?(:'rawUrl')
163
- self.raw_url = attributes[:'rawUrl']
164
- end
165
-
166
- if attributes.has_key?(:'subject')
167
- self.subject = attributes[:'subject']
168
- end
169
-
170
- if attributes.has_key?(:'to')
171
- if (value = attributes[:'to']).is_a?(Array)
172
- self.to = value
173
- end
174
- end
175
-
176
- if attributes.has_key?(:'updatedAt')
177
- self.updated_at = attributes[:'updatedAt']
178
- end
179
-
180
- if attributes.has_key?(:'userId')
181
- self.user_id = attributes[:'userId']
182
- end
183
- end
184
-
185
- # Show invalid properties with the reasons. Usually used together with valid?
186
- # @return Array for valid properties with the reasons
187
- def list_invalid_properties
188
- invalid_properties = Array.new
189
- if @created_at.nil?
190
- invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
191
- end
192
-
193
- if @id.nil?
194
- invalid_properties.push('invalid value for "id", id cannot be nil.')
195
- end
196
-
197
- if @inbox_id.nil?
198
- invalid_properties.push('invalid value for "inbox_id", inbox_id cannot be nil.')
199
- end
200
-
201
- if @to.nil?
202
- invalid_properties.push('invalid value for "to", to cannot be nil.')
203
- end
204
-
205
- if @updated_at.nil?
206
- invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
207
- end
208
-
209
- if @user_id.nil?
210
- invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
211
- end
212
-
213
- invalid_properties
214
- end
215
-
216
- # Check to see if the all the properties in the model are valid
217
- # @return true if the model is valid
218
- def valid?
219
- return false if @created_at.nil?
220
- return false if @id.nil?
221
- return false if @inbox_id.nil?
222
- return false if @to.nil?
223
- return false if @updated_at.nil?
224
- return false if @user_id.nil?
225
- true
226
- end
227
-
228
- # Checks equality by comparing each attribute.
229
- # @param [Object] Object to be compared
230
- def ==(o)
231
- return true if self.equal?(o)
232
- self.class == o.class &&
233
- analysis == o.analysis &&
234
- attachments == o.attachments &&
235
- bcc == o.bcc &&
236
- body == o.body &&
237
- cc == o.cc &&
238
- charset == o.charset &&
239
- created_at == o.created_at &&
240
- from == o.from &&
241
- headers == o.headers &&
242
- html == o.html &&
243
- id == o.id &&
244
- inbox_id == o.inbox_id &&
245
- raw_url == o.raw_url &&
246
- subject == o.subject &&
247
- to == o.to &&
248
- updated_at == o.updated_at &&
249
- user_id == o.user_id
250
- end
251
-
252
- # @see the `==` method
253
- # @param [Object] Object to be compared
254
- def eql?(o)
255
- self == o
256
- end
257
-
258
- # Calculates hash code according to all attributes.
259
- # @return [Fixnum] Hash code
260
- def hash
261
- [analysis, attachments, bcc, body, cc, charset, created_at, from, headers, html, id, inbox_id, raw_url, subject, to, updated_at, user_id].hash
262
- end
263
-
264
- # Builds the object from hash
265
- # @param [Hash] attributes Model attributes in the form of hash
266
- # @return [Object] Returns the model itself
267
- def build_from_hash(attributes)
268
- return nil unless attributes.is_a?(Hash)
269
- self.class.openapi_types.each_pair do |key, type|
270
- if type =~ /\AArray<(.*)>/i
271
- # check to ensure the input is an array given that the the attribute
272
- # is documented as an array but the input is not
273
- if attributes[self.class.attribute_map[key]].is_a?(Array)
274
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
275
- end
276
- elsif !attributes[self.class.attribute_map[key]].nil?
277
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
278
- end # or else data not found in attributes(hash), not an issue as the data can be optional
279
- end
280
-
281
- self
282
- end
283
-
284
- # Deserializes the data based on type
285
- # @param string type Data type
286
- # @param string value Value to be deserialized
287
- # @return [Object] Deserialized data
288
- def _deserialize(type, value)
289
- case type.to_sym
290
- when :DateTime
291
- DateTime.parse(value)
292
- when :Date
293
- Date.parse(value)
294
- when :String
295
- value.to_s
296
- when :Integer
297
- value.to_i
298
- when :Float
299
- value.to_f
300
- when :BOOLEAN
301
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
302
- true
303
- else
304
- false
305
- end
306
- when :Object
307
- # generic object (usually a Hash), return directly
308
- value
309
- when /\AArray<(?<inner_type>.+)>\z/
310
- inner_type = Regexp.last_match[:inner_type]
311
- value.map { |v| _deserialize(inner_type, v) }
312
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
313
- k_type = Regexp.last_match[:k_type]
314
- v_type = Regexp.last_match[:v_type]
315
- {}.tap do |hash|
316
- value.each do |k, v|
317
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
318
- end
319
- end
320
- else # model
321
- temp_model = MailSlurpClient.const_get(type).new
322
- temp_model.build_from_hash(value)
323
- end
324
- end
325
-
326
- # Returns the string representation of the object
327
- # @return [String] String presentation of the object
328
- def to_s
329
- to_hash.to_s
330
- end
331
-
332
- # to_body is an alias to to_hash (backward compatibility)
333
- # @return [Hash] Returns the object in the form of hash
334
- def to_body
335
- to_hash
336
- end
337
-
338
- # Returns the object in the form of hash
339
- # @return [Hash] Returns the object in the form of hash
340
- def to_hash
341
- hash = {}
342
- self.class.attribute_map.each_pair do |attr, param|
343
- value = self.send(attr)
344
- next if value.nil?
345
- hash[param] = _to_hash(value)
346
- end
347
- hash
348
- end
349
-
350
- # Outputs non-array value in the form of hash
351
- # For object, use to_hash. Otherwise, just return the value
352
- # @param [Object] value Any valid value
353
- # @return [Hash] Returns the value in the form of hash
354
- def _to_hash(value)
355
- if value.is_a?(Array)
356
- value.compact.map { |v| _to_hash(v) }
357
- elsif value.is_a?(Hash)
358
- {}.tap do |hash|
359
- value.each { |k, v| hash[k] = _to_hash(v) }
360
- end
361
- elsif value.respond_to? :to_hash
362
- value.to_hash
363
- else
364
- value
365
- end
366
- end
367
- end
368
- end
@@ -1,245 +0,0 @@
1
- =begin
2
- #MailSlurp API
3
-
4
- #For documentation see [developer guide](https://www.mailslurp.com/developers). [Create an account](https://app.mailslurp.com) in the MailSlurp Dashboard to [view your API Key](https://app). For all bugs, feature requests, or help please [see support](https://www.mailslurp.com/support/).
5
-
6
- OpenAPI spec version: 0.0.1-alpha
7
- Contact: contact@mailslurp.dev
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 3.3.4
10
-
11
- =end
12
-
13
- require 'date'
14
-
15
- module MailSlurpClient
16
- # Analysis of email
17
- class EmailAnalysis
18
- attr_accessor :dkim_verdict
19
-
20
- attr_accessor :dmarc_verdict
21
-
22
- attr_accessor :spam_verdict
23
-
24
- attr_accessor :spf_verdict
25
-
26
- attr_accessor :virus_verdict
27
-
28
- # Attribute mapping from ruby-style variable name to JSON key.
29
- def self.attribute_map
30
- {
31
- :'dkim_verdict' => :'dkimVerdict',
32
- :'dmarc_verdict' => :'dmarcVerdict',
33
- :'spam_verdict' => :'spamVerdict',
34
- :'spf_verdict' => :'spfVerdict',
35
- :'virus_verdict' => :'virusVerdict'
36
- }
37
- end
38
-
39
- # Attribute type mapping.
40
- def self.openapi_types
41
- {
42
- :'dkim_verdict' => :'String',
43
- :'dmarc_verdict' => :'String',
44
- :'spam_verdict' => :'String',
45
- :'spf_verdict' => :'String',
46
- :'virus_verdict' => :'String'
47
- }
48
- end
49
-
50
- # Initializes the object
51
- # @param [Hash] attributes Model attributes in the form of hash
52
- def initialize(attributes = {})
53
- return unless attributes.is_a?(Hash)
54
-
55
- # convert string to symbol for hash key
56
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
57
-
58
- if attributes.has_key?(:'dkimVerdict')
59
- self.dkim_verdict = attributes[:'dkimVerdict']
60
- end
61
-
62
- if attributes.has_key?(:'dmarcVerdict')
63
- self.dmarc_verdict = attributes[:'dmarcVerdict']
64
- end
65
-
66
- if attributes.has_key?(:'spamVerdict')
67
- self.spam_verdict = attributes[:'spamVerdict']
68
- end
69
-
70
- if attributes.has_key?(:'spfVerdict')
71
- self.spf_verdict = attributes[:'spfVerdict']
72
- end
73
-
74
- if attributes.has_key?(:'virusVerdict')
75
- self.virus_verdict = attributes[:'virusVerdict']
76
- end
77
- end
78
-
79
- # Show invalid properties with the reasons. Usually used together with valid?
80
- # @return Array for valid properties with the reasons
81
- def list_invalid_properties
82
- invalid_properties = Array.new
83
- if @dkim_verdict.nil?
84
- invalid_properties.push('invalid value for "dkim_verdict", dkim_verdict cannot be nil.')
85
- end
86
-
87
- if @dmarc_verdict.nil?
88
- invalid_properties.push('invalid value for "dmarc_verdict", dmarc_verdict cannot be nil.')
89
- end
90
-
91
- if @spam_verdict.nil?
92
- invalid_properties.push('invalid value for "spam_verdict", spam_verdict cannot be nil.')
93
- end
94
-
95
- if @spf_verdict.nil?
96
- invalid_properties.push('invalid value for "spf_verdict", spf_verdict cannot be nil.')
97
- end
98
-
99
- if @virus_verdict.nil?
100
- invalid_properties.push('invalid value for "virus_verdict", virus_verdict cannot be nil.')
101
- end
102
-
103
- invalid_properties
104
- end
105
-
106
- # Check to see if the all the properties in the model are valid
107
- # @return true if the model is valid
108
- def valid?
109
- return false if @dkim_verdict.nil?
110
- return false if @dmarc_verdict.nil?
111
- return false if @spam_verdict.nil?
112
- return false if @spf_verdict.nil?
113
- return false if @virus_verdict.nil?
114
- true
115
- end
116
-
117
- # Checks equality by comparing each attribute.
118
- # @param [Object] Object to be compared
119
- def ==(o)
120
- return true if self.equal?(o)
121
- self.class == o.class &&
122
- dkim_verdict == o.dkim_verdict &&
123
- dmarc_verdict == o.dmarc_verdict &&
124
- spam_verdict == o.spam_verdict &&
125
- spf_verdict == o.spf_verdict &&
126
- virus_verdict == o.virus_verdict
127
- end
128
-
129
- # @see the `==` method
130
- # @param [Object] Object to be compared
131
- def eql?(o)
132
- self == o
133
- end
134
-
135
- # Calculates hash code according to all attributes.
136
- # @return [Fixnum] Hash code
137
- def hash
138
- [dkim_verdict, dmarc_verdict, spam_verdict, spf_verdict, virus_verdict].hash
139
- end
140
-
141
- # Builds the object from hash
142
- # @param [Hash] attributes Model attributes in the form of hash
143
- # @return [Object] Returns the model itself
144
- def build_from_hash(attributes)
145
- return nil unless attributes.is_a?(Hash)
146
- self.class.openapi_types.each_pair do |key, type|
147
- if type =~ /\AArray<(.*)>/i
148
- # check to ensure the input is an array given that the the attribute
149
- # is documented as an array but the input is not
150
- if attributes[self.class.attribute_map[key]].is_a?(Array)
151
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
152
- end
153
- elsif !attributes[self.class.attribute_map[key]].nil?
154
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
155
- end # or else data not found in attributes(hash), not an issue as the data can be optional
156
- end
157
-
158
- self
159
- end
160
-
161
- # Deserializes the data based on type
162
- # @param string type Data type
163
- # @param string value Value to be deserialized
164
- # @return [Object] Deserialized data
165
- def _deserialize(type, value)
166
- case type.to_sym
167
- when :DateTime
168
- DateTime.parse(value)
169
- when :Date
170
- Date.parse(value)
171
- when :String
172
- value.to_s
173
- when :Integer
174
- value.to_i
175
- when :Float
176
- value.to_f
177
- when :BOOLEAN
178
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
179
- true
180
- else
181
- false
182
- end
183
- when :Object
184
- # generic object (usually a Hash), return directly
185
- value
186
- when /\AArray<(?<inner_type>.+)>\z/
187
- inner_type = Regexp.last_match[:inner_type]
188
- value.map { |v| _deserialize(inner_type, v) }
189
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
190
- k_type = Regexp.last_match[:k_type]
191
- v_type = Regexp.last_match[:v_type]
192
- {}.tap do |hash|
193
- value.each do |k, v|
194
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
195
- end
196
- end
197
- else # model
198
- temp_model = MailSlurpClient.const_get(type).new
199
- temp_model.build_from_hash(value)
200
- end
201
- end
202
-
203
- # Returns the string representation of the object
204
- # @return [String] String presentation of the object
205
- def to_s
206
- to_hash.to_s
207
- end
208
-
209
- # to_body is an alias to to_hash (backward compatibility)
210
- # @return [Hash] Returns the object in the form of hash
211
- def to_body
212
- to_hash
213
- end
214
-
215
- # Returns the object in the form of hash
216
- # @return [Hash] Returns the object in the form of hash
217
- def to_hash
218
- hash = {}
219
- self.class.attribute_map.each_pair do |attr, param|
220
- value = self.send(attr)
221
- next if value.nil?
222
- hash[param] = _to_hash(value)
223
- end
224
- hash
225
- end
226
-
227
- # Outputs non-array value in the form of hash
228
- # For object, use to_hash. Otherwise, just return the value
229
- # @param [Object] value Any valid value
230
- # @return [Hash] Returns the value in the form of hash
231
- def _to_hash(value)
232
- if value.is_a?(Array)
233
- value.compact.map { |v| _to_hash(v) }
234
- elsif value.is_a?(Hash)
235
- {}.tap do |hash|
236
- value.each { |k, v| hash[k] = _to_hash(v) }
237
- end
238
- elsif value.respond_to? :to_hash
239
- value.to_hash
240
- else
241
- value
242
- end
243
- end
244
- end
245
- end