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,212 +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 inbox with an email address. Emails can be sent to or from this email address.
17
- class Inbox
18
- attr_accessor :created
19
-
20
- # The inbox's email address. Send an email to this address and the inbox will receive it
21
- attr_accessor :email_address
22
-
23
- attr_accessor :id
24
-
25
- attr_accessor :user_id
26
-
27
- # Attribute mapping from ruby-style variable name to JSON key.
28
- def self.attribute_map
29
- {
30
- :'created' => :'created',
31
- :'email_address' => :'emailAddress',
32
- :'id' => :'id',
33
- :'user_id' => :'userId'
34
- }
35
- end
36
-
37
- # Attribute type mapping.
38
- def self.openapi_types
39
- {
40
- :'created' => :'DateTime',
41
- :'email_address' => :'String',
42
- :'id' => :'String',
43
- :'user_id' => :'String'
44
- }
45
- end
46
-
47
- # Initializes the object
48
- # @param [Hash] attributes Model attributes in the form of hash
49
- def initialize(attributes = {})
50
- return unless attributes.is_a?(Hash)
51
-
52
- # convert string to symbol for hash key
53
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
54
-
55
- if attributes.has_key?(:'created')
56
- self.created = attributes[:'created']
57
- end
58
-
59
- if attributes.has_key?(:'emailAddress')
60
- self.email_address = attributes[:'emailAddress']
61
- end
62
-
63
- if attributes.has_key?(:'id')
64
- self.id = attributes[:'id']
65
- end
66
-
67
- if attributes.has_key?(:'userId')
68
- self.user_id = attributes[:'userId']
69
- end
70
- end
71
-
72
- # Show invalid properties with the reasons. Usually used together with valid?
73
- # @return Array for valid properties with the reasons
74
- def list_invalid_properties
75
- invalid_properties = Array.new
76
- invalid_properties
77
- end
78
-
79
- # Check to see if the all the properties in the model are valid
80
- # @return true if the model is valid
81
- def valid?
82
- true
83
- end
84
-
85
- # Checks equality by comparing each attribute.
86
- # @param [Object] Object to be compared
87
- def ==(o)
88
- return true if self.equal?(o)
89
- self.class == o.class &&
90
- created == o.created &&
91
- email_address == o.email_address &&
92
- id == o.id &&
93
- user_id == o.user_id
94
- end
95
-
96
- # @see the `==` method
97
- # @param [Object] Object to be compared
98
- def eql?(o)
99
- self == o
100
- end
101
-
102
- # Calculates hash code according to all attributes.
103
- # @return [Fixnum] Hash code
104
- def hash
105
- [created, email_address, id, user_id].hash
106
- end
107
-
108
- # Builds the object from hash
109
- # @param [Hash] attributes Model attributes in the form of hash
110
- # @return [Object] Returns the model itself
111
- def build_from_hash(attributes)
112
- return nil unless attributes.is_a?(Hash)
113
- self.class.openapi_types.each_pair do |key, type|
114
- if type =~ /\AArray<(.*)>/i
115
- # check to ensure the input is an array given that the the attribute
116
- # is documented as an array but the input is not
117
- if attributes[self.class.attribute_map[key]].is_a?(Array)
118
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
119
- end
120
- elsif !attributes[self.class.attribute_map[key]].nil?
121
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
122
- end # or else data not found in attributes(hash), not an issue as the data can be optional
123
- end
124
-
125
- self
126
- end
127
-
128
- # Deserializes the data based on type
129
- # @param string type Data type
130
- # @param string value Value to be deserialized
131
- # @return [Object] Deserialized data
132
- def _deserialize(type, value)
133
- case type.to_sym
134
- when :DateTime
135
- DateTime.parse(value)
136
- when :Date
137
- Date.parse(value)
138
- when :String
139
- value.to_s
140
- when :Integer
141
- value.to_i
142
- when :Float
143
- value.to_f
144
- when :BOOLEAN
145
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
146
- true
147
- else
148
- false
149
- end
150
- when :Object
151
- # generic object (usually a Hash), return directly
152
- value
153
- when /\AArray<(?<inner_type>.+)>\z/
154
- inner_type = Regexp.last_match[:inner_type]
155
- value.map { |v| _deserialize(inner_type, v) }
156
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
157
- k_type = Regexp.last_match[:k_type]
158
- v_type = Regexp.last_match[:v_type]
159
- {}.tap do |hash|
160
- value.each do |k, v|
161
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
162
- end
163
- end
164
- else # model
165
- temp_model = MailSlurpClient.const_get(type).new
166
- temp_model.build_from_hash(value)
167
- end
168
- end
169
-
170
- # Returns the string representation of the object
171
- # @return [String] String presentation of the object
172
- def to_s
173
- to_hash.to_s
174
- end
175
-
176
- # to_body is an alias to to_hash (backward compatibility)
177
- # @return [Hash] Returns the object in the form of hash
178
- def to_body
179
- to_hash
180
- end
181
-
182
- # Returns the object in the form of hash
183
- # @return [Hash] Returns the object in the form of hash
184
- def to_hash
185
- hash = {}
186
- self.class.attribute_map.each_pair do |attr, param|
187
- value = self.send(attr)
188
- next if value.nil?
189
- hash[param] = _to_hash(value)
190
- end
191
- hash
192
- end
193
-
194
- # Outputs non-array value in the form of hash
195
- # For object, use to_hash. Otherwise, just return the value
196
- # @param [Object] value Any valid value
197
- # @return [Hash] Returns the value in the form of hash
198
- def _to_hash(value)
199
- if value.is_a?(Array)
200
- value.compact.map { |v| _to_hash(v) }
201
- elsif value.is_a?(Hash)
202
- {}.tap do |hash|
203
- value.each { |k, v| hash[k] = _to_hash(v) }
204
- end
205
- elsif value.respond_to? :to_hash
206
- value.to_hash
207
- else
208
- value
209
- end
210
- end
211
- end
212
- end
@@ -1,250 +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
- class MatchOption
17
- # The email property to match on. One of SUBJECT, TO, BCC, CC or FROM
18
- attr_accessor :field
19
-
20
- # What criteria to apply. CONTAIN or EQUAL. Note CONTAIN is recommended due to some SMTP servers adding new lines
21
- attr_accessor :should
22
-
23
- # The value to compare to the field using EQUAL or CONTAIN
24
- attr_accessor :value
25
-
26
- class EnumAttributeValidator
27
- attr_reader :datatype
28
- attr_reader :allowable_values
29
-
30
- def initialize(datatype, allowable_values)
31
- @allowable_values = allowable_values.map do |value|
32
- case datatype.to_s
33
- when /Integer/i
34
- value.to_i
35
- when /Float/i
36
- value.to_f
37
- else
38
- value
39
- end
40
- end
41
- end
42
-
43
- def valid?(value)
44
- !value || allowable_values.include?(value)
45
- end
46
- end
47
-
48
- # Attribute mapping from ruby-style variable name to JSON key.
49
- def self.attribute_map
50
- {
51
- :'field' => :'field',
52
- :'should' => :'should',
53
- :'value' => :'value'
54
- }
55
- end
56
-
57
- # Attribute type mapping.
58
- def self.openapi_types
59
- {
60
- :'field' => :'String',
61
- :'should' => :'String',
62
- :'value' => :'String'
63
- }
64
- end
65
-
66
- # Initializes the object
67
- # @param [Hash] attributes Model attributes in the form of hash
68
- def initialize(attributes = {})
69
- return unless attributes.is_a?(Hash)
70
-
71
- # convert string to symbol for hash key
72
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
73
-
74
- if attributes.has_key?(:'field')
75
- self.field = attributes[:'field']
76
- end
77
-
78
- if attributes.has_key?(:'should')
79
- self.should = attributes[:'should']
80
- end
81
-
82
- if attributes.has_key?(:'value')
83
- self.value = attributes[:'value']
84
- end
85
- end
86
-
87
- # Show invalid properties with the reasons. Usually used together with valid?
88
- # @return Array for valid properties with the reasons
89
- def list_invalid_properties
90
- invalid_properties = Array.new
91
- invalid_properties
92
- end
93
-
94
- # Check to see if the all the properties in the model are valid
95
- # @return true if the model is valid
96
- def valid?
97
- field_validator = EnumAttributeValidator.new('String', ['SUBJECT', 'TO', 'BCC', 'CC', 'FROM'])
98
- return false unless field_validator.valid?(@field)
99
- should_validator = EnumAttributeValidator.new('String', ['CONTAIN', 'EQUAL'])
100
- return false unless should_validator.valid?(@should)
101
- true
102
- end
103
-
104
- # Custom attribute writer method checking allowed values (enum).
105
- # @param [Object] field Object to be assigned
106
- def field=(field)
107
- validator = EnumAttributeValidator.new('String', ['SUBJECT', 'TO', 'BCC', 'CC', 'FROM'])
108
- unless validator.valid?(field)
109
- fail ArgumentError, 'invalid value for "field", must be one of #{validator.allowable_values}.'
110
- end
111
- @field = field
112
- end
113
-
114
- # Custom attribute writer method checking allowed values (enum).
115
- # @param [Object] should Object to be assigned
116
- def should=(should)
117
- validator = EnumAttributeValidator.new('String', ['CONTAIN', 'EQUAL'])
118
- unless validator.valid?(should)
119
- fail ArgumentError, 'invalid value for "should", must be one of #{validator.allowable_values}.'
120
- end
121
- @should = should
122
- end
123
-
124
- # Checks equality by comparing each attribute.
125
- # @param [Object] Object to be compared
126
- def ==(o)
127
- return true if self.equal?(o)
128
- self.class == o.class &&
129
- field == o.field &&
130
- should == o.should &&
131
- value == o.value
132
- end
133
-
134
- # @see the `==` method
135
- # @param [Object] Object to be compared
136
- def eql?(o)
137
- self == o
138
- end
139
-
140
- # Calculates hash code according to all attributes.
141
- # @return [Fixnum] Hash code
142
- def hash
143
- [field, should, value].hash
144
- end
145
-
146
- # Builds the object from hash
147
- # @param [Hash] attributes Model attributes in the form of hash
148
- # @return [Object] Returns the model itself
149
- def build_from_hash(attributes)
150
- return nil unless attributes.is_a?(Hash)
151
- self.class.openapi_types.each_pair do |key, type|
152
- if type =~ /\AArray<(.*)>/i
153
- # check to ensure the input is an array given that the the attribute
154
- # is documented as an array but the input is not
155
- if attributes[self.class.attribute_map[key]].is_a?(Array)
156
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
157
- end
158
- elsif !attributes[self.class.attribute_map[key]].nil?
159
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
160
- end # or else data not found in attributes(hash), not an issue as the data can be optional
161
- end
162
-
163
- self
164
- end
165
-
166
- # Deserializes the data based on type
167
- # @param string type Data type
168
- # @param string value Value to be deserialized
169
- # @return [Object] Deserialized data
170
- def _deserialize(type, value)
171
- case type.to_sym
172
- when :DateTime
173
- DateTime.parse(value)
174
- when :Date
175
- Date.parse(value)
176
- when :String
177
- value.to_s
178
- when :Integer
179
- value.to_i
180
- when :Float
181
- value.to_f
182
- when :BOOLEAN
183
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
184
- true
185
- else
186
- false
187
- end
188
- when :Object
189
- # generic object (usually a Hash), return directly
190
- value
191
- when /\AArray<(?<inner_type>.+)>\z/
192
- inner_type = Regexp.last_match[:inner_type]
193
- value.map { |v| _deserialize(inner_type, v) }
194
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
195
- k_type = Regexp.last_match[:k_type]
196
- v_type = Regexp.last_match[:v_type]
197
- {}.tap do |hash|
198
- value.each do |k, v|
199
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
200
- end
201
- end
202
- else # model
203
- temp_model = MailSlurpClient.const_get(type).new
204
- temp_model.build_from_hash(value)
205
- end
206
- end
207
-
208
- # Returns the string representation of the object
209
- # @return [String] String presentation of the object
210
- def to_s
211
- to_hash.to_s
212
- end
213
-
214
- # to_body is an alias to to_hash (backward compatibility)
215
- # @return [Hash] Returns the object in the form of hash
216
- def to_body
217
- to_hash
218
- end
219
-
220
- # Returns the object in the form of hash
221
- # @return [Hash] Returns the object in the form of hash
222
- def to_hash
223
- hash = {}
224
- self.class.attribute_map.each_pair do |attr, param|
225
- value = self.send(attr)
226
- next if value.nil?
227
- hash[param] = _to_hash(value)
228
- end
229
- hash
230
- end
231
-
232
- # Outputs non-array value in the form of hash
233
- # For object, use to_hash. Otherwise, just return the value
234
- # @param [Object] value Any valid value
235
- # @return [Hash] Returns the value in the form of hash
236
- def _to_hash(value)
237
- if value.is_a?(Array)
238
- value.compact.map { |v| _to_hash(v) }
239
- elsif value.is_a?(Hash)
240
- {}.tap do |hash|
241
- value.each { |k, v| hash[k] = _to_hash(v) }
242
- end
243
- elsif value.respond_to? :to_hash
244
- value.to_hash
245
- else
246
- value
247
- end
248
- end
249
- end
250
- end