mailslurp_client 15.12.12 → 15.12.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) 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/webhook_controller_api.rb +68 -0
  4. data/lib/mailslurp_client/models/alias_projection.rb +15 -15
  5. data/lib/mailslurp_client/models/attachment_projection.rb +14 -14
  6. data/lib/mailslurp_client/models/bounce_recipient_projection.rb +13 -13
  7. data/lib/mailslurp_client/models/create_contact_options.rb +7 -0
  8. data/lib/mailslurp_client/models/create_domain_options.rb +3 -0
  9. data/lib/mailslurp_client/models/create_inbox_dto.rb +10 -0
  10. data/lib/mailslurp_client/models/create_webhook_options.rb +22 -7
  11. data/lib/mailslurp_client/models/email.rb +15 -0
  12. data/lib/mailslurp_client/models/email_analysis.rb +5 -0
  13. data/lib/mailslurp_client/models/email_preview.rb +6 -5
  14. data/lib/mailslurp_client/models/email_projection.rb +10 -10
  15. data/lib/mailslurp_client/models/inbox_dto.rb +7 -0
  16. data/lib/mailslurp_client/models/inbox_preview.rb +5 -0
  17. data/lib/mailslurp_client/models/organization_inbox_projection.rb +4 -0
  18. data/lib/mailslurp_client/models/page_alias.rb +22 -22
  19. data/lib/mailslurp_client/models/page_attachment_entity.rb +22 -22
  20. data/lib/mailslurp_client/models/page_bounced_email.rb +22 -22
  21. data/lib/mailslurp_client/models/page_bounced_recipients.rb +22 -22
  22. data/lib/mailslurp_client/models/page_contact_projection.rb +22 -22
  23. data/lib/mailslurp_client/models/page_email_preview.rb +22 -22
  24. data/lib/mailslurp_client/models/page_email_projection.rb +22 -22
  25. data/lib/mailslurp_client/models/page_email_validation_request.rb +22 -22
  26. data/lib/mailslurp_client/models/page_expired_inbox_record_projection.rb +22 -22
  27. data/lib/mailslurp_client/models/page_group_projection.rb +22 -22
  28. data/lib/mailslurp_client/models/page_inbox_forwarder_dto.rb +22 -22
  29. data/lib/mailslurp_client/models/page_inbox_projection.rb +22 -22
  30. data/lib/mailslurp_client/models/page_inbox_ruleset_dto.rb +22 -22
  31. data/lib/mailslurp_client/models/page_missed_email_projection.rb +22 -22
  32. data/lib/mailslurp_client/models/page_organization_inbox_projection.rb +22 -22
  33. data/lib/mailslurp_client/models/page_phone_number_projection.rb +22 -22
  34. data/lib/mailslurp_client/models/page_sent_email_projection.rb +16 -16
  35. data/lib/mailslurp_client/models/page_sent_email_with_queue_projection.rb +16 -16
  36. data/lib/mailslurp_client/models/page_sms_projection.rb +22 -22
  37. data/lib/mailslurp_client/models/page_template_projection.rb +22 -22
  38. data/lib/mailslurp_client/models/page_thread_projection.rb +22 -22
  39. data/lib/mailslurp_client/models/page_tracking_pixel_projection.rb +22 -22
  40. data/lib/mailslurp_client/models/page_unknown_missed_email_projection.rb +22 -22
  41. data/lib/mailslurp_client/models/page_webhook_projection.rb +22 -22
  42. data/lib/mailslurp_client/models/page_webhook_result.rb +22 -22
  43. data/lib/mailslurp_client/models/sent_email_dto.rb +52 -1
  44. data/lib/mailslurp_client/models/sent_email_projection.rb +67 -67
  45. data/lib/mailslurp_client/models/thread_projection.rb +16 -16
  46. data/lib/mailslurp_client/models/tracking_pixel_projection.rb +19 -19
  47. data/lib/mailslurp_client/models/update_inbox_options.rb +5 -0
  48. data/lib/mailslurp_client/models/upload_attachment_options.rb +2 -0
  49. data/lib/mailslurp_client/models/webhook_dto.rb +18 -9
  50. data/lib/mailslurp_client/models/webhook_header_name_value.rb +228 -0
  51. data/lib/mailslurp_client/models/webhook_headers.rb +215 -0
  52. data/lib/mailslurp_client/version.rb +1 -1
  53. data/lib/mailslurp_client.rb +2 -0
  54. metadata +4 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0d30701e229ce040fbb75ed57e55b956f01ccbc2e5927e58b57040726745b04d
4
- data.tar.gz: 65e17380075bf80701d29a182821acaaf63f772f45c7c155106e6e6134225055
3
+ metadata.gz: 1b8e7e366076b52e650de96ef4978c5a3aa66496afc619770c3ec9729b4589eb
4
+ data.tar.gz: 8bb32eb87a3d0d93aa92862d382f1fa2ea1c62341225dfe2ce9047bae43be7aa
5
5
  SHA512:
6
- metadata.gz: 2b1886a68d0d12d9a883917f7aa63d96d706efd1b94f34ba61b42f947445cd4234955491a7b1293735c254a415914c282e401518cf600f1bb2025de9d8906946
7
- data.tar.gz: 79dfebe69b1173f17d7052bc9c9aef49cc17046b5e243a7eaea9ef33d348c80e4453d315317da649de98826e6d46a77a1c5f99159587ed51796514a2ef46844b
6
+ metadata.gz: 7847af2adeaee0f7c7f058b7364225a3455c5ad8cee0ba6bd1e79e3ea0e0b170e3d356234db273c171651e5e7a0778d29f9633112554930f66b807f3fe758eb0
7
+ data.tar.gz: cae9e3474cf492b809b9b2cfe2bce0fe98e05939b9cccad3832513a52e7981f69c3386ac52f75892974f7443247d84875d6137278fd75663c85e5ed7a7ea0150
@@ -19,6 +19,110 @@ module MailSlurpClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # @param [Hash] opts the optional parameters
23
+ # @return [String]
24
+ def get_smtp_password(opts = {})
25
+ data, _status_code, _headers = get_smtp_password_with_http_info(opts)
26
+ data
27
+ end
28
+
29
+ # @param [Hash] opts the optional parameters
30
+ # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
31
+ def get_smtp_password_with_http_info(opts = {})
32
+ if @api_client.config.debugging
33
+ @api_client.config.logger.debug 'Calling API: ApiUserControllerApi.get_smtp_password ...'
34
+ end
35
+ # resource path
36
+ local_var_path = '/user/smtp/password'
37
+
38
+ # query parameters
39
+ query_params = opts[:query_params] || {}
40
+
41
+ # header parameters
42
+ header_params = opts[:header_params] || {}
43
+ # HTTP header 'Accept' (if needed)
44
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
45
+
46
+ # form parameters
47
+ form_params = opts[:form_params] || {}
48
+
49
+ # http body (model)
50
+ post_body = opts[:body]
51
+
52
+ # return_type
53
+ return_type = opts[:return_type] || 'String'
54
+
55
+ # auth_names
56
+ auth_names = opts[:auth_names] || ['API_KEY']
57
+
58
+ new_options = opts.merge(
59
+ :header_params => header_params,
60
+ :query_params => query_params,
61
+ :form_params => form_params,
62
+ :body => post_body,
63
+ :auth_names => auth_names,
64
+ :return_type => return_type
65
+ )
66
+
67
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
68
+ if @api_client.config.debugging
69
+ @api_client.config.logger.debug "API called: ApiUserControllerApi#get_smtp_password\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
70
+ end
71
+ return data, status_code, headers
72
+ end
73
+
74
+ # @param [Hash] opts the optional parameters
75
+ # @return [String]
76
+ def get_smtp_username(opts = {})
77
+ data, _status_code, _headers = get_smtp_username_with_http_info(opts)
78
+ data
79
+ end
80
+
81
+ # @param [Hash] opts the optional parameters
82
+ # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
83
+ def get_smtp_username_with_http_info(opts = {})
84
+ if @api_client.config.debugging
85
+ @api_client.config.logger.debug 'Calling API: ApiUserControllerApi.get_smtp_username ...'
86
+ end
87
+ # resource path
88
+ local_var_path = '/user/smtp/username'
89
+
90
+ # query parameters
91
+ query_params = opts[:query_params] || {}
92
+
93
+ # header parameters
94
+ header_params = opts[:header_params] || {}
95
+ # HTTP header 'Accept' (if needed)
96
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
97
+
98
+ # form parameters
99
+ form_params = opts[:form_params] || {}
100
+
101
+ # http body (model)
102
+ post_body = opts[:body]
103
+
104
+ # return_type
105
+ return_type = opts[:return_type] || 'String'
106
+
107
+ # auth_names
108
+ auth_names = opts[:auth_names] || ['API_KEY']
109
+
110
+ new_options = opts.merge(
111
+ :header_params => header_params,
112
+ :query_params => query_params,
113
+ :form_params => form_params,
114
+ :body => post_body,
115
+ :auth_names => auth_names,
116
+ :return_type => return_type
117
+ )
118
+
119
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
120
+ if @api_client.config.debugging
121
+ @api_client.config.logger.debug "API called: ApiUserControllerApi#get_smtp_username\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
122
+ end
123
+ return data, status_code, headers
124
+ end
125
+
22
126
  # @param [Hash] opts the optional parameters
23
127
  # @return [UserInfoDto]
24
128
  def get_user_info(opts = {})
@@ -1648,6 +1648,74 @@ module MailSlurpClient
1648
1648
  return data, status_code, headers
1649
1649
  end
1650
1650
 
1651
+ # Update a webhook request headers
1652
+ # @param webhook_id [String]
1653
+ # @param webhook_headers [WebhookHeaders]
1654
+ # @param [Hash] opts the optional parameters
1655
+ # @return [WebhookDto]
1656
+ def update_webhook_headers(webhook_id, webhook_headers, opts = {})
1657
+ data, _status_code, _headers = update_webhook_headers_with_http_info(webhook_id, webhook_headers, opts)
1658
+ data
1659
+ end
1660
+
1661
+ # Update a webhook request headers
1662
+ # @param webhook_id [String]
1663
+ # @param webhook_headers [WebhookHeaders]
1664
+ # @param [Hash] opts the optional parameters
1665
+ # @return [Array<(WebhookDto, Integer, Hash)>] WebhookDto data, response status code and response headers
1666
+ def update_webhook_headers_with_http_info(webhook_id, webhook_headers, opts = {})
1667
+ if @api_client.config.debugging
1668
+ @api_client.config.logger.debug 'Calling API: WebhookControllerApi.update_webhook_headers ...'
1669
+ end
1670
+ # verify the required parameter 'webhook_id' is set
1671
+ if @api_client.config.client_side_validation && webhook_id.nil?
1672
+ fail ArgumentError, "Missing the required parameter 'webhook_id' when calling WebhookControllerApi.update_webhook_headers"
1673
+ end
1674
+ # verify the required parameter 'webhook_headers' is set
1675
+ if @api_client.config.client_side_validation && webhook_headers.nil?
1676
+ fail ArgumentError, "Missing the required parameter 'webhook_headers' when calling WebhookControllerApi.update_webhook_headers"
1677
+ end
1678
+ # resource path
1679
+ local_var_path = '/webhooks/{webhookId}/headers'.sub('{' + 'webhookId' + '}', CGI.escape(webhook_id.to_s))
1680
+
1681
+ # query parameters
1682
+ query_params = opts[:query_params] || {}
1683
+
1684
+ # header parameters
1685
+ header_params = opts[:header_params] || {}
1686
+ # HTTP header 'Accept' (if needed)
1687
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1688
+ # HTTP header 'Content-Type'
1689
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1690
+
1691
+ # form parameters
1692
+ form_params = opts[:form_params] || {}
1693
+
1694
+ # http body (model)
1695
+ post_body = opts[:body] || @api_client.object_to_http_body(webhook_headers)
1696
+
1697
+ # return_type
1698
+ return_type = opts[:return_type] || 'WebhookDto'
1699
+
1700
+ # auth_names
1701
+ auth_names = opts[:auth_names] || ['API_KEY']
1702
+
1703
+ new_options = opts.merge(
1704
+ :header_params => header_params,
1705
+ :query_params => query_params,
1706
+ :form_params => form_params,
1707
+ :body => post_body,
1708
+ :auth_names => auth_names,
1709
+ :return_type => return_type
1710
+ )
1711
+
1712
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1713
+ if @api_client.config.debugging
1714
+ @api_client.config.logger.debug "API called: WebhookControllerApi#update_webhook_headers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1715
+ end
1716
+ return data, status_code, headers
1717
+ end
1718
+
1651
1719
  # Verify a webhook payload signature
1652
1720
  # Verify a webhook payload using the messageId and signature. This allows you to be sure that MailSlurp sent the payload and not another server.
1653
1721
  # @param verify_webhook_signature_options [VerifyWebhookSignatureOptions]
@@ -19,12 +19,12 @@ module MailSlurpClient
19
19
 
20
20
  attr_accessor :id
21
21
 
22
+ attr_accessor :inbox_id
23
+
22
24
  attr_accessor :user_id
23
25
 
24
26
  attr_accessor :email_address
25
27
 
26
- attr_accessor :inbox_id
27
-
28
28
  attr_accessor :created_at
29
29
 
30
30
  attr_accessor :updated_at
@@ -36,9 +36,9 @@ module MailSlurpClient
36
36
  {
37
37
  :'name' => :'name',
38
38
  :'id' => :'id',
39
+ :'inbox_id' => :'inboxId',
39
40
  :'user_id' => :'userId',
40
41
  :'email_address' => :'emailAddress',
41
- :'inbox_id' => :'inboxId',
42
42
  :'created_at' => :'createdAt',
43
43
  :'updated_at' => :'updatedAt',
44
44
  :'use_threads' => :'useThreads'
@@ -50,9 +50,9 @@ module MailSlurpClient
50
50
  {
51
51
  :'name' => :'String',
52
52
  :'id' => :'String',
53
+ :'inbox_id' => :'String',
53
54
  :'user_id' => :'String',
54
55
  :'email_address' => :'String',
55
- :'inbox_id' => :'String',
56
56
  :'created_at' => :'DateTime',
57
57
  :'updated_at' => :'DateTime',
58
58
  :'use_threads' => :'Boolean'
@@ -88,6 +88,10 @@ module MailSlurpClient
88
88
  self.id = attributes[:'id']
89
89
  end
90
90
 
91
+ if attributes.key?(:'inbox_id')
92
+ self.inbox_id = attributes[:'inbox_id']
93
+ end
94
+
91
95
  if attributes.key?(:'user_id')
92
96
  self.user_id = attributes[:'user_id']
93
97
  end
@@ -96,10 +100,6 @@ module MailSlurpClient
96
100
  self.email_address = attributes[:'email_address']
97
101
  end
98
102
 
99
- if attributes.key?(:'inbox_id')
100
- self.inbox_id = attributes[:'inbox_id']
101
- end
102
-
103
103
  if attributes.key?(:'created_at')
104
104
  self.created_at = attributes[:'created_at']
105
105
  end
@@ -121,6 +121,10 @@ module MailSlurpClient
121
121
  invalid_properties.push('invalid value for "id", id cannot be nil.')
122
122
  end
123
123
 
124
+ if @inbox_id.nil?
125
+ invalid_properties.push('invalid value for "inbox_id", inbox_id cannot be nil.')
126
+ end
127
+
124
128
  if @user_id.nil?
125
129
  invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
126
130
  end
@@ -129,10 +133,6 @@ module MailSlurpClient
129
133
  invalid_properties.push('invalid value for "email_address", email_address cannot be nil.')
130
134
  end
131
135
 
132
- if @inbox_id.nil?
133
- invalid_properties.push('invalid value for "inbox_id", inbox_id cannot be nil.')
134
- end
135
-
136
136
  if @created_at.nil?
137
137
  invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
138
138
  end
@@ -148,9 +148,9 @@ module MailSlurpClient
148
148
  # @return true if the model is valid
149
149
  def valid?
150
150
  return false if @id.nil?
151
+ return false if @inbox_id.nil?
151
152
  return false if @user_id.nil?
152
153
  return false if @email_address.nil?
153
- return false if @inbox_id.nil?
154
154
  return false if @created_at.nil?
155
155
  return false if @updated_at.nil?
156
156
  true
@@ -163,9 +163,9 @@ module MailSlurpClient
163
163
  self.class == o.class &&
164
164
  name == o.name &&
165
165
  id == o.id &&
166
+ inbox_id == o.inbox_id &&
166
167
  user_id == o.user_id &&
167
168
  email_address == o.email_address &&
168
- inbox_id == o.inbox_id &&
169
169
  created_at == o.created_at &&
170
170
  updated_at == o.updated_at &&
171
171
  use_threads == o.use_threads
@@ -180,7 +180,7 @@ module MailSlurpClient
180
180
  # Calculates hash code according to all attributes.
181
181
  # @return [Integer] Hash code
182
182
  def hash
183
- [name, id, user_id, email_address, inbox_id, created_at, updated_at, use_threads].hash
183
+ [name, id, inbox_id, user_id, email_address, created_at, updated_at, use_threads].hash
184
184
  end
185
185
 
186
186
  # Builds the object from hash
@@ -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,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
@@ -66,6 +66,13 @@ module MailSlurpClient
66
66
  # List of attributes with nullable: true
67
67
  def self.openapi_nullable
68
68
  Set.new([
69
+ :'first_name',
70
+ :'last_name',
71
+ :'company',
72
+ :'email_addresses',
73
+ :'tags',
74
+ :'opt_out',
75
+ :'group_id'
69
76
  ])
70
77
  end
71
78
 
@@ -72,6 +72,9 @@ module MailSlurpClient
72
72
  # List of attributes with nullable: true
73
73
  def self.openapi_nullable
74
74
  Set.new([
75
+ :'description',
76
+ :'created_catch_all_inbox',
77
+ :'domain_type'
75
78
  ])
76
79
  end
77
80
 
@@ -107,6 +107,16 @@ module MailSlurpClient
107
107
  # List of attributes with nullable: true
108
108
  def self.openapi_nullable
109
109
  Set.new([
110
+ :'name',
111
+ :'description',
112
+ :'use_domain_pool',
113
+ :'tags',
114
+ :'expires_at',
115
+ :'favourite',
116
+ :'expires_in',
117
+ :'allow_team_access',
118
+ :'inbox_type',
119
+ :'virtual_inbox'
110
120
  ])
111
121
  end
112
122
 
@@ -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,9 +23,11 @@ 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
+ attr_accessor :include_headers
30
+
29
31
  class EnumAttributeValidator
30
32
  attr_reader :datatype
31
33
  attr_reader :allowable_values
@@ -54,7 +56,8 @@ module MailSlurpClient
54
56
  :'url' => :'url',
55
57
  :'basic_auth' => :'basicAuth',
56
58
  :'name' => :'name',
57
- :'event_name' => :'eventName'
59
+ :'event_name' => :'eventName',
60
+ :'include_headers' => :'includeHeaders'
58
61
  }
59
62
  end
60
63
 
@@ -64,13 +67,15 @@ module MailSlurpClient
64
67
  :'url' => :'String',
65
68
  :'basic_auth' => :'BasicAuthOptions',
66
69
  :'name' => :'String',
67
- :'event_name' => :'String'
70
+ :'event_name' => :'String',
71
+ :'include_headers' => :'WebhookHeaders'
68
72
  }
69
73
  end
70
74
 
71
75
  # List of attributes with nullable: true
72
76
  def self.openapi_nullable
73
77
  Set.new([
78
+ :'basic_auth',
74
79
  ])
75
80
  end
76
81
 
@@ -104,6 +109,10 @@ module MailSlurpClient
104
109
  if attributes.key?(:'event_name')
105
110
  self.event_name = attributes[:'event_name']
106
111
  end
112
+
113
+ if attributes.key?(:'include_headers')
114
+ self.include_headers = attributes[:'include_headers']
115
+ end
107
116
  end
108
117
 
109
118
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -114,6 +123,10 @@ module MailSlurpClient
114
123
  invalid_properties.push('invalid value for "url", url cannot be nil.')
115
124
  end
116
125
 
126
+ if @event_name.nil?
127
+ invalid_properties.push('invalid value for "event_name", event_name cannot be nil.')
128
+ end
129
+
117
130
  invalid_properties
118
131
  end
119
132
 
@@ -121,6 +134,7 @@ module MailSlurpClient
121
134
  # @return true if the model is valid
122
135
  def valid?
123
136
  return false if @url.nil?
137
+ return false if @event_name.nil?
124
138
  event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"])
125
139
  return false unless event_name_validator.valid?(@event_name)
126
140
  true
@@ -144,7 +158,8 @@ module MailSlurpClient
144
158
  url == o.url &&
145
159
  basic_auth == o.basic_auth &&
146
160
  name == o.name &&
147
- event_name == o.event_name
161
+ event_name == o.event_name &&
162
+ include_headers == o.include_headers
148
163
  end
149
164
 
150
165
  # @see the `==` method
@@ -156,7 +171,7 @@ module MailSlurpClient
156
171
  # Calculates hash code according to all attributes.
157
172
  # @return [Integer] Hash code
158
173
  def hash
159
- [url, basic_auth, name, event_name].hash
174
+ [url, basic_auth, name, event_name, include_headers].hash
160
175
  end
161
176
 
162
177
  # Builds the object from hash
@@ -146,6 +146,21 @@ module MailSlurpClient
146
146
  # List of attributes with nullable: true
147
147
  def self.openapi_nullable
148
148
  Set.new([
149
+ :'from',
150
+ :'sender',
151
+ :'recipients',
152
+ :'reply_to',
153
+ :'cc',
154
+ :'bcc',
155
+ :'headers',
156
+ :'attachments',
157
+ :'subject',
158
+ :'body',
159
+ :'body_excerpt',
160
+ :'body_md5_hash',
161
+ :'is_html',
162
+ :'charset',
163
+ :'analysis',
149
164
  ])
150
165
  end
151
166
 
@@ -55,6 +55,11 @@ module MailSlurpClient
55
55
  # List of attributes with nullable: true
56
56
  def self.openapi_nullable
57
57
  Set.new([
58
+ :'spam_verdict',
59
+ :'virus_verdict',
60
+ :'spf_verdict',
61
+ :'dkim_verdict',
62
+ :'dmarc_verdict'
58
63
  ])
59
64
  end
60
65