mailslurp_client 13.0.1 → 14.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (166) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mailslurp_client/api/alias_controller_api.rb +19 -1
  3. data/lib/mailslurp_client/api/attachment_controller_api.rb +7 -1
  4. data/lib/mailslurp_client/api/bounce_controller_api.rb +13 -1
  5. data/lib/mailslurp_client/api/bulk_actions_controller_api.rb +1 -1
  6. data/lib/mailslurp_client/api/common_actions_controller_api.rb +45 -1
  7. data/lib/mailslurp_client/api/contact_controller_api.rb +7 -1
  8. data/lib/mailslurp_client/api/domain_controller_api.rb +1 -1
  9. data/lib/mailslurp_client/api/email_controller_api.rb +17 -5
  10. data/lib/mailslurp_client/api/expired_controller_api.rb +7 -1
  11. data/lib/mailslurp_client/api/export_controller_api.rb +1 -1
  12. data/lib/mailslurp_client/api/form_controller_api.rb +1 -1
  13. data/lib/mailslurp_client/api/group_controller_api.rb +13 -1
  14. data/lib/mailslurp_client/api/inbox_controller_api.rb +111 -7
  15. data/lib/mailslurp_client/api/inbox_forwarder_controller_api.rb +7 -1
  16. data/lib/mailslurp_client/api/inbox_ruleset_controller_api.rb +7 -1
  17. data/lib/mailslurp_client/api/mail_server_controller_api.rb +1 -1
  18. data/lib/mailslurp_client/api/missed_email_controller_api.rb +94 -1
  19. data/lib/mailslurp_client/api/sent_emails_controller_api.rb +25 -1
  20. data/lib/mailslurp_client/api/template_controller_api.rb +81 -7
  21. data/lib/mailslurp_client/api/tracking_controller_api.rb +7 -1
  22. data/lib/mailslurp_client/api/wait_for_controller_api.rb +22 -7
  23. data/lib/mailslurp_client/api/webhook_controller_api.rb +386 -8
  24. data/lib/mailslurp_client/api_client.rb +1 -1
  25. data/lib/mailslurp_client/api_error.rb +1 -1
  26. data/lib/mailslurp_client/configuration.rb +1 -1
  27. data/lib/mailslurp_client/models/abstract_webhook_payload.rb +3 -3
  28. data/lib/mailslurp_client/models/alias_dto.rb +1 -1
  29. data/lib/mailslurp_client/models/alias_projection.rb +1 -1
  30. data/lib/mailslurp_client/models/attachment_entity.rb +1 -1
  31. data/lib/mailslurp_client/models/attachment_meta_data.rb +1 -1
  32. data/lib/mailslurp_client/models/attachment_projection.rb +1 -1
  33. data/lib/mailslurp_client/models/basic_auth_options.rb +1 -1
  34. data/lib/mailslurp_client/models/bounce_projection.rb +1 -1
  35. data/lib/mailslurp_client/models/bounce_recipient.rb +1 -1
  36. data/lib/mailslurp_client/models/bounced_email_dto.rb +1 -1
  37. data/lib/mailslurp_client/models/bounced_recipient_dto.rb +1 -1
  38. data/lib/mailslurp_client/models/bulk_send_email_options.rb +1 -1
  39. data/lib/mailslurp_client/models/condition_option.rb +1 -1
  40. data/lib/mailslurp_client/models/contact_dto.rb +1 -1
  41. data/lib/mailslurp_client/models/contact_projection.rb +1 -1
  42. data/lib/mailslurp_client/models/content_match_options.rb +1 -1
  43. data/lib/mailslurp_client/models/create_alias_options.rb +1 -1
  44. data/lib/mailslurp_client/models/create_contact_options.rb +1 -1
  45. data/lib/mailslurp_client/models/create_domain_options.rb +1 -1
  46. data/lib/mailslurp_client/models/create_group_options.rb +1 -1
  47. data/lib/mailslurp_client/models/create_inbox_dto.rb +2 -2
  48. data/lib/mailslurp_client/models/create_inbox_forwarder_options.rb +18 -29
  49. data/lib/mailslurp_client/models/create_inbox_ruleset_options.rb +1 -1
  50. data/lib/mailslurp_client/models/create_template_options.rb +1 -1
  51. data/lib/mailslurp_client/models/create_tracking_pixel_options.rb +1 -1
  52. data/lib/mailslurp_client/models/create_webhook_options.rb +3 -3
  53. data/lib/mailslurp_client/models/describe_domain_options.rb +1 -1
  54. data/lib/mailslurp_client/models/describe_mail_server_domain_result.rb +1 -1
  55. data/lib/mailslurp_client/models/dns_lookup_options.rb +1 -1
  56. data/lib/mailslurp_client/models/dns_lookup_result.rb +1 -1
  57. data/lib/mailslurp_client/models/dns_lookup_results.rb +1 -1
  58. data/lib/mailslurp_client/models/domain_dto.rb +1 -1
  59. data/lib/mailslurp_client/models/domain_name_record.rb +1 -1
  60. data/lib/mailslurp_client/models/domain_preview.rb +1 -1
  61. data/lib/mailslurp_client/models/download_attachment_dto.rb +1 -1
  62. data/lib/mailslurp_client/models/email.rb +29 -11
  63. data/lib/mailslurp_client/models/email_analysis.rb +1 -1
  64. data/lib/mailslurp_client/models/email_content_match_result.rb +1 -1
  65. data/lib/mailslurp_client/models/email_links_result.rb +1 -1
  66. data/lib/mailslurp_client/models/email_preview.rb +7 -7
  67. data/lib/mailslurp_client/models/email_projection.rb +1 -1
  68. data/lib/mailslurp_client/models/email_recipients.rb +230 -0
  69. data/lib/mailslurp_client/models/email_text_lines_result.rb +1 -1
  70. data/lib/mailslurp_client/models/email_verification_result.rb +2 -2
  71. data/lib/mailslurp_client/models/expiration_defaults.rb +19 -5
  72. data/lib/mailslurp_client/models/expired_inbox_dto.rb +1 -1
  73. data/lib/mailslurp_client/models/expired_inbox_record_projection.rb +1 -1
  74. data/lib/mailslurp_client/models/export_link.rb +1 -1
  75. data/lib/mailslurp_client/models/export_options.rb +1 -1
  76. data/lib/mailslurp_client/models/flush_expired_inboxes_result.rb +227 -0
  77. data/lib/mailslurp_client/models/forward_email_options.rb +1 -1
  78. data/lib/mailslurp_client/models/gravatar_url.rb +1 -1
  79. data/lib/mailslurp_client/models/group_contacts_dto.rb +1 -1
  80. data/lib/mailslurp_client/models/group_dto.rb +1 -1
  81. data/lib/mailslurp_client/models/group_projection.rb +1 -1
  82. data/lib/mailslurp_client/models/html_validation_result.rb +1 -1
  83. data/lib/mailslurp_client/models/inbox.rb +1 -1
  84. data/lib/mailslurp_client/models/inbox_forwarder_dto.rb +1 -1
  85. data/lib/mailslurp_client/models/inbox_forwarder_test_options.rb +1 -1
  86. data/lib/mailslurp_client/models/inbox_forwarder_test_result.rb +1 -1
  87. data/lib/mailslurp_client/models/{inbox_projection.rb → inbox_preview.rb} +23 -25
  88. data/lib/mailslurp_client/models/inbox_ruleset_dto.rb +1 -1
  89. data/lib/mailslurp_client/models/inbox_ruleset_test_options.rb +1 -1
  90. data/lib/mailslurp_client/models/inbox_ruleset_test_result.rb +1 -1
  91. data/lib/mailslurp_client/models/ip_address_result.rb +1 -1
  92. data/lib/mailslurp_client/models/json_schema_dto.rb +211 -0
  93. data/lib/mailslurp_client/models/match_option.rb +1 -1
  94. data/lib/mailslurp_client/models/match_options.rb +1 -1
  95. data/lib/mailslurp_client/models/missed_email.rb +1 -6
  96. data/lib/mailslurp_client/models/missed_email_projection.rb +1 -6
  97. data/lib/mailslurp_client/models/name_server_record.rb +1 -1
  98. data/lib/mailslurp_client/models/organization_inbox_projection.rb +1 -1
  99. data/lib/mailslurp_client/models/page_alias.rb +1 -1
  100. data/lib/mailslurp_client/models/page_attachment_entity.rb +1 -1
  101. data/lib/mailslurp_client/models/page_bounced_email.rb +1 -1
  102. data/lib/mailslurp_client/models/page_bounced_recipients.rb +1 -1
  103. data/lib/mailslurp_client/models/page_contact_projection.rb +1 -1
  104. data/lib/mailslurp_client/models/page_email_preview.rb +1 -1
  105. data/lib/mailslurp_client/models/page_email_projection.rb +1 -1
  106. data/lib/mailslurp_client/models/page_expired_inbox_record_projection.rb +1 -1
  107. data/lib/mailslurp_client/models/page_group_projection.rb +1 -1
  108. data/lib/mailslurp_client/models/page_inbox_forwarder_dto.rb +1 -1
  109. data/lib/mailslurp_client/models/page_inbox_projection.rb +2 -2
  110. data/lib/mailslurp_client/models/page_inbox_ruleset_dto.rb +1 -1
  111. data/lib/mailslurp_client/models/page_missed_email_projection.rb +1 -1
  112. data/lib/mailslurp_client/models/page_organization_inbox_projection.rb +1 -1
  113. data/lib/mailslurp_client/models/page_sent_email_projection.rb +1 -1
  114. data/lib/mailslurp_client/models/page_template_projection.rb +1 -1
  115. data/lib/mailslurp_client/models/page_thread_projection.rb +1 -1
  116. data/lib/mailslurp_client/models/page_tracking_pixel_projection.rb +1 -1
  117. data/lib/mailslurp_client/models/page_unknown_missed_email_projection.rb +299 -0
  118. data/lib/mailslurp_client/models/page_webhook_projection.rb +2 -1
  119. data/lib/mailslurp_client/models/page_webhook_result.rb +2 -2
  120. data/lib/mailslurp_client/models/pageable.rb +1 -1
  121. data/lib/mailslurp_client/models/raw_email_json.rb +1 -1
  122. data/lib/mailslurp_client/models/{model_alias.rb → recipient.rb} +14 -74
  123. data/lib/mailslurp_client/models/reply_to_alias_email_options.rb +1 -1
  124. data/lib/mailslurp_client/models/reply_to_email_options.rb +1 -1
  125. data/lib/mailslurp_client/models/send_email_options.rb +1 -1
  126. data/lib/mailslurp_client/models/sender.rb +234 -0
  127. data/lib/mailslurp_client/models/sent_email_dto.rb +1 -1
  128. data/lib/mailslurp_client/models/sent_email_projection.rb +1 -1
  129. data/lib/mailslurp_client/models/set_inbox_favourited_options.rb +1 -1
  130. data/lib/mailslurp_client/models/simple_send_email_options.rb +1 -1
  131. data/lib/mailslurp_client/models/sort.rb +1 -1
  132. data/lib/mailslurp_client/models/template_dto.rb +1 -1
  133. data/lib/mailslurp_client/models/template_projection.rb +1 -1
  134. data/lib/mailslurp_client/models/template_variable.rb +1 -1
  135. data/lib/mailslurp_client/models/test_new_inbox_forwarder_options.rb +1 -1
  136. data/lib/mailslurp_client/models/test_new_inbox_ruleset_options.rb +1 -1
  137. data/lib/mailslurp_client/models/thread_projection.rb +1 -1
  138. data/lib/mailslurp_client/models/tracking_pixel_dto.rb +1 -1
  139. data/lib/mailslurp_client/models/tracking_pixel_projection.rb +1 -1
  140. data/lib/mailslurp_client/models/unknown_missed_email_projection.rb +254 -0
  141. data/lib/mailslurp_client/models/unread_count.rb +1 -1
  142. data/lib/mailslurp_client/models/unseen_error_count_dto.rb +211 -0
  143. data/lib/mailslurp_client/models/update_alias_options.rb +1 -1
  144. data/lib/mailslurp_client/models/update_domain_options.rb +1 -1
  145. data/lib/mailslurp_client/models/update_group_contacts.rb +1 -1
  146. data/lib/mailslurp_client/models/update_inbox_options.rb +1 -1
  147. data/lib/mailslurp_client/models/upload_attachment_options.rb +2 -2
  148. data/lib/mailslurp_client/models/validation_dto.rb +1 -1
  149. data/lib/mailslurp_client/models/validation_message.rb +1 -1
  150. data/lib/mailslurp_client/models/verify_email_address_options.rb +1 -1
  151. data/lib/mailslurp_client/models/wait_for_conditions.rb +43 -3
  152. data/lib/mailslurp_client/models/webhook_dto.rb +4 -4
  153. data/lib/mailslurp_client/models/webhook_email_opened_payload.rb +3 -3
  154. data/lib/mailslurp_client/models/webhook_email_read_payload.rb +312 -0
  155. data/lib/mailslurp_client/models/webhook_new_attachment_payload.rb +3 -3
  156. data/lib/mailslurp_client/models/webhook_new_contact_payload.rb +3 -3
  157. data/lib/mailslurp_client/models/webhook_new_email_payload.rb +8 -8
  158. data/lib/mailslurp_client/models/webhook_projection.rb +3 -3
  159. data/lib/mailslurp_client/models/webhook_redrive_result.rb +234 -0
  160. data/lib/mailslurp_client/models/{webhook_result_entity.rb → webhook_result_dto.rb} +25 -7
  161. data/lib/mailslurp_client/models/webhook_test_request.rb +1 -1
  162. data/lib/mailslurp_client/models/webhook_test_response.rb +1 -1
  163. data/lib/mailslurp_client/models/webhook_test_result.rb +1 -1
  164. data/lib/mailslurp_client/version.rb +2 -2
  165. data/lib/mailslurp_client.rb +13 -4
  166. metadata +14 -5
@@ -0,0 +1,312 @@
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://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
5
+
6
+ The version of the OpenAPI document: 6.5.2
7
+
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
+ # EMAIL_READ webhook payload. Sent to your webhook url endpoint via HTTP POST when an email is read. This happens when an email is requested in full from the API or a user views the email in the dashboard.
17
+ class WebhookEmailReadPayload
18
+ # Date time of event creation
19
+ attr_accessor :created_at
20
+
21
+ # ID of the email that was received. Use this ID for fetching the email with the `EmailController`.
22
+ attr_accessor :email_id
23
+
24
+ # Is the email read
25
+ attr_accessor :email_is_read
26
+
27
+ # Name of the event type webhook is being triggered for.
28
+ attr_accessor :event_name
29
+
30
+ # Id of the inbox that received an email
31
+ attr_accessor :inbox_id
32
+
33
+ # Idempotent message ID. Store this ID locally or in a database to prevent message duplication.
34
+ attr_accessor :message_id
35
+
36
+ # ID of webhook entity being triggered
37
+ attr_accessor :webhook_id
38
+
39
+ # Name of the webhook being triggered
40
+ attr_accessor :webhook_name
41
+
42
+ class EnumAttributeValidator
43
+ attr_reader :datatype
44
+ attr_reader :allowable_values
45
+
46
+ def initialize(datatype, allowable_values)
47
+ @allowable_values = allowable_values.map do |value|
48
+ case datatype.to_s
49
+ when /Integer/i
50
+ value.to_i
51
+ when /Float/i
52
+ value.to_f
53
+ else
54
+ value
55
+ end
56
+ end
57
+ end
58
+
59
+ def valid?(value)
60
+ !value || allowable_values.include?(value)
61
+ end
62
+ end
63
+
64
+ # Attribute mapping from ruby-style variable name to JSON key.
65
+ def self.attribute_map
66
+ {
67
+ :'created_at' => :'createdAt',
68
+ :'email_id' => :'emailId',
69
+ :'email_is_read' => :'emailIsRead',
70
+ :'event_name' => :'eventName',
71
+ :'inbox_id' => :'inboxId',
72
+ :'message_id' => :'messageId',
73
+ :'webhook_id' => :'webhookId',
74
+ :'webhook_name' => :'webhookName'
75
+ }
76
+ end
77
+
78
+ # Attribute type mapping.
79
+ def self.openapi_types
80
+ {
81
+ :'created_at' => :'DateTime',
82
+ :'email_id' => :'String',
83
+ :'email_is_read' => :'Boolean',
84
+ :'event_name' => :'String',
85
+ :'inbox_id' => :'String',
86
+ :'message_id' => :'String',
87
+ :'webhook_id' => :'String',
88
+ :'webhook_name' => :'String'
89
+ }
90
+ end
91
+
92
+ # List of attributes with nullable: true
93
+ def self.openapi_nullable
94
+ Set.new([
95
+ ])
96
+ end
97
+
98
+ # Initializes the object
99
+ # @param [Hash] attributes Model attributes in the form of hash
100
+ def initialize(attributes = {})
101
+ if (!attributes.is_a?(Hash))
102
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::WebhookEmailReadPayload` initialize method"
103
+ end
104
+
105
+ # check to see if the attribute exists and convert string to symbol for hash key
106
+ attributes = attributes.each_with_object({}) { |(k, v), h|
107
+ if (!self.class.attribute_map.key?(k.to_sym))
108
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::WebhookEmailReadPayload`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
109
+ end
110
+ h[k.to_sym] = v
111
+ }
112
+
113
+ if attributes.key?(:'created_at')
114
+ self.created_at = attributes[:'created_at']
115
+ end
116
+
117
+ if attributes.key?(:'email_id')
118
+ self.email_id = attributes[:'email_id']
119
+ end
120
+
121
+ if attributes.key?(:'email_is_read')
122
+ self.email_is_read = attributes[:'email_is_read']
123
+ end
124
+
125
+ if attributes.key?(:'event_name')
126
+ self.event_name = attributes[:'event_name']
127
+ end
128
+
129
+ if attributes.key?(:'inbox_id')
130
+ self.inbox_id = attributes[:'inbox_id']
131
+ end
132
+
133
+ if attributes.key?(:'message_id')
134
+ self.message_id = attributes[:'message_id']
135
+ end
136
+
137
+ if attributes.key?(:'webhook_id')
138
+ self.webhook_id = attributes[:'webhook_id']
139
+ end
140
+
141
+ if attributes.key?(:'webhook_name')
142
+ self.webhook_name = attributes[:'webhook_name']
143
+ end
144
+ end
145
+
146
+ # Show invalid properties with the reasons. Usually used together with valid?
147
+ # @return Array for valid properties with the reasons
148
+ def list_invalid_properties
149
+ invalid_properties = Array.new
150
+ invalid_properties
151
+ end
152
+
153
+ # Check to see if the all the properties in the model are valid
154
+ # @return true if the model is valid
155
+ def valid?
156
+ event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ"])
157
+ return false unless event_name_validator.valid?(@event_name)
158
+ true
159
+ end
160
+
161
+ # Custom attribute writer method checking allowed values (enum).
162
+ # @param [Object] event_name Object to be assigned
163
+ def event_name=(event_name)
164
+ validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ"])
165
+ unless validator.valid?(event_name)
166
+ fail ArgumentError, "invalid value for \"event_name\", must be one of #{validator.allowable_values}."
167
+ end
168
+ @event_name = event_name
169
+ end
170
+
171
+ # Checks equality by comparing each attribute.
172
+ # @param [Object] Object to be compared
173
+ def ==(o)
174
+ return true if self.equal?(o)
175
+ self.class == o.class &&
176
+ created_at == o.created_at &&
177
+ email_id == o.email_id &&
178
+ email_is_read == o.email_is_read &&
179
+ event_name == o.event_name &&
180
+ inbox_id == o.inbox_id &&
181
+ message_id == o.message_id &&
182
+ webhook_id == o.webhook_id &&
183
+ webhook_name == o.webhook_name
184
+ end
185
+
186
+ # @see the `==` method
187
+ # @param [Object] Object to be compared
188
+ def eql?(o)
189
+ self == o
190
+ end
191
+
192
+ # Calculates hash code according to all attributes.
193
+ # @return [Integer] Hash code
194
+ def hash
195
+ [created_at, email_id, email_is_read, event_name, inbox_id, message_id, webhook_id, webhook_name].hash
196
+ end
197
+
198
+ # Builds the object from hash
199
+ # @param [Hash] attributes Model attributes in the form of hash
200
+ # @return [Object] Returns the model itself
201
+ def self.build_from_hash(attributes)
202
+ new.build_from_hash(attributes)
203
+ end
204
+
205
+ # Builds the object from hash
206
+ # @param [Hash] attributes Model attributes in the form of hash
207
+ # @return [Object] Returns the model itself
208
+ def build_from_hash(attributes)
209
+ return nil unless attributes.is_a?(Hash)
210
+ self.class.openapi_types.each_pair do |key, type|
211
+ if type =~ /\AArray<(.*)>/i
212
+ # check to ensure the input is an array given that the attribute
213
+ # is documented as an array but the input is not
214
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
215
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
216
+ end
217
+ elsif !attributes[self.class.attribute_map[key]].nil?
218
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
219
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
220
+ end
221
+
222
+ self
223
+ end
224
+
225
+ # Deserializes the data based on type
226
+ # @param string type Data type
227
+ # @param string value Value to be deserialized
228
+ # @return [Object] Deserialized data
229
+ def _deserialize(type, value)
230
+ case type.to_sym
231
+ when :DateTime
232
+ DateTime.parse(value)
233
+ when :Date
234
+ Date.parse(value)
235
+ when :String
236
+ value.to_s
237
+ when :Integer
238
+ value.to_i
239
+ when :Float
240
+ value.to_f
241
+ when :Boolean
242
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
243
+ true
244
+ else
245
+ false
246
+ end
247
+ when :Object
248
+ # generic object (usually a Hash), return directly
249
+ value
250
+ when /\AArray<(?<inner_type>.+)>\z/
251
+ inner_type = Regexp.last_match[:inner_type]
252
+ value.map { |v| _deserialize(inner_type, v) }
253
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
254
+ k_type = Regexp.last_match[:k_type]
255
+ v_type = Regexp.last_match[:v_type]
256
+ {}.tap do |hash|
257
+ value.each do |k, v|
258
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
259
+ end
260
+ end
261
+ else # model
262
+ MailSlurpClient.const_get(type).build_from_hash(value)
263
+ end
264
+ end
265
+
266
+ # Returns the string representation of the object
267
+ # @return [String] String presentation of the object
268
+ def to_s
269
+ to_hash.to_s
270
+ end
271
+
272
+ # to_body is an alias to to_hash (backward compatibility)
273
+ # @return [Hash] Returns the object in the form of hash
274
+ def to_body
275
+ to_hash
276
+ end
277
+
278
+ # Returns the object in the form of hash
279
+ # @return [Hash] Returns the object in the form of hash
280
+ def to_hash
281
+ hash = {}
282
+ self.class.attribute_map.each_pair do |attr, param|
283
+ value = self.send(attr)
284
+ if value.nil?
285
+ is_nullable = self.class.openapi_nullable.include?(attr)
286
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
287
+ end
288
+
289
+ hash[param] = _to_hash(value)
290
+ end
291
+ hash
292
+ end
293
+
294
+ # Outputs non-array value in the form of hash
295
+ # For object, use to_hash. Otherwise, just return the value
296
+ # @param [Object] value Any valid value
297
+ # @return [Hash] Returns the value in the form of hash
298
+ def _to_hash(value)
299
+ if value.is_a?(Array)
300
+ value.compact.map { |v| _to_hash(v) }
301
+ elsif value.is_a?(Hash)
302
+ {}.tap do |hash|
303
+ value.each { |k, v| hash[k] = _to_hash(v) }
304
+ end
305
+ elsif value.respond_to? :to_hash
306
+ value.to_hash
307
+ else
308
+ value
309
+ end
310
+ end
311
+ end
312
+ end
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #MailSlurp API
3
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://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
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://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
5
5
 
6
6
  The version of the OpenAPI document: 6.5.2
7
7
 
@@ -153,7 +153,7 @@ module MailSlurpClient
153
153
  # Check to see if the all the properties in the model are valid
154
154
  # @return true if the model is valid
155
155
  def valid?
156
- event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED"])
156
+ event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ"])
157
157
  return false unless event_name_validator.valid?(@event_name)
158
158
  true
159
159
  end
@@ -161,7 +161,7 @@ module MailSlurpClient
161
161
  # Custom attribute writer method checking allowed values (enum).
162
162
  # @param [Object] event_name Object to be assigned
163
163
  def event_name=(event_name)
164
- validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED"])
164
+ validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ"])
165
165
  unless validator.valid?(event_name)
166
166
  fail ArgumentError, "invalid value for \"event_name\", must be one of #{validator.allowable_values}."
167
167
  end
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #MailSlurp API
3
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://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
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://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
5
5
 
6
6
  The version of the OpenAPI document: 6.5.2
7
7
 
@@ -228,7 +228,7 @@ module MailSlurpClient
228
228
  return false if @contact_id.nil?
229
229
  return false if @created_at.nil?
230
230
  return false if @email_addresses.nil?
231
- event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED"])
231
+ event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ"])
232
232
  return false unless event_name_validator.valid?(@event_name)
233
233
  return false if @tags.nil?
234
234
  true
@@ -237,7 +237,7 @@ module MailSlurpClient
237
237
  # Custom attribute writer method checking allowed values (enum).
238
238
  # @param [Object] event_name Object to be assigned
239
239
  def event_name=(event_name)
240
- validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED"])
240
+ validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ"])
241
241
  unless validator.valid?(event_name)
242
242
  fail ArgumentError, "invalid value for \"event_name\", must be one of #{validator.allowable_values}."
243
243
  end
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #MailSlurp API
3
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://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
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://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
5
5
 
6
6
  The version of the OpenAPI document: 6.5.2
7
7
 
@@ -18,10 +18,10 @@ module MailSlurpClient
18
18
  # List of attachment meta data objects if attachments present
19
19
  attr_accessor :attachment_meta_datas
20
20
 
21
- # List of `BCC` recipients email was addressed to
21
+ # List of `BCC` recipients email addresses that the email was addressed to. See recipients object for names.
22
22
  attr_accessor :bcc
23
23
 
24
- # List of `CC` recipients email was addressed to
24
+ # List of `CC` recipients email addresses that the email was addressed to. See recipients object for names.
25
25
  attr_accessor :cc
26
26
 
27
27
  # Date time of event creation
@@ -33,7 +33,7 @@ module MailSlurpClient
33
33
  # Name of the event type webhook is being triggered for.
34
34
  attr_accessor :event_name
35
35
 
36
- # Who the email was sent from
36
+ # Who the email was sent from. An email address - see fromName for the sender name.
37
37
  attr_accessor :from
38
38
 
39
39
  # Id of the inbox that received an email
@@ -42,10 +42,10 @@ module MailSlurpClient
42
42
  # Idempotent message ID. Store this ID locally or in a database to prevent message duplication.
43
43
  attr_accessor :message_id
44
44
 
45
- # The subject line of the email message
45
+ # The subject line of the email message as specified by SMTP subject header
46
46
  attr_accessor :subject
47
47
 
48
- # List of `To` recipients that email was addressed to
48
+ # List of `To` recipient email addresses that the email was addressed to. See recipients object for names.
49
49
  attr_accessor :to
50
50
 
51
51
  # ID of webhook entity being triggered
@@ -206,7 +206,7 @@ module MailSlurpClient
206
206
  # Check to see if the all the properties in the model are valid
207
207
  # @return true if the model is valid
208
208
  def valid?
209
- event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED"])
209
+ event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ"])
210
210
  return false unless event_name_validator.valid?(@event_name)
211
211
  true
212
212
  end
@@ -214,7 +214,7 @@ module MailSlurpClient
214
214
  # Custom attribute writer method checking allowed values (enum).
215
215
  # @param [Object] event_name Object to be assigned
216
216
  def event_name=(event_name)
217
- validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED"])
217
+ validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ"])
218
218
  unless validator.valid?(event_name)
219
219
  fail ArgumentError, "invalid value for \"event_name\", must be one of #{validator.allowable_values}."
220
220
  end
@@ -1,7 +1,7 @@
1
1
  =begin
2
2
  #MailSlurp API
3
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://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
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://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
5
5
 
6
6
  The version of the OpenAPI document: 6.5.2
7
7
 
@@ -158,7 +158,7 @@ module MailSlurpClient
158
158
  # @return true if the model is valid
159
159
  def valid?
160
160
  return false if @created_at.nil?
161
- event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED"])
161
+ event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ"])
162
162
  return false unless event_name_validator.valid?(@event_name)
163
163
  return false if @id.nil?
164
164
  return false if @inbox_id.nil?
@@ -170,7 +170,7 @@ module MailSlurpClient
170
170
  # Custom attribute writer method checking allowed values (enum).
171
171
  # @param [Object] event_name Object to be assigned
172
172
  def event_name=(event_name)
173
- validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED"])
173
+ validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ"])
174
174
  unless validator.valid?(event_name)
175
175
  fail ArgumentError, "invalid value for \"event_name\", must be one of #{validator.allowable_values}."
176
176
  end