mailslurp_client 15.9.0 → 15.12.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) 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/attachment_controller_api.rb +4 -4
  4. data/lib/mailslurp_client/api/email_controller_api.rb +68 -3
  5. data/lib/mailslurp_client/api/inbox_controller_api.rb +138 -0
  6. data/lib/mailslurp_client/api/missed_email_controller_api.rb +56 -0
  7. data/lib/mailslurp_client/api/phone_controller_api.rb +487 -0
  8. data/lib/mailslurp_client/api/sent_emails_controller_api.rb +73 -0
  9. data/lib/mailslurp_client/api/sms_controller_api.rb +286 -0
  10. data/lib/mailslurp_client/api/template_controller_api.rb +124 -0
  11. data/lib/mailslurp_client/api/wait_for_controller_api.rb +64 -0
  12. data/lib/mailslurp_client/api/webhook_controller_api.rb +2 -2
  13. data/lib/mailslurp_client/models/abstract_webhook_payload.rb +2 -2
  14. data/lib/mailslurp_client/models/alias_projection.rb +31 -31
  15. data/lib/mailslurp_client/models/attachment_entity.rb +10 -1
  16. data/lib/mailslurp_client/models/attachment_projection.rb +14 -14
  17. data/lib/mailslurp_client/models/bounce_projection.rb +31 -4
  18. data/lib/mailslurp_client/models/{bounce_recipient.rb → bounce_recipient_projection.rb} +35 -36
  19. data/lib/mailslurp_client/models/bounced_email_dto.rb +19 -1
  20. data/lib/mailslurp_client/models/bounced_recipient_dto.rb +37 -1
  21. data/lib/mailslurp_client/models/contact_projection.rb +18 -13
  22. data/lib/mailslurp_client/models/create_emergency_address_options.rb +324 -0
  23. data/lib/mailslurp_client/models/create_webhook_options.rb +2 -2
  24. data/lib/mailslurp_client/models/email_html_dto.rb +215 -0
  25. data/lib/mailslurp_client/models/email_preview.rb +5 -0
  26. data/lib/mailslurp_client/models/email_projection.rb +29 -19
  27. data/lib/mailslurp_client/models/emergency_address.rb +408 -0
  28. data/lib/mailslurp_client/models/emergency_address_dto.rb +273 -0
  29. data/lib/mailslurp_client/models/empty_response_dto.rb +206 -0
  30. data/lib/mailslurp_client/models/expired_inbox_record_projection.rb +15 -15
  31. data/lib/mailslurp_client/models/inbox_by_name_result.rb +221 -0
  32. data/lib/mailslurp_client/models/inbox_dto.rb +11 -1
  33. data/lib/mailslurp_client/models/inbox_preview.rb +5 -0
  34. data/lib/mailslurp_client/models/missed_email.rb +37 -1
  35. data/lib/mailslurp_client/models/organization_inbox_projection.rb +5 -0
  36. data/lib/mailslurp_client/models/page_alias.rb +22 -22
  37. data/lib/mailslurp_client/models/page_attachment_entity.rb +22 -22
  38. data/lib/mailslurp_client/models/page_bounced_email.rb +22 -22
  39. data/lib/mailslurp_client/models/page_bounced_recipients.rb +23 -23
  40. data/lib/mailslurp_client/models/page_contact_projection.rb +22 -22
  41. data/lib/mailslurp_client/models/page_email_preview.rb +22 -22
  42. data/lib/mailslurp_client/models/page_email_projection.rb +22 -22
  43. data/lib/mailslurp_client/models/page_email_validation_request.rb +22 -22
  44. data/lib/mailslurp_client/models/page_expired_inbox_record_projection.rb +22 -22
  45. data/lib/mailslurp_client/models/page_group_projection.rb +22 -22
  46. data/lib/mailslurp_client/models/page_inbox_forwarder_dto.rb +22 -22
  47. data/lib/mailslurp_client/models/page_inbox_projection.rb +22 -22
  48. data/lib/mailslurp_client/models/page_inbox_ruleset_dto.rb +22 -22
  49. data/lib/mailslurp_client/models/page_missed_email_projection.rb +22 -22
  50. data/lib/mailslurp_client/models/page_organization_inbox_projection.rb +22 -22
  51. data/lib/mailslurp_client/models/page_phone_number_projection.rb +308 -0
  52. data/lib/mailslurp_client/models/page_sent_email_projection.rb +16 -16
  53. data/lib/mailslurp_client/models/page_sent_email_with_queue_projection.rb +344 -0
  54. data/lib/mailslurp_client/models/page_sms_projection.rb +308 -0
  55. data/lib/mailslurp_client/models/page_template_projection.rb +22 -22
  56. data/lib/mailslurp_client/models/page_thread_projection.rb +22 -22
  57. data/lib/mailslurp_client/models/page_tracking_pixel_projection.rb +22 -22
  58. data/lib/mailslurp_client/models/page_unknown_missed_email_projection.rb +22 -22
  59. data/lib/mailslurp_client/models/page_webhook_projection.rb +22 -22
  60. data/lib/mailslurp_client/models/page_webhook_result.rb +22 -22
  61. data/lib/mailslurp_client/models/phone_number_dto.rb +347 -0
  62. data/lib/mailslurp_client/models/phone_number_projection.rb +302 -0
  63. data/lib/mailslurp_client/models/phone_plan_dto.rb +287 -0
  64. data/lib/mailslurp_client/models/send_with_queue_result.rb +318 -0
  65. data/lib/mailslurp_client/models/sent_email_projection.rb +18 -13
  66. data/lib/mailslurp_client/models/sms_match_option.rb +289 -0
  67. data/lib/mailslurp_client/models/sms_message.rb +318 -0
  68. data/lib/mailslurp_client/models/sms_preview.rb +267 -0
  69. data/lib/mailslurp_client/models/sms_projection.rb +282 -0
  70. data/lib/mailslurp_client/models/template_preview.rb +211 -0
  71. data/lib/mailslurp_client/models/template_projection.rb +18 -18
  72. data/lib/mailslurp_client/models/thread_projection.rb +36 -36
  73. data/lib/mailslurp_client/models/tracking_pixel_projection.rb +19 -19
  74. data/lib/mailslurp_client/models/user_info_dto.rb +334 -0
  75. data/lib/mailslurp_client/models/wait_for_sms_conditions.rb +371 -0
  76. data/lib/mailslurp_client/models/webhook_bounce_payload.rb +2 -2
  77. data/lib/mailslurp_client/models/webhook_bounce_recipient_payload.rb +2 -2
  78. data/lib/mailslurp_client/models/webhook_dto.rb +2 -2
  79. data/lib/mailslurp_client/models/webhook_email_opened_payload.rb +2 -2
  80. data/lib/mailslurp_client/models/webhook_email_read_payload.rb +2 -2
  81. data/lib/mailslurp_client/models/webhook_new_attachment_payload.rb +2 -2
  82. data/lib/mailslurp_client/models/webhook_new_contact_payload.rb +7 -2
  83. data/lib/mailslurp_client/models/webhook_new_email_payload.rb +2 -2
  84. data/lib/mailslurp_client/models/webhook_projection.rb +2 -2
  85. data/lib/mailslurp_client/models/webhook_result_dto.rb +7 -2
  86. data/lib/mailslurp_client/version.rb +1 -1
  87. data/lib/mailslurp_client.rb +24 -1
  88. metadata +26 -3
@@ -31,12 +31,12 @@ module MailSlurpClient
31
31
  # Number of items returned
32
32
  attr_accessor :number_of_elements
33
33
 
34
- # Total number of items available for querying
35
- attr_accessor :total_elements
36
-
37
34
  # Total number of pages available
38
35
  attr_accessor :total_pages
39
36
 
37
+ # Total number of items available for querying
38
+ attr_accessor :total_elements
39
+
40
40
  attr_accessor :last
41
41
 
42
42
  attr_accessor :sort
@@ -54,8 +54,8 @@ module MailSlurpClient
54
54
  :'size' => :'size',
55
55
  :'number' => :'number',
56
56
  :'number_of_elements' => :'numberOfElements',
57
- :'total_elements' => :'totalElements',
58
57
  :'total_pages' => :'totalPages',
58
+ :'total_elements' => :'totalElements',
59
59
  :'last' => :'last',
60
60
  :'sort' => :'sort',
61
61
  :'first' => :'first',
@@ -72,8 +72,8 @@ module MailSlurpClient
72
72
  :'size' => :'Integer',
73
73
  :'number' => :'Integer',
74
74
  :'number_of_elements' => :'Integer',
75
- :'total_elements' => :'Integer',
76
75
  :'total_pages' => :'Integer',
76
+ :'total_elements' => :'Integer',
77
77
  :'last' => :'Boolean',
78
78
  :'sort' => :'Sort',
79
79
  :'first' => :'Boolean',
@@ -128,14 +128,14 @@ module MailSlurpClient
128
128
  self.number_of_elements = attributes[:'number_of_elements']
129
129
  end
130
130
 
131
- if attributes.key?(:'total_elements')
132
- self.total_elements = attributes[:'total_elements']
133
- end
134
-
135
131
  if attributes.key?(:'total_pages')
136
132
  self.total_pages = attributes[:'total_pages']
137
133
  end
138
134
 
135
+ if attributes.key?(:'total_elements')
136
+ self.total_elements = attributes[:'total_elements']
137
+ end
138
+
139
139
  if attributes.key?(:'last')
140
140
  self.last = attributes[:'last']
141
141
  end
@@ -173,14 +173,14 @@ module MailSlurpClient
173
173
  invalid_properties.push('invalid value for "number_of_elements", number_of_elements cannot be nil.')
174
174
  end
175
175
 
176
- if @total_elements.nil?
177
- invalid_properties.push('invalid value for "total_elements", total_elements cannot be nil.')
178
- end
179
-
180
176
  if @total_pages.nil?
181
177
  invalid_properties.push('invalid value for "total_pages", total_pages cannot be nil.')
182
178
  end
183
179
 
180
+ if @total_elements.nil?
181
+ invalid_properties.push('invalid value for "total_elements", total_elements cannot be nil.')
182
+ end
183
+
184
184
  invalid_properties
185
185
  end
186
186
 
@@ -191,8 +191,8 @@ module MailSlurpClient
191
191
  return false if @size.nil?
192
192
  return false if @number.nil?
193
193
  return false if @number_of_elements.nil?
194
- return false if @total_elements.nil?
195
194
  return false if @total_pages.nil?
195
+ return false if @total_elements.nil?
196
196
  true
197
197
  end
198
198
 
@@ -207,8 +207,8 @@ module MailSlurpClient
207
207
  size == o.size &&
208
208
  number == o.number &&
209
209
  number_of_elements == o.number_of_elements &&
210
- total_elements == o.total_elements &&
211
210
  total_pages == o.total_pages &&
211
+ total_elements == o.total_elements &&
212
212
  last == o.last &&
213
213
  sort == o.sort &&
214
214
  first == o.first &&
@@ -224,7 +224,7 @@ module MailSlurpClient
224
224
  # Calculates hash code according to all attributes.
225
225
  # @return [Integer] Hash code
226
226
  def hash
227
- [content, pageable, total, size, number, number_of_elements, total_elements, total_pages, last, sort, first, empty].hash
227
+ [content, pageable, total, size, number, number_of_elements, total_pages, total_elements, last, sort, first, empty].hash
228
228
  end
229
229
 
230
230
  # Builds the object from hash
@@ -0,0 +1,344 @@
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
+ # Paginated sent email results for emails sent with queue. Page index starts at zero. Projection results may omit larger entity fields. For fetching a full sent email entity use the projection ID with individual method calls.
17
+ class PageSentEmailWithQueueProjection
18
+ # Collection of items
19
+ attr_accessor :content
20
+
21
+ attr_accessor :pageable
22
+
23
+ attr_accessor :total
24
+
25
+ # Size of page requested
26
+ attr_accessor :size
27
+
28
+ # Page number starting at 0
29
+ attr_accessor :number
30
+
31
+ # Number of items returned
32
+ attr_accessor :number_of_elements
33
+
34
+ # Total number of pages available
35
+ attr_accessor :total_pages
36
+
37
+ # Total number of items available for querying
38
+ attr_accessor :total_elements
39
+
40
+ attr_accessor :last
41
+
42
+ attr_accessor :sort
43
+
44
+ attr_accessor :first
45
+
46
+ attr_accessor :empty
47
+
48
+ # Attribute mapping from ruby-style variable name to JSON key.
49
+ def self.attribute_map
50
+ {
51
+ :'content' => :'content',
52
+ :'pageable' => :'pageable',
53
+ :'total' => :'total',
54
+ :'size' => :'size',
55
+ :'number' => :'number',
56
+ :'number_of_elements' => :'numberOfElements',
57
+ :'total_pages' => :'totalPages',
58
+ :'total_elements' => :'totalElements',
59
+ :'last' => :'last',
60
+ :'sort' => :'sort',
61
+ :'first' => :'first',
62
+ :'empty' => :'empty'
63
+ }
64
+ end
65
+
66
+ # Attribute type mapping.
67
+ def self.openapi_types
68
+ {
69
+ :'content' => :'Array<SendWithQueueResult>',
70
+ :'pageable' => :'PageableObject',
71
+ :'total' => :'Integer',
72
+ :'size' => :'Integer',
73
+ :'number' => :'Integer',
74
+ :'number_of_elements' => :'Integer',
75
+ :'total_pages' => :'Integer',
76
+ :'total_elements' => :'Integer',
77
+ :'last' => :'Boolean',
78
+ :'sort' => :'Sort',
79
+ :'first' => :'Boolean',
80
+ :'empty' => :'Boolean'
81
+ }
82
+ end
83
+
84
+ # List of attributes with nullable: true
85
+ def self.openapi_nullable
86
+ Set.new([
87
+ ])
88
+ end
89
+
90
+ # Initializes the object
91
+ # @param [Hash] attributes Model attributes in the form of hash
92
+ def initialize(attributes = {})
93
+ if (!attributes.is_a?(Hash))
94
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::PageSentEmailWithQueueProjection` initialize method"
95
+ end
96
+
97
+ # check to see if the attribute exists and convert string to symbol for hash key
98
+ attributes = attributes.each_with_object({}) { |(k, v), h|
99
+ if (!self.class.attribute_map.key?(k.to_sym))
100
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::PageSentEmailWithQueueProjection`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
101
+ end
102
+ h[k.to_sym] = v
103
+ }
104
+
105
+ if attributes.key?(:'content')
106
+ if (value = attributes[:'content']).is_a?(Array)
107
+ self.content = value
108
+ end
109
+ end
110
+
111
+ if attributes.key?(:'pageable')
112
+ self.pageable = attributes[:'pageable']
113
+ end
114
+
115
+ if attributes.key?(:'total')
116
+ self.total = attributes[:'total']
117
+ end
118
+
119
+ if attributes.key?(:'size')
120
+ self.size = attributes[:'size']
121
+ end
122
+
123
+ if attributes.key?(:'number')
124
+ self.number = attributes[:'number']
125
+ end
126
+
127
+ if attributes.key?(:'number_of_elements')
128
+ self.number_of_elements = attributes[:'number_of_elements']
129
+ end
130
+
131
+ if attributes.key?(:'total_pages')
132
+ self.total_pages = attributes[:'total_pages']
133
+ end
134
+
135
+ if attributes.key?(:'total_elements')
136
+ self.total_elements = attributes[:'total_elements']
137
+ end
138
+
139
+ if attributes.key?(:'last')
140
+ self.last = attributes[:'last']
141
+ end
142
+
143
+ if attributes.key?(:'sort')
144
+ self.sort = attributes[:'sort']
145
+ end
146
+
147
+ if attributes.key?(:'first')
148
+ self.first = attributes[:'first']
149
+ end
150
+
151
+ if attributes.key?(:'empty')
152
+ self.empty = attributes[:'empty']
153
+ end
154
+ end
155
+
156
+ # Show invalid properties with the reasons. Usually used together with valid?
157
+ # @return Array for valid properties with the reasons
158
+ def list_invalid_properties
159
+ invalid_properties = Array.new
160
+ if @content.nil?
161
+ invalid_properties.push('invalid value for "content", content cannot be nil.')
162
+ end
163
+
164
+ if @size.nil?
165
+ invalid_properties.push('invalid value for "size", size cannot be nil.')
166
+ end
167
+
168
+ if @number.nil?
169
+ invalid_properties.push('invalid value for "number", number cannot be nil.')
170
+ end
171
+
172
+ if @number_of_elements.nil?
173
+ invalid_properties.push('invalid value for "number_of_elements", number_of_elements cannot be nil.')
174
+ end
175
+
176
+ if @total_pages.nil?
177
+ invalid_properties.push('invalid value for "total_pages", total_pages cannot be nil.')
178
+ end
179
+
180
+ if @total_elements.nil?
181
+ invalid_properties.push('invalid value for "total_elements", total_elements cannot be nil.')
182
+ end
183
+
184
+ invalid_properties
185
+ end
186
+
187
+ # Check to see if the all the properties in the model are valid
188
+ # @return true if the model is valid
189
+ def valid?
190
+ return false if @content.nil?
191
+ return false if @size.nil?
192
+ return false if @number.nil?
193
+ return false if @number_of_elements.nil?
194
+ return false if @total_pages.nil?
195
+ return false if @total_elements.nil?
196
+ true
197
+ end
198
+
199
+ # Checks equality by comparing each attribute.
200
+ # @param [Object] Object to be compared
201
+ def ==(o)
202
+ return true if self.equal?(o)
203
+ self.class == o.class &&
204
+ content == o.content &&
205
+ pageable == o.pageable &&
206
+ total == o.total &&
207
+ size == o.size &&
208
+ number == o.number &&
209
+ number_of_elements == o.number_of_elements &&
210
+ total_pages == o.total_pages &&
211
+ total_elements == o.total_elements &&
212
+ last == o.last &&
213
+ sort == o.sort &&
214
+ first == o.first &&
215
+ empty == o.empty
216
+ end
217
+
218
+ # @see the `==` method
219
+ # @param [Object] Object to be compared
220
+ def eql?(o)
221
+ self == o
222
+ end
223
+
224
+ # Calculates hash code according to all attributes.
225
+ # @return [Integer] Hash code
226
+ def hash
227
+ [content, pageable, total, size, number, number_of_elements, total_pages, total_elements, last, sort, first, empty].hash
228
+ end
229
+
230
+ # Builds the object from hash
231
+ # @param [Hash] attributes Model attributes in the form of hash
232
+ # @return [Object] Returns the model itself
233
+ def self.build_from_hash(attributes)
234
+ new.build_from_hash(attributes)
235
+ end
236
+
237
+ # Builds the object from hash
238
+ # @param [Hash] attributes Model attributes in the form of hash
239
+ # @return [Object] Returns the model itself
240
+ def build_from_hash(attributes)
241
+ return nil unless attributes.is_a?(Hash)
242
+ self.class.openapi_types.each_pair do |key, type|
243
+ if type =~ /\AArray<(.*)>/i
244
+ # check to ensure the input is an array given that the attribute
245
+ # is documented as an array but the input is not
246
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
247
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
248
+ end
249
+ elsif !attributes[self.class.attribute_map[key]].nil?
250
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
251
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
252
+ end
253
+
254
+ self
255
+ end
256
+
257
+ # Deserializes the data based on type
258
+ # @param string type Data type
259
+ # @param string value Value to be deserialized
260
+ # @return [Object] Deserialized data
261
+ def _deserialize(type, value)
262
+ case type.to_sym
263
+ when :DateTime
264
+ DateTime.parse(value)
265
+ when :Date
266
+ Date.parse(value)
267
+ when :String
268
+ value.to_s
269
+ when :Integer
270
+ value.to_i
271
+ when :Float
272
+ value.to_f
273
+ when :Boolean
274
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
275
+ true
276
+ else
277
+ false
278
+ end
279
+ when :Object
280
+ # generic object (usually a Hash), return directly
281
+ value
282
+ when /\AArray<(?<inner_type>.+)>\z/
283
+ inner_type = Regexp.last_match[:inner_type]
284
+ value.map { |v| _deserialize(inner_type, v) }
285
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
286
+ k_type = Regexp.last_match[:k_type]
287
+ v_type = Regexp.last_match[:v_type]
288
+ {}.tap do |hash|
289
+ value.each do |k, v|
290
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
291
+ end
292
+ end
293
+ else # model
294
+ MailSlurpClient.const_get(type).build_from_hash(value)
295
+ end
296
+ end
297
+
298
+ # Returns the string representation of the object
299
+ # @return [String] String presentation of the object
300
+ def to_s
301
+ to_hash.to_s
302
+ end
303
+
304
+ # to_body is an alias to to_hash (backward compatibility)
305
+ # @return [Hash] Returns the object in the form of hash
306
+ def to_body
307
+ to_hash
308
+ end
309
+
310
+ # Returns the object in the form of hash
311
+ # @return [Hash] Returns the object in the form of hash
312
+ def to_hash
313
+ hash = {}
314
+ self.class.attribute_map.each_pair do |attr, param|
315
+ value = self.send(attr)
316
+ if value.nil?
317
+ is_nullable = self.class.openapi_nullable.include?(attr)
318
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
319
+ end
320
+
321
+ hash[param] = _to_hash(value)
322
+ end
323
+ hash
324
+ end
325
+
326
+ # Outputs non-array value in the form of hash
327
+ # For object, use to_hash. Otherwise, just return the value
328
+ # @param [Object] value Any valid value
329
+ # @return [Hash] Returns the value in the form of hash
330
+ def _to_hash(value)
331
+ if value.is_a?(Array)
332
+ value.compact.map { |v| _to_hash(v) }
333
+ elsif value.is_a?(Hash)
334
+ {}.tap do |hash|
335
+ value.each { |k, v| hash[k] = _to_hash(v) }
336
+ end
337
+ elsif value.respond_to? :to_hash
338
+ value.to_hash
339
+ else
340
+ value
341
+ end
342
+ end
343
+ end
344
+ end