mailslurp_client 15.0.3 → 15.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (170) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/lib/mailslurp_client/api/alias_controller_api.rb +60 -56
  4. data/lib/mailslurp_client/api/attachment_controller_api.rb +50 -61
  5. data/lib/mailslurp_client/api/bounce_controller_api.rb +27 -19
  6. data/lib/mailslurp_client/api/bulk_actions_controller_api.rb +16 -16
  7. data/lib/mailslurp_client/api/common_actions_controller_api.rb +129 -68
  8. data/lib/mailslurp_client/api/contact_controller_api.rb +23 -23
  9. data/lib/mailslurp_client/api/domain_controller_api.rb +33 -33
  10. data/lib/mailslurp_client/api/email_controller_api.rb +145 -122
  11. data/lib/mailslurp_client/api/expired_controller_api.rb +20 -20
  12. data/lib/mailslurp_client/api/export_controller_api.rb +39 -39
  13. data/lib/mailslurp_client/api/form_controller_api.rb +17 -19
  14. data/lib/mailslurp_client/api/group_controller_api.rb +53 -53
  15. data/lib/mailslurp_client/api/inbox_controller_api.rb +198 -178
  16. data/lib/mailslurp_client/api/inbox_forwarder_controller_api.rb +34 -30
  17. data/lib/mailslurp_client/api/inbox_ruleset_controller_api.rb +34 -30
  18. data/lib/mailslurp_client/api/mail_server_controller_api.rb +27 -27
  19. data/lib/mailslurp_client/api/missed_email_controller_api.rb +55 -43
  20. data/lib/mailslurp_client/api/sent_emails_controller_api.rb +158 -48
  21. data/lib/mailslurp_client/api/template_controller_api.rb +22 -22
  22. data/lib/mailslurp_client/api/tracking_controller_api.rb +17 -17
  23. data/lib/mailslurp_client/api/wait_for_controller_api.rb +129 -89
  24. data/lib/mailslurp_client/api/webhook_controller_api.rb +103 -87
  25. data/lib/mailslurp_client/api_client.rb +1 -1
  26. data/lib/mailslurp_client/api_error.rb +1 -1
  27. data/lib/mailslurp_client/configuration.rb +3 -3
  28. data/lib/mailslurp_client/models/abstract_webhook_payload.rb +22 -22
  29. data/lib/mailslurp_client/models/alias_dto.rb +64 -49
  30. data/lib/mailslurp_client/models/alias_projection.rb +50 -50
  31. data/lib/mailslurp_client/models/attachment_entity.rb +40 -40
  32. data/lib/mailslurp_client/models/attachment_meta_data.rb +42 -22
  33. data/lib/mailslurp_client/models/attachment_projection.rb +38 -33
  34. data/lib/mailslurp_client/models/basic_auth_options.rb +1 -1
  35. data/lib/mailslurp_client/models/bounce_projection.rb +19 -19
  36. data/lib/mailslurp_client/models/bounce_recipient.rb +31 -31
  37. data/lib/mailslurp_client/models/bounced_email_dto.rb +63 -63
  38. data/lib/mailslurp_client/models/bounced_recipient_dto.rb +23 -23
  39. data/lib/mailslurp_client/models/bulk_send_email_options.rb +11 -1
  40. data/lib/mailslurp_client/models/condition_option.rb +13 -3
  41. data/lib/mailslurp_client/models/contact_dto.rb +63 -63
  42. data/lib/mailslurp_client/models/contact_projection.rb +39 -39
  43. data/lib/mailslurp_client/models/content_match_options.rb +6 -1
  44. data/lib/mailslurp_client/models/count_dto.rb +1 -1
  45. data/lib/mailslurp_client/models/create_alias_options.rb +11 -1
  46. data/lib/mailslurp_client/models/create_contact_options.rb +43 -43
  47. data/lib/mailslurp_client/models/create_domain_options.rb +22 -17
  48. data/lib/mailslurp_client/models/create_group_options.rb +1 -1
  49. data/lib/mailslurp_client/models/create_inbox_dto.rb +59 -59
  50. data/lib/mailslurp_client/models/create_inbox_forwarder_options.rb +30 -15
  51. data/lib/mailslurp_client/models/create_inbox_ruleset_options.rb +39 -24
  52. data/lib/mailslurp_client/models/create_template_options.rb +1 -1
  53. data/lib/mailslurp_client/models/create_tracking_pixel_options.rb +1 -1
  54. data/lib/mailslurp_client/models/create_webhook_options.rb +24 -19
  55. data/lib/mailslurp_client/models/describe_domain_options.rb +1 -1
  56. data/lib/mailslurp_client/models/describe_mail_server_domain_result.rb +21 -21
  57. data/lib/mailslurp_client/models/dns_lookup_options.rb +30 -15
  58. data/lib/mailslurp_client/models/dns_lookup_result.rb +34 -33
  59. data/lib/mailslurp_client/models/dns_lookup_results.rb +1 -1
  60. data/lib/mailslurp_client/models/domain_dto.rb +100 -70
  61. data/lib/mailslurp_client/models/domain_name_record.rb +18 -17
  62. data/lib/mailslurp_client/models/domain_preview.rb +29 -28
  63. data/lib/mailslurp_client/models/download_attachment_dto.rb +16 -1
  64. data/lib/mailslurp_client/models/email.rb +179 -139
  65. data/lib/mailslurp_client/models/email_analysis.rb +29 -29
  66. data/lib/mailslurp_client/models/email_content_match_result.rb +19 -19
  67. data/lib/mailslurp_client/models/email_links_result.rb +19 -19
  68. data/lib/mailslurp_client/models/email_preview.rb +63 -48
  69. data/lib/mailslurp_client/models/email_projection.rb +77 -77
  70. data/lib/mailslurp_client/models/email_recipients.rb +17 -16
  71. data/lib/mailslurp_client/models/email_text_lines_result.rb +19 -19
  72. data/lib/mailslurp_client/models/email_verification_result.rb +22 -22
  73. data/lib/mailslurp_client/models/expiration_defaults.rb +17 -17
  74. data/lib/mailslurp_client/models/expired_inbox_dto.rb +19 -19
  75. data/lib/mailslurp_client/models/expired_inbox_record_projection.rb +33 -33
  76. data/lib/mailslurp_client/models/export_link.rb +1 -1
  77. data/lib/mailslurp_client/models/export_options.rb +2 -2
  78. data/lib/mailslurp_client/models/flush_expired_inboxes_result.rb +19 -19
  79. data/lib/mailslurp_client/models/forward_email_options.rb +37 -32
  80. data/lib/mailslurp_client/models/gravatar_url.rb +19 -19
  81. data/lib/mailslurp_client/models/group_contacts_dto.rb +19 -19
  82. data/lib/mailslurp_client/models/group_dto.rb +28 -28
  83. data/lib/mailslurp_client/models/group_projection.rb +29 -29
  84. data/lib/mailslurp_client/models/html_validation_result.rb +27 -12
  85. data/lib/mailslurp_client/models/{inbox.rb → inbox_dto.rb} +72 -57
  86. data/lib/mailslurp_client/models/inbox_exists_dto.rb +1 -1
  87. data/lib/mailslurp_client/models/inbox_forwarder_dto.rb +48 -48
  88. data/lib/mailslurp_client/models/inbox_forwarder_test_options.rb +1 -1
  89. data/lib/mailslurp_client/models/inbox_forwarder_test_result.rb +19 -19
  90. data/lib/mailslurp_client/models/inbox_preview.rb +59 -39
  91. data/lib/mailslurp_client/models/inbox_ruleset_dto.rb +61 -61
  92. data/lib/mailslurp_client/models/inbox_ruleset_test_options.rb +1 -1
  93. data/lib/mailslurp_client/models/inbox_ruleset_test_result.rb +19 -14
  94. data/lib/mailslurp_client/models/inline_object.rb +221 -0
  95. data/lib/mailslurp_client/models/ip_address_result.rb +1 -1
  96. data/lib/mailslurp_client/models/json_schema_dto.rb +1 -1
  97. data/lib/mailslurp_client/models/match_option.rb +18 -3
  98. data/lib/mailslurp_client/models/match_options.rb +17 -17
  99. data/lib/mailslurp_client/models/missed_email.rb +77 -77
  100. data/lib/mailslurp_client/models/missed_email_projection.rb +25 -25
  101. data/lib/mailslurp_client/models/name_server_record.rb +16 -16
  102. data/lib/mailslurp_client/models/organization_inbox_projection.rb +70 -45
  103. data/lib/mailslurp_client/models/page_alias.rb +59 -50
  104. data/lib/mailslurp_client/models/page_attachment_entity.rb +59 -50
  105. data/lib/mailslurp_client/models/page_bounced_email.rb +59 -50
  106. data/lib/mailslurp_client/models/page_bounced_recipients.rb +59 -50
  107. data/lib/mailslurp_client/models/page_contact_projection.rb +59 -50
  108. data/lib/mailslurp_client/models/page_email_preview.rb +59 -50
  109. data/lib/mailslurp_client/models/page_email_projection.rb +59 -50
  110. data/lib/mailslurp_client/models/page_expired_inbox_record_projection.rb +59 -50
  111. data/lib/mailslurp_client/models/page_group_projection.rb +59 -50
  112. data/lib/mailslurp_client/models/page_inbox_forwarder_dto.rb +59 -50
  113. data/lib/mailslurp_client/models/page_inbox_projection.rb +59 -50
  114. data/lib/mailslurp_client/models/page_inbox_ruleset_dto.rb +59 -50
  115. data/lib/mailslurp_client/models/page_missed_email_projection.rb +59 -50
  116. data/lib/mailslurp_client/models/page_organization_inbox_projection.rb +59 -50
  117. data/lib/mailslurp_client/models/page_sent_email_projection.rb +86 -47
  118. data/lib/mailslurp_client/models/page_template_projection.rb +59 -50
  119. data/lib/mailslurp_client/models/page_thread_projection.rb +59 -50
  120. data/lib/mailslurp_client/models/page_tracking_pixel_projection.rb +59 -50
  121. data/lib/mailslurp_client/models/page_unknown_missed_email_projection.rb +59 -50
  122. data/lib/mailslurp_client/models/page_webhook_projection.rb +59 -50
  123. data/lib/mailslurp_client/models/page_webhook_result.rb +59 -50
  124. data/lib/mailslurp_client/models/{pageable.rb → pageable_object.rb} +32 -32
  125. data/lib/mailslurp_client/models/raw_email_json.rb +1 -1
  126. data/lib/mailslurp_client/models/recipient.rb +19 -19
  127. data/lib/mailslurp_client/models/reply_to_alias_email_options.rb +47 -35
  128. data/lib/mailslurp_client/models/reply_to_email_options.rb +57 -45
  129. data/lib/mailslurp_client/models/send_email_options.rb +112 -110
  130. data/lib/mailslurp_client/models/sender.rb +20 -19
  131. data/lib/mailslurp_client/models/sent_email_dto.rb +110 -95
  132. data/lib/mailslurp_client/models/sent_email_projection.rb +88 -87
  133. data/lib/mailslurp_client/models/set_inbox_favourited_options.rb +6 -1
  134. data/lib/mailslurp_client/models/simple_send_email_options.rb +30 -25
  135. data/lib/mailslurp_client/models/sort.rb +1 -1
  136. data/lib/mailslurp_client/models/template_dto.rb +33 -33
  137. data/lib/mailslurp_client/models/template_projection.rb +37 -37
  138. data/lib/mailslurp_client/models/template_variable.rb +1 -1
  139. data/lib/mailslurp_client/models/test_new_inbox_forwarder_options.rb +1 -1
  140. data/lib/mailslurp_client/models/test_new_inbox_ruleset_options.rb +1 -1
  141. data/lib/mailslurp_client/models/thread_projection.rb +71 -71
  142. data/lib/mailslurp_client/models/tracking_pixel_dto.rb +54 -54
  143. data/lib/mailslurp_client/models/tracking_pixel_projection.rb +42 -42
  144. data/lib/mailslurp_client/models/unknown_missed_email_projection.rb +25 -25
  145. data/lib/mailslurp_client/models/unread_count.rb +1 -1
  146. data/lib/mailslurp_client/models/unseen_error_count_dto.rb +1 -1
  147. data/lib/mailslurp_client/models/update_alias_options.rb +1 -1
  148. data/lib/mailslurp_client/models/update_domain_options.rb +1 -1
  149. data/lib/mailslurp_client/models/update_group_contacts.rb +1 -1
  150. data/lib/mailslurp_client/models/update_inbox_options.rb +27 -27
  151. data/lib/mailslurp_client/models/upload_attachment_options.rb +15 -15
  152. data/lib/mailslurp_client/models/validation_dto.rb +11 -1
  153. data/lib/mailslurp_client/models/validation_message.rb +2 -1
  154. data/lib/mailslurp_client/models/verify_email_address_options.rb +1 -1
  155. data/lib/mailslurp_client/models/wait_for_conditions.rb +53 -53
  156. data/lib/mailslurp_client/models/webhook_dto.rb +105 -65
  157. data/lib/mailslurp_client/models/webhook_email_opened_payload.rb +83 -43
  158. data/lib/mailslurp_client/models/webhook_email_read_payload.rb +85 -50
  159. data/lib/mailslurp_client/models/webhook_new_attachment_payload.rb +79 -44
  160. data/lib/mailslurp_client/models/webhook_new_contact_payload.rb +98 -83
  161. data/lib/mailslurp_client/models/webhook_new_email_payload.rb +140 -85
  162. data/lib/mailslurp_client/models/webhook_projection.rb +47 -47
  163. data/lib/mailslurp_client/models/webhook_redrive_result.rb +19 -19
  164. data/lib/mailslurp_client/models/webhook_result_dto.rb +102 -102
  165. data/lib/mailslurp_client/models/webhook_test_request.rb +28 -28
  166. data/lib/mailslurp_client/models/webhook_test_response.rb +14 -14
  167. data/lib/mailslurp_client/models/webhook_test_result.rb +19 -19
  168. data/lib/mailslurp_client/version.rb +2 -2
  169. data/lib/mailslurp_client.rb +4 -3
  170. metadata +5 -4
@@ -4,7 +4,7 @@
4
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
+ Contact: contact@mailslurp.dev
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 4.3.1
10
10
 
@@ -15,32 +15,32 @@ require 'date'
15
15
  module MailSlurpClient
16
16
  # EMAIL_OPENED webhook payload. Sent to your webhook url endpoint via HTTP POST when an email containing a tracking pixel is opened and the pixel image is loaded by a reader.
17
17
  class WebhookEmailOpenedPayload
18
- # Date time of event creation
19
- attr_accessor :created_at
18
+ # Idempotent message ID. Store this ID locally or in a database to prevent message duplication.
19
+ attr_accessor :message_id
20
+
21
+ # ID of webhook entity being triggered
22
+ attr_accessor :webhook_id
20
23
 
21
24
  # Name of the event type webhook is being triggered for.
22
25
  attr_accessor :event_name
23
26
 
27
+ # Name of the webhook being triggered
28
+ attr_accessor :webhook_name
29
+
24
30
  # Id of the inbox that received an email
25
31
  attr_accessor :inbox_id
26
32
 
27
- # Idempotent message ID. Store this ID locally or in a database to prevent message duplication.
28
- attr_accessor :message_id
29
-
30
33
  # ID of the tracking pixel
31
34
  attr_accessor :pixel_id
32
35
 
33
- # Email address for the recipient of the tracking pixel
34
- attr_accessor :recipient
35
-
36
36
  # ID of sent email
37
37
  attr_accessor :sent_email_id
38
38
 
39
- # ID of webhook entity being triggered
40
- attr_accessor :webhook_id
39
+ # Email address for the recipient of the tracking pixel
40
+ attr_accessor :recipient
41
41
 
42
- # Name of the webhook being triggered
43
- attr_accessor :webhook_name
42
+ # Date time of event creation
43
+ attr_accessor :created_at
44
44
 
45
45
  class EnumAttributeValidator
46
46
  attr_reader :datatype
@@ -67,30 +67,30 @@ module MailSlurpClient
67
67
  # Attribute mapping from ruby-style variable name to JSON key.
68
68
  def self.attribute_map
69
69
  {
70
- :'created_at' => :'createdAt',
70
+ :'message_id' => :'messageId',
71
+ :'webhook_id' => :'webhookId',
71
72
  :'event_name' => :'eventName',
73
+ :'webhook_name' => :'webhookName',
72
74
  :'inbox_id' => :'inboxId',
73
- :'message_id' => :'messageId',
74
75
  :'pixel_id' => :'pixelId',
75
- :'recipient' => :'recipient',
76
76
  :'sent_email_id' => :'sentEmailId',
77
- :'webhook_id' => :'webhookId',
78
- :'webhook_name' => :'webhookName'
77
+ :'recipient' => :'recipient',
78
+ :'created_at' => :'createdAt'
79
79
  }
80
80
  end
81
81
 
82
82
  # Attribute type mapping.
83
83
  def self.openapi_types
84
84
  {
85
- :'created_at' => :'DateTime',
85
+ :'message_id' => :'String',
86
+ :'webhook_id' => :'String',
86
87
  :'event_name' => :'String',
88
+ :'webhook_name' => :'String',
87
89
  :'inbox_id' => :'String',
88
- :'message_id' => :'String',
89
90
  :'pixel_id' => :'String',
90
- :'recipient' => :'String',
91
91
  :'sent_email_id' => :'String',
92
- :'webhook_id' => :'String',
93
- :'webhook_name' => :'String'
92
+ :'recipient' => :'String',
93
+ :'created_at' => :'DateTime'
94
94
  }
95
95
  end
96
96
 
@@ -115,40 +115,40 @@ module MailSlurpClient
115
115
  h[k.to_sym] = v
116
116
  }
117
117
 
118
- if attributes.key?(:'created_at')
119
- self.created_at = attributes[:'created_at']
118
+ if attributes.key?(:'message_id')
119
+ self.message_id = attributes[:'message_id']
120
+ end
121
+
122
+ if attributes.key?(:'webhook_id')
123
+ self.webhook_id = attributes[:'webhook_id']
120
124
  end
121
125
 
122
126
  if attributes.key?(:'event_name')
123
127
  self.event_name = attributes[:'event_name']
124
128
  end
125
129
 
126
- if attributes.key?(:'inbox_id')
127
- self.inbox_id = attributes[:'inbox_id']
130
+ if attributes.key?(:'webhook_name')
131
+ self.webhook_name = attributes[:'webhook_name']
128
132
  end
129
133
 
130
- if attributes.key?(:'message_id')
131
- self.message_id = attributes[:'message_id']
134
+ if attributes.key?(:'inbox_id')
135
+ self.inbox_id = attributes[:'inbox_id']
132
136
  end
133
137
 
134
138
  if attributes.key?(:'pixel_id')
135
139
  self.pixel_id = attributes[:'pixel_id']
136
140
  end
137
141
 
138
- if attributes.key?(:'recipient')
139
- self.recipient = attributes[:'recipient']
140
- end
141
-
142
142
  if attributes.key?(:'sent_email_id')
143
143
  self.sent_email_id = attributes[:'sent_email_id']
144
144
  end
145
145
 
146
- if attributes.key?(:'webhook_id')
147
- self.webhook_id = attributes[:'webhook_id']
146
+ if attributes.key?(:'recipient')
147
+ self.recipient = attributes[:'recipient']
148
148
  end
149
149
 
150
- if attributes.key?(:'webhook_name')
151
- self.webhook_name = attributes[:'webhook_name']
150
+ if attributes.key?(:'created_at')
151
+ self.created_at = attributes[:'created_at']
152
152
  end
153
153
  end
154
154
 
@@ -156,14 +156,54 @@ module MailSlurpClient
156
156
  # @return Array for valid properties with the reasons
157
157
  def list_invalid_properties
158
158
  invalid_properties = Array.new
159
+ if @message_id.nil?
160
+ invalid_properties.push('invalid value for "message_id", message_id cannot be nil.')
161
+ end
162
+
163
+ if @webhook_id.nil?
164
+ invalid_properties.push('invalid value for "webhook_id", webhook_id cannot be nil.')
165
+ end
166
+
167
+ if @event_name.nil?
168
+ invalid_properties.push('invalid value for "event_name", event_name cannot be nil.')
169
+ end
170
+
171
+ if @inbox_id.nil?
172
+ invalid_properties.push('invalid value for "inbox_id", inbox_id cannot be nil.')
173
+ end
174
+
175
+ if @pixel_id.nil?
176
+ invalid_properties.push('invalid value for "pixel_id", pixel_id cannot be nil.')
177
+ end
178
+
179
+ if @sent_email_id.nil?
180
+ invalid_properties.push('invalid value for "sent_email_id", sent_email_id cannot be nil.')
181
+ end
182
+
183
+ if @recipient.nil?
184
+ invalid_properties.push('invalid value for "recipient", recipient cannot be nil.')
185
+ end
186
+
187
+ if @created_at.nil?
188
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
189
+ end
190
+
159
191
  invalid_properties
160
192
  end
161
193
 
162
194
  # Check to see if the all the properties in the model are valid
163
195
  # @return true if the model is valid
164
196
  def valid?
197
+ return false if @message_id.nil?
198
+ return false if @webhook_id.nil?
199
+ return false if @event_name.nil?
165
200
  event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ"])
166
201
  return false unless event_name_validator.valid?(@event_name)
202
+ return false if @inbox_id.nil?
203
+ return false if @pixel_id.nil?
204
+ return false if @sent_email_id.nil?
205
+ return false if @recipient.nil?
206
+ return false if @created_at.nil?
167
207
  true
168
208
  end
169
209
 
@@ -182,15 +222,15 @@ module MailSlurpClient
182
222
  def ==(o)
183
223
  return true if self.equal?(o)
184
224
  self.class == o.class &&
185
- created_at == o.created_at &&
225
+ message_id == o.message_id &&
226
+ webhook_id == o.webhook_id &&
186
227
  event_name == o.event_name &&
228
+ webhook_name == o.webhook_name &&
187
229
  inbox_id == o.inbox_id &&
188
- message_id == o.message_id &&
189
230
  pixel_id == o.pixel_id &&
190
- recipient == o.recipient &&
191
231
  sent_email_id == o.sent_email_id &&
192
- webhook_id == o.webhook_id &&
193
- webhook_name == o.webhook_name
232
+ recipient == o.recipient &&
233
+ created_at == o.created_at
194
234
  end
195
235
 
196
236
  # @see the `==` method
@@ -202,7 +242,7 @@ module MailSlurpClient
202
242
  # Calculates hash code according to all attributes.
203
243
  # @return [Integer] Hash code
204
244
  def hash
205
- [created_at, event_name, inbox_id, message_id, pixel_id, recipient, sent_email_id, webhook_id, webhook_name].hash
245
+ [message_id, webhook_id, event_name, webhook_name, inbox_id, pixel_id, sent_email_id, recipient, created_at].hash
206
246
  end
207
247
 
208
248
  # Builds the object from hash
@@ -4,7 +4,7 @@
4
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
+ Contact: contact@mailslurp.dev
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 4.3.1
10
10
 
@@ -15,29 +15,29 @@ require 'date'
15
15
  module MailSlurpClient
16
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
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
18
+ # Idempotent message ID. Store this ID locally or in a database to prevent message duplication.
19
+ attr_accessor :message_id
23
20
 
24
- # Is the email read
25
- attr_accessor :email_is_read
21
+ # ID of webhook entity being triggered
22
+ attr_accessor :webhook_id
26
23
 
27
24
  # Name of the event type webhook is being triggered for.
28
25
  attr_accessor :event_name
29
26
 
27
+ # Name of the webhook being triggered
28
+ attr_accessor :webhook_name
29
+
30
+ # ID of the email that was received. Use this ID for fetching the email with the `EmailController`.
31
+ attr_accessor :email_id
32
+
30
33
  # Id of the inbox that received an email
31
34
  attr_accessor :inbox_id
32
35
 
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
36
+ # Is the email read
37
+ attr_accessor :email_is_read
38
38
 
39
- # Name of the webhook being triggered
40
- attr_accessor :webhook_name
39
+ # Date time of event creation
40
+ attr_accessor :created_at
41
41
 
42
42
  class EnumAttributeValidator
43
43
  attr_reader :datatype
@@ -64,28 +64,28 @@ module MailSlurpClient
64
64
  # Attribute mapping from ruby-style variable name to JSON key.
65
65
  def self.attribute_map
66
66
  {
67
- :'created_at' => :'createdAt',
68
- :'email_id' => :'emailId',
69
- :'email_is_read' => :'emailIsRead',
70
- :'event_name' => :'eventName',
71
- :'inbox_id' => :'inboxId',
72
67
  :'message_id' => :'messageId',
73
68
  :'webhook_id' => :'webhookId',
74
- :'webhook_name' => :'webhookName'
69
+ :'event_name' => :'eventName',
70
+ :'webhook_name' => :'webhookName',
71
+ :'email_id' => :'emailId',
72
+ :'inbox_id' => :'inboxId',
73
+ :'email_is_read' => :'emailIsRead',
74
+ :'created_at' => :'createdAt'
75
75
  }
76
76
  end
77
77
 
78
78
  # Attribute type mapping.
79
79
  def self.openapi_types
80
80
  {
81
- :'created_at' => :'DateTime',
82
- :'email_id' => :'String',
83
- :'email_is_read' => :'Boolean',
84
- :'event_name' => :'String',
85
- :'inbox_id' => :'String',
86
81
  :'message_id' => :'String',
87
82
  :'webhook_id' => :'String',
88
- :'webhook_name' => :'String'
83
+ :'event_name' => :'String',
84
+ :'webhook_name' => :'String',
85
+ :'email_id' => :'String',
86
+ :'inbox_id' => :'String',
87
+ :'email_is_read' => :'Boolean',
88
+ :'created_at' => :'DateTime'
89
89
  }
90
90
  end
91
91
 
@@ -110,36 +110,36 @@ module MailSlurpClient
110
110
  h[k.to_sym] = v
111
111
  }
112
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']
113
+ if attributes.key?(:'message_id')
114
+ self.message_id = attributes[:'message_id']
119
115
  end
120
116
 
121
- if attributes.key?(:'email_is_read')
122
- self.email_is_read = attributes[:'email_is_read']
117
+ if attributes.key?(:'webhook_id')
118
+ self.webhook_id = attributes[:'webhook_id']
123
119
  end
124
120
 
125
121
  if attributes.key?(:'event_name')
126
122
  self.event_name = attributes[:'event_name']
127
123
  end
128
124
 
129
- if attributes.key?(:'inbox_id')
130
- self.inbox_id = attributes[:'inbox_id']
125
+ if attributes.key?(:'webhook_name')
126
+ self.webhook_name = attributes[:'webhook_name']
131
127
  end
132
128
 
133
- if attributes.key?(:'message_id')
134
- self.message_id = attributes[:'message_id']
129
+ if attributes.key?(:'email_id')
130
+ self.email_id = attributes[:'email_id']
135
131
  end
136
132
 
137
- if attributes.key?(:'webhook_id')
138
- self.webhook_id = attributes[:'webhook_id']
133
+ if attributes.key?(:'inbox_id')
134
+ self.inbox_id = attributes[:'inbox_id']
139
135
  end
140
136
 
141
- if attributes.key?(:'webhook_name')
142
- self.webhook_name = attributes[:'webhook_name']
137
+ if attributes.key?(:'email_is_read')
138
+ self.email_is_read = attributes[:'email_is_read']
139
+ end
140
+
141
+ if attributes.key?(:'created_at')
142
+ self.created_at = attributes[:'created_at']
143
143
  end
144
144
  end
145
145
 
@@ -147,14 +147,49 @@ module MailSlurpClient
147
147
  # @return Array for valid properties with the reasons
148
148
  def list_invalid_properties
149
149
  invalid_properties = Array.new
150
+ if @message_id.nil?
151
+ invalid_properties.push('invalid value for "message_id", message_id cannot be nil.')
152
+ end
153
+
154
+ if @webhook_id.nil?
155
+ invalid_properties.push('invalid value for "webhook_id", webhook_id cannot be nil.')
156
+ end
157
+
158
+ if @event_name.nil?
159
+ invalid_properties.push('invalid value for "event_name", event_name cannot be nil.')
160
+ end
161
+
162
+ if @email_id.nil?
163
+ invalid_properties.push('invalid value for "email_id", email_id cannot be nil.')
164
+ end
165
+
166
+ if @inbox_id.nil?
167
+ invalid_properties.push('invalid value for "inbox_id", inbox_id cannot be nil.')
168
+ end
169
+
170
+ if @email_is_read.nil?
171
+ invalid_properties.push('invalid value for "email_is_read", email_is_read cannot be nil.')
172
+ end
173
+
174
+ if @created_at.nil?
175
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
176
+ end
177
+
150
178
  invalid_properties
151
179
  end
152
180
 
153
181
  # Check to see if the all the properties in the model are valid
154
182
  # @return true if the model is valid
155
183
  def valid?
184
+ return false if @message_id.nil?
185
+ return false if @webhook_id.nil?
186
+ return false if @event_name.nil?
156
187
  event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ"])
157
188
  return false unless event_name_validator.valid?(@event_name)
189
+ return false if @email_id.nil?
190
+ return false if @inbox_id.nil?
191
+ return false if @email_is_read.nil?
192
+ return false if @created_at.nil?
158
193
  true
159
194
  end
160
195
 
@@ -173,14 +208,14 @@ module MailSlurpClient
173
208
  def ==(o)
174
209
  return true if self.equal?(o)
175
210
  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
211
  message_id == o.message_id &&
182
212
  webhook_id == o.webhook_id &&
183
- webhook_name == o.webhook_name
213
+ event_name == o.event_name &&
214
+ webhook_name == o.webhook_name &&
215
+ email_id == o.email_id &&
216
+ inbox_id == o.inbox_id &&
217
+ email_is_read == o.email_is_read &&
218
+ created_at == o.created_at
184
219
  end
185
220
 
186
221
  # @see the `==` method
@@ -192,7 +227,7 @@ module MailSlurpClient
192
227
  # Calculates hash code according to all attributes.
193
228
  # @return [Integer] Hash code
194
229
  def hash
195
- [created_at, email_id, email_is_read, event_name, inbox_id, message_id, webhook_id, webhook_name].hash
230
+ [message_id, webhook_id, event_name, webhook_name, email_id, inbox_id, email_is_read, created_at].hash
196
231
  end
197
232
 
198
233
  # Builds the object from hash
@@ -4,7 +4,7 @@
4
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
+ Contact: contact@mailslurp.dev
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 4.3.1
10
10
 
@@ -15,29 +15,29 @@ require 'date'
15
15
  module MailSlurpClient
16
16
  # NEW_ATTACHMENT webhook payload. Sent to your webhook url endpoint via HTTP POST when an email is received by the inbox that your webhook is attached to that contains an attachment. You can use the attachmentId to download the attachment.
17
17
  class WebhookNewAttachmentPayload
18
- # ID of attachment. Use the `AttachmentController` to
19
- attr_accessor :attachment_id
18
+ # Idempotent message ID. Store this ID locally or in a database to prevent message duplication.
19
+ attr_accessor :message_id
20
20
 
21
- # Size of attachment in bytes
22
- attr_accessor :content_length
21
+ # ID of webhook entity being triggered
22
+ attr_accessor :webhook_id
23
23
 
24
- # Content type of attachment such as 'image/png' or 'application/pdf
25
- attr_accessor :content_type
24
+ # Name of the webhook being triggered
25
+ attr_accessor :webhook_name
26
26
 
27
27
  # Name of the event type webhook is being triggered for.
28
28
  attr_accessor :event_name
29
29
 
30
- # Idempotent message ID. Store this ID locally or in a database to prevent message duplication.
31
- attr_accessor :message_id
30
+ # ID of attachment. Use the `AttachmentController` to
31
+ attr_accessor :attachment_id
32
32
 
33
33
  # Filename of the attachment if present
34
34
  attr_accessor :name
35
35
 
36
- # ID of webhook entity being triggered
37
- attr_accessor :webhook_id
36
+ # Content type of attachment such as 'image/png' or 'application/pdf
37
+ attr_accessor :content_type
38
38
 
39
- # Name of the webhook being triggered
40
- attr_accessor :webhook_name
39
+ # Size of attachment in bytes
40
+ attr_accessor :content_length
41
41
 
42
42
  class EnumAttributeValidator
43
43
  attr_reader :datatype
@@ -64,28 +64,28 @@ module MailSlurpClient
64
64
  # Attribute mapping from ruby-style variable name to JSON key.
65
65
  def self.attribute_map
66
66
  {
67
- :'attachment_id' => :'attachmentId',
68
- :'content_length' => :'contentLength',
69
- :'content_type' => :'contentType',
70
- :'event_name' => :'eventName',
71
67
  :'message_id' => :'messageId',
72
- :'name' => :'name',
73
68
  :'webhook_id' => :'webhookId',
74
- :'webhook_name' => :'webhookName'
69
+ :'webhook_name' => :'webhookName',
70
+ :'event_name' => :'eventName',
71
+ :'attachment_id' => :'attachmentId',
72
+ :'name' => :'name',
73
+ :'content_type' => :'contentType',
74
+ :'content_length' => :'contentLength'
75
75
  }
76
76
  end
77
77
 
78
78
  # Attribute type mapping.
79
79
  def self.openapi_types
80
80
  {
81
- :'attachment_id' => :'String',
82
- :'content_length' => :'Integer',
83
- :'content_type' => :'String',
84
- :'event_name' => :'String',
85
81
  :'message_id' => :'String',
86
- :'name' => :'String',
87
82
  :'webhook_id' => :'String',
88
- :'webhook_name' => :'String'
83
+ :'webhook_name' => :'String',
84
+ :'event_name' => :'String',
85
+ :'attachment_id' => :'String',
86
+ :'name' => :'String',
87
+ :'content_type' => :'String',
88
+ :'content_length' => :'Integer'
89
89
  }
90
90
  end
91
91
 
@@ -110,36 +110,36 @@ module MailSlurpClient
110
110
  h[k.to_sym] = v
111
111
  }
112
112
 
113
- if attributes.key?(:'attachment_id')
114
- self.attachment_id = attributes[:'attachment_id']
113
+ if attributes.key?(:'message_id')
114
+ self.message_id = attributes[:'message_id']
115
115
  end
116
116
 
117
- if attributes.key?(:'content_length')
118
- self.content_length = attributes[:'content_length']
117
+ if attributes.key?(:'webhook_id')
118
+ self.webhook_id = attributes[:'webhook_id']
119
119
  end
120
120
 
121
- if attributes.key?(:'content_type')
122
- self.content_type = attributes[:'content_type']
121
+ if attributes.key?(:'webhook_name')
122
+ self.webhook_name = attributes[:'webhook_name']
123
123
  end
124
124
 
125
125
  if attributes.key?(:'event_name')
126
126
  self.event_name = attributes[:'event_name']
127
127
  end
128
128
 
129
- if attributes.key?(:'message_id')
130
- self.message_id = attributes[:'message_id']
129
+ if attributes.key?(:'attachment_id')
130
+ self.attachment_id = attributes[:'attachment_id']
131
131
  end
132
132
 
133
133
  if attributes.key?(:'name')
134
134
  self.name = attributes[:'name']
135
135
  end
136
136
 
137
- if attributes.key?(:'webhook_id')
138
- self.webhook_id = attributes[:'webhook_id']
137
+ if attributes.key?(:'content_type')
138
+ self.content_type = attributes[:'content_type']
139
139
  end
140
140
 
141
- if attributes.key?(:'webhook_name')
142
- self.webhook_name = attributes[:'webhook_name']
141
+ if attributes.key?(:'content_length')
142
+ self.content_length = attributes[:'content_length']
143
143
  end
144
144
  end
145
145
 
@@ -147,14 +147,49 @@ module MailSlurpClient
147
147
  # @return Array for valid properties with the reasons
148
148
  def list_invalid_properties
149
149
  invalid_properties = Array.new
150
+ if @message_id.nil?
151
+ invalid_properties.push('invalid value for "message_id", message_id cannot be nil.')
152
+ end
153
+
154
+ if @webhook_id.nil?
155
+ invalid_properties.push('invalid value for "webhook_id", webhook_id cannot be nil.')
156
+ end
157
+
158
+ if @event_name.nil?
159
+ invalid_properties.push('invalid value for "event_name", event_name cannot be nil.')
160
+ end
161
+
162
+ if @attachment_id.nil?
163
+ invalid_properties.push('invalid value for "attachment_id", attachment_id cannot be nil.')
164
+ end
165
+
166
+ if @name.nil?
167
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
168
+ end
169
+
170
+ if @content_type.nil?
171
+ invalid_properties.push('invalid value for "content_type", content_type cannot be nil.')
172
+ end
173
+
174
+ if @content_length.nil?
175
+ invalid_properties.push('invalid value for "content_length", content_length cannot be nil.')
176
+ end
177
+
150
178
  invalid_properties
151
179
  end
152
180
 
153
181
  # Check to see if the all the properties in the model are valid
154
182
  # @return true if the model is valid
155
183
  def valid?
184
+ return false if @message_id.nil?
185
+ return false if @webhook_id.nil?
186
+ return false if @event_name.nil?
156
187
  event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ"])
157
188
  return false unless event_name_validator.valid?(@event_name)
189
+ return false if @attachment_id.nil?
190
+ return false if @name.nil?
191
+ return false if @content_type.nil?
192
+ return false if @content_length.nil?
158
193
  true
159
194
  end
160
195
 
@@ -173,14 +208,14 @@ module MailSlurpClient
173
208
  def ==(o)
174
209
  return true if self.equal?(o)
175
210
  self.class == o.class &&
176
- attachment_id == o.attachment_id &&
177
- content_length == o.content_length &&
178
- content_type == o.content_type &&
179
- event_name == o.event_name &&
180
211
  message_id == o.message_id &&
181
- name == o.name &&
182
212
  webhook_id == o.webhook_id &&
183
- webhook_name == o.webhook_name
213
+ webhook_name == o.webhook_name &&
214
+ event_name == o.event_name &&
215
+ attachment_id == o.attachment_id &&
216
+ name == o.name &&
217
+ content_type == o.content_type &&
218
+ content_length == o.content_length
184
219
  end
185
220
 
186
221
  # @see the `==` method
@@ -192,7 +227,7 @@ module MailSlurpClient
192
227
  # Calculates hash code according to all attributes.
193
228
  # @return [Integer] Hash code
194
229
  def hash
195
- [attachment_id, content_length, content_type, event_name, message_id, name, webhook_id, webhook_name].hash
230
+ [message_id, webhook_id, webhook_name, event_name, attachment_id, name, content_type, content_length].hash
196
231
  end
197
232
 
198
233
  # Builds the object from hash