mailslurp_client 15.0.2 → 15.0.6

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 +191 -117
  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 +360 -226
  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 +11 -26
  29. data/lib/mailslurp_client/models/alias_dto.rb +46 -57
  30. data/lib/mailslurp_client/models/alias_projection.rb +38 -68
  31. data/lib/mailslurp_client/models/attachment_entity.rb +35 -55
  32. data/lib/mailslurp_client/models/attachment_meta_data.rb +22 -22
  33. data/lib/mailslurp_client/models/attachment_projection.rb +30 -45
  34. data/lib/mailslurp_client/models/basic_auth_options.rb +1 -11
  35. data/lib/mailslurp_client/models/bounce_projection.rb +14 -24
  36. data/lib/mailslurp_client/models/bounce_recipient.rb +23 -43
  37. data/lib/mailslurp_client/models/bounced_email_dto.rb +57 -77
  38. data/lib/mailslurp_client/models/bounced_recipient_dto.rb +17 -32
  39. data/lib/mailslurp_client/models/bulk_send_email_options.rb +6 -1
  40. data/lib/mailslurp_client/models/condition_option.rb +3 -3
  41. data/lib/mailslurp_client/models/contact_dto.rb +54 -74
  42. data/lib/mailslurp_client/models/contact_projection.rb +43 -53
  43. data/lib/mailslurp_client/models/content_match_options.rb +1 -1
  44. data/lib/mailslurp_client/models/count_dto.rb +206 -0
  45. data/lib/mailslurp_client/models/create_alias_options.rb +1 -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 -6
  49. data/lib/mailslurp_client/models/create_inbox_dto.rb +59 -59
  50. data/lib/mailslurp_client/models/create_inbox_forwarder_options.rb +20 -15
  51. data/lib/mailslurp_client/models/create_inbox_ruleset_options.rb +24 -24
  52. data/lib/mailslurp_client/models/create_template_options.rb +1 -11
  53. data/lib/mailslurp_client/models/create_tracking_pixel_options.rb +1 -1
  54. data/lib/mailslurp_client/models/create_webhook_options.rb +19 -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 +16 -26
  57. data/lib/mailslurp_client/models/dns_lookup_options.rb +25 -15
  58. data/lib/mailslurp_client/models/dns_lookup_result.rb +24 -43
  59. data/lib/mailslurp_client/models/dns_lookup_results.rb +1 -6
  60. data/lib/mailslurp_client/models/domain_dto.rb +60 -81
  61. data/lib/mailslurp_client/models/domain_name_record.rb +12 -31
  62. data/lib/mailslurp_client/models/domain_preview.rb +27 -51
  63. data/lib/mailslurp_client/models/download_attachment_dto.rb +1 -1
  64. data/lib/mailslurp_client/models/email.rb +135 -136
  65. data/lib/mailslurp_client/models/email_analysis.rb +29 -29
  66. data/lib/mailslurp_client/models/email_content_match_result.rb +14 -24
  67. data/lib/mailslurp_client/models/email_links_result.rb +14 -24
  68. data/lib/mailslurp_client/models/email_preview.rb +48 -48
  69. data/lib/mailslurp_client/models/email_projection.rb +67 -87
  70. data/lib/mailslurp_client/models/email_recipients.rb +17 -16
  71. data/lib/mailslurp_client/models/email_text_lines_result.rb +14 -24
  72. data/lib/mailslurp_client/models/email_verification_result.rb +17 -37
  73. data/lib/mailslurp_client/models/expiration_defaults.rb +17 -27
  74. data/lib/mailslurp_client/models/expired_inbox_dto.rb +14 -29
  75. data/lib/mailslurp_client/models/expired_inbox_record_projection.rb +23 -43
  76. data/lib/mailslurp_client/models/export_link.rb +1 -6
  77. data/lib/mailslurp_client/models/export_options.rb +2 -7
  78. data/lib/mailslurp_client/models/flush_expired_inboxes_result.rb +14 -24
  79. data/lib/mailslurp_client/models/forward_email_options.rb +37 -32
  80. data/lib/mailslurp_client/models/gravatar_url.rb +14 -24
  81. data/lib/mailslurp_client/models/group_contacts_dto.rb +14 -24
  82. data/lib/mailslurp_client/models/group_dto.rb +23 -38
  83. data/lib/mailslurp_client/models/group_projection.rb +23 -38
  84. data/lib/mailslurp_client/models/html_validation_result.rb +14 -15
  85. data/lib/mailslurp_client/models/{inbox.rb → inbox_dto.rb} +48 -58
  86. data/lib/mailslurp_client/models/inbox_exists_dto.rb +1 -6
  87. data/lib/mailslurp_client/models/inbox_forwarder_dto.rb +32 -62
  88. data/lib/mailslurp_client/models/inbox_forwarder_test_options.rb +1 -6
  89. data/lib/mailslurp_client/models/inbox_forwarder_test_result.rb +14 -24
  90. data/lib/mailslurp_client/models/inbox_preview.rb +39 -39
  91. data/lib/mailslurp_client/models/inbox_ruleset_dto.rb +44 -79
  92. data/lib/mailslurp_client/models/inbox_ruleset_test_options.rb +1 -6
  93. data/lib/mailslurp_client/models/inbox_ruleset_test_result.rb +14 -19
  94. data/lib/mailslurp_client/models/inline_object.rb +221 -0
  95. data/lib/mailslurp_client/models/ip_address_result.rb +1 -11
  96. data/lib/mailslurp_client/models/json_schema_dto.rb +1 -6
  97. data/lib/mailslurp_client/models/match_option.rb +8 -3
  98. data/lib/mailslurp_client/models/match_options.rb +17 -17
  99. data/lib/mailslurp_client/models/missed_email.rb +68 -103
  100. data/lib/mailslurp_client/models/missed_email_projection.rb +20 -30
  101. data/lib/mailslurp_client/models/name_server_record.rb +11 -31
  102. data/lib/mailslurp_client/models/organization_inbox_projection.rb +45 -45
  103. data/lib/mailslurp_client/models/page_alias.rb +50 -50
  104. data/lib/mailslurp_client/models/page_attachment_entity.rb +50 -50
  105. data/lib/mailslurp_client/models/page_bounced_email.rb +50 -50
  106. data/lib/mailslurp_client/models/page_bounced_recipients.rb +50 -50
  107. data/lib/mailslurp_client/models/page_contact_projection.rb +50 -50
  108. data/lib/mailslurp_client/models/page_email_preview.rb +50 -50
  109. data/lib/mailslurp_client/models/page_email_projection.rb +50 -50
  110. data/lib/mailslurp_client/models/page_expired_inbox_record_projection.rb +50 -50
  111. data/lib/mailslurp_client/models/page_group_projection.rb +50 -50
  112. data/lib/mailslurp_client/models/page_inbox_forwarder_dto.rb +50 -50
  113. data/lib/mailslurp_client/models/page_inbox_projection.rb +50 -50
  114. data/lib/mailslurp_client/models/page_inbox_ruleset_dto.rb +50 -50
  115. data/lib/mailslurp_client/models/page_missed_email_projection.rb +50 -50
  116. data/lib/mailslurp_client/models/page_organization_inbox_projection.rb +50 -50
  117. data/lib/mailslurp_client/models/page_sent_email_projection.rb +50 -50
  118. data/lib/mailslurp_client/models/page_template_projection.rb +50 -50
  119. data/lib/mailslurp_client/models/page_thread_projection.rb +50 -50
  120. data/lib/mailslurp_client/models/page_tracking_pixel_projection.rb +50 -50
  121. data/lib/mailslurp_client/models/page_unknown_missed_email_projection.rb +50 -50
  122. data/lib/mailslurp_client/models/page_webhook_projection.rb +50 -50
  123. data/lib/mailslurp_client/models/page_webhook_result.rb +50 -50
  124. data/lib/mailslurp_client/models/pageable.rb +29 -29
  125. data/lib/mailslurp_client/models/raw_email_json.rb +1 -6
  126. data/lib/mailslurp_client/models/recipient.rb +14 -24
  127. data/lib/mailslurp_client/models/reply_to_alias_email_options.rb +39 -38
  128. data/lib/mailslurp_client/models/reply_to_email_options.rb +52 -51
  129. data/lib/mailslurp_client/models/send_email_options.rb +108 -116
  130. data/lib/mailslurp_client/models/sender.rb +15 -24
  131. data/lib/mailslurp_client/models/sent_email_dto.rb +98 -103
  132. data/lib/mailslurp_client/models/sent_email_projection.rb +64 -103
  133. data/lib/mailslurp_client/models/set_inbox_favourited_options.rb +1 -1
  134. data/lib/mailslurp_client/models/simple_send_email_options.rb +25 -25
  135. data/lib/mailslurp_client/models/sort.rb +14 -14
  136. data/lib/mailslurp_client/models/template_dto.rb +23 -48
  137. data/lib/mailslurp_client/models/template_projection.rb +26 -51
  138. data/lib/mailslurp_client/models/template_variable.rb +1 -11
  139. data/lib/mailslurp_client/models/test_new_inbox_forwarder_options.rb +1 -11
  140. data/lib/mailslurp_client/models/test_new_inbox_ruleset_options.rb +1 -11
  141. data/lib/mailslurp_client/models/thread_projection.rb +58 -93
  142. data/lib/mailslurp_client/models/tracking_pixel_dto.rb +44 -69
  143. data/lib/mailslurp_client/models/tracking_pixel_projection.rb +35 -55
  144. data/lib/mailslurp_client/models/unknown_missed_email_projection.rb +20 -30
  145. data/lib/mailslurp_client/models/unread_count.rb +1 -6
  146. data/lib/mailslurp_client/models/unseen_error_count_dto.rb +1 -6
  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 -6
  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 +1 -1
  153. data/lib/mailslurp_client/models/validation_message.rb +2 -6
  154. data/lib/mailslurp_client/models/verify_email_address_options.rb +1 -6
  155. data/lib/mailslurp_client/models/wait_for_conditions.rb +49 -59
  156. data/lib/mailslurp_client/models/webhook_dto.rb +65 -70
  157. data/lib/mailslurp_client/models/webhook_email_opened_payload.rb +43 -43
  158. data/lib/mailslurp_client/models/webhook_email_read_payload.rb +50 -50
  159. data/lib/mailslurp_client/models/webhook_new_attachment_payload.rb +44 -44
  160. data/lib/mailslurp_client/models/webhook_new_contact_payload.rb +76 -96
  161. data/lib/mailslurp_client/models/webhook_new_email_payload.rb +85 -85
  162. data/lib/mailslurp_client/models/webhook_projection.rb +35 -60
  163. data/lib/mailslurp_client/models/webhook_redrive_result.rb +14 -24
  164. data/lib/mailslurp_client/models/webhook_result_dto.rb +77 -127
  165. data/lib/mailslurp_client/models/webhook_test_request.rb +22 -37
  166. data/lib/mailslurp_client/models/webhook_test_response.rb +14 -14
  167. data/lib/mailslurp_client/models/webhook_test_result.rb +14 -24
  168. data/lib/mailslurp_client/version.rb +2 -2
  169. data/lib/mailslurp_client.rb +4 -2
  170. metadata +5 -3
@@ -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
 
@@ -13,37 +13,32 @@ OpenAPI Generator version: 4.3.1
13
13
  require 'date'
14
14
 
15
15
  module MailSlurpClient
16
- # Conditions that a `waitForXEmails` endpoint operates on. The methods wait until given conditions are met or a timeout is reached. If the conditions are met without needing to wait the results will be returned immediately. Can include `unreadOnly` to ignore already read emails that were returned in an API call or viewing in the dashboard. Can also include matches for emails containing `from`, `subject`, `hasAttachments` etc.
16
+ # Conditions to apply to emails that you are waiting for
17
17
  class WaitForConditions
18
- # ISO Date Time latest time of email to consider. Filter for matching emails that were received before this date
19
- attr_accessor :before
18
+ attr_accessor :inbox_id
20
19
 
21
20
  # Number of results that should match conditions. Either exactly or at least this amount based on the `countType`. If count condition is not met and the timeout has not been reached the `waitFor` method will retry the operation.
22
21
  attr_accessor :count
23
22
 
24
- # How should the found count be compared to the expected count.
25
- attr_accessor :count_type
26
-
27
23
  # Max time in milliseconds to wait between retries if a `timeout` is specified.
28
24
  attr_accessor :delay_timeout
29
25
 
30
- # ID of inbox to search within and apply conditions to. Essentially filtering the emails found to give a count.
31
- attr_accessor :inbox_id
26
+ # Max time in milliseconds to retry the `waitFor` operation until conditions are met.
27
+ attr_accessor :timeout
32
28
 
33
- # Conditions that should be matched for an email to qualify for results. Each condition will be applied in order to each email within an inbox to filter a result list of matching emails you are waiting for.
34
- attr_accessor :matches
29
+ # Apply conditions only to **unread** emails. All emails begin with `read=false`. An email is marked `read=true` when an `EmailDto` representation of it has been returned to the user at least once. For example you have called `getEmail` or `waitForLatestEmail` etc., or you have viewed the email in the dashboard.
30
+ attr_accessor :unread_only
35
31
 
36
- # ISO Date Time earliest time of email to consider. Filter for matching emails that were received after this date
37
- attr_accessor :since
32
+ # How result size should be compared with the expected size. Exactly or at-least matching result?
33
+ attr_accessor :count_type
34
+
35
+ attr_accessor :matches
38
36
 
39
- # Direction to sort matching emails by created time
40
37
  attr_accessor :sort_direction
41
38
 
42
- # Max time in milliseconds to retry the `waitFor` operation until conditions are met.
43
- attr_accessor :timeout
39
+ attr_accessor :since
44
40
 
45
- # Apply conditions only to **unread** emails. All emails begin with `read=false`. An email is marked `read=true` when an `EmailDto` representation of it has been returned to the user at least once. For example you have called `getEmail` or `waitForLatestEmail` etc., or you have viewed the email in the dashboard.
46
- attr_accessor :unread_only
41
+ attr_accessor :before
47
42
 
48
43
  class EnumAttributeValidator
49
44
  attr_reader :datatype
@@ -70,32 +65,32 @@ module MailSlurpClient
70
65
  # Attribute mapping from ruby-style variable name to JSON key.
71
66
  def self.attribute_map
72
67
  {
73
- :'before' => :'before',
68
+ :'inbox_id' => :'inboxId',
74
69
  :'count' => :'count',
75
- :'count_type' => :'countType',
76
70
  :'delay_timeout' => :'delayTimeout',
77
- :'inbox_id' => :'inboxId',
71
+ :'timeout' => :'timeout',
72
+ :'unread_only' => :'unreadOnly',
73
+ :'count_type' => :'countType',
78
74
  :'matches' => :'matches',
79
- :'since' => :'since',
80
75
  :'sort_direction' => :'sortDirection',
81
- :'timeout' => :'timeout',
82
- :'unread_only' => :'unreadOnly'
76
+ :'since' => :'since',
77
+ :'before' => :'before'
83
78
  }
84
79
  end
85
80
 
86
81
  # Attribute type mapping.
87
82
  def self.openapi_types
88
83
  {
89
- :'before' => :'DateTime',
84
+ :'inbox_id' => :'String',
90
85
  :'count' => :'Integer',
91
- :'count_type' => :'String',
92
86
  :'delay_timeout' => :'Integer',
93
- :'inbox_id' => :'String',
87
+ :'timeout' => :'Integer',
88
+ :'unread_only' => :'Boolean',
89
+ :'count_type' => :'String',
94
90
  :'matches' => :'Array<MatchOption>',
95
- :'since' => :'DateTime',
96
91
  :'sort_direction' => :'String',
97
- :'timeout' => :'Integer',
98
- :'unread_only' => :'Boolean'
92
+ :'since' => :'DateTime',
93
+ :'before' => :'DateTime'
99
94
  }
100
95
  end
101
96
 
@@ -120,24 +115,28 @@ module MailSlurpClient
120
115
  h[k.to_sym] = v
121
116
  }
122
117
 
123
- if attributes.key?(:'before')
124
- self.before = attributes[:'before']
118
+ if attributes.key?(:'inbox_id')
119
+ self.inbox_id = attributes[:'inbox_id']
125
120
  end
126
121
 
127
122
  if attributes.key?(:'count')
128
123
  self.count = attributes[:'count']
129
124
  end
130
125
 
131
- if attributes.key?(:'count_type')
132
- self.count_type = attributes[:'count_type']
133
- end
134
-
135
126
  if attributes.key?(:'delay_timeout')
136
127
  self.delay_timeout = attributes[:'delay_timeout']
137
128
  end
138
129
 
139
- if attributes.key?(:'inbox_id')
140
- self.inbox_id = attributes[:'inbox_id']
130
+ if attributes.key?(:'timeout')
131
+ self.timeout = attributes[:'timeout']
132
+ end
133
+
134
+ if attributes.key?(:'unread_only')
135
+ self.unread_only = attributes[:'unread_only']
136
+ end
137
+
138
+ if attributes.key?(:'count_type')
139
+ self.count_type = attributes[:'count_type']
141
140
  end
142
141
 
143
142
  if attributes.key?(:'matches')
@@ -146,20 +145,16 @@ module MailSlurpClient
146
145
  end
147
146
  end
148
147
 
149
- if attributes.key?(:'since')
150
- self.since = attributes[:'since']
151
- end
152
-
153
148
  if attributes.key?(:'sort_direction')
154
149
  self.sort_direction = attributes[:'sort_direction']
155
150
  end
156
151
 
157
- if attributes.key?(:'timeout')
158
- self.timeout = attributes[:'timeout']
152
+ if attributes.key?(:'since')
153
+ self.since = attributes[:'since']
159
154
  end
160
155
 
161
- if attributes.key?(:'unread_only')
162
- self.unread_only = attributes[:'unread_only']
156
+ if attributes.key?(:'before')
157
+ self.before = attributes[:'before']
163
158
  end
164
159
  end
165
160
 
@@ -167,10 +162,6 @@ module MailSlurpClient
167
162
  # @return Array for valid properties with the reasons
168
163
  def list_invalid_properties
169
164
  invalid_properties = Array.new
170
- if @inbox_id.nil?
171
- invalid_properties.push('invalid value for "inbox_id", inbox_id cannot be nil.')
172
- end
173
-
174
165
  if @timeout.nil?
175
166
  invalid_properties.push('invalid value for "timeout", timeout cannot be nil.')
176
167
  end
@@ -181,12 +172,11 @@ module MailSlurpClient
181
172
  # Check to see if the all the properties in the model are valid
182
173
  # @return true if the model is valid
183
174
  def valid?
175
+ return false if @timeout.nil?
184
176
  count_type_validator = EnumAttributeValidator.new('String', ["EXACTLY", "ATLEAST"])
185
177
  return false unless count_type_validator.valid?(@count_type)
186
- return false if @inbox_id.nil?
187
178
  sort_direction_validator = EnumAttributeValidator.new('String', ["ASC", "DESC"])
188
179
  return false unless sort_direction_validator.valid?(@sort_direction)
189
- return false if @timeout.nil?
190
180
  true
191
181
  end
192
182
 
@@ -215,16 +205,16 @@ module MailSlurpClient
215
205
  def ==(o)
216
206
  return true if self.equal?(o)
217
207
  self.class == o.class &&
218
- before == o.before &&
208
+ inbox_id == o.inbox_id &&
219
209
  count == o.count &&
220
- count_type == o.count_type &&
221
210
  delay_timeout == o.delay_timeout &&
222
- inbox_id == o.inbox_id &&
211
+ timeout == o.timeout &&
212
+ unread_only == o.unread_only &&
213
+ count_type == o.count_type &&
223
214
  matches == o.matches &&
224
- since == o.since &&
225
215
  sort_direction == o.sort_direction &&
226
- timeout == o.timeout &&
227
- unread_only == o.unread_only
216
+ since == o.since &&
217
+ before == o.before
228
218
  end
229
219
 
230
220
  # @see the `==` method
@@ -236,7 +226,7 @@ module MailSlurpClient
236
226
  # Calculates hash code according to all attributes.
237
227
  # @return [Integer] Hash code
238
228
  def hash
239
- [before, count, count_type, delay_timeout, inbox_id, matches, since, sort_direction, timeout, unread_only].hash
229
+ [inbox_id, count, delay_timeout, timeout, unread_only, count_type, matches, sort_direction, since, before].hash
240
230
  end
241
231
 
242
232
  # 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,36 +15,36 @@ require 'date'
15
15
  module MailSlurpClient
16
16
  # Representation of a webhook for an inbox. The URL specified will be using by MailSlurp whenever an email is received by the attached inbox. A webhook entity should have a URL that points to your server. Your server should accept HTTP/S POST requests and return a success 200. MailSlurp will retry your webhooks if they fail. See https://api.mailslurp.com/schemas/webhook-payload for the payload schema.
17
17
  class WebhookDto
18
- # Does webhook expect basic authentication? If true it means you created this webhook with a username and password. MailSlurp will use these in the URL to authenticate itself.
19
- attr_accessor :basic_auth
18
+ # ID of the Webhook
19
+ attr_accessor :id
20
20
 
21
- # When the webhook was created
22
- attr_accessor :created_at
21
+ # User ID of the Webhook
22
+ attr_accessor :user_id
23
23
 
24
- attr_accessor :event_name
24
+ # Does webhook expect basic authentication? If true it means you created this webhook with a username and password. MailSlurp will use these in the URL to authenticate itself.
25
+ attr_accessor :basic_auth
25
26
 
26
- # ID of the Webhook
27
- attr_accessor :id
27
+ # Name of the webhook
28
+ attr_accessor :name
28
29
 
29
30
  # The inbox that the Webhook will be triggered by
30
31
  attr_accessor :inbox_id
31
32
 
33
+ # URL of your server that the webhook will be sent to. The schema of the JSON that is sent is described by the payloadJsonSchema.
34
+ attr_accessor :url
35
+
32
36
  # HTTP method that your server endpoint must listen for
33
37
  attr_accessor :method
34
38
 
35
- # Name of the webhook
36
- attr_accessor :name
37
-
38
39
  # Deprecated. Fetch JSON Schema for webhook using the getJsonSchemaForWebhookPayload method
39
40
  attr_accessor :payload_json_schema
40
41
 
41
- attr_accessor :updated_at
42
+ # When the webhook was created
43
+ attr_accessor :created_at
42
44
 
43
- # URL of your server that the webhook will be sent to. The schema of the JSON that is sent is described by the payloadJsonSchema.
44
- attr_accessor :url
45
+ attr_accessor :updated_at
45
46
 
46
- # User ID of the Webhook
47
- attr_accessor :user_id
47
+ attr_accessor :event_name
48
48
 
49
49
  class EnumAttributeValidator
50
50
  attr_reader :datatype
@@ -71,34 +71,34 @@ module MailSlurpClient
71
71
  # Attribute mapping from ruby-style variable name to JSON key.
72
72
  def self.attribute_map
73
73
  {
74
- :'basic_auth' => :'basicAuth',
75
- :'created_at' => :'createdAt',
76
- :'event_name' => :'eventName',
77
74
  :'id' => :'id',
75
+ :'user_id' => :'userId',
76
+ :'basic_auth' => :'basicAuth',
77
+ :'name' => :'name',
78
78
  :'inbox_id' => :'inboxId',
79
+ :'url' => :'url',
79
80
  :'method' => :'method',
80
- :'name' => :'name',
81
81
  :'payload_json_schema' => :'payloadJsonSchema',
82
+ :'created_at' => :'createdAt',
82
83
  :'updated_at' => :'updatedAt',
83
- :'url' => :'url',
84
- :'user_id' => :'userId'
84
+ :'event_name' => :'eventName'
85
85
  }
86
86
  end
87
87
 
88
88
  # Attribute type mapping.
89
89
  def self.openapi_types
90
90
  {
91
- :'basic_auth' => :'Boolean',
92
- :'created_at' => :'DateTime',
93
- :'event_name' => :'String',
94
91
  :'id' => :'String',
92
+ :'user_id' => :'String',
93
+ :'basic_auth' => :'Boolean',
94
+ :'name' => :'String',
95
95
  :'inbox_id' => :'String',
96
+ :'url' => :'String',
96
97
  :'method' => :'String',
97
- :'name' => :'String',
98
98
  :'payload_json_schema' => :'String',
99
+ :'created_at' => :'DateTime',
99
100
  :'updated_at' => :'DateTime',
100
- :'url' => :'String',
101
- :'user_id' => :'String'
101
+ :'event_name' => :'String'
102
102
  }
103
103
  end
104
104
 
@@ -123,48 +123,48 @@ module MailSlurpClient
123
123
  h[k.to_sym] = v
124
124
  }
125
125
 
126
- if attributes.key?(:'basic_auth')
127
- self.basic_auth = attributes[:'basic_auth']
126
+ if attributes.key?(:'id')
127
+ self.id = attributes[:'id']
128
128
  end
129
129
 
130
- if attributes.key?(:'created_at')
131
- self.created_at = attributes[:'created_at']
130
+ if attributes.key?(:'user_id')
131
+ self.user_id = attributes[:'user_id']
132
132
  end
133
133
 
134
- if attributes.key?(:'event_name')
135
- self.event_name = attributes[:'event_name']
134
+ if attributes.key?(:'basic_auth')
135
+ self.basic_auth = attributes[:'basic_auth']
136
136
  end
137
137
 
138
- if attributes.key?(:'id')
139
- self.id = attributes[:'id']
138
+ if attributes.key?(:'name')
139
+ self.name = attributes[:'name']
140
140
  end
141
141
 
142
142
  if attributes.key?(:'inbox_id')
143
143
  self.inbox_id = attributes[:'inbox_id']
144
144
  end
145
145
 
146
- if attributes.key?(:'method')
147
- self.method = attributes[:'method']
146
+ if attributes.key?(:'url')
147
+ self.url = attributes[:'url']
148
148
  end
149
149
 
150
- if attributes.key?(:'name')
151
- self.name = attributes[:'name']
150
+ if attributes.key?(:'method')
151
+ self.method = attributes[:'method']
152
152
  end
153
153
 
154
154
  if attributes.key?(:'payload_json_schema')
155
155
  self.payload_json_schema = attributes[:'payload_json_schema']
156
156
  end
157
157
 
158
- if attributes.key?(:'updated_at')
159
- self.updated_at = attributes[:'updated_at']
158
+ if attributes.key?(:'created_at')
159
+ self.created_at = attributes[:'created_at']
160
160
  end
161
161
 
162
- if attributes.key?(:'url')
163
- self.url = attributes[:'url']
162
+ if attributes.key?(:'updated_at')
163
+ self.updated_at = attributes[:'updated_at']
164
164
  end
165
165
 
166
- if attributes.key?(:'user_id')
167
- self.user_id = attributes[:'user_id']
166
+ if attributes.key?(:'event_name')
167
+ self.event_name = attributes[:'event_name']
168
168
  end
169
169
  end
170
170
 
@@ -172,34 +172,19 @@ module MailSlurpClient
172
172
  # @return Array for valid properties with the reasons
173
173
  def list_invalid_properties
174
174
  invalid_properties = Array.new
175
- if @updated_at.nil?
176
- invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
177
- end
178
-
179
175
  invalid_properties
180
176
  end
181
177
 
182
178
  # Check to see if the all the properties in the model are valid
183
179
  # @return true if the model is valid
184
180
  def valid?
185
- event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ"])
186
- return false unless event_name_validator.valid?(@event_name)
187
181
  method_validator = EnumAttributeValidator.new('String', ["GET", "HEAD", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "TRACE"])
188
182
  return false unless method_validator.valid?(@method)
189
- return false if @updated_at.nil?
183
+ event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ"])
184
+ return false unless event_name_validator.valid?(@event_name)
190
185
  true
191
186
  end
192
187
 
193
- # Custom attribute writer method checking allowed values (enum).
194
- # @param [Object] event_name Object to be assigned
195
- def event_name=(event_name)
196
- validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ"])
197
- unless validator.valid?(event_name)
198
- fail ArgumentError, "invalid value for \"event_name\", must be one of #{validator.allowable_values}."
199
- end
200
- @event_name = event_name
201
- end
202
-
203
188
  # Custom attribute writer method checking allowed values (enum).
204
189
  # @param [Object] method Object to be assigned
205
190
  def method=(method)
@@ -210,22 +195,32 @@ module MailSlurpClient
210
195
  @method = method
211
196
  end
212
197
 
198
+ # Custom attribute writer method checking allowed values (enum).
199
+ # @param [Object] event_name Object to be assigned
200
+ def event_name=(event_name)
201
+ validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ"])
202
+ unless validator.valid?(event_name)
203
+ fail ArgumentError, "invalid value for \"event_name\", must be one of #{validator.allowable_values}."
204
+ end
205
+ @event_name = event_name
206
+ end
207
+
213
208
  # Checks equality by comparing each attribute.
214
209
  # @param [Object] Object to be compared
215
210
  def ==(o)
216
211
  return true if self.equal?(o)
217
212
  self.class == o.class &&
218
- basic_auth == o.basic_auth &&
219
- created_at == o.created_at &&
220
- event_name == o.event_name &&
221
213
  id == o.id &&
214
+ user_id == o.user_id &&
215
+ basic_auth == o.basic_auth &&
216
+ name == o.name &&
222
217
  inbox_id == o.inbox_id &&
218
+ url == o.url &&
223
219
  method == o.method &&
224
- name == o.name &&
225
220
  payload_json_schema == o.payload_json_schema &&
221
+ created_at == o.created_at &&
226
222
  updated_at == o.updated_at &&
227
- url == o.url &&
228
- user_id == o.user_id
223
+ event_name == o.event_name
229
224
  end
230
225
 
231
226
  # @see the `==` method
@@ -237,7 +232,7 @@ module MailSlurpClient
237
232
  # Calculates hash code according to all attributes.
238
233
  # @return [Integer] Hash code
239
234
  def hash
240
- [basic_auth, created_at, event_name, id, inbox_id, method, name, payload_json_schema, updated_at, url, user_id].hash
235
+ [id, user_id, basic_auth, name, inbox_id, url, method, payload_json_schema, created_at, updated_at, event_name].hash
241
236
  end
242
237
 
243
238
  # 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,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
 
@@ -182,15 +182,15 @@ module MailSlurpClient
182
182
  def ==(o)
183
183
  return true if self.equal?(o)
184
184
  self.class == o.class &&
185
- created_at == o.created_at &&
185
+ message_id == o.message_id &&
186
+ webhook_id == o.webhook_id &&
186
187
  event_name == o.event_name &&
188
+ webhook_name == o.webhook_name &&
187
189
  inbox_id == o.inbox_id &&
188
- message_id == o.message_id &&
189
190
  pixel_id == o.pixel_id &&
190
- recipient == o.recipient &&
191
191
  sent_email_id == o.sent_email_id &&
192
- webhook_id == o.webhook_id &&
193
- webhook_name == o.webhook_name
192
+ recipient == o.recipient &&
193
+ created_at == o.created_at
194
194
  end
195
195
 
196
196
  # @see the `==` method
@@ -202,7 +202,7 @@ module MailSlurpClient
202
202
  # Calculates hash code according to all attributes.
203
203
  # @return [Integer] Hash code
204
204
  def hash
205
- [created_at, event_name, inbox_id, message_id, pixel_id, recipient, sent_email_id, webhook_id, webhook_name].hash
205
+ [message_id, webhook_id, event_name, webhook_name, inbox_id, pixel_id, sent_email_id, recipient, created_at].hash
206
206
  end
207
207
 
208
208
  # Builds the object from hash