mailslurp_client 15.12.14 → 15.12.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mailslurp_client/api/api_user_controller_api.rb +104 -0
  3. data/lib/mailslurp_client/api/bounce_controller_api.rb +79 -0
  4. data/lib/mailslurp_client/api/inbox_controller_api.rb +89 -0
  5. data/lib/mailslurp_client/api/sent_emails_controller_api.rb +292 -0
  6. data/lib/mailslurp_client/api/webhook_controller_api.rb +3 -0
  7. data/lib/mailslurp_client/models/attachment_meta_data.rb +1 -1
  8. data/lib/mailslurp_client/models/attachment_projection.rb +14 -14
  9. data/lib/mailslurp_client/models/bounce_projection.rb +22 -22
  10. data/lib/mailslurp_client/models/bounce_recipient_projection.rb +13 -13
  11. data/lib/mailslurp_client/models/complaint.rb +289 -0
  12. data/lib/mailslurp_client/models/create_webhook_options.rb +3 -4
  13. data/lib/mailslurp_client/models/delivery_status_dto.rb +345 -0
  14. data/lib/mailslurp_client/models/email.rb +11 -1
  15. data/lib/mailslurp_client/models/email_preview.rb +11 -1
  16. data/lib/mailslurp_client/models/email_projection.rb +31 -22
  17. data/lib/mailslurp_client/models/inbox_preview.rb +11 -1
  18. data/lib/mailslurp_client/models/organization_inbox_projection.rb +11 -1
  19. data/lib/mailslurp_client/models/page_alias.rb +22 -22
  20. data/lib/mailslurp_client/models/page_attachment_entity.rb +22 -22
  21. data/lib/mailslurp_client/models/page_bounced_email.rb +22 -22
  22. data/lib/mailslurp_client/models/page_bounced_recipients.rb +22 -22
  23. data/lib/mailslurp_client/models/page_complaint.rb +308 -0
  24. data/lib/mailslurp_client/models/page_contact_projection.rb +22 -22
  25. data/lib/mailslurp_client/models/page_delivery_status.rb +308 -0
  26. data/lib/mailslurp_client/models/page_email_preview.rb +22 -22
  27. data/lib/mailslurp_client/models/page_email_projection.rb +22 -22
  28. data/lib/mailslurp_client/models/page_email_validation_request.rb +22 -22
  29. data/lib/mailslurp_client/models/page_expired_inbox_record_projection.rb +22 -22
  30. data/lib/mailslurp_client/models/page_group_projection.rb +22 -22
  31. data/lib/mailslurp_client/models/page_inbox_forwarder_dto.rb +22 -22
  32. data/lib/mailslurp_client/models/page_inbox_projection.rb +22 -22
  33. data/lib/mailslurp_client/models/page_inbox_ruleset_dto.rb +22 -22
  34. data/lib/mailslurp_client/models/page_missed_email_projection.rb +22 -22
  35. data/lib/mailslurp_client/models/page_organization_inbox_projection.rb +22 -22
  36. data/lib/mailslurp_client/models/page_phone_number_projection.rb +22 -22
  37. data/lib/mailslurp_client/models/page_sent_email_projection.rb +16 -16
  38. data/lib/mailslurp_client/models/page_sent_email_with_queue_projection.rb +16 -16
  39. data/lib/mailslurp_client/models/page_sms_projection.rb +22 -22
  40. data/lib/mailslurp_client/models/page_template_projection.rb +22 -22
  41. data/lib/mailslurp_client/models/page_thread_projection.rb +22 -22
  42. data/lib/mailslurp_client/models/page_tracking_pixel_projection.rb +22 -22
  43. data/lib/mailslurp_client/models/page_unknown_missed_email_projection.rb +22 -22
  44. data/lib/mailslurp_client/models/page_webhook_projection.rb +22 -22
  45. data/lib/mailslurp_client/models/page_webhook_result.rb +22 -22
  46. data/lib/mailslurp_client/models/sent_email_dto.rb +62 -1
  47. data/lib/mailslurp_client/models/sent_email_projection.rb +15 -15
  48. data/lib/mailslurp_client/models/sort.rb +13 -13
  49. data/lib/mailslurp_client/models/tracking_pixel_projection.rb +10 -10
  50. data/lib/mailslurp_client/models/webhook_new_email_payload.rb +11 -1
  51. data/lib/mailslurp_client/version.rb +1 -1
  52. data/lib/mailslurp_client.rb +4 -0
  53. metadata +9 -5
@@ -20,9 +20,6 @@ module MailSlurpClient
20
20
  # Content length of attachment in bytes
21
21
  attr_accessor :content_length
22
22
 
23
- # Content type of attachment.
24
- attr_accessor :content_type
25
-
26
23
  attr_accessor :user_id
27
24
 
28
25
  # Attachment ID
@@ -32,16 +29,19 @@ module MailSlurpClient
32
29
 
33
30
  attr_accessor :updated_at
34
31
 
32
+ # Content type of attachment.
33
+ attr_accessor :content_type
34
+
35
35
  # Attribute mapping from ruby-style variable name to JSON key.
36
36
  def self.attribute_map
37
37
  {
38
38
  :'name' => :'name',
39
39
  :'content_length' => :'contentLength',
40
- :'content_type' => :'contentType',
41
40
  :'user_id' => :'userId',
42
41
  :'attachment_id' => :'attachmentId',
43
42
  :'created_at' => :'createdAt',
44
- :'updated_at' => :'updatedAt'
43
+ :'updated_at' => :'updatedAt',
44
+ :'content_type' => :'contentType'
45
45
  }
46
46
  end
47
47
 
@@ -50,11 +50,11 @@ module MailSlurpClient
50
50
  {
51
51
  :'name' => :'String',
52
52
  :'content_length' => :'Integer',
53
- :'content_type' => :'String',
54
53
  :'user_id' => :'String',
55
54
  :'attachment_id' => :'String',
56
55
  :'created_at' => :'DateTime',
57
- :'updated_at' => :'DateTime'
56
+ :'updated_at' => :'DateTime',
57
+ :'content_type' => :'String'
58
58
  }
59
59
  end
60
60
 
@@ -87,10 +87,6 @@ module MailSlurpClient
87
87
  self.content_length = attributes[:'content_length']
88
88
  end
89
89
 
90
- if attributes.key?(:'content_type')
91
- self.content_type = attributes[:'content_type']
92
- end
93
-
94
90
  if attributes.key?(:'user_id')
95
91
  self.user_id = attributes[:'user_id']
96
92
  end
@@ -106,6 +102,10 @@ module MailSlurpClient
106
102
  if attributes.key?(:'updated_at')
107
103
  self.updated_at = attributes[:'updated_at']
108
104
  end
105
+
106
+ if attributes.key?(:'content_type')
107
+ self.content_type = attributes[:'content_type']
108
+ end
109
109
  end
110
110
 
111
111
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -148,11 +148,11 @@ module MailSlurpClient
148
148
  self.class == o.class &&
149
149
  name == o.name &&
150
150
  content_length == o.content_length &&
151
- content_type == o.content_type &&
152
151
  user_id == o.user_id &&
153
152
  attachment_id == o.attachment_id &&
154
153
  created_at == o.created_at &&
155
- updated_at == o.updated_at
154
+ updated_at == o.updated_at &&
155
+ content_type == o.content_type
156
156
  end
157
157
 
158
158
  # @see the `==` method
@@ -164,7 +164,7 @@ module MailSlurpClient
164
164
  # Calculates hash code according to all attributes.
165
165
  # @return [Integer] Hash code
166
166
  def hash
167
- [name, content_length, content_type, user_id, attachment_id, created_at, updated_at].hash
167
+ [name, content_length, user_id, attachment_id, created_at, updated_at, content_type].hash
168
168
  end
169
169
 
170
170
  # Builds the object from hash
@@ -17,25 +17,25 @@ module MailSlurpClient
17
17
  class BounceProjection
18
18
  attr_accessor :id
19
19
 
20
- attr_accessor :subject
21
-
22
20
  attr_accessor :sender
23
21
 
24
- attr_accessor :created_at
22
+ attr_accessor :subject
25
23
 
26
- attr_accessor :bounce_mta
24
+ attr_accessor :created_at
27
25
 
28
26
  attr_accessor :bounce_type
29
27
 
28
+ attr_accessor :bounce_mta
29
+
30
30
  # Attribute mapping from ruby-style variable name to JSON key.
31
31
  def self.attribute_map
32
32
  {
33
33
  :'id' => :'id',
34
- :'subject' => :'subject',
35
34
  :'sender' => :'sender',
35
+ :'subject' => :'subject',
36
36
  :'created_at' => :'createdAt',
37
- :'bounce_mta' => :'bounceMta',
38
- :'bounce_type' => :'bounceType'
37
+ :'bounce_type' => :'bounceType',
38
+ :'bounce_mta' => :'bounceMta'
39
39
  }
40
40
  end
41
41
 
@@ -43,11 +43,11 @@ module MailSlurpClient
43
43
  def self.openapi_types
44
44
  {
45
45
  :'id' => :'String',
46
- :'subject' => :'String',
47
46
  :'sender' => :'String',
47
+ :'subject' => :'String',
48
48
  :'created_at' => :'DateTime',
49
- :'bounce_mta' => :'String',
50
- :'bounce_type' => :'String'
49
+ :'bounce_type' => :'String',
50
+ :'bounce_mta' => :'String'
51
51
  }
52
52
  end
53
53
 
@@ -76,25 +76,25 @@ module MailSlurpClient
76
76
  self.id = attributes[:'id']
77
77
  end
78
78
 
79
- if attributes.key?(:'subject')
80
- self.subject = attributes[:'subject']
81
- end
82
-
83
79
  if attributes.key?(:'sender')
84
80
  self.sender = attributes[:'sender']
85
81
  end
86
82
 
87
- if attributes.key?(:'created_at')
88
- self.created_at = attributes[:'created_at']
83
+ if attributes.key?(:'subject')
84
+ self.subject = attributes[:'subject']
89
85
  end
90
86
 
91
- if attributes.key?(:'bounce_mta')
92
- self.bounce_mta = attributes[:'bounce_mta']
87
+ if attributes.key?(:'created_at')
88
+ self.created_at = attributes[:'created_at']
93
89
  end
94
90
 
95
91
  if attributes.key?(:'bounce_type')
96
92
  self.bounce_type = attributes[:'bounce_type']
97
93
  end
94
+
95
+ if attributes.key?(:'bounce_mta')
96
+ self.bounce_mta = attributes[:'bounce_mta']
97
+ end
98
98
  end
99
99
 
100
100
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -126,11 +126,11 @@ module MailSlurpClient
126
126
  return true if self.equal?(o)
127
127
  self.class == o.class &&
128
128
  id == o.id &&
129
- subject == o.subject &&
130
129
  sender == o.sender &&
130
+ subject == o.subject &&
131
131
  created_at == o.created_at &&
132
- bounce_mta == o.bounce_mta &&
133
- bounce_type == o.bounce_type
132
+ bounce_type == o.bounce_type &&
133
+ bounce_mta == o.bounce_mta
134
134
  end
135
135
 
136
136
  # @see the `==` method
@@ -142,7 +142,7 @@ module MailSlurpClient
142
142
  # Calculates hash code according to all attributes.
143
143
  # @return [Integer] Hash code
144
144
  def hash
145
- [id, subject, sender, created_at, bounce_mta, bounce_type].hash
145
+ [id, sender, subject, created_at, bounce_type, bounce_mta].hash
146
146
  end
147
147
 
148
148
  # Builds the object from hash
@@ -17,8 +17,6 @@ module MailSlurpClient
17
17
  class BounceRecipientProjection
18
18
  attr_accessor :id
19
19
 
20
- attr_accessor :action
21
-
22
20
  attr_accessor :status
23
21
 
24
22
  attr_accessor :sent_email_id
@@ -27,15 +25,17 @@ module MailSlurpClient
27
25
 
28
26
  attr_accessor :recipient
29
27
 
28
+ attr_accessor :action
29
+
30
30
  # Attribute mapping from ruby-style variable name to JSON key.
31
31
  def self.attribute_map
32
32
  {
33
33
  :'id' => :'id',
34
- :'action' => :'action',
35
34
  :'status' => :'status',
36
35
  :'sent_email_id' => :'sentEmailId',
37
36
  :'created_at' => :'createdAt',
38
- :'recipient' => :'recipient'
37
+ :'recipient' => :'recipient',
38
+ :'action' => :'action'
39
39
  }
40
40
  end
41
41
 
@@ -43,11 +43,11 @@ module MailSlurpClient
43
43
  def self.openapi_types
44
44
  {
45
45
  :'id' => :'String',
46
- :'action' => :'String',
47
46
  :'status' => :'String',
48
47
  :'sent_email_id' => :'String',
49
48
  :'created_at' => :'DateTime',
50
- :'recipient' => :'String'
49
+ :'recipient' => :'String',
50
+ :'action' => :'String'
51
51
  }
52
52
  end
53
53
 
@@ -76,10 +76,6 @@ module MailSlurpClient
76
76
  self.id = attributes[:'id']
77
77
  end
78
78
 
79
- if attributes.key?(:'action')
80
- self.action = attributes[:'action']
81
- end
82
-
83
79
  if attributes.key?(:'status')
84
80
  self.status = attributes[:'status']
85
81
  end
@@ -95,6 +91,10 @@ module MailSlurpClient
95
91
  if attributes.key?(:'recipient')
96
92
  self.recipient = attributes[:'recipient']
97
93
  end
94
+
95
+ if attributes.key?(:'action')
96
+ self.action = attributes[:'action']
97
+ end
98
98
  end
99
99
 
100
100
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -126,11 +126,11 @@ module MailSlurpClient
126
126
  return true if self.equal?(o)
127
127
  self.class == o.class &&
128
128
  id == o.id &&
129
- action == o.action &&
130
129
  status == o.status &&
131
130
  sent_email_id == o.sent_email_id &&
132
131
  created_at == o.created_at &&
133
- recipient == o.recipient
132
+ recipient == o.recipient &&
133
+ action == o.action
134
134
  end
135
135
 
136
136
  # @see the `==` method
@@ -142,7 +142,7 @@ module MailSlurpClient
142
142
  # Calculates hash code according to all attributes.
143
143
  # @return [Integer] Hash code
144
144
  def hash
145
- [id, action, status, sent_email_id, created_at, recipient].hash
145
+ [id, status, sent_email_id, created_at, recipient, action].hash
146
146
  end
147
147
 
148
148
  # Builds the object from hash
@@ -0,0 +1,289 @@
1
+ =begin
2
+ #MailSlurp API
3
+
4
+ #MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://docs.mailslurp.com/) - [Examples](https://github.com/mailslurp/examples) repository
5
+
6
+ The version of the OpenAPI document: 6.5.2
7
+ Contact: contact@mailslurp.dev
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 4.3.1
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module MailSlurpClient
16
+ class Complaint
17
+ attr_accessor :id
18
+
19
+ attr_accessor :user_id
20
+
21
+ attr_accessor :event_type
22
+
23
+ attr_accessor :mail_source
24
+
25
+ attr_accessor :mail_message_id
26
+
27
+ attr_accessor :complaint_recipient
28
+
29
+ attr_accessor :created_at
30
+
31
+ attr_accessor :updated_at
32
+
33
+ # Attribute mapping from ruby-style variable name to JSON key.
34
+ def self.attribute_map
35
+ {
36
+ :'id' => :'id',
37
+ :'user_id' => :'userId',
38
+ :'event_type' => :'eventType',
39
+ :'mail_source' => :'mailSource',
40
+ :'mail_message_id' => :'mailMessageId',
41
+ :'complaint_recipient' => :'complaintRecipient',
42
+ :'created_at' => :'createdAt',
43
+ :'updated_at' => :'updatedAt'
44
+ }
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ def self.openapi_types
49
+ {
50
+ :'id' => :'String',
51
+ :'user_id' => :'String',
52
+ :'event_type' => :'String',
53
+ :'mail_source' => :'String',
54
+ :'mail_message_id' => :'String',
55
+ :'complaint_recipient' => :'String',
56
+ :'created_at' => :'DateTime',
57
+ :'updated_at' => :'DateTime'
58
+ }
59
+ end
60
+
61
+ # List of attributes with nullable: true
62
+ def self.openapi_nullable
63
+ Set.new([
64
+ ])
65
+ end
66
+
67
+ # Initializes the object
68
+ # @param [Hash] attributes Model attributes in the form of hash
69
+ def initialize(attributes = {})
70
+ if (!attributes.is_a?(Hash))
71
+ fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::Complaint` initialize method"
72
+ end
73
+
74
+ # check to see if the attribute exists and convert string to symbol for hash key
75
+ attributes = attributes.each_with_object({}) { |(k, v), h|
76
+ if (!self.class.attribute_map.key?(k.to_sym))
77
+ fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::Complaint`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
78
+ end
79
+ h[k.to_sym] = v
80
+ }
81
+
82
+ if attributes.key?(:'id')
83
+ self.id = attributes[:'id']
84
+ end
85
+
86
+ if attributes.key?(:'user_id')
87
+ self.user_id = attributes[:'user_id']
88
+ end
89
+
90
+ if attributes.key?(:'event_type')
91
+ self.event_type = attributes[:'event_type']
92
+ end
93
+
94
+ if attributes.key?(:'mail_source')
95
+ self.mail_source = attributes[:'mail_source']
96
+ end
97
+
98
+ if attributes.key?(:'mail_message_id')
99
+ self.mail_message_id = attributes[:'mail_message_id']
100
+ end
101
+
102
+ if attributes.key?(:'complaint_recipient')
103
+ self.complaint_recipient = attributes[:'complaint_recipient']
104
+ end
105
+
106
+ if attributes.key?(:'created_at')
107
+ self.created_at = attributes[:'created_at']
108
+ end
109
+
110
+ if attributes.key?(:'updated_at')
111
+ self.updated_at = attributes[:'updated_at']
112
+ end
113
+ end
114
+
115
+ # Show invalid properties with the reasons. Usually used together with valid?
116
+ # @return Array for valid properties with the reasons
117
+ def list_invalid_properties
118
+ invalid_properties = Array.new
119
+ if @id.nil?
120
+ invalid_properties.push('invalid value for "id", id cannot be nil.')
121
+ end
122
+
123
+ if @complaint_recipient.nil?
124
+ invalid_properties.push('invalid value for "complaint_recipient", complaint_recipient cannot be nil.')
125
+ end
126
+
127
+ if @created_at.nil?
128
+ invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
129
+ end
130
+
131
+ if @updated_at.nil?
132
+ invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
133
+ end
134
+
135
+ invalid_properties
136
+ end
137
+
138
+ # Check to see if the all the properties in the model are valid
139
+ # @return true if the model is valid
140
+ def valid?
141
+ return false if @id.nil?
142
+ return false if @complaint_recipient.nil?
143
+ return false if @created_at.nil?
144
+ return false if @updated_at.nil?
145
+ true
146
+ end
147
+
148
+ # Checks equality by comparing each attribute.
149
+ # @param [Object] Object to be compared
150
+ def ==(o)
151
+ return true if self.equal?(o)
152
+ self.class == o.class &&
153
+ id == o.id &&
154
+ user_id == o.user_id &&
155
+ event_type == o.event_type &&
156
+ mail_source == o.mail_source &&
157
+ mail_message_id == o.mail_message_id &&
158
+ complaint_recipient == o.complaint_recipient &&
159
+ created_at == o.created_at &&
160
+ updated_at == o.updated_at
161
+ end
162
+
163
+ # @see the `==` method
164
+ # @param [Object] Object to be compared
165
+ def eql?(o)
166
+ self == o
167
+ end
168
+
169
+ # Calculates hash code according to all attributes.
170
+ # @return [Integer] Hash code
171
+ def hash
172
+ [id, user_id, event_type, mail_source, mail_message_id, complaint_recipient, created_at, updated_at].hash
173
+ end
174
+
175
+ # Builds the object from hash
176
+ # @param [Hash] attributes Model attributes in the form of hash
177
+ # @return [Object] Returns the model itself
178
+ def self.build_from_hash(attributes)
179
+ new.build_from_hash(attributes)
180
+ end
181
+
182
+ # Builds the object from hash
183
+ # @param [Hash] attributes Model attributes in the form of hash
184
+ # @return [Object] Returns the model itself
185
+ def build_from_hash(attributes)
186
+ return nil unless attributes.is_a?(Hash)
187
+ self.class.openapi_types.each_pair do |key, type|
188
+ if type =~ /\AArray<(.*)>/i
189
+ # check to ensure the input is an array given that the attribute
190
+ # is documented as an array but the input is not
191
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
192
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
193
+ end
194
+ elsif !attributes[self.class.attribute_map[key]].nil?
195
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
196
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
197
+ end
198
+
199
+ self
200
+ end
201
+
202
+ # Deserializes the data based on type
203
+ # @param string type Data type
204
+ # @param string value Value to be deserialized
205
+ # @return [Object] Deserialized data
206
+ def _deserialize(type, value)
207
+ case type.to_sym
208
+ when :DateTime
209
+ DateTime.parse(value)
210
+ when :Date
211
+ Date.parse(value)
212
+ when :String
213
+ value.to_s
214
+ when :Integer
215
+ value.to_i
216
+ when :Float
217
+ value.to_f
218
+ when :Boolean
219
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
220
+ true
221
+ else
222
+ false
223
+ end
224
+ when :Object
225
+ # generic object (usually a Hash), return directly
226
+ value
227
+ when /\AArray<(?<inner_type>.+)>\z/
228
+ inner_type = Regexp.last_match[:inner_type]
229
+ value.map { |v| _deserialize(inner_type, v) }
230
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
231
+ k_type = Regexp.last_match[:k_type]
232
+ v_type = Regexp.last_match[:v_type]
233
+ {}.tap do |hash|
234
+ value.each do |k, v|
235
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
236
+ end
237
+ end
238
+ else # model
239
+ MailSlurpClient.const_get(type).build_from_hash(value)
240
+ end
241
+ end
242
+
243
+ # Returns the string representation of the object
244
+ # @return [String] String presentation of the object
245
+ def to_s
246
+ to_hash.to_s
247
+ end
248
+
249
+ # to_body is an alias to to_hash (backward compatibility)
250
+ # @return [Hash] Returns the object in the form of hash
251
+ def to_body
252
+ to_hash
253
+ end
254
+
255
+ # Returns the object in the form of hash
256
+ # @return [Hash] Returns the object in the form of hash
257
+ def to_hash
258
+ hash = {}
259
+ self.class.attribute_map.each_pair do |attr, param|
260
+ value = self.send(attr)
261
+ if value.nil?
262
+ is_nullable = self.class.openapi_nullable.include?(attr)
263
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
264
+ end
265
+
266
+ hash[param] = _to_hash(value)
267
+ end
268
+ hash
269
+ end
270
+
271
+ # Outputs non-array value in the form of hash
272
+ # For object, use to_hash. Otherwise, just return the value
273
+ # @param [Object] value Any valid value
274
+ # @return [Hash] Returns the value in the form of hash
275
+ def _to_hash(value)
276
+ if value.is_a?(Array)
277
+ value.compact.map { |v| _to_hash(v) }
278
+ elsif value.is_a?(Hash)
279
+ {}.tap do |hash|
280
+ value.each { |k, v| hash[k] = _to_hash(v) }
281
+ end
282
+ elsif value.respond_to? :to_hash
283
+ value.to_hash
284
+ else
285
+ value
286
+ end
287
+ end
288
+ end
289
+ end
@@ -13,9 +13,9 @@ OpenAPI Generator version: 4.3.1
13
13
  require 'date'
14
14
 
15
15
  module MailSlurpClient
16
- # Options for creating a webhook. Webhooks can be attached to inboxes and MailSlurp will POST a webhook payload to the URL specified whenever the inbox receives an email. Webhooks are great for processing many inbound emails.
16
+ # Options for creating a webhook. Webhooks can be attached to inboxes and MailSlurp will POST a webhook payload to the URL specified whenever the webhook's event is triggered. Webhooks are great for processing many inbound emails and responding to other events at scale.
17
17
  class CreateWebhookOptions
18
- # Public URL on your server that MailSlurp can post WebhookNotification payload to when an email is received or an event is trigger. The payload of the submitted JSON is dependent on the webhook event type. The default `EMAIL_RECEIVED` payload is described by `https://ruby.api.mailslurp.com/schemas/webhook-payload`. The other events, `NEW_EMAIL`, `NEW_CONTACT`, and `NEW_ATTACHMENT` are described by `https://ruby.api.mailslurp.com/schemas/webhook-new-email-payload`, `https://ruby.api.mailslurp.com/schemas/webhook-new-contact-payload`,`https://ruby.api.mailslurp.com/schemas/webhook-new-attachment-payload` respectively.
18
+ # Public URL on your server that MailSlurp can post WebhookNotification payload to when an email is received or an event is trigger. The payload of the submitted JSON is dependent on the webhook event type. See docs.mailslurp.com/webhooks for event payload documentation.
19
19
  attr_accessor :url
20
20
 
21
21
  attr_accessor :basic_auth
@@ -23,7 +23,7 @@ module MailSlurpClient
23
23
  # Optional name for the webhook
24
24
  attr_accessor :name
25
25
 
26
- # Optional webhook event name. Default is `EMAIL_RECEIVED` and is triggered when an email is received by the inbox associated with the webhook. Payload differ according to the webhook event name. The other events are `NEW_EMAIL`, `NEW_CONTACT`, and `NEW_ATTACHMENT` and `EMAIL_OPENED`. `EMAIL_OPENED` requires the use of tracking pixels when sending. See the email tracking guide for more information.
26
+ # Optional webhook event name. Default is `EMAIL_RECEIVED` and is triggered when an email is received by the inbox associated with the webhook. Payload differ according to the webhook event name.
27
27
  attr_accessor :event_name
28
28
 
29
29
  attr_accessor :include_headers
@@ -76,7 +76,6 @@ module MailSlurpClient
76
76
  def self.openapi_nullable
77
77
  Set.new([
78
78
  :'basic_auth',
79
- :'event_name',
80
79
  ])
81
80
  end
82
81