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
 
@@ -13,37 +13,37 @@ 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
+ # ID of inbox to search within and apply conditions to. Essentially filtering the emails found to give a count.
19
+ attr_accessor :inbox_id
20
20
 
21
21
  # 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
22
  attr_accessor :count
23
23
 
24
- # How should the found count be compared to the expected count.
25
- attr_accessor :count_type
26
-
27
24
  # Max time in milliseconds to wait between retries if a `timeout` is specified.
28
25
  attr_accessor :delay_timeout
29
26
 
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
27
+ # Max time in milliseconds to retry the `waitFor` operation until conditions are met.
28
+ attr_accessor :timeout
29
+
30
+ # 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.
31
+ attr_accessor :unread_only
32
+
33
+ # How result size should be compared with the expected size. Exactly or at-least matching result?
34
+ attr_accessor :count_type
32
35
 
33
36
  # 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
37
  attr_accessor :matches
35
38
 
36
- # ISO Date Time earliest time of email to consider. Filter for matching emails that were received after this date
37
- attr_accessor :since
38
-
39
39
  # Direction to sort matching emails by created time
40
40
  attr_accessor :sort_direction
41
41
 
42
- # Max time in milliseconds to retry the `waitFor` operation until conditions are met.
43
- attr_accessor :timeout
42
+ # ISO Date Time earliest time of email to consider. Filter for matching emails that were received after this date
43
+ attr_accessor :since
44
44
 
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
45
+ # ISO Date Time latest time of email to consider. Filter for matching emails that were received before this date
46
+ attr_accessor :before
47
47
 
48
48
  class EnumAttributeValidator
49
49
  attr_reader :datatype
@@ -70,32 +70,32 @@ module MailSlurpClient
70
70
  # Attribute mapping from ruby-style variable name to JSON key.
71
71
  def self.attribute_map
72
72
  {
73
- :'before' => :'before',
73
+ :'inbox_id' => :'inboxId',
74
74
  :'count' => :'count',
75
- :'count_type' => :'countType',
76
75
  :'delay_timeout' => :'delayTimeout',
77
- :'inbox_id' => :'inboxId',
76
+ :'timeout' => :'timeout',
77
+ :'unread_only' => :'unreadOnly',
78
+ :'count_type' => :'countType',
78
79
  :'matches' => :'matches',
79
- :'since' => :'since',
80
80
  :'sort_direction' => :'sortDirection',
81
- :'timeout' => :'timeout',
82
- :'unread_only' => :'unreadOnly'
81
+ :'since' => :'since',
82
+ :'before' => :'before'
83
83
  }
84
84
  end
85
85
 
86
86
  # Attribute type mapping.
87
87
  def self.openapi_types
88
88
  {
89
- :'before' => :'DateTime',
89
+ :'inbox_id' => :'String',
90
90
  :'count' => :'Integer',
91
- :'count_type' => :'String',
92
91
  :'delay_timeout' => :'Integer',
93
- :'inbox_id' => :'String',
92
+ :'timeout' => :'Integer',
93
+ :'unread_only' => :'Boolean',
94
+ :'count_type' => :'String',
94
95
  :'matches' => :'Array<MatchOption>',
95
- :'since' => :'DateTime',
96
96
  :'sort_direction' => :'String',
97
- :'timeout' => :'Integer',
98
- :'unread_only' => :'Boolean'
97
+ :'since' => :'DateTime',
98
+ :'before' => :'DateTime'
99
99
  }
100
100
  end
101
101
 
@@ -120,24 +120,28 @@ module MailSlurpClient
120
120
  h[k.to_sym] = v
121
121
  }
122
122
 
123
- if attributes.key?(:'before')
124
- self.before = attributes[:'before']
123
+ if attributes.key?(:'inbox_id')
124
+ self.inbox_id = attributes[:'inbox_id']
125
125
  end
126
126
 
127
127
  if attributes.key?(:'count')
128
128
  self.count = attributes[:'count']
129
129
  end
130
130
 
131
- if attributes.key?(:'count_type')
132
- self.count_type = attributes[:'count_type']
133
- end
134
-
135
131
  if attributes.key?(:'delay_timeout')
136
132
  self.delay_timeout = attributes[:'delay_timeout']
137
133
  end
138
134
 
139
- if attributes.key?(:'inbox_id')
140
- self.inbox_id = attributes[:'inbox_id']
135
+ if attributes.key?(:'timeout')
136
+ self.timeout = attributes[:'timeout']
137
+ end
138
+
139
+ if attributes.key?(:'unread_only')
140
+ self.unread_only = attributes[:'unread_only']
141
+ end
142
+
143
+ if attributes.key?(:'count_type')
144
+ self.count_type = attributes[:'count_type']
141
145
  end
142
146
 
143
147
  if attributes.key?(:'matches')
@@ -146,20 +150,16 @@ module MailSlurpClient
146
150
  end
147
151
  end
148
152
 
149
- if attributes.key?(:'since')
150
- self.since = attributes[:'since']
151
- end
152
-
153
153
  if attributes.key?(:'sort_direction')
154
154
  self.sort_direction = attributes[:'sort_direction']
155
155
  end
156
156
 
157
- if attributes.key?(:'timeout')
158
- self.timeout = attributes[:'timeout']
157
+ if attributes.key?(:'since')
158
+ self.since = attributes[:'since']
159
159
  end
160
160
 
161
- if attributes.key?(:'unread_only')
162
- self.unread_only = attributes[:'unread_only']
161
+ if attributes.key?(:'before')
162
+ self.before = attributes[:'before']
163
163
  end
164
164
  end
165
165
 
@@ -181,12 +181,12 @@ module MailSlurpClient
181
181
  # Check to see if the all the properties in the model are valid
182
182
  # @return true if the model is valid
183
183
  def valid?
184
+ return false if @inbox_id.nil?
185
+ return false if @timeout.nil?
184
186
  count_type_validator = EnumAttributeValidator.new('String', ["EXACTLY", "ATLEAST"])
185
187
  return false unless count_type_validator.valid?(@count_type)
186
- return false if @inbox_id.nil?
187
188
  sort_direction_validator = EnumAttributeValidator.new('String', ["ASC", "DESC"])
188
189
  return false unless sort_direction_validator.valid?(@sort_direction)
189
- return false if @timeout.nil?
190
190
  true
191
191
  end
192
192
 
@@ -215,16 +215,16 @@ module MailSlurpClient
215
215
  def ==(o)
216
216
  return true if self.equal?(o)
217
217
  self.class == o.class &&
218
- before == o.before &&
218
+ inbox_id == o.inbox_id &&
219
219
  count == o.count &&
220
- count_type == o.count_type &&
221
220
  delay_timeout == o.delay_timeout &&
222
- inbox_id == o.inbox_id &&
221
+ timeout == o.timeout &&
222
+ unread_only == o.unread_only &&
223
+ count_type == o.count_type &&
223
224
  matches == o.matches &&
224
- since == o.since &&
225
225
  sort_direction == o.sort_direction &&
226
- timeout == o.timeout &&
227
- unread_only == o.unread_only
226
+ since == o.since &&
227
+ before == o.before
228
228
  end
229
229
 
230
230
  # @see the `==` method
@@ -236,7 +236,7 @@ module MailSlurpClient
236
236
  # Calculates hash code according to all attributes.
237
237
  # @return [Integer] Hash code
238
238
  def hash
239
- [before, count, count_type, delay_timeout, inbox_id, matches, since, sort_direction, timeout, unread_only].hash
239
+ [inbox_id, count, delay_timeout, timeout, unread_only, count_type, matches, sort_direction, since, before].hash
240
240
  end
241
241
 
242
242
  # 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,6 +172,38 @@ 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 @id.nil?
176
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
177
+ end
178
+
179
+ if @user_id.nil?
180
+ invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
181
+ end
182
+
183
+ if @basic_auth.nil?
184
+ invalid_properties.push('invalid value for "basic_auth", basic_auth cannot be nil.')
185
+ end
186
+
187
+ if @inbox_id.nil?
188
+ invalid_properties.push('invalid value for "inbox_id", inbox_id cannot be nil.')
189
+ end
190
+
191
+ if @url.nil?
192
+ invalid_properties.push('invalid value for "url", url cannot be nil.')
193
+ end
194
+
195
+ if @method.nil?
196
+ invalid_properties.push('invalid value for "method", method cannot be nil.')
197
+ end
198
+
199
+ if @payload_json_schema.nil?
200
+ invalid_properties.push('invalid value for "payload_json_schema", payload_json_schema cannot be nil.')
201
+ end
202
+
203
+ if @created_at.nil?
204
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
205
+ end
206
+
175
207
  if @updated_at.nil?
176
208
  invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
177
209
  end
@@ -182,24 +214,22 @@ module MailSlurpClient
182
214
  # Check to see if the all the properties in the model are valid
183
215
  # @return true if the model is valid
184
216
  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)
217
+ return false if @id.nil?
218
+ return false if @user_id.nil?
219
+ return false if @basic_auth.nil?
220
+ return false if @inbox_id.nil?
221
+ return false if @url.nil?
222
+ return false if @method.nil?
187
223
  method_validator = EnumAttributeValidator.new('String', ["GET", "HEAD", "POST", "PUT", "PATCH", "DELETE", "OPTIONS", "TRACE"])
188
224
  return false unless method_validator.valid?(@method)
225
+ return false if @payload_json_schema.nil?
226
+ return false if @created_at.nil?
189
227
  return false if @updated_at.nil?
228
+ event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ"])
229
+ return false unless event_name_validator.valid?(@event_name)
190
230
  true
191
231
  end
192
232
 
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
233
  # Custom attribute writer method checking allowed values (enum).
204
234
  # @param [Object] method Object to be assigned
205
235
  def method=(method)
@@ -210,22 +240,32 @@ module MailSlurpClient
210
240
  @method = method
211
241
  end
212
242
 
243
+ # Custom attribute writer method checking allowed values (enum).
244
+ # @param [Object] event_name Object to be assigned
245
+ def event_name=(event_name)
246
+ validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ"])
247
+ unless validator.valid?(event_name)
248
+ fail ArgumentError, "invalid value for \"event_name\", must be one of #{validator.allowable_values}."
249
+ end
250
+ @event_name = event_name
251
+ end
252
+
213
253
  # Checks equality by comparing each attribute.
214
254
  # @param [Object] Object to be compared
215
255
  def ==(o)
216
256
  return true if self.equal?(o)
217
257
  self.class == o.class &&
218
- basic_auth == o.basic_auth &&
219
- created_at == o.created_at &&
220
- event_name == o.event_name &&
221
258
  id == o.id &&
259
+ user_id == o.user_id &&
260
+ basic_auth == o.basic_auth &&
261
+ name == o.name &&
222
262
  inbox_id == o.inbox_id &&
263
+ url == o.url &&
223
264
  method == o.method &&
224
- name == o.name &&
225
265
  payload_json_schema == o.payload_json_schema &&
266
+ created_at == o.created_at &&
226
267
  updated_at == o.updated_at &&
227
- url == o.url &&
228
- user_id == o.user_id
268
+ event_name == o.event_name
229
269
  end
230
270
 
231
271
  # @see the `==` method
@@ -237,7 +277,7 @@ module MailSlurpClient
237
277
  # Calculates hash code according to all attributes.
238
278
  # @return [Integer] Hash code
239
279
  def hash
240
- [basic_auth, created_at, event_name, id, inbox_id, method, name, payload_json_schema, updated_at, url, user_id].hash
280
+ [id, user_id, basic_auth, name, inbox_id, url, method, payload_json_schema, created_at, updated_at, event_name].hash
241
281
  end
242
282
 
243
283
  # Builds the object from hash