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,205 +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
- # Options for uploading files for attachments
17
- class UploadAttachmentOptions
18
- # Base64 encoded string of file contents
19
- attr_accessor :base64_contents
20
-
21
- # Optional contentType for file. For instance application/pdf
22
- attr_accessor :content_type
23
-
24
- # Optional filename to save upload with
25
- attr_accessor :filename
26
-
27
- # Attribute mapping from ruby-style variable name to JSON key.
28
- def self.attribute_map
29
- {
30
- :'base64_contents' => :'base64Contents',
31
- :'content_type' => :'contentType',
32
- :'filename' => :'filename'
33
- }
34
- end
35
-
36
- # Attribute type mapping.
37
- def self.openapi_types
38
- {
39
- :'base64_contents' => :'String',
40
- :'content_type' => :'String',
41
- :'filename' => :'String'
42
- }
43
- end
44
-
45
- # Initializes the object
46
- # @param [Hash] attributes Model attributes in the form of hash
47
- def initialize(attributes = {})
48
- return unless attributes.is_a?(Hash)
49
-
50
- # convert string to symbol for hash key
51
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
52
-
53
- if attributes.has_key?(:'base64Contents')
54
- self.base64_contents = attributes[:'base64Contents']
55
- end
56
-
57
- if attributes.has_key?(:'contentType')
58
- self.content_type = attributes[:'contentType']
59
- end
60
-
61
- if attributes.has_key?(:'filename')
62
- self.filename = attributes[:'filename']
63
- end
64
- end
65
-
66
- # Show invalid properties with the reasons. Usually used together with valid?
67
- # @return Array for valid properties with the reasons
68
- def list_invalid_properties
69
- invalid_properties = Array.new
70
- invalid_properties
71
- end
72
-
73
- # Check to see if the all the properties in the model are valid
74
- # @return true if the model is valid
75
- def valid?
76
- true
77
- end
78
-
79
- # Checks equality by comparing each attribute.
80
- # @param [Object] Object to be compared
81
- def ==(o)
82
- return true if self.equal?(o)
83
- self.class == o.class &&
84
- base64_contents == o.base64_contents &&
85
- content_type == o.content_type &&
86
- filename == o.filename
87
- end
88
-
89
- # @see the `==` method
90
- # @param [Object] Object to be compared
91
- def eql?(o)
92
- self == o
93
- end
94
-
95
- # Calculates hash code according to all attributes.
96
- # @return [Fixnum] Hash code
97
- def hash
98
- [base64_contents, content_type, filename].hash
99
- end
100
-
101
- # Builds the object from hash
102
- # @param [Hash] attributes Model attributes in the form of hash
103
- # @return [Object] Returns the model itself
104
- def build_from_hash(attributes)
105
- return nil unless attributes.is_a?(Hash)
106
- self.class.openapi_types.each_pair do |key, type|
107
- if type =~ /\AArray<(.*)>/i
108
- # check to ensure the input is an array given that the the attribute
109
- # is documented as an array but the input is not
110
- if attributes[self.class.attribute_map[key]].is_a?(Array)
111
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
112
- end
113
- elsif !attributes[self.class.attribute_map[key]].nil?
114
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
115
- end # or else data not found in attributes(hash), not an issue as the data can be optional
116
- end
117
-
118
- self
119
- end
120
-
121
- # Deserializes the data based on type
122
- # @param string type Data type
123
- # @param string value Value to be deserialized
124
- # @return [Object] Deserialized data
125
- def _deserialize(type, value)
126
- case type.to_sym
127
- when :DateTime
128
- DateTime.parse(value)
129
- when :Date
130
- Date.parse(value)
131
- when :String
132
- value.to_s
133
- when :Integer
134
- value.to_i
135
- when :Float
136
- value.to_f
137
- when :BOOLEAN
138
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
139
- true
140
- else
141
- false
142
- end
143
- when :Object
144
- # generic object (usually a Hash), return directly
145
- value
146
- when /\AArray<(?<inner_type>.+)>\z/
147
- inner_type = Regexp.last_match[:inner_type]
148
- value.map { |v| _deserialize(inner_type, v) }
149
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
150
- k_type = Regexp.last_match[:k_type]
151
- v_type = Regexp.last_match[:v_type]
152
- {}.tap do |hash|
153
- value.each do |k, v|
154
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
155
- end
156
- end
157
- else # model
158
- temp_model = MailSlurpClient.const_get(type).new
159
- temp_model.build_from_hash(value)
160
- end
161
- end
162
-
163
- # Returns the string representation of the object
164
- # @return [String] String presentation of the object
165
- def to_s
166
- to_hash.to_s
167
- end
168
-
169
- # to_body is an alias to to_hash (backward compatibility)
170
- # @return [Hash] Returns the object in the form of hash
171
- def to_body
172
- to_hash
173
- end
174
-
175
- # Returns the object in the form of hash
176
- # @return [Hash] Returns the object in the form of hash
177
- def to_hash
178
- hash = {}
179
- self.class.attribute_map.each_pair do |attr, param|
180
- value = self.send(attr)
181
- next if value.nil?
182
- hash[param] = _to_hash(value)
183
- end
184
- hash
185
- end
186
-
187
- # Outputs non-array value in the form of hash
188
- # For object, use to_hash. Otherwise, just return the value
189
- # @param [Object] value Any valid value
190
- # @return [Hash] Returns the value in the form of hash
191
- def _to_hash(value)
192
- if value.is_a?(Array)
193
- value.compact.map { |v| _to_hash(v) }
194
- elsif value.is_a?(Hash)
195
- {}.tap do |hash|
196
- value.each { |k, v| hash[k] = _to_hash(v) }
197
- end
198
- elsif value.respond_to? :to_hash
199
- value.to_hash
200
- else
201
- value
202
- end
203
- end
204
- end
205
- end
@@ -1,242 +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 a webhook for an inbox.
17
- class Webhook
18
- # Does Webhook expect basic authentication
19
- attr_accessor :basic_auth
20
-
21
- attr_accessor :created_at
22
-
23
- # ID of the Webhook
24
- attr_accessor :id
25
-
26
- # The inbox that the Webhook will be triggered by
27
- attr_accessor :inbox_id
28
-
29
- attr_accessor :name
30
-
31
- attr_accessor :updated_at
32
-
33
- # Attribute mapping from ruby-style variable name to JSON key.
34
- def self.attribute_map
35
- {
36
- :'basic_auth' => :'basicAuth',
37
- :'created_at' => :'createdAt',
38
- :'id' => :'id',
39
- :'inbox_id' => :'inboxId',
40
- :'name' => :'name',
41
- :'updated_at' => :'updatedAt'
42
- }
43
- end
44
-
45
- # Attribute type mapping.
46
- def self.openapi_types
47
- {
48
- :'basic_auth' => :'BOOLEAN',
49
- :'created_at' => :'DateTime',
50
- :'id' => :'String',
51
- :'inbox_id' => :'String',
52
- :'name' => :'String',
53
- :'updated_at' => :'DateTime'
54
- }
55
- end
56
-
57
- # Initializes the object
58
- # @param [Hash] attributes Model attributes in the form of hash
59
- def initialize(attributes = {})
60
- return unless attributes.is_a?(Hash)
61
-
62
- # convert string to symbol for hash key
63
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
64
-
65
- if attributes.has_key?(:'basicAuth')
66
- self.basic_auth = attributes[:'basicAuth']
67
- end
68
-
69
- if attributes.has_key?(:'createdAt')
70
- self.created_at = attributes[:'createdAt']
71
- end
72
-
73
- if attributes.has_key?(:'id')
74
- self.id = attributes[:'id']
75
- end
76
-
77
- if attributes.has_key?(:'inboxId')
78
- self.inbox_id = attributes[:'inboxId']
79
- end
80
-
81
- if attributes.has_key?(:'name')
82
- self.name = attributes[:'name']
83
- end
84
-
85
- if attributes.has_key?(:'updatedAt')
86
- self.updated_at = attributes[:'updatedAt']
87
- end
88
- end
89
-
90
- # Show invalid properties with the reasons. Usually used together with valid?
91
- # @return Array for valid properties with the reasons
92
- def list_invalid_properties
93
- invalid_properties = Array.new
94
- if @created_at.nil?
95
- invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
96
- end
97
-
98
- if @updated_at.nil?
99
- invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
100
- end
101
-
102
- invalid_properties
103
- end
104
-
105
- # Check to see if the all the properties in the model are valid
106
- # @return true if the model is valid
107
- def valid?
108
- return false if @created_at.nil?
109
- return false if @updated_at.nil?
110
- true
111
- end
112
-
113
- # Checks equality by comparing each attribute.
114
- # @param [Object] Object to be compared
115
- def ==(o)
116
- return true if self.equal?(o)
117
- self.class == o.class &&
118
- basic_auth == o.basic_auth &&
119
- created_at == o.created_at &&
120
- id == o.id &&
121
- inbox_id == o.inbox_id &&
122
- name == o.name &&
123
- updated_at == o.updated_at
124
- end
125
-
126
- # @see the `==` method
127
- # @param [Object] Object to be compared
128
- def eql?(o)
129
- self == o
130
- end
131
-
132
- # Calculates hash code according to all attributes.
133
- # @return [Fixnum] Hash code
134
- def hash
135
- [basic_auth, created_at, id, inbox_id, name, updated_at].hash
136
- end
137
-
138
- # Builds the object from hash
139
- # @param [Hash] attributes Model attributes in the form of hash
140
- # @return [Object] Returns the model itself
141
- def build_from_hash(attributes)
142
- return nil unless attributes.is_a?(Hash)
143
- self.class.openapi_types.each_pair do |key, type|
144
- if type =~ /\AArray<(.*)>/i
145
- # check to ensure the input is an array given that the the attribute
146
- # is documented as an array but the input is not
147
- if attributes[self.class.attribute_map[key]].is_a?(Array)
148
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
149
- end
150
- elsif !attributes[self.class.attribute_map[key]].nil?
151
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
152
- end # or else data not found in attributes(hash), not an issue as the data can be optional
153
- end
154
-
155
- self
156
- end
157
-
158
- # Deserializes the data based on type
159
- # @param string type Data type
160
- # @param string value Value to be deserialized
161
- # @return [Object] Deserialized data
162
- def _deserialize(type, value)
163
- case type.to_sym
164
- when :DateTime
165
- DateTime.parse(value)
166
- when :Date
167
- Date.parse(value)
168
- when :String
169
- value.to_s
170
- when :Integer
171
- value.to_i
172
- when :Float
173
- value.to_f
174
- when :BOOLEAN
175
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
176
- true
177
- else
178
- false
179
- end
180
- when :Object
181
- # generic object (usually a Hash), return directly
182
- value
183
- when /\AArray<(?<inner_type>.+)>\z/
184
- inner_type = Regexp.last_match[:inner_type]
185
- value.map { |v| _deserialize(inner_type, v) }
186
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
187
- k_type = Regexp.last_match[:k_type]
188
- v_type = Regexp.last_match[:v_type]
189
- {}.tap do |hash|
190
- value.each do |k, v|
191
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
192
- end
193
- end
194
- else # model
195
- temp_model = MailSlurpClient.const_get(type).new
196
- temp_model.build_from_hash(value)
197
- end
198
- end
199
-
200
- # Returns the string representation of the object
201
- # @return [String] String presentation of the object
202
- def to_s
203
- to_hash.to_s
204
- end
205
-
206
- # to_body is an alias to to_hash (backward compatibility)
207
- # @return [Hash] Returns the object in the form of hash
208
- def to_body
209
- to_hash
210
- end
211
-
212
- # Returns the object in the form of hash
213
- # @return [Hash] Returns the object in the form of hash
214
- def to_hash
215
- hash = {}
216
- self.class.attribute_map.each_pair do |attr, param|
217
- value = self.send(attr)
218
- next if value.nil?
219
- hash[param] = _to_hash(value)
220
- end
221
- hash
222
- end
223
-
224
- # Outputs non-array value in the form of hash
225
- # For object, use to_hash. Otherwise, just return the value
226
- # @param [Object] value Any valid value
227
- # @return [Hash] Returns the value in the form of hash
228
- def _to_hash(value)
229
- if value.is_a?(Array)
230
- value.compact.map { |v| _to_hash(v) }
231
- elsif value.is_a?(Hash)
232
- {}.tap do |hash|
233
- value.each { |k, v| hash[k] = _to_hash(v) }
234
- end
235
- elsif value.respond_to? :to_hash
236
- value.to_hash
237
- else
238
- value
239
- end
240
- end
241
- end
242
- end
@@ -1,15 +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
- module MailSlurpClient
14
- VERSION = '5.0.0'
15
- end