mailslurp_client 15.11.1 → 15.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mailslurp_client/api/api_user_controller_api.rb +74 -0
  3. data/lib/mailslurp_client/api/inbox_controller_api.rb +63 -0
  4. data/lib/mailslurp_client/api/template_controller_api.rb +124 -0
  5. data/lib/mailslurp_client/models/bounce_projection.rb +31 -4
  6. data/lib/mailslurp_client/models/{bounce_recipient.rb → bounce_recipient_projection.rb} +35 -36
  7. data/lib/mailslurp_client/models/bounced_email_dto.rb +19 -1
  8. data/lib/mailslurp_client/models/bounced_recipient_dto.rb +37 -1
  9. data/lib/mailslurp_client/models/email_projection.rb +10 -10
  10. data/lib/mailslurp_client/models/inbox_by_name_result.rb +221 -0
  11. data/lib/mailslurp_client/models/inbox_dto.rb +11 -1
  12. data/lib/mailslurp_client/models/page_alias.rb +10 -10
  13. data/lib/mailslurp_client/models/page_attachment_entity.rb +10 -10
  14. data/lib/mailslurp_client/models/page_bounced_email.rb +10 -10
  15. data/lib/mailslurp_client/models/page_bounced_recipients.rb +11 -11
  16. data/lib/mailslurp_client/models/page_contact_projection.rb +10 -10
  17. data/lib/mailslurp_client/models/page_email_preview.rb +10 -10
  18. data/lib/mailslurp_client/models/page_email_projection.rb +10 -10
  19. data/lib/mailslurp_client/models/page_email_validation_request.rb +10 -10
  20. data/lib/mailslurp_client/models/page_expired_inbox_record_projection.rb +10 -10
  21. data/lib/mailslurp_client/models/page_group_projection.rb +10 -10
  22. data/lib/mailslurp_client/models/page_inbox_forwarder_dto.rb +10 -10
  23. data/lib/mailslurp_client/models/page_inbox_projection.rb +10 -10
  24. data/lib/mailslurp_client/models/page_inbox_ruleset_dto.rb +10 -10
  25. data/lib/mailslurp_client/models/page_missed_email_projection.rb +10 -10
  26. data/lib/mailslurp_client/models/page_organization_inbox_projection.rb +10 -10
  27. data/lib/mailslurp_client/models/page_phone_number_projection.rb +10 -10
  28. data/lib/mailslurp_client/models/page_sent_email_projection.rb +16 -16
  29. data/lib/mailslurp_client/models/page_sent_email_with_queue_projection.rb +16 -16
  30. data/lib/mailslurp_client/models/page_sms_projection.rb +10 -10
  31. data/lib/mailslurp_client/models/page_template_projection.rb +10 -10
  32. data/lib/mailslurp_client/models/page_thread_projection.rb +10 -10
  33. data/lib/mailslurp_client/models/page_tracking_pixel_projection.rb +10 -10
  34. data/lib/mailslurp_client/models/page_unknown_missed_email_projection.rb +10 -10
  35. data/lib/mailslurp_client/models/page_webhook_projection.rb +10 -10
  36. data/lib/mailslurp_client/models/page_webhook_result.rb +10 -10
  37. data/lib/mailslurp_client/models/sent_email_projection.rb +24 -24
  38. data/lib/mailslurp_client/models/template_preview.rb +211 -0
  39. data/lib/mailslurp_client/models/tracking_pixel_projection.rb +13 -13
  40. data/lib/mailslurp_client/models/user_info_dto.rb +334 -0
  41. data/lib/mailslurp_client/version.rb +1 -1
  42. data/lib/mailslurp_client.rb +5 -1
  43. metadata +7 -3
@@ -0,0 +1,334 @@
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 UserInfoDto
17
+ attr_accessor :id
18
+
19
+ attr_accessor :email_address
20
+
21
+ attr_accessor :account_state
22
+
23
+ attr_accessor :subscription_type
24
+
25
+ attr_accessor :account_type
26
+
27
+ attr_accessor :created_at
28
+
29
+ class EnumAttributeValidator
30
+ attr_reader :datatype
31
+ attr_reader :allowable_values
32
+
33
+ def initialize(datatype, allowable_values)
34
+ @allowable_values = allowable_values.map do |value|
35
+ case datatype.to_s
36
+ when /Integer/i
37
+ value.to_i
38
+ when /Float/i
39
+ value.to_f
40
+ else
41
+ value
42
+ end
43
+ end
44
+ end
45
+
46
+ def valid?(value)
47
+ !value || allowable_values.include?(value)
48
+ end
49
+ end
50
+
51
+ # Attribute mapping from ruby-style variable name to JSON key.
52
+ def self.attribute_map
53
+ {
54
+ :'id' => :'id',
55
+ :'email_address' => :'emailAddress',
56
+ :'account_state' => :'accountState',
57
+ :'subscription_type' => :'subscriptionType',
58
+ :'account_type' => :'accountType',
59
+ :'created_at' => :'createdAt'
60
+ }
61
+ end
62
+
63
+ # Attribute type mapping.
64
+ def self.openapi_types
65
+ {
66
+ :'id' => :'String',
67
+ :'email_address' => :'String',
68
+ :'account_state' => :'String',
69
+ :'subscription_type' => :'String',
70
+ :'account_type' => :'String',
71
+ :'created_at' => :'DateTime'
72
+ }
73
+ end
74
+
75
+ # List of attributes with nullable: true
76
+ def self.openapi_nullable
77
+ Set.new([
78
+ ])
79
+ end
80
+
81
+ # Initializes the object
82
+ # @param [Hash] attributes Model attributes in the form of hash
83
+ def initialize(attributes = {})
84
+ if (!attributes.is_a?(Hash))
85
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::UserInfoDto` initialize method"
86
+ end
87
+
88
+ # check to see if the attribute exists and convert string to symbol for hash key
89
+ attributes = attributes.each_with_object({}) { |(k, v), h|
90
+ if (!self.class.attribute_map.key?(k.to_sym))
91
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::UserInfoDto`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
92
+ end
93
+ h[k.to_sym] = v
94
+ }
95
+
96
+ if attributes.key?(:'id')
97
+ self.id = attributes[:'id']
98
+ end
99
+
100
+ if attributes.key?(:'email_address')
101
+ self.email_address = attributes[:'email_address']
102
+ end
103
+
104
+ if attributes.key?(:'account_state')
105
+ self.account_state = attributes[:'account_state']
106
+ end
107
+
108
+ if attributes.key?(:'subscription_type')
109
+ self.subscription_type = attributes[:'subscription_type']
110
+ end
111
+
112
+ if attributes.key?(:'account_type')
113
+ self.account_type = attributes[:'account_type']
114
+ end
115
+
116
+ if attributes.key?(:'created_at')
117
+ self.created_at = attributes[:'created_at']
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 @id.nil?
126
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
127
+ end
128
+
129
+ if @email_address.nil?
130
+ invalid_properties.push('invalid value for "email_address", email_address cannot be nil.')
131
+ end
132
+
133
+ if @account_state.nil?
134
+ invalid_properties.push('invalid value for "account_state", account_state cannot be nil.')
135
+ end
136
+
137
+ if @account_type.nil?
138
+ invalid_properties.push('invalid value for "account_type", account_type cannot be nil.')
139
+ end
140
+
141
+ if @created_at.nil?
142
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
143
+ end
144
+
145
+ invalid_properties
146
+ end
147
+
148
+ # Check to see if the all the properties in the model are valid
149
+ # @return true if the model is valid
150
+ def valid?
151
+ return false if @id.nil?
152
+ return false if @email_address.nil?
153
+ return false if @account_state.nil?
154
+ account_state_validator = EnumAttributeValidator.new('String', ["FROZEN", "ACTIVE"])
155
+ return false unless account_state_validator.valid?(@account_state)
156
+ subscription_type_validator = EnumAttributeValidator.new('String', ["PRO_MONTHLY", "STARTER", "TEAM", "ENTERPRISE"])
157
+ return false unless subscription_type_validator.valid?(@subscription_type)
158
+ return false if @account_type.nil?
159
+ account_type_validator = EnumAttributeValidator.new('String', ["SOLO", "CHILD_SOLO", "CHILD_TEAM"])
160
+ return false unless account_type_validator.valid?(@account_type)
161
+ return false if @created_at.nil?
162
+ true
163
+ end
164
+
165
+ # Custom attribute writer method checking allowed values (enum).
166
+ # @param [Object] account_state Object to be assigned
167
+ def account_state=(account_state)
168
+ validator = EnumAttributeValidator.new('String', ["FROZEN", "ACTIVE"])
169
+ unless validator.valid?(account_state)
170
+ fail ArgumentError, "invalid value for \"account_state\", must be one of #{validator.allowable_values}."
171
+ end
172
+ @account_state = account_state
173
+ end
174
+
175
+ # Custom attribute writer method checking allowed values (enum).
176
+ # @param [Object] subscription_type Object to be assigned
177
+ def subscription_type=(subscription_type)
178
+ validator = EnumAttributeValidator.new('String', ["PRO_MONTHLY", "STARTER", "TEAM", "ENTERPRISE"])
179
+ unless validator.valid?(subscription_type)
180
+ fail ArgumentError, "invalid value for \"subscription_type\", must be one of #{validator.allowable_values}."
181
+ end
182
+ @subscription_type = subscription_type
183
+ end
184
+
185
+ # Custom attribute writer method checking allowed values (enum).
186
+ # @param [Object] account_type Object to be assigned
187
+ def account_type=(account_type)
188
+ validator = EnumAttributeValidator.new('String', ["SOLO", "CHILD_SOLO", "CHILD_TEAM"])
189
+ unless validator.valid?(account_type)
190
+ fail ArgumentError, "invalid value for \"account_type\", must be one of #{validator.allowable_values}."
191
+ end
192
+ @account_type = account_type
193
+ end
194
+
195
+ # Checks equality by comparing each attribute.
196
+ # @param [Object] Object to be compared
197
+ def ==(o)
198
+ return true if self.equal?(o)
199
+ self.class == o.class &&
200
+ id == o.id &&
201
+ email_address == o.email_address &&
202
+ account_state == o.account_state &&
203
+ subscription_type == o.subscription_type &&
204
+ account_type == o.account_type &&
205
+ created_at == o.created_at
206
+ end
207
+
208
+ # @see the `==` method
209
+ # @param [Object] Object to be compared
210
+ def eql?(o)
211
+ self == o
212
+ end
213
+
214
+ # Calculates hash code according to all attributes.
215
+ # @return [Integer] Hash code
216
+ def hash
217
+ [id, email_address, account_state, subscription_type, account_type, created_at].hash
218
+ end
219
+
220
+ # Builds the object from hash
221
+ # @param [Hash] attributes Model attributes in the form of hash
222
+ # @return [Object] Returns the model itself
223
+ def self.build_from_hash(attributes)
224
+ new.build_from_hash(attributes)
225
+ end
226
+
227
+ # Builds the object from hash
228
+ # @param [Hash] attributes Model attributes in the form of hash
229
+ # @return [Object] Returns the model itself
230
+ def build_from_hash(attributes)
231
+ return nil unless attributes.is_a?(Hash)
232
+ self.class.openapi_types.each_pair do |key, type|
233
+ if type =~ /\AArray<(.*)>/i
234
+ # check to ensure the input is an array given that the attribute
235
+ # is documented as an array but the input is not
236
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
237
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
238
+ end
239
+ elsif !attributes[self.class.attribute_map[key]].nil?
240
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
241
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
242
+ end
243
+
244
+ self
245
+ end
246
+
247
+ # Deserializes the data based on type
248
+ # @param string type Data type
249
+ # @param string value Value to be deserialized
250
+ # @return [Object] Deserialized data
251
+ def _deserialize(type, value)
252
+ case type.to_sym
253
+ when :DateTime
254
+ DateTime.parse(value)
255
+ when :Date
256
+ Date.parse(value)
257
+ when :String
258
+ value.to_s
259
+ when :Integer
260
+ value.to_i
261
+ when :Float
262
+ value.to_f
263
+ when :Boolean
264
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
265
+ true
266
+ else
267
+ false
268
+ end
269
+ when :Object
270
+ # generic object (usually a Hash), return directly
271
+ value
272
+ when /\AArray<(?<inner_type>.+)>\z/
273
+ inner_type = Regexp.last_match[:inner_type]
274
+ value.map { |v| _deserialize(inner_type, v) }
275
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
276
+ k_type = Regexp.last_match[:k_type]
277
+ v_type = Regexp.last_match[:v_type]
278
+ {}.tap do |hash|
279
+ value.each do |k, v|
280
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
281
+ end
282
+ end
283
+ else # model
284
+ MailSlurpClient.const_get(type).build_from_hash(value)
285
+ end
286
+ end
287
+
288
+ # Returns the string representation of the object
289
+ # @return [String] String presentation of the object
290
+ def to_s
291
+ to_hash.to_s
292
+ end
293
+
294
+ # to_body is an alias to to_hash (backward compatibility)
295
+ # @return [Hash] Returns the object in the form of hash
296
+ def to_body
297
+ to_hash
298
+ end
299
+
300
+ # Returns the object in the form of hash
301
+ # @return [Hash] Returns the object in the form of hash
302
+ def to_hash
303
+ hash = {}
304
+ self.class.attribute_map.each_pair do |attr, param|
305
+ value = self.send(attr)
306
+ if value.nil?
307
+ is_nullable = self.class.openapi_nullable.include?(attr)
308
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
309
+ end
310
+
311
+ hash[param] = _to_hash(value)
312
+ end
313
+ hash
314
+ end
315
+
316
+ # Outputs non-array value in the form of hash
317
+ # For object, use to_hash. Otherwise, just return the value
318
+ # @param [Object] value Any valid value
319
+ # @return [Hash] Returns the value in the form of hash
320
+ def _to_hash(value)
321
+ if value.is_a?(Array)
322
+ value.compact.map { |v| _to_hash(v) }
323
+ elsif value.is_a?(Hash)
324
+ {}.tap do |hash|
325
+ value.each { |k, v| hash[k] = _to_hash(v) }
326
+ end
327
+ elsif value.respond_to? :to_hash
328
+ value.to_hash
329
+ else
330
+ value
331
+ end
332
+ end
333
+ end
334
+ end
@@ -11,5 +11,5 @@ OpenAPI Generator version: 4.3.1
11
11
  =end
12
12
 
13
13
  module MailSlurpClient
14
- VERSION = '15.11.1'
14
+ VERSION = '15.12.0'
15
15
  end
@@ -25,7 +25,7 @@ require 'mailslurp_client/models/attachment_meta_data'
25
25
  require 'mailslurp_client/models/attachment_projection'
26
26
  require 'mailslurp_client/models/basic_auth_options'
27
27
  require 'mailslurp_client/models/bounce_projection'
28
- require 'mailslurp_client/models/bounce_recipient'
28
+ require 'mailslurp_client/models/bounce_recipient_projection'
29
29
  require 'mailslurp_client/models/bounced_email_dto'
30
30
  require 'mailslurp_client/models/bounced_recipient_dto'
31
31
  require 'mailslurp_client/models/bulk_send_email_options'
@@ -87,6 +87,7 @@ require 'mailslurp_client/models/ip_address_result'
87
87
  require 'mailslurp_client/models/imap_flag_operation_options'
88
88
  require 'mailslurp_client/models/imap_smtp_access_details'
89
89
  require 'mailslurp_client/models/inbox_by_email_address_result'
90
+ require 'mailslurp_client/models/inbox_by_name_result'
90
91
  require 'mailslurp_client/models/inbox_dto'
91
92
  require 'mailslurp_client/models/inbox_exists_dto'
92
93
  require 'mailslurp_client/models/inbox_forwarder_dto'
@@ -154,6 +155,7 @@ require 'mailslurp_client/models/sms_preview'
154
155
  require 'mailslurp_client/models/sms_projection'
155
156
  require 'mailslurp_client/models/sort'
156
157
  require 'mailslurp_client/models/template_dto'
158
+ require 'mailslurp_client/models/template_preview'
157
159
  require 'mailslurp_client/models/template_projection'
158
160
  require 'mailslurp_client/models/template_variable'
159
161
  require 'mailslurp_client/models/test_new_inbox_forwarder_options'
@@ -169,6 +171,7 @@ require 'mailslurp_client/models/update_domain_options'
169
171
  require 'mailslurp_client/models/update_group_contacts'
170
172
  require 'mailslurp_client/models/update_inbox_options'
171
173
  require 'mailslurp_client/models/upload_attachment_options'
174
+ require 'mailslurp_client/models/user_info_dto'
172
175
  require 'mailslurp_client/models/validate_email_address_list_options'
173
176
  require 'mailslurp_client/models/validate_email_address_list_result'
174
177
  require 'mailslurp_client/models/validation_dto'
@@ -195,6 +198,7 @@ require 'mailslurp_client/models/webhook_test_result'
195
198
 
196
199
  # APIs
197
200
  require 'mailslurp_client/api/alias_controller_api'
201
+ require 'mailslurp_client/api/api_user_controller_api'
198
202
  require 'mailslurp_client/api/attachment_controller_api'
199
203
  require 'mailslurp_client/api/bounce_controller_api'
200
204
  require 'mailslurp_client/api/bulk_actions_controller_api'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mailslurp_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 15.11.1
4
+ version: 15.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - mailslurp
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-06-28 00:00:00.000000000 Z
11
+ date: 2022-07-02 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Create emails addresses in Ruby then send and receive real emails and
14
14
  attachments. See https://www.mailslurp.com/docs/ruby/ for full Ruby documentation.
@@ -24,6 +24,7 @@ files:
24
24
  - SUPPORT.md
25
25
  - lib/mailslurp_client.rb
26
26
  - lib/mailslurp_client/api/alias_controller_api.rb
27
+ - lib/mailslurp_client/api/api_user_controller_api.rb
27
28
  - lib/mailslurp_client/api/attachment_controller_api.rb
28
29
  - lib/mailslurp_client/api/bounce_controller_api.rb
29
30
  - lib/mailslurp_client/api/bulk_actions_controller_api.rb
@@ -59,7 +60,7 @@ files:
59
60
  - lib/mailslurp_client/models/attachment_projection.rb
60
61
  - lib/mailslurp_client/models/basic_auth_options.rb
61
62
  - lib/mailslurp_client/models/bounce_projection.rb
62
- - lib/mailslurp_client/models/bounce_recipient.rb
63
+ - lib/mailslurp_client/models/bounce_recipient_projection.rb
63
64
  - lib/mailslurp_client/models/bounced_email_dto.rb
64
65
  - lib/mailslurp_client/models/bounced_recipient_dto.rb
65
66
  - lib/mailslurp_client/models/bulk_send_email_options.rb
@@ -120,6 +121,7 @@ files:
120
121
  - lib/mailslurp_client/models/imap_flag_operation_options.rb
121
122
  - lib/mailslurp_client/models/imap_smtp_access_details.rb
122
123
  - lib/mailslurp_client/models/inbox_by_email_address_result.rb
124
+ - lib/mailslurp_client/models/inbox_by_name_result.rb
123
125
  - lib/mailslurp_client/models/inbox_dto.rb
124
126
  - lib/mailslurp_client/models/inbox_exists_dto.rb
125
127
  - lib/mailslurp_client/models/inbox_forwarder_dto.rb
@@ -188,6 +190,7 @@ files:
188
190
  - lib/mailslurp_client/models/sms_projection.rb
189
191
  - lib/mailslurp_client/models/sort.rb
190
192
  - lib/mailslurp_client/models/template_dto.rb
193
+ - lib/mailslurp_client/models/template_preview.rb
191
194
  - lib/mailslurp_client/models/template_projection.rb
192
195
  - lib/mailslurp_client/models/template_variable.rb
193
196
  - lib/mailslurp_client/models/test_new_inbox_forwarder_options.rb
@@ -203,6 +206,7 @@ files:
203
206
  - lib/mailslurp_client/models/update_group_contacts.rb
204
207
  - lib/mailslurp_client/models/update_inbox_options.rb
205
208
  - lib/mailslurp_client/models/upload_attachment_options.rb
209
+ - lib/mailslurp_client/models/user_info_dto.rb
206
210
  - lib/mailslurp_client/models/validate_email_address_list_options.rb
207
211
  - lib/mailslurp_client/models/validate_email_address_list_result.rb
208
212
  - lib/mailslurp_client/models/validation_dto.rb