mailslurp_client 15.7.8 → 15.7.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mailslurp_client/api/inbox_controller_api.rb +60 -0
- data/lib/mailslurp_client/api/webhook_controller_api.rb +233 -3
- data/lib/mailslurp_client/models/abstract_webhook_payload.rb +2 -2
- data/lib/mailslurp_client/models/alias_projection.rb +15 -15
- data/lib/mailslurp_client/models/attachment_projection.rb +14 -14
- data/lib/mailslurp_client/models/bounce_recipient.rb +5 -0
- data/lib/mailslurp_client/models/create_webhook_options.rb +2 -2
- data/lib/mailslurp_client/models/email_projection.rb +10 -10
- data/lib/mailslurp_client/models/inbox_dto.rb +1 -1
- data/lib/mailslurp_client/models/page_alias.rb +19 -19
- data/lib/mailslurp_client/models/page_attachment_entity.rb +19 -19
- data/lib/mailslurp_client/models/page_bounced_email.rb +19 -19
- data/lib/mailslurp_client/models/page_bounced_recipients.rb +19 -19
- data/lib/mailslurp_client/models/page_contact_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_email_preview.rb +19 -19
- data/lib/mailslurp_client/models/page_email_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_email_validation_request.rb +19 -19
- data/lib/mailslurp_client/models/page_expired_inbox_record_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_group_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_inbox_forwarder_dto.rb +19 -19
- data/lib/mailslurp_client/models/page_inbox_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_inbox_ruleset_dto.rb +19 -19
- data/lib/mailslurp_client/models/page_missed_email_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_organization_inbox_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_template_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_thread_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_tracking_pixel_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_unknown_missed_email_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_webhook_projection.rb +19 -19
- data/lib/mailslurp_client/models/page_webhook_result.rb +19 -19
- data/lib/mailslurp_client/models/sent_email_projection.rb +45 -45
- data/lib/mailslurp_client/models/template_projection.rb +15 -15
- data/lib/mailslurp_client/models/thread_projection.rb +15 -15
- data/lib/mailslurp_client/models/tracking_pixel_projection.rb +10 -10
- data/lib/mailslurp_client/models/webhook_bounce_payload.rb +339 -0
- data/lib/mailslurp_client/models/webhook_bounce_recipient_payload.rb +302 -0
- data/lib/mailslurp_client/models/webhook_dto.rb +3 -8
- data/lib/mailslurp_client/models/webhook_email_opened_payload.rb +2 -2
- data/lib/mailslurp_client/models/webhook_email_read_payload.rb +2 -2
- data/lib/mailslurp_client/models/webhook_new_attachment_payload.rb +2 -2
- data/lib/mailslurp_client/models/webhook_new_contact_payload.rb +2 -2
- data/lib/mailslurp_client/models/webhook_new_email_payload.rb +2 -2
- data/lib/mailslurp_client/models/webhook_projection.rb +2 -7
- data/lib/mailslurp_client/models/webhook_result_dto.rb +2 -7
- data/lib/mailslurp_client/version.rb +1 -1
- data/lib/mailslurp_client.rb +2 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b999b8bbfe463fea5ecaa35efa0d50acb7071da4cd169571d7c33f5c9c1c08a3
|
4
|
+
data.tar.gz: 25a8179c4e01fa5aa1569089963543b213292e3ba766b63abc3be91e2d854289
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c18e17efa4c3708836e25f96f017f6b13ace81acec6778f1e0b44d1530067458a364b014d15f7845deaad5487d57e0b32c23000d08ab74ea033d39658fe60350
|
7
|
+
data.tar.gz: eef26c881474496e37842c63785041bd64832d4bba87581216cf86ef2ce217f99ef758f162efba41bfb6a295bb45d3e3cd4f82f98a695b469463a51a303d54a5
|
@@ -297,6 +297,66 @@ module MailSlurpClient
|
|
297
297
|
return data, status_code, headers
|
298
298
|
end
|
299
299
|
|
300
|
+
# Delete all emails in a given inboxes.
|
301
|
+
# Deletes all emails in an inbox. Be careful as emails cannot be recovered
|
302
|
+
# @param inbox_id [String]
|
303
|
+
# @param [Hash] opts the optional parameters
|
304
|
+
# @return [nil]
|
305
|
+
def delete_all_inbox_emails(inbox_id, opts = {})
|
306
|
+
delete_all_inbox_emails_with_http_info(inbox_id, opts)
|
307
|
+
nil
|
308
|
+
end
|
309
|
+
|
310
|
+
# Delete all emails in a given inboxes.
|
311
|
+
# Deletes all emails in an inbox. Be careful as emails cannot be recovered
|
312
|
+
# @param inbox_id [String]
|
313
|
+
# @param [Hash] opts the optional parameters
|
314
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
315
|
+
def delete_all_inbox_emails_with_http_info(inbox_id, opts = {})
|
316
|
+
if @api_client.config.debugging
|
317
|
+
@api_client.config.logger.debug 'Calling API: InboxControllerApi.delete_all_inbox_emails ...'
|
318
|
+
end
|
319
|
+
# verify the required parameter 'inbox_id' is set
|
320
|
+
if @api_client.config.client_side_validation && inbox_id.nil?
|
321
|
+
fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.delete_all_inbox_emails"
|
322
|
+
end
|
323
|
+
# resource path
|
324
|
+
local_var_path = '/inboxes/{inboxId}/deleteAllInboxEmails'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))
|
325
|
+
|
326
|
+
# query parameters
|
327
|
+
query_params = opts[:query_params] || {}
|
328
|
+
|
329
|
+
# header parameters
|
330
|
+
header_params = opts[:header_params] || {}
|
331
|
+
|
332
|
+
# form parameters
|
333
|
+
form_params = opts[:form_params] || {}
|
334
|
+
|
335
|
+
# http body (model)
|
336
|
+
post_body = opts[:body]
|
337
|
+
|
338
|
+
# return_type
|
339
|
+
return_type = opts[:return_type]
|
340
|
+
|
341
|
+
# auth_names
|
342
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
343
|
+
|
344
|
+
new_options = opts.merge(
|
345
|
+
:header_params => header_params,
|
346
|
+
:query_params => query_params,
|
347
|
+
:form_params => form_params,
|
348
|
+
:body => post_body,
|
349
|
+
:auth_names => auth_names,
|
350
|
+
:return_type => return_type
|
351
|
+
)
|
352
|
+
|
353
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
354
|
+
if @api_client.config.debugging
|
355
|
+
@api_client.config.logger.debug "API called: InboxControllerApi#delete_all_inbox_emails\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
356
|
+
end
|
357
|
+
return data, status_code, headers
|
358
|
+
end
|
359
|
+
|
300
360
|
# Delete all inboxes
|
301
361
|
# Permanently delete all inboxes and associated email addresses. This will also delete all emails within the inboxes. Be careful as inboxes cannot be recovered once deleted. Note: deleting inboxes will not impact your usage limits. Monthly inbox creation limits are based on how many inboxes were created in the last 30 days, not how many inboxes you currently have.
|
302
362
|
# @param [Hash] opts the optional parameters
|
@@ -19,6 +19,70 @@ module MailSlurpClient
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
+
# Attach a WebHook URL to an inbox
|
23
|
+
# Get notified of account level events such as bounce and bounce recipient.
|
24
|
+
# @param create_webhook_options [CreateWebhookOptions]
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [WebhookDto]
|
27
|
+
def create_account_webhook(create_webhook_options, opts = {})
|
28
|
+
data, _status_code, _headers = create_account_webhook_with_http_info(create_webhook_options, opts)
|
29
|
+
data
|
30
|
+
end
|
31
|
+
|
32
|
+
# Attach a WebHook URL to an inbox
|
33
|
+
# Get notified of account level events such as bounce and bounce recipient.
|
34
|
+
# @param create_webhook_options [CreateWebhookOptions]
|
35
|
+
# @param [Hash] opts the optional parameters
|
36
|
+
# @return [Array<(WebhookDto, Integer, Hash)>] WebhookDto data, response status code and response headers
|
37
|
+
def create_account_webhook_with_http_info(create_webhook_options, opts = {})
|
38
|
+
if @api_client.config.debugging
|
39
|
+
@api_client.config.logger.debug 'Calling API: WebhookControllerApi.create_account_webhook ...'
|
40
|
+
end
|
41
|
+
# verify the required parameter 'create_webhook_options' is set
|
42
|
+
if @api_client.config.client_side_validation && create_webhook_options.nil?
|
43
|
+
fail ArgumentError, "Missing the required parameter 'create_webhook_options' when calling WebhookControllerApi.create_account_webhook"
|
44
|
+
end
|
45
|
+
# resource path
|
46
|
+
local_var_path = '/webhooks'
|
47
|
+
|
48
|
+
# query parameters
|
49
|
+
query_params = opts[:query_params] || {}
|
50
|
+
|
51
|
+
# header parameters
|
52
|
+
header_params = opts[:header_params] || {}
|
53
|
+
# HTTP header 'Accept' (if needed)
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
55
|
+
# HTTP header 'Content-Type'
|
56
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
57
|
+
|
58
|
+
# form parameters
|
59
|
+
form_params = opts[:form_params] || {}
|
60
|
+
|
61
|
+
# http body (model)
|
62
|
+
post_body = opts[:body] || @api_client.object_to_http_body(create_webhook_options)
|
63
|
+
|
64
|
+
# return_type
|
65
|
+
return_type = opts[:return_type] || 'WebhookDto'
|
66
|
+
|
67
|
+
# auth_names
|
68
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
69
|
+
|
70
|
+
new_options = opts.merge(
|
71
|
+
:header_params => header_params,
|
72
|
+
:query_params => query_params,
|
73
|
+
:form_params => form_params,
|
74
|
+
:body => post_body,
|
75
|
+
:auth_names => auth_names,
|
76
|
+
:return_type => return_type
|
77
|
+
)
|
78
|
+
|
79
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
80
|
+
if @api_client.config.debugging
|
81
|
+
@api_client.config.logger.debug "API called: WebhookControllerApi#create_account_webhook\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
82
|
+
end
|
83
|
+
return data, status_code, headers
|
84
|
+
end
|
85
|
+
|
22
86
|
# Attach a WebHook URL to an inbox
|
23
87
|
# Get notified whenever an inbox receives an email via a WebHook URL. An emailID will be posted to this URL every time an email is received for this inbox. The URL must be publicly reachable by the MailSlurp server. You can provide basicAuth values if you wish to secure this endpoint.
|
24
88
|
# @param inbox_id [String]
|
@@ -205,6 +269,64 @@ module MailSlurpClient
|
|
205
269
|
return data, status_code, headers
|
206
270
|
end
|
207
271
|
|
272
|
+
# Delete a webhook
|
273
|
+
# @param webhook_id [String]
|
274
|
+
# @param [Hash] opts the optional parameters
|
275
|
+
# @return [nil]
|
276
|
+
def delete_webhook_by_id(webhook_id, opts = {})
|
277
|
+
delete_webhook_by_id_with_http_info(webhook_id, opts)
|
278
|
+
nil
|
279
|
+
end
|
280
|
+
|
281
|
+
# Delete a webhook
|
282
|
+
# @param webhook_id [String]
|
283
|
+
# @param [Hash] opts the optional parameters
|
284
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
285
|
+
def delete_webhook_by_id_with_http_info(webhook_id, opts = {})
|
286
|
+
if @api_client.config.debugging
|
287
|
+
@api_client.config.logger.debug 'Calling API: WebhookControllerApi.delete_webhook_by_id ...'
|
288
|
+
end
|
289
|
+
# verify the required parameter 'webhook_id' is set
|
290
|
+
if @api_client.config.client_side_validation && webhook_id.nil?
|
291
|
+
fail ArgumentError, "Missing the required parameter 'webhook_id' when calling WebhookControllerApi.delete_webhook_by_id"
|
292
|
+
end
|
293
|
+
# resource path
|
294
|
+
local_var_path = '/webhooks/{webhookId}'.sub('{' + 'webhookId' + '}', CGI.escape(webhook_id.to_s))
|
295
|
+
|
296
|
+
# query parameters
|
297
|
+
query_params = opts[:query_params] || {}
|
298
|
+
|
299
|
+
# header parameters
|
300
|
+
header_params = opts[:header_params] || {}
|
301
|
+
|
302
|
+
# form parameters
|
303
|
+
form_params = opts[:form_params] || {}
|
304
|
+
|
305
|
+
# http body (model)
|
306
|
+
post_body = opts[:body]
|
307
|
+
|
308
|
+
# return_type
|
309
|
+
return_type = opts[:return_type]
|
310
|
+
|
311
|
+
# auth_names
|
312
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
313
|
+
|
314
|
+
new_options = opts.merge(
|
315
|
+
:header_params => header_params,
|
316
|
+
:query_params => query_params,
|
317
|
+
:form_params => form_params,
|
318
|
+
:body => post_body,
|
319
|
+
:auth_names => auth_names,
|
320
|
+
:return_type => return_type
|
321
|
+
)
|
322
|
+
|
323
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
324
|
+
if @api_client.config.debugging
|
325
|
+
@api_client.config.logger.debug "API called: WebhookControllerApi#delete_webhook_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
326
|
+
end
|
327
|
+
return data, status_code, headers
|
328
|
+
end
|
329
|
+
|
208
330
|
# Get results for all webhooks
|
209
331
|
# @param [Hash] opts the optional parameters
|
210
332
|
# @option opts [Integer] :page Optional page index in list pagination (default to 0)
|
@@ -537,7 +659,7 @@ module MailSlurpClient
|
|
537
659
|
if @api_client.config.debugging
|
538
660
|
@api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_test_webhook_payload ...'
|
539
661
|
end
|
540
|
-
allowable_values = ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ"]
|
662
|
+
allowable_values = ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT"]
|
541
663
|
if @api_client.config.client_side_validation && opts[:'event_name'] && !allowable_values.include?(opts[:'event_name'])
|
542
664
|
fail ArgumentError, "invalid value for \"event_name\", must be one of #{allowable_values}"
|
543
665
|
end
|
@@ -581,6 +703,114 @@ module MailSlurpClient
|
|
581
703
|
return data, status_code, headers
|
582
704
|
end
|
583
705
|
|
706
|
+
# Get webhook test payload for bounce
|
707
|
+
# @param [Hash] opts the optional parameters
|
708
|
+
# @return [WebhookBouncePayload]
|
709
|
+
def get_test_webhook_payload_bounce(opts = {})
|
710
|
+
data, _status_code, _headers = get_test_webhook_payload_bounce_with_http_info(opts)
|
711
|
+
data
|
712
|
+
end
|
713
|
+
|
714
|
+
# Get webhook test payload for bounce
|
715
|
+
# @param [Hash] opts the optional parameters
|
716
|
+
# @return [Array<(WebhookBouncePayload, Integer, Hash)>] WebhookBouncePayload data, response status code and response headers
|
717
|
+
def get_test_webhook_payload_bounce_with_http_info(opts = {})
|
718
|
+
if @api_client.config.debugging
|
719
|
+
@api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_test_webhook_payload_bounce ...'
|
720
|
+
end
|
721
|
+
# resource path
|
722
|
+
local_var_path = '/webhooks/test/email-bounce-payload'
|
723
|
+
|
724
|
+
# query parameters
|
725
|
+
query_params = opts[:query_params] || {}
|
726
|
+
|
727
|
+
# header parameters
|
728
|
+
header_params = opts[:header_params] || {}
|
729
|
+
# HTTP header 'Accept' (if needed)
|
730
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
731
|
+
|
732
|
+
# form parameters
|
733
|
+
form_params = opts[:form_params] || {}
|
734
|
+
|
735
|
+
# http body (model)
|
736
|
+
post_body = opts[:body]
|
737
|
+
|
738
|
+
# return_type
|
739
|
+
return_type = opts[:return_type] || 'WebhookBouncePayload'
|
740
|
+
|
741
|
+
# auth_names
|
742
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
743
|
+
|
744
|
+
new_options = opts.merge(
|
745
|
+
:header_params => header_params,
|
746
|
+
:query_params => query_params,
|
747
|
+
:form_params => form_params,
|
748
|
+
:body => post_body,
|
749
|
+
:auth_names => auth_names,
|
750
|
+
:return_type => return_type
|
751
|
+
)
|
752
|
+
|
753
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
754
|
+
if @api_client.config.debugging
|
755
|
+
@api_client.config.logger.debug "API called: WebhookControllerApi#get_test_webhook_payload_bounce\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
756
|
+
end
|
757
|
+
return data, status_code, headers
|
758
|
+
end
|
759
|
+
|
760
|
+
# Get webhook test payload for bounce recipient
|
761
|
+
# @param [Hash] opts the optional parameters
|
762
|
+
# @return [WebhookBounceRecipientPayload]
|
763
|
+
def get_test_webhook_payload_bounce_recipient(opts = {})
|
764
|
+
data, _status_code, _headers = get_test_webhook_payload_bounce_recipient_with_http_info(opts)
|
765
|
+
data
|
766
|
+
end
|
767
|
+
|
768
|
+
# Get webhook test payload for bounce recipient
|
769
|
+
# @param [Hash] opts the optional parameters
|
770
|
+
# @return [Array<(WebhookBounceRecipientPayload, Integer, Hash)>] WebhookBounceRecipientPayload data, response status code and response headers
|
771
|
+
def get_test_webhook_payload_bounce_recipient_with_http_info(opts = {})
|
772
|
+
if @api_client.config.debugging
|
773
|
+
@api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_test_webhook_payload_bounce_recipient ...'
|
774
|
+
end
|
775
|
+
# resource path
|
776
|
+
local_var_path = '/webhooks/test/email-bounce-recipient-payload'
|
777
|
+
|
778
|
+
# query parameters
|
779
|
+
query_params = opts[:query_params] || {}
|
780
|
+
|
781
|
+
# header parameters
|
782
|
+
header_params = opts[:header_params] || {}
|
783
|
+
# HTTP header 'Accept' (if needed)
|
784
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
785
|
+
|
786
|
+
# form parameters
|
787
|
+
form_params = opts[:form_params] || {}
|
788
|
+
|
789
|
+
# http body (model)
|
790
|
+
post_body = opts[:body]
|
791
|
+
|
792
|
+
# return_type
|
793
|
+
return_type = opts[:return_type] || 'WebhookBounceRecipientPayload'
|
794
|
+
|
795
|
+
# auth_names
|
796
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
797
|
+
|
798
|
+
new_options = opts.merge(
|
799
|
+
:header_params => header_params,
|
800
|
+
:query_params => query_params,
|
801
|
+
:form_params => form_params,
|
802
|
+
:body => post_body,
|
803
|
+
:auth_names => auth_names,
|
804
|
+
:return_type => return_type
|
805
|
+
)
|
806
|
+
|
807
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
808
|
+
if @api_client.config.debugging
|
809
|
+
@api_client.config.logger.debug "API called: WebhookControllerApi#get_test_webhook_payload_bounce_recipient\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
810
|
+
end
|
811
|
+
return data, status_code, headers
|
812
|
+
end
|
813
|
+
|
584
814
|
# Get webhook test payload for email opened event
|
585
815
|
# @param [Hash] opts the optional parameters
|
586
816
|
# @return [WebhookEmailOpenedPayload]
|
@@ -911,7 +1141,7 @@ module MailSlurpClient
|
|
911
1141
|
return data, status_code, headers
|
912
1142
|
end
|
913
1143
|
|
914
|
-
# Get a webhook
|
1144
|
+
# Get a webhook
|
915
1145
|
# @param webhook_id [String]
|
916
1146
|
# @param [Hash] opts the optional parameters
|
917
1147
|
# @return [WebhookDto]
|
@@ -920,7 +1150,7 @@ module MailSlurpClient
|
|
920
1150
|
data
|
921
1151
|
end
|
922
1152
|
|
923
|
-
# Get a webhook
|
1153
|
+
# Get a webhook
|
924
1154
|
# @param webhook_id [String]
|
925
1155
|
# @param [Hash] opts the optional parameters
|
926
1156
|
# @return [Array<(WebhookDto, Integer, Hash)>] WebhookDto data, response status code and response headers
|
@@ -126,7 +126,7 @@ module MailSlurpClient
|
|
126
126
|
# @return true if the model is valid
|
127
127
|
def valid?
|
128
128
|
return false if @event_name.nil?
|
129
|
-
event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ"])
|
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
131
|
return false if @webhook_id.nil?
|
132
132
|
return false if @message_id.nil?
|
@@ -136,7 +136,7 @@ module MailSlurpClient
|
|
136
136
|
# Custom attribute writer method checking allowed values (enum).
|
137
137
|
# @param [Object] event_name Object to be assigned
|
138
138
|
def event_name=(event_name)
|
139
|
-
validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ"])
|
139
|
+
validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT"])
|
140
140
|
unless validator.valid?(event_name)
|
141
141
|
fail ArgumentError, "invalid value for \"event_name\", must be one of #{validator.allowable_values}."
|
142
142
|
end
|
@@ -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 :use_threads
|
@@ -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
|
:'use_threads' => :'useThreads',
|
44
44
|
:'updated_at' => :'updatedAt'
|
@@ -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
|
:'use_threads' => :'Boolean',
|
58
58
|
:'updated_at' => :'DateTime'
|
@@ -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
|
use_threads == o.use_threads &&
|
171
171
|
updated_at == o.updated_at
|
@@ -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,
|
183
|
+
[name, id, inbox_id, user_id, email_address, created_at, use_threads, updated_at].hash
|
184
184
|
end
|
185
185
|
|
186
186
|
# Builds the object from hash
|
@@ -19,9 +19,6 @@ module MailSlurpClient
|
|
19
19
|
# Content length of attachment in bytes
|
20
20
|
attr_accessor :content_length
|
21
21
|
|
22
|
-
# Content type of attachment.
|
23
|
-
attr_accessor :content_type
|
24
|
-
|
25
22
|
attr_accessor :user_id
|
26
23
|
|
27
24
|
# Attachment ID
|
@@ -31,16 +28,19 @@ module MailSlurpClient
|
|
31
28
|
|
32
29
|
attr_accessor :updated_at
|
33
30
|
|
31
|
+
# Content type of attachment.
|
32
|
+
attr_accessor :content_type
|
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
|
:'content_length' => :'contentLength',
|
39
|
-
:'content_type' => :'contentType',
|
40
39
|
:'user_id' => :'userId',
|
41
40
|
:'attachment_id' => :'attachmentId',
|
42
41
|
:'created_at' => :'createdAt',
|
43
|
-
:'updated_at' => :'updatedAt'
|
42
|
+
:'updated_at' => :'updatedAt',
|
43
|
+
:'content_type' => :'contentType'
|
44
44
|
}
|
45
45
|
end
|
46
46
|
|
@@ -49,11 +49,11 @@ module MailSlurpClient
|
|
49
49
|
{
|
50
50
|
:'name' => :'String',
|
51
51
|
:'content_length' => :'Integer',
|
52
|
-
:'content_type' => :'String',
|
53
52
|
:'user_id' => :'String',
|
54
53
|
:'attachment_id' => :'String',
|
55
54
|
:'created_at' => :'DateTime',
|
56
|
-
:'updated_at' => :'DateTime'
|
55
|
+
:'updated_at' => :'DateTime',
|
56
|
+
:'content_type' => :'String'
|
57
57
|
}
|
58
58
|
end
|
59
59
|
|
@@ -86,10 +86,6 @@ module MailSlurpClient
|
|
86
86
|
self.content_length = attributes[:'content_length']
|
87
87
|
end
|
88
88
|
|
89
|
-
if attributes.key?(:'content_type')
|
90
|
-
self.content_type = attributes[:'content_type']
|
91
|
-
end
|
92
|
-
|
93
89
|
if attributes.key?(:'user_id')
|
94
90
|
self.user_id = attributes[:'user_id']
|
95
91
|
end
|
@@ -105,6 +101,10 @@ module MailSlurpClient
|
|
105
101
|
if attributes.key?(:'updated_at')
|
106
102
|
self.updated_at = attributes[:'updated_at']
|
107
103
|
end
|
104
|
+
|
105
|
+
if attributes.key?(:'content_type')
|
106
|
+
self.content_type = attributes[:'content_type']
|
107
|
+
end
|
108
108
|
end
|
109
109
|
|
110
110
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -147,11 +147,11 @@ module MailSlurpClient
|
|
147
147
|
self.class == o.class &&
|
148
148
|
name == o.name &&
|
149
149
|
content_length == o.content_length &&
|
150
|
-
content_type == o.content_type &&
|
151
150
|
user_id == o.user_id &&
|
152
151
|
attachment_id == o.attachment_id &&
|
153
152
|
created_at == o.created_at &&
|
154
|
-
updated_at == o.updated_at
|
153
|
+
updated_at == o.updated_at &&
|
154
|
+
content_type == o.content_type
|
155
155
|
end
|
156
156
|
|
157
157
|
# @see the `==` method
|
@@ -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
|
-
[name, content_length,
|
166
|
+
[name, content_length, user_id, attachment_id, created_at, updated_at, content_type].hash
|
167
167
|
end
|
168
168
|
|
169
169
|
# Builds the object from hash
|
@@ -92,6 +92,10 @@ module MailSlurpClient
|
|
92
92
|
# @return Array for valid properties with the reasons
|
93
93
|
def list_invalid_properties
|
94
94
|
invalid_properties = Array.new
|
95
|
+
if @id.nil?
|
96
|
+
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
97
|
+
end
|
98
|
+
|
95
99
|
if @recipient.nil?
|
96
100
|
invalid_properties.push('invalid value for "recipient", recipient cannot be nil.')
|
97
101
|
end
|
@@ -110,6 +114,7 @@ module MailSlurpClient
|
|
110
114
|
# Check to see if the all the properties in the model are valid
|
111
115
|
# @return true if the model is valid
|
112
116
|
def valid?
|
117
|
+
return false if @id.nil?
|
113
118
|
return false if @recipient.nil?
|
114
119
|
return false if @created_at.nil?
|
115
120
|
return false if @updated_at.nil?
|
@@ -121,7 +121,7 @@ module MailSlurpClient
|
|
121
121
|
# @return true if the model is valid
|
122
122
|
def valid?
|
123
123
|
return false if @url.nil?
|
124
|
-
event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ"])
|
124
|
+
event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT"])
|
125
125
|
return false unless event_name_validator.valid?(@event_name)
|
126
126
|
true
|
127
127
|
end
|
@@ -129,7 +129,7 @@ module MailSlurpClient
|
|
129
129
|
# Custom attribute writer method checking allowed values (enum).
|
130
130
|
# @param [Object] event_name Object to be assigned
|
131
131
|
def event_name=(event_name)
|
132
|
-
validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ"])
|
132
|
+
validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT"])
|
133
133
|
unless validator.valid?(event_name)
|
134
134
|
fail ArgumentError, "invalid value for \"event_name\", must be one of #{validator.allowable_values}."
|
135
135
|
end
|
@@ -21,10 +21,10 @@ module MailSlurpClient
|
|
21
21
|
|
22
22
|
attr_accessor :subject
|
23
23
|
|
24
|
-
attr_accessor :attachments
|
25
|
-
|
26
24
|
attr_accessor :inbox_id
|
27
25
|
|
26
|
+
attr_accessor :attachments
|
27
|
+
|
28
28
|
attr_accessor :to
|
29
29
|
|
30
30
|
attr_accessor :bcc
|
@@ -47,8 +47,8 @@ module MailSlurpClient
|
|
47
47
|
:'id' => :'id',
|
48
48
|
:'from' => :'from',
|
49
49
|
:'subject' => :'subject',
|
50
|
-
:'attachments' => :'attachments',
|
51
50
|
:'inbox_id' => :'inboxId',
|
51
|
+
:'attachments' => :'attachments',
|
52
52
|
:'to' => :'to',
|
53
53
|
:'bcc' => :'bcc',
|
54
54
|
:'cc' => :'cc',
|
@@ -66,8 +66,8 @@ module MailSlurpClient
|
|
66
66
|
:'id' => :'String',
|
67
67
|
:'from' => :'String',
|
68
68
|
:'subject' => :'String',
|
69
|
-
:'attachments' => :'Array<String>',
|
70
69
|
:'inbox_id' => :'String',
|
70
|
+
:'attachments' => :'Array<String>',
|
71
71
|
:'to' => :'Array<String>',
|
72
72
|
:'bcc' => :'Array<String>',
|
73
73
|
:'cc' => :'Array<String>',
|
@@ -112,16 +112,16 @@ module MailSlurpClient
|
|
112
112
|
self.subject = attributes[:'subject']
|
113
113
|
end
|
114
114
|
|
115
|
+
if attributes.key?(:'inbox_id')
|
116
|
+
self.inbox_id = attributes[:'inbox_id']
|
117
|
+
end
|
118
|
+
|
115
119
|
if attributes.key?(:'attachments')
|
116
120
|
if (value = attributes[:'attachments']).is_a?(Array)
|
117
121
|
self.attachments = value
|
118
122
|
end
|
119
123
|
end
|
120
124
|
|
121
|
-
if attributes.key?(:'inbox_id')
|
122
|
-
self.inbox_id = attributes[:'inbox_id']
|
123
|
-
end
|
124
|
-
|
125
125
|
if attributes.key?(:'to')
|
126
126
|
if (value = attributes[:'to']).is_a?(Array)
|
127
127
|
self.to = value
|
@@ -202,8 +202,8 @@ module MailSlurpClient
|
|
202
202
|
id == o.id &&
|
203
203
|
from == o.from &&
|
204
204
|
subject == o.subject &&
|
205
|
-
attachments == o.attachments &&
|
206
205
|
inbox_id == o.inbox_id &&
|
206
|
+
attachments == o.attachments &&
|
207
207
|
to == o.to &&
|
208
208
|
bcc == o.bcc &&
|
209
209
|
cc == o.cc &&
|
@@ -223,7 +223,7 @@ module MailSlurpClient
|
|
223
223
|
# Calculates hash code according to all attributes.
|
224
224
|
# @return [Integer] Hash code
|
225
225
|
def hash
|
226
|
-
[id, from, subject,
|
226
|
+
[id, from, subject, inbox_id, attachments, to, bcc, cc, created_at, team_access, read, body_md5_hash, body_excerpt].hash
|
227
227
|
end
|
228
228
|
|
229
229
|
# Builds the object from hash
|