mailslurp_client 15.7.15 → 15.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mailslurp_client/api/attachment_controller_api.rb +9 -9
  3. data/lib/mailslurp_client/api/common_actions_controller_api.rb +6 -0
  4. data/lib/mailslurp_client/api/email_controller_api.rb +3 -0
  5. data/lib/mailslurp_client/api/inbox_controller_api.rb +5 -2
  6. data/lib/mailslurp_client/api/template_controller_api.rb +28 -16
  7. data/lib/mailslurp_client/api/webhook_controller_api.rb +68 -10
  8. data/lib/mailslurp_client/models/abstract_webhook_payload.rb +15 -15
  9. data/lib/mailslurp_client/models/alias_projection.rb +27 -27
  10. data/lib/mailslurp_client/models/attachment_projection.rb +22 -22
  11. data/lib/mailslurp_client/models/contact_projection.rb +14 -13
  12. data/lib/mailslurp_client/models/create_inbox_dto.rb +14 -4
  13. data/lib/mailslurp_client/models/create_template_options.rb +3 -1
  14. data/lib/mailslurp_client/models/email.rb +13 -4
  15. data/lib/mailslurp_client/models/email_projection.rb +35 -35
  16. data/lib/mailslurp_client/models/flush_expired_inboxes_result.rb +2 -0
  17. data/lib/mailslurp_client/models/group_dto.rb +1 -0
  18. data/lib/mailslurp_client/models/inbox_dto.rb +19 -4
  19. data/lib/mailslurp_client/models/inbox_forwarder_test_options.rb +1 -0
  20. data/lib/mailslurp_client/models/inbox_preview.rb +11 -1
  21. data/lib/mailslurp_client/models/inline_object1.rb +270 -0
  22. data/lib/mailslurp_client/models/organization_inbox_projection.rb +14 -4
  23. data/lib/mailslurp_client/models/page_alias.rb +19 -19
  24. data/lib/mailslurp_client/models/page_attachment_entity.rb +19 -19
  25. data/lib/mailslurp_client/models/page_bounced_email.rb +19 -19
  26. data/lib/mailslurp_client/models/page_bounced_recipients.rb +19 -19
  27. data/lib/mailslurp_client/models/page_contact_projection.rb +19 -19
  28. data/lib/mailslurp_client/models/page_email_preview.rb +19 -19
  29. data/lib/mailslurp_client/models/page_email_projection.rb +19 -19
  30. data/lib/mailslurp_client/models/page_email_validation_request.rb +19 -19
  31. data/lib/mailslurp_client/models/page_expired_inbox_record_projection.rb +19 -19
  32. data/lib/mailslurp_client/models/page_group_projection.rb +19 -19
  33. data/lib/mailslurp_client/models/page_inbox_forwarder_dto.rb +19 -19
  34. data/lib/mailslurp_client/models/page_inbox_projection.rb +19 -19
  35. data/lib/mailslurp_client/models/page_inbox_ruleset_dto.rb +19 -19
  36. data/lib/mailslurp_client/models/page_missed_email_projection.rb +19 -19
  37. data/lib/mailslurp_client/models/page_organization_inbox_projection.rb +19 -19
  38. data/lib/mailslurp_client/models/page_template_projection.rb +19 -19
  39. data/lib/mailslurp_client/models/page_thread_projection.rb +19 -19
  40. data/lib/mailslurp_client/models/page_tracking_pixel_projection.rb +19 -19
  41. data/lib/mailslurp_client/models/page_unknown_missed_email_projection.rb +19 -19
  42. data/lib/mailslurp_client/models/page_webhook_projection.rb +19 -19
  43. data/lib/mailslurp_client/models/page_webhook_result.rb +19 -19
  44. data/lib/mailslurp_client/models/reply_to_alias_email_options.rb +13 -4
  45. data/lib/mailslurp_client/models/reply_to_email_options.rb +13 -4
  46. data/lib/mailslurp_client/models/sent_email_dto.rb +22 -4
  47. data/lib/mailslurp_client/models/sent_email_projection.rb +41 -32
  48. data/lib/mailslurp_client/models/template_dto.rb +5 -0
  49. data/lib/mailslurp_client/models/template_projection.rb +18 -18
  50. data/lib/mailslurp_client/models/template_variable.rb +2 -0
  51. data/lib/mailslurp_client/models/thread_projection.rb +49 -38
  52. data/lib/mailslurp_client/models/tracking_pixel_projection.rb +10 -10
  53. data/lib/mailslurp_client/models/validate_email_address_list_options.rb +1 -0
  54. data/lib/mailslurp_client/models/verify_webhook_signature_options.rb +225 -0
  55. data/lib/mailslurp_client/models/verify_webhook_signature_results.rb +211 -0
  56. data/lib/mailslurp_client/models/webhook_projection.rb +18 -18
  57. data/lib/mailslurp_client/version.rb +1 -1
  58. data/lib/mailslurp_client.rb +3 -0
  59. metadata +5 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 228705b59c20fd53fa607206ff7fa940cc9415046cbf427f5945dc48d40d146a
4
- data.tar.gz: 9625c66adc08d5e5b2df2bf1133c70a590d8778d1686d77a4056737ee9e907bb
3
+ metadata.gz: 0cd94528b624d05b2418a77d42dda159fb84dd1190ad634ee0a0a26727815476
4
+ data.tar.gz: fb9d8fe02d0fd089bcb14f288182122f52ae85f9426432fd08301255c1f9cd13
5
5
  SHA512:
6
- metadata.gz: 547555cfcff62c42067f3e845c3f8037f506f715e4b014d7a8116cfa90280f857926cfcb4ee75d42d7a2e42f1afbb3adbd6a67d096725063c308b489e173d6e2
7
- data.tar.gz: d4ed561778340b979dcca59fed8ea9f4e1b2a7ff760fb7431b3111eccdf6a4042769852bf1097f8196ae5f9089534a9520e76857ea0f95b830ca0378e78c48de
6
+ metadata.gz: 5eac32cda727ea19453a202f6a8030b215f1bd899f76e4e4a8e0abb20837d73961cc55b6ddec1ad3ca039e81d815c651fba39282a188283056c7bd0dd35fdad1
7
+ data.tar.gz: 2a286f8a8426ba315c3a16aa7b4c70928c5daeff1af918eb461059f85d81a7d580518d8cb5ab1c928eda9cb7d85aa53a665bb236594ae643a9021d7515be7e8a
@@ -516,29 +516,29 @@ module MailSlurpClient
516
516
  end
517
517
 
518
518
  # Upload an attachment for sending using file byte stream input octet stream. Returns an array whose first element is the ID of the uploaded attachment.
519
- # @param request_body [Array<String>]
519
+ # @param inline_object1 [InlineObject1]
520
520
  # @param [Hash] opts the optional parameters
521
521
  # @option opts [String] :content_type Optional contentType for file. For instance &#x60;application/pdf&#x60;
522
522
  # @option opts [String] :filename Optional filename to save upload with
523
523
  # @return [Array<String>]
524
- def upload_attachment_bytes(request_body, opts = {})
525
- data, _status_code, _headers = upload_attachment_bytes_with_http_info(request_body, opts)
524
+ def upload_attachment_bytes(inline_object1, opts = {})
525
+ data, _status_code, _headers = upload_attachment_bytes_with_http_info(inline_object1, opts)
526
526
  data
527
527
  end
528
528
 
529
529
  # Upload an attachment for sending using file byte stream input octet stream. Returns an array whose first element is the ID of the uploaded attachment.
530
- # @param request_body [Array<String>]
530
+ # @param inline_object1 [InlineObject1]
531
531
  # @param [Hash] opts the optional parameters
532
532
  # @option opts [String] :content_type Optional contentType for file. For instance &#x60;application/pdf&#x60;
533
533
  # @option opts [String] :filename Optional filename to save upload with
534
534
  # @return [Array<(Array<String>, Integer, Hash)>] Array<String> data, response status code and response headers
535
- def upload_attachment_bytes_with_http_info(request_body, opts = {})
535
+ def upload_attachment_bytes_with_http_info(inline_object1, opts = {})
536
536
  if @api_client.config.debugging
537
537
  @api_client.config.logger.debug 'Calling API: AttachmentControllerApi.upload_attachment_bytes ...'
538
538
  end
539
- # verify the required parameter 'request_body' is set
540
- if @api_client.config.client_side_validation && request_body.nil?
541
- fail ArgumentError, "Missing the required parameter 'request_body' when calling AttachmentControllerApi.upload_attachment_bytes"
539
+ # verify the required parameter 'inline_object1' is set
540
+ if @api_client.config.client_side_validation && inline_object1.nil?
541
+ fail ArgumentError, "Missing the required parameter 'inline_object1' when calling AttachmentControllerApi.upload_attachment_bytes"
542
542
  end
543
543
  # resource path
544
544
  local_var_path = '/attachments/bytes'
@@ -559,7 +559,7 @@ module MailSlurpClient
559
559
  form_params = opts[:form_params] || {}
560
560
 
561
561
  # http body (model)
562
- post_body = opts[:body] || @api_client.object_to_http_body(request_body)
562
+ post_body = opts[:body] || @api_client.object_to_http_body(inline_object1)
563
563
 
564
564
  # return_type
565
565
  return_type = opts[:return_type] || 'Array<String>'
@@ -32,6 +32,7 @@ module MailSlurpClient
32
32
  # @option opts [String] :name
33
33
  # @option opts [Array<String>] :tags
34
34
  # @option opts [Boolean] :favourite
35
+ # @option opts [Boolean] :virtual_inbox
35
36
  # @return [InboxDto]
36
37
  def create_new_email_address(opts = {})
37
38
  data, _status_code, _headers = create_new_email_address_with_http_info(opts)
@@ -51,6 +52,7 @@ module MailSlurpClient
51
52
  # @option opts [String] :name
52
53
  # @option opts [Array<String>] :tags
53
54
  # @option opts [Boolean] :favourite
55
+ # @option opts [Boolean] :virtual_inbox
54
56
  # @return [Array<(InboxDto, Integer, Hash)>] InboxDto data, response status code and response headers
55
57
  def create_new_email_address_with_http_info(opts = {})
56
58
  if @api_client.config.debugging
@@ -75,6 +77,7 @@ module MailSlurpClient
75
77
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
76
78
  query_params[:'tags'] = @api_client.build_collection_param(opts[:'tags'], :multi) if !opts[:'tags'].nil?
77
79
  query_params[:'favourite'] = opts[:'favourite'] if !opts[:'favourite'].nil?
80
+ query_params[:'virtualInbox'] = opts[:'virtual_inbox'] if !opts[:'virtual_inbox'].nil?
78
81
 
79
82
  # header parameters
80
83
  header_params = opts[:header_params] || {}
@@ -122,6 +125,7 @@ module MailSlurpClient
122
125
  # @option opts [String] :name
123
126
  # @option opts [Array<String>] :tags
124
127
  # @option opts [Boolean] :favourite
128
+ # @option opts [Boolean] :virtual_inbox
125
129
  # @return [InboxDto]
126
130
  def create_random_inbox(opts = {})
127
131
  data, _status_code, _headers = create_random_inbox_with_http_info(opts)
@@ -141,6 +145,7 @@ module MailSlurpClient
141
145
  # @option opts [String] :name
142
146
  # @option opts [Array<String>] :tags
143
147
  # @option opts [Boolean] :favourite
148
+ # @option opts [Boolean] :virtual_inbox
144
149
  # @return [Array<(InboxDto, Integer, Hash)>] InboxDto data, response status code and response headers
145
150
  def create_random_inbox_with_http_info(opts = {})
146
151
  if @api_client.config.debugging
@@ -165,6 +170,7 @@ module MailSlurpClient
165
170
  query_params[:'name'] = opts[:'name'] if !opts[:'name'].nil?
166
171
  query_params[:'tags'] = @api_client.build_collection_param(opts[:'tags'], :multi) if !opts[:'tags'].nil?
167
172
  query_params[:'favourite'] = opts[:'favourite'] if !opts[:'favourite'].nil?
173
+ query_params[:'virtualInbox'] = opts[:'virtual_inbox'] if !opts[:'virtual_inbox'].nil?
168
174
 
169
175
  # header parameters
170
176
  header_params = opts[:header_params] || {}
@@ -1864,6 +1864,7 @@ module MailSlurpClient
1864
1864
  # @param send_email_options [SendEmailOptions]
1865
1865
  # @param [Hash] opts the optional parameters
1866
1866
  # @option opts [Boolean] :use_domain_pool Use domain pool. Optionally create inbox to send from using the mailslurp domain pool.
1867
+ # @option opts [Boolean] :virtual_send Optionally create inbox to send from that is a virtual inbox and won&#39;t send to external addresses
1867
1868
  # @return [nil]
1868
1869
  def send_email_source_optional(inbox_id, send_email_options, opts = {})
1869
1870
  send_email_source_optional_with_http_info(inbox_id, send_email_options, opts)
@@ -1876,6 +1877,7 @@ module MailSlurpClient
1876
1877
  # @param send_email_options [SendEmailOptions]
1877
1878
  # @param [Hash] opts the optional parameters
1878
1879
  # @option opts [Boolean] :use_domain_pool Use domain pool. Optionally create inbox to send from using the mailslurp domain pool.
1880
+ # @option opts [Boolean] :virtual_send Optionally create inbox to send from that is a virtual inbox and won&#39;t send to external addresses
1879
1881
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1880
1882
  def send_email_source_optional_with_http_info(inbox_id, send_email_options, opts = {})
1881
1883
  if @api_client.config.debugging
@@ -1895,6 +1897,7 @@ module MailSlurpClient
1895
1897
  # query parameters
1896
1898
  query_params = opts[:query_params] || {}
1897
1899
  query_params[:'useDomainPool'] = opts[:'use_domain_pool'] if !opts[:'use_domain_pool'].nil?
1900
+ query_params[:'virtualSend'] = opts[:'virtual_send'] if !opts[:'virtual_send'].nil?
1898
1901
 
1899
1902
  # header parameters
1900
1903
  header_params = opts[:header_params] || {}
@@ -32,6 +32,7 @@ module MailSlurpClient
32
32
  # @option opts [Integer] :expires_in Number of milliseconds that inbox should exist for
33
33
  # @option opts [Boolean] :allow_team_access DEPRECATED (team access is always true). Grant team access to this inbox and the emails that belong to it for team members of your organization.
34
34
  # @option opts [String] :inbox_type HTTP (default) or SMTP inbox type. HTTP inboxes are default and best solution for most cases. SMTP inboxes are more reliable for public inbound email consumption (but do not support sending emails). When using custom domains the domain type must match the inbox type. HTTP inboxes are processed by AWS SES while SMTP inboxes use a custom mail server running at &#x60;mx.mailslurp.com&#x60;.
35
+ # @option opts [Boolean] :virtual_inbox Virtual inbox prevents any outbound emails from being sent. It creates sent email records but will never send real emails to recipients. Great for testing and faking email sending.
35
36
  # @return [InboxDto]
36
37
  def create_inbox(opts = {})
37
38
  data, _status_code, _headers = create_inbox_with_http_info(opts)
@@ -51,6 +52,7 @@ module MailSlurpClient
51
52
  # @option opts [Integer] :expires_in Number of milliseconds that inbox should exist for
52
53
  # @option opts [Boolean] :allow_team_access DEPRECATED (team access is always true). Grant team access to this inbox and the emails that belong to it for team members of your organization.
53
54
  # @option opts [String] :inbox_type HTTP (default) or SMTP inbox type. HTTP inboxes are default and best solution for most cases. SMTP inboxes are more reliable for public inbound email consumption (but do not support sending emails). When using custom domains the domain type must match the inbox type. HTTP inboxes are processed by AWS SES while SMTP inboxes use a custom mail server running at &#x60;mx.mailslurp.com&#x60;.
55
+ # @option opts [Boolean] :virtual_inbox Virtual inbox prevents any outbound emails from being sent. It creates sent email records but will never send real emails to recipients. Great for testing and faking email sending.
54
56
  # @return [Array<(InboxDto, Integer, Hash)>] InboxDto data, response status code and response headers
55
57
  def create_inbox_with_http_info(opts = {})
56
58
  if @api_client.config.debugging
@@ -75,6 +77,7 @@ module MailSlurpClient
75
77
  query_params[:'expiresIn'] = opts[:'expires_in'] if !opts[:'expires_in'].nil?
76
78
  query_params[:'allowTeamAccess'] = opts[:'allow_team_access'] if !opts[:'allow_team_access'].nil?
77
79
  query_params[:'inboxType'] = opts[:'inbox_type'] if !opts[:'inbox_type'].nil?
80
+ query_params[:'virtualInbox'] = opts[:'virtual_inbox'] if !opts[:'virtual_inbox'].nil?
78
81
 
79
82
  # header parameters
80
83
  header_params = opts[:header_params] || {}
@@ -2016,7 +2019,7 @@ module MailSlurpClient
2016
2019
 
2017
2020
  # Set inbox favourited state
2018
2021
  # Set and return new favourite state for an inbox
2019
- # @param inbox_id [String]
2022
+ # @param inbox_id [String] ID of inbox to set favourite state
2020
2023
  # @param set_inbox_favourited_options [SetInboxFavouritedOptions]
2021
2024
  # @param [Hash] opts the optional parameters
2022
2025
  # @return [InboxDto]
@@ -2027,7 +2030,7 @@ module MailSlurpClient
2027
2030
 
2028
2031
  # Set inbox favourited state
2029
2032
  # Set and return new favourite state for an inbox
2030
- # @param inbox_id [String]
2033
+ # @param inbox_id [String] ID of inbox to set favourite state
2031
2034
  # @param set_inbox_favourited_options [SetInboxFavouritedOptions]
2032
2035
  # @param [Hash] opts the optional parameters
2033
2036
  # @return [Array<(InboxDto, Integer, Hash)>] InboxDto data, response status code and response headers
@@ -20,6 +20,7 @@ module MailSlurpClient
20
20
  @api_client = api_client
21
21
  end
22
22
  # Create a Template
23
+ # Create an email template with variables for use with templated transactional emails.
23
24
  # @param create_template_options [CreateTemplateOptions]
24
25
  # @param [Hash] opts the optional parameters
25
26
  # @return [TemplateDto]
@@ -29,6 +30,7 @@ module MailSlurpClient
29
30
  end
30
31
 
31
32
  # Create a Template
33
+ # Create an email template with variables for use with templated transactional emails.
32
34
  # @param create_template_options [CreateTemplateOptions]
33
35
  # @param [Hash] opts the optional parameters
34
36
  # @return [Array<(TemplateDto, Integer, Hash)>] TemplateDto data, response status code and response headers
@@ -81,8 +83,9 @@ module MailSlurpClient
81
83
  return data, status_code, headers
82
84
  end
83
85
 
84
- # Delete Template
85
- # @param template_id [String]
86
+ # Delete email template
87
+ # Delete template
88
+ # @param template_id [String] Template ID
86
89
  # @param [Hash] opts the optional parameters
87
90
  # @return [nil]
88
91
  def delete_template(template_id, opts = {})
@@ -90,8 +93,9 @@ module MailSlurpClient
90
93
  nil
91
94
  end
92
95
 
93
- # Delete Template
94
- # @param template_id [String]
96
+ # Delete email template
97
+ # Delete template
98
+ # @param template_id [String] Template ID
95
99
  # @param [Hash] opts the optional parameters
96
100
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
97
101
  def delete_template_with_http_info(template_id, opts = {})
@@ -139,7 +143,8 @@ module MailSlurpClient
139
143
  return data, status_code, headers
140
144
  end
141
145
 
142
- # Get all Templates in paginated format
146
+ # List templates
147
+ # Get all templates in paginated format
143
148
  # @param [Hash] opts the optional parameters
144
149
  # @option opts [Integer] :page Optional page index in list pagination (default to 0)
145
150
  # @option opts [Integer] :size Optional page size in list pagination (default to 20)
@@ -152,7 +157,8 @@ module MailSlurpClient
152
157
  data
153
158
  end
154
159
 
155
- # Get all Templates in paginated format
160
+ # List templates
161
+ # Get all templates in paginated format
156
162
  # @param [Hash] opts the optional parameters
157
163
  # @option opts [Integer] :page Optional page index in list pagination
158
164
  # @option opts [Integer] :size Optional page size in list pagination
@@ -212,8 +218,9 @@ module MailSlurpClient
212
218
  return data, status_code, headers
213
219
  end
214
220
 
215
- # Get Template
216
- # @param template_id [String]
221
+ # Get template
222
+ # Get email template
223
+ # @param template_id [String] Template ID
217
224
  # @param [Hash] opts the optional parameters
218
225
  # @return [TemplateDto]
219
226
  def get_template(template_id, opts = {})
@@ -221,8 +228,9 @@ module MailSlurpClient
221
228
  data
222
229
  end
223
230
 
224
- # Get Template
225
- # @param template_id [String]
231
+ # Get template
232
+ # Get email template
233
+ # @param template_id [String] Template ID
226
234
  # @param [Hash] opts the optional parameters
227
235
  # @return [Array<(TemplateDto, Integer, Hash)>] TemplateDto data, response status code and response headers
228
236
  def get_template_with_http_info(template_id, opts = {})
@@ -272,7 +280,8 @@ module MailSlurpClient
272
280
  return data, status_code, headers
273
281
  end
274
282
 
275
- # Get all Templates
283
+ # List templates
284
+ # Get all templates
276
285
  # @param [Hash] opts the optional parameters
277
286
  # @return [Array<TemplateProjection>]
278
287
  def get_templates(opts = {})
@@ -280,7 +289,8 @@ module MailSlurpClient
280
289
  data
281
290
  end
282
291
 
283
- # Get all Templates
292
+ # List templates
293
+ # Get all templates
284
294
  # @param [Hash] opts the optional parameters
285
295
  # @return [Array<(Array<TemplateProjection>, Integer, Hash)>] Array<TemplateProjection> data, response status code and response headers
286
296
  def get_templates_with_http_info(opts = {})
@@ -326,8 +336,9 @@ module MailSlurpClient
326
336
  return data, status_code, headers
327
337
  end
328
338
 
329
- # Update a Template
330
- # @param template_id [String]
339
+ # Update template
340
+ # Update email template
341
+ # @param template_id [String] Template ID
331
342
  # @param create_template_options [CreateTemplateOptions]
332
343
  # @param [Hash] opts the optional parameters
333
344
  # @return [TemplateDto]
@@ -336,8 +347,9 @@ module MailSlurpClient
336
347
  data
337
348
  end
338
349
 
339
- # Update a Template
340
- # @param template_id [String]
350
+ # Update template
351
+ # Update email template
352
+ # @param template_id [String] Template ID
341
353
  # @param create_template_options [CreateTemplateOptions]
342
354
  # @param [Hash] opts the optional parameters
343
355
  # @return [Array<(TemplateDto, Integer, Hash)>] TemplateDto data, response status code and response headers
@@ -1413,28 +1413,22 @@ module MailSlurpClient
1413
1413
  end
1414
1414
 
1415
1415
  # Get count of unseen webhook results with error status
1416
- # @param inbox_id [String]
1417
1416
  # @param [Hash] opts the optional parameters
1418
1417
  # @return [UnseenErrorCountDto]
1419
- def get_webhook_results_unseen_error_count(inbox_id, opts = {})
1420
- data, _status_code, _headers = get_webhook_results_unseen_error_count_with_http_info(inbox_id, opts)
1418
+ def get_webhook_results_unseen_error_count(opts = {})
1419
+ data, _status_code, _headers = get_webhook_results_unseen_error_count_with_http_info(opts)
1421
1420
  data
1422
1421
  end
1423
1422
 
1424
1423
  # Get count of unseen webhook results with error status
1425
- # @param inbox_id [String]
1426
1424
  # @param [Hash] opts the optional parameters
1427
1425
  # @return [Array<(UnseenErrorCountDto, Integer, Hash)>] UnseenErrorCountDto data, response status code and response headers
1428
- def get_webhook_results_unseen_error_count_with_http_info(inbox_id, opts = {})
1426
+ def get_webhook_results_unseen_error_count_with_http_info(opts = {})
1429
1427
  if @api_client.config.debugging
1430
1428
  @api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_webhook_results_unseen_error_count ...'
1431
1429
  end
1432
- # verify the required parameter 'inbox_id' is set
1433
- if @api_client.config.client_side_validation && inbox_id.nil?
1434
- fail ArgumentError, "Missing the required parameter 'inbox_id' when calling WebhookControllerApi.get_webhook_results_unseen_error_count"
1435
- end
1436
1430
  # resource path
1437
- local_var_path = '/webhooks/results/unseen-count'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))
1431
+ local_var_path = '/webhooks/results/unseen-count'
1438
1432
 
1439
1433
  # query parameters
1440
1434
  query_params = opts[:query_params] || {}
@@ -1653,5 +1647,69 @@ module MailSlurpClient
1653
1647
  end
1654
1648
  return data, status_code, headers
1655
1649
  end
1650
+
1651
+ # Verify a webhook payload signature
1652
+ # 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
+ # @param verify_webhook_signature_options [VerifyWebhookSignatureOptions]
1654
+ # @param [Hash] opts the optional parameters
1655
+ # @return [VerifyWebhookSignatureResults]
1656
+ def verify_webhook_signature(verify_webhook_signature_options, opts = {})
1657
+ data, _status_code, _headers = verify_webhook_signature_with_http_info(verify_webhook_signature_options, opts)
1658
+ data
1659
+ end
1660
+
1661
+ # Verify a webhook payload signature
1662
+ # Verify a webhook payload using the messageId and signature. This allows you to be sure that MailSlurp sent the payload and not another server.
1663
+ # @param verify_webhook_signature_options [VerifyWebhookSignatureOptions]
1664
+ # @param [Hash] opts the optional parameters
1665
+ # @return [Array<(VerifyWebhookSignatureResults, Integer, Hash)>] VerifyWebhookSignatureResults data, response status code and response headers
1666
+ def verify_webhook_signature_with_http_info(verify_webhook_signature_options, opts = {})
1667
+ if @api_client.config.debugging
1668
+ @api_client.config.logger.debug 'Calling API: WebhookControllerApi.verify_webhook_signature ...'
1669
+ end
1670
+ # verify the required parameter 'verify_webhook_signature_options' is set
1671
+ if @api_client.config.client_side_validation && verify_webhook_signature_options.nil?
1672
+ fail ArgumentError, "Missing the required parameter 'verify_webhook_signature_options' when calling WebhookControllerApi.verify_webhook_signature"
1673
+ end
1674
+ # resource path
1675
+ local_var_path = '/webhooks/verify'
1676
+
1677
+ # query parameters
1678
+ query_params = opts[:query_params] || {}
1679
+
1680
+ # header parameters
1681
+ header_params = opts[:header_params] || {}
1682
+ # HTTP header 'Accept' (if needed)
1683
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1684
+ # HTTP header 'Content-Type'
1685
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1686
+
1687
+ # form parameters
1688
+ form_params = opts[:form_params] || {}
1689
+
1690
+ # http body (model)
1691
+ post_body = opts[:body] || @api_client.object_to_http_body(verify_webhook_signature_options)
1692
+
1693
+ # return_type
1694
+ return_type = opts[:return_type] || 'VerifyWebhookSignatureResults'
1695
+
1696
+ # auth_names
1697
+ auth_names = opts[:auth_names] || ['API_KEY']
1698
+
1699
+ new_options = opts.merge(
1700
+ :header_params => header_params,
1701
+ :query_params => query_params,
1702
+ :form_params => form_params,
1703
+ :body => post_body,
1704
+ :auth_names => auth_names,
1705
+ :return_type => return_type
1706
+ )
1707
+
1708
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1709
+ if @api_client.config.debugging
1710
+ @api_client.config.logger.debug "API called: WebhookControllerApi#verify_webhook_signature\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1711
+ end
1712
+ return data, status_code, headers
1713
+ end
1656
1714
  end
1657
1715
  end
@@ -17,10 +17,10 @@ module MailSlurpClient
17
17
  class AbstractWebhookPayload
18
18
  attr_accessor :event_name
19
19
 
20
- attr_accessor :webhook_id
21
-
22
20
  attr_accessor :message_id
23
21
 
22
+ attr_accessor :webhook_id
23
+
24
24
  attr_accessor :webhook_name
25
25
 
26
26
  class EnumAttributeValidator
@@ -49,8 +49,8 @@ module MailSlurpClient
49
49
  def self.attribute_map
50
50
  {
51
51
  :'event_name' => :'eventName',
52
- :'webhook_id' => :'webhookId',
53
52
  :'message_id' => :'messageId',
53
+ :'webhook_id' => :'webhookId',
54
54
  :'webhook_name' => :'webhookName'
55
55
  }
56
56
  end
@@ -59,8 +59,8 @@ module MailSlurpClient
59
59
  def self.openapi_types
60
60
  {
61
61
  :'event_name' => :'String',
62
- :'webhook_id' => :'String',
63
62
  :'message_id' => :'String',
63
+ :'webhook_id' => :'String',
64
64
  :'webhook_name' => :'String'
65
65
  }
66
66
  end
@@ -90,14 +90,14 @@ module MailSlurpClient
90
90
  self.event_name = attributes[:'event_name']
91
91
  end
92
92
 
93
- if attributes.key?(:'webhook_id')
94
- self.webhook_id = attributes[:'webhook_id']
95
- end
96
-
97
93
  if attributes.key?(:'message_id')
98
94
  self.message_id = attributes[:'message_id']
99
95
  end
100
96
 
97
+ if attributes.key?(:'webhook_id')
98
+ self.webhook_id = attributes[:'webhook_id']
99
+ end
100
+
101
101
  if attributes.key?(:'webhook_name')
102
102
  self.webhook_name = attributes[:'webhook_name']
103
103
  end
@@ -111,14 +111,14 @@ module MailSlurpClient
111
111
  invalid_properties.push('invalid value for "event_name", event_name cannot be nil.')
112
112
  end
113
113
 
114
- if @webhook_id.nil?
115
- invalid_properties.push('invalid value for "webhook_id", webhook_id cannot be nil.')
116
- end
117
-
118
114
  if @message_id.nil?
119
115
  invalid_properties.push('invalid value for "message_id", message_id cannot be nil.')
120
116
  end
121
117
 
118
+ if @webhook_id.nil?
119
+ invalid_properties.push('invalid value for "webhook_id", webhook_id cannot be nil.')
120
+ end
121
+
122
122
  invalid_properties
123
123
  end
124
124
 
@@ -128,8 +128,8 @@ module MailSlurpClient
128
128
  return false if @event_name.nil?
129
129
  event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT"])
130
130
  return false unless event_name_validator.valid?(@event_name)
131
- return false if @webhook_id.nil?
132
131
  return false if @message_id.nil?
132
+ return false if @webhook_id.nil?
133
133
  true
134
134
  end
135
135
 
@@ -149,8 +149,8 @@ module MailSlurpClient
149
149
  return true if self.equal?(o)
150
150
  self.class == o.class &&
151
151
  event_name == o.event_name &&
152
- webhook_id == o.webhook_id &&
153
152
  message_id == o.message_id &&
153
+ webhook_id == o.webhook_id &&
154
154
  webhook_name == o.webhook_name
155
155
  end
156
156
 
@@ -163,7 +163,7 @@ module MailSlurpClient
163
163
  # Calculates hash code according to all attributes.
164
164
  # @return [Integer] Hash code
165
165
  def hash
166
- [event_name, webhook_id, message_id, webhook_name].hash
166
+ [event_name, message_id, webhook_id, webhook_name].hash
167
167
  end
168
168
 
169
169
  # Builds the object from hash
@@ -19,29 +19,29 @@ 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
28
+ attr_accessor :updated_at
27
29
 
28
30
  attr_accessor :created_at
29
31
 
30
32
  attr_accessor :use_threads
31
33
 
32
- attr_accessor :updated_at
33
-
34
34
  # Attribute mapping from ruby-style variable name to JSON key.
35
35
  def self.attribute_map
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
+ :'updated_at' => :'updatedAt',
42
43
  :'created_at' => :'createdAt',
43
- :'use_threads' => :'useThreads',
44
- :'updated_at' => :'updatedAt'
44
+ :'use_threads' => :'useThreads'
45
45
  }
46
46
  end
47
47
 
@@ -50,12 +50,12 @@ 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
+ :'updated_at' => :'DateTime',
56
57
  :'created_at' => :'DateTime',
57
- :'use_threads' => :'Boolean',
58
- :'updated_at' => :'DateTime'
58
+ :'use_threads' => :'Boolean'
59
59
  }
60
60
  end
61
61
 
@@ -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,8 +100,8 @@ 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']
103
+ if attributes.key?(:'updated_at')
104
+ self.updated_at = attributes[:'updated_at']
101
105
  end
102
106
 
103
107
  if attributes.key?(:'created_at')
@@ -107,10 +111,6 @@ module MailSlurpClient
107
111
  if attributes.key?(:'use_threads')
108
112
  self.use_threads = attributes[:'use_threads']
109
113
  end
110
-
111
- if attributes.key?(:'updated_at')
112
- self.updated_at = attributes[:'updated_at']
113
- end
114
114
  end
115
115
 
116
116
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -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,18 +133,14 @@ 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.')
136
+ if @updated_at.nil?
137
+ invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
134
138
  end
135
139
 
136
140
  if @created_at.nil?
137
141
  invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
138
142
  end
139
143
 
140
- if @updated_at.nil?
141
- invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
142
- end
143
-
144
144
  invalid_properties
145
145
  end
146
146
 
@@ -148,11 +148,11 @@ 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
- return false if @created_at.nil?
155
154
  return false if @updated_at.nil?
155
+ return false if @created_at.nil?
156
156
  true
157
157
  end
158
158
 
@@ -163,12 +163,12 @@ 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
+ updated_at == o.updated_at &&
169
170
  created_at == o.created_at &&
170
- use_threads == o.use_threads &&
171
- updated_at == o.updated_at
171
+ use_threads == o.use_threads
172
172
  end
173
173
 
174
174
  # @see the `==` method
@@ -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, use_threads, updated_at].hash
183
+ [name, id, inbox_id, user_id, email_address, updated_at, created_at, use_threads].hash
184
184
  end
185
185
 
186
186
  # Builds the object from hash