mailslurp_client 15.13.7 → 15.13.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mailslurp_client/api/api_user_controller_api.rb +23 -58
  3. data/lib/mailslurp_client/api/email_controller_api.rb +7 -10
  4. data/lib/mailslurp_client/api/inbox_controller_api.rb +2 -2
  5. data/lib/mailslurp_client/api/webhook_controller_api.rb +195 -2
  6. data/lib/mailslurp_client/models/abstract_webhook_payload.rb +2 -2
  7. data/lib/mailslurp_client/models/bounce_projection.rb +10 -10
  8. data/lib/mailslurp_client/models/create_webhook_options.rb +2 -2
  9. data/lib/mailslurp_client/models/email_projection.rb +10 -10
  10. data/lib/mailslurp_client/models/page_alias.rb +10 -10
  11. data/lib/mailslurp_client/models/page_attachment_entity.rb +10 -10
  12. data/lib/mailslurp_client/models/page_bounced_email.rb +10 -10
  13. data/lib/mailslurp_client/models/page_bounced_recipients.rb +10 -10
  14. data/lib/mailslurp_client/models/page_complaint.rb +10 -10
  15. data/lib/mailslurp_client/models/page_contact_projection.rb +10 -10
  16. data/lib/mailslurp_client/models/page_delivery_status.rb +10 -10
  17. data/lib/mailslurp_client/models/page_email_preview.rb +10 -10
  18. data/lib/mailslurp_client/models/page_email_projection.rb +10 -10
  19. data/lib/mailslurp_client/models/page_email_validation_request.rb +10 -10
  20. data/lib/mailslurp_client/models/page_expired_inbox_record_projection.rb +10 -10
  21. data/lib/mailslurp_client/models/page_group_projection.rb +10 -10
  22. data/lib/mailslurp_client/models/page_inbox_forwarder_dto.rb +10 -10
  23. data/lib/mailslurp_client/models/page_inbox_projection.rb +10 -10
  24. data/lib/mailslurp_client/models/page_inbox_ruleset_dto.rb +10 -10
  25. data/lib/mailslurp_client/models/page_missed_email_projection.rb +10 -10
  26. data/lib/mailslurp_client/models/page_organization_inbox_projection.rb +10 -10
  27. data/lib/mailslurp_client/models/page_phone_number_projection.rb +10 -10
  28. data/lib/mailslurp_client/models/page_sent_email_projection.rb +16 -16
  29. data/lib/mailslurp_client/models/page_sent_email_with_queue_projection.rb +16 -16
  30. data/lib/mailslurp_client/models/page_sms_projection.rb +10 -10
  31. data/lib/mailslurp_client/models/page_template_projection.rb +10 -10
  32. data/lib/mailslurp_client/models/page_thread_projection.rb +10 -10
  33. data/lib/mailslurp_client/models/page_tracking_pixel_projection.rb +10 -10
  34. data/lib/mailslurp_client/models/page_unknown_missed_email_projection.rb +10 -10
  35. data/lib/mailslurp_client/models/page_webhook_projection.rb +10 -10
  36. data/lib/mailslurp_client/models/page_webhook_result.rb +10 -10
  37. data/lib/mailslurp_client/models/sent_email_projection.rb +15 -15
  38. data/lib/mailslurp_client/models/sort.rb +13 -13
  39. data/lib/mailslurp_client/models/tracking_pixel_projection.rb +10 -10
  40. data/lib/mailslurp_client/models/webhook_bounce_payload.rb +4 -2
  41. data/lib/mailslurp_client/models/webhook_bounce_recipient_payload.rb +2 -2
  42. data/lib/mailslurp_client/models/webhook_delivery_status_payload.rb +429 -0
  43. data/lib/mailslurp_client/models/webhook_dto.rb +2 -2
  44. data/lib/mailslurp_client/models/webhook_email_opened_payload.rb +3 -3
  45. data/lib/mailslurp_client/models/webhook_email_read_payload.rb +3 -3
  46. data/lib/mailslurp_client/models/webhook_new_attachment_payload.rb +2 -2
  47. data/lib/mailslurp_client/models/webhook_new_contact_payload.rb +17 -2
  48. data/lib/mailslurp_client/models/webhook_new_email_payload.rb +3 -3
  49. data/lib/mailslurp_client/models/webhook_new_sms_payload.rb +393 -0
  50. data/lib/mailslurp_client/models/webhook_projection.rb +12 -3
  51. data/lib/mailslurp_client/models/webhook_result_dto.rb +2 -2
  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: 0ad0e6f0bb866a1636661d227c15367112183b4895938ebeb641a8ebe040b5b9
4
- data.tar.gz: 5f0585e05f61234dcbac5d53ed586fe94ae0d39e5dea311184bfc0881db17566
3
+ metadata.gz: 9d5470ef47d765f919e62ecdc915589d08c48bbcc2848dd0649ac2340d360ac3
4
+ data.tar.gz: 16e4860ff8f2752a5a71e189f5729d0246b3910713832d92e23e7760fc13ae49
5
5
  SHA512:
6
- metadata.gz: e4fa9111c5f14cfa4043b1ff56dd50afb3a582291a2c2b11aefe2f23fb0406dec7f9b0a44384dd89b2152738cfe050cd8fdc10adf9d56beaffb0eb8e59cc2e5a
7
- data.tar.gz: 6bd914a81a69c0614ea68d8350fd5eab7d3c380bbc0926403a7a4d7b5fd91dc6033fa18697187899c76a0a973b0c3c3b09ef2f3b817b6a625fd2bfa5fe174f9f
6
+ metadata.gz: 4b436a4e1b778e8165c82fd941fb2deecdf51fafea536cf669fe7ca9e80036197dbf9a3103e6818a9f831b64a6a83dca0ee8baceab4609b3dd9201ed0c276093
7
+ data.tar.gz: 98c94a1e143795eb1ce9f468ae801afe1db6bfc9491a21b5066b4aa26cf8a889c07b61e579b08d1e495188fae17ced9961eedbe65129e4e2ce968c130432d642
@@ -19,87 +19,52 @@ module MailSlurpClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Utility function to extract properties from JSON objects in language where this is cumbersome.
23
+ # @param property [String] JSON property name or dot separated path selector such as `a.b.c`
24
+ # @param body [Object]
22
25
  # @param [Hash] opts the optional parameters
23
26
  # @return [String]
24
- def get_smtp_password(opts = {})
25
- data, _status_code, _headers = get_smtp_password_with_http_info(opts)
27
+ def get_json_property_as_string(property, body, opts = {})
28
+ data, _status_code, _headers = get_json_property_as_string_with_http_info(property, body, opts)
26
29
  data
27
30
  end
28
31
 
32
+ # Utility function to extract properties from JSON objects in language where this is cumbersome.
33
+ # @param property [String] JSON property name or dot separated path selector such as `a.b.c`
34
+ # @param body [Object]
29
35
  # @param [Hash] opts the optional parameters
30
36
  # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
31
- def get_smtp_password_with_http_info(opts = {})
37
+ def get_json_property_as_string_with_http_info(property, body, opts = {})
32
38
  if @api_client.config.debugging
33
- @api_client.config.logger.debug 'Calling API: ApiUserControllerApi.get_smtp_password ...'
39
+ @api_client.config.logger.debug 'Calling API: ApiUserControllerApi.get_json_property_as_string ...'
34
40
  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}"
41
+ # verify the required parameter 'property' is set
42
+ if @api_client.config.client_side_validation && property.nil?
43
+ fail ArgumentError, "Missing the required parameter 'property' when calling ApiUserControllerApi.get_json_property_as_string"
70
44
  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 ...'
45
+ # verify the required parameter 'body' is set
46
+ if @api_client.config.client_side_validation && body.nil?
47
+ fail ArgumentError, "Missing the required parameter 'body' when calling ApiUserControllerApi.get_json_property_as_string"
86
48
  end
87
49
  # resource path
88
- local_var_path = '/user/smtp/username'
50
+ local_var_path = '/user/json/pluck'
89
51
 
90
52
  # query parameters
91
53
  query_params = opts[:query_params] || {}
54
+ query_params[:'property'] = property
92
55
 
93
56
  # header parameters
94
57
  header_params = opts[:header_params] || {}
95
58
  # HTTP header 'Accept' (if needed)
96
59
  header_params['Accept'] = @api_client.select_header_accept(['*/*'])
60
+ # HTTP header 'Content-Type'
61
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
97
62
 
98
63
  # form parameters
99
64
  form_params = opts[:form_params] || {}
100
65
 
101
66
  # http body (model)
102
- post_body = opts[:body]
67
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
103
68
 
104
69
  # return_type
105
70
  return_type = opts[:return_type] || 'String'
@@ -116,9 +81,9 @@ module MailSlurpClient
116
81
  :return_type => return_type
117
82
  )
118
83
 
119
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
84
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
120
85
  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}"
86
+ @api_client.config.logger.debug "API called: ApiUserControllerApi#get_json_property_as_string\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
122
87
  end
123
88
  return data, status_code, headers
124
89
  end
@@ -1925,42 +1925,39 @@ module MailSlurpClient
1925
1925
 
1926
1926
  # Send email
1927
1927
  # Alias for `InboxController.sendEmail` method - see original method for full details. Sends an email from a given inbox that you have created. If no inbox is supplied a random inbox will be created for you and used to send the email.
1928
- # @param inbox_id [String] ID of the inbox you want to send the email from
1929
1928
  # @param send_email_options [SendEmailOptions]
1930
1929
  # @param [Hash] opts the optional parameters
1930
+ # @option opts [String] :inbox_id ID of the inbox you want to send the email from
1931
1931
  # @option opts [Boolean] :use_domain_pool Use domain pool. Optionally create inbox to send from using the mailslurp domain pool.
1932
1932
  # @option opts [Boolean] :virtual_send Optionally create inbox to send from that is a virtual inbox and won&#39;t send to external addresses
1933
1933
  # @return [nil]
1934
- def send_email_source_optional(inbox_id, send_email_options, opts = {})
1935
- send_email_source_optional_with_http_info(inbox_id, send_email_options, opts)
1934
+ def send_email_source_optional(send_email_options, opts = {})
1935
+ send_email_source_optional_with_http_info(send_email_options, opts)
1936
1936
  nil
1937
1937
  end
1938
1938
 
1939
1939
  # Send email
1940
1940
  # Alias for &#x60;InboxController.sendEmail&#x60; method - see original method for full details. Sends an email from a given inbox that you have created. If no inbox is supplied a random inbox will be created for you and used to send the email.
1941
- # @param inbox_id [String] ID of the inbox you want to send the email from
1942
1941
  # @param send_email_options [SendEmailOptions]
1943
1942
  # @param [Hash] opts the optional parameters
1943
+ # @option opts [String] :inbox_id ID of the inbox you want to send the email from
1944
1944
  # @option opts [Boolean] :use_domain_pool Use domain pool. Optionally create inbox to send from using the mailslurp domain pool.
1945
1945
  # @option opts [Boolean] :virtual_send Optionally create inbox to send from that is a virtual inbox and won&#39;t send to external addresses
1946
1946
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1947
- def send_email_source_optional_with_http_info(inbox_id, send_email_options, opts = {})
1947
+ def send_email_source_optional_with_http_info(send_email_options, opts = {})
1948
1948
  if @api_client.config.debugging
1949
1949
  @api_client.config.logger.debug 'Calling API: EmailControllerApi.send_email_source_optional ...'
1950
1950
  end
1951
- # verify the required parameter 'inbox_id' is set
1952
- if @api_client.config.client_side_validation && inbox_id.nil?
1953
- fail ArgumentError, "Missing the required parameter 'inbox_id' when calling EmailControllerApi.send_email_source_optional"
1954
- end
1955
1951
  # verify the required parameter 'send_email_options' is set
1956
1952
  if @api_client.config.client_side_validation && send_email_options.nil?
1957
1953
  fail ArgumentError, "Missing the required parameter 'send_email_options' when calling EmailControllerApi.send_email_source_optional"
1958
1954
  end
1959
1955
  # resource path
1960
- local_var_path = '/emails'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))
1956
+ local_var_path = '/emails'
1961
1957
 
1962
1958
  # query parameters
1963
1959
  query_params = opts[:query_params] || {}
1960
+ query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
1964
1961
  query_params[:'useDomainPool'] = opts[:'use_domain_pool'] if !opts[:'use_domain_pool'].nil?
1965
1962
  query_params[:'virtualSend'] = opts[:'virtual_send'] if !opts[:'virtual_send'].nil?
1966
1963
 
@@ -1510,7 +1510,7 @@ module MailSlurpClient
1510
1510
  end
1511
1511
 
1512
1512
  # List Inboxes and email addresses
1513
- # List the inboxes you have created. Note use of the more advanced `getAllEmails` is recommended and allows paginated access using a limit and sort parameter.
1513
+ # List the inboxes you have created. Note use of the more advanced `getAllInboxes` is recommended and allows paginated access using a limit and sort parameter.
1514
1514
  # @param [Hash] opts the optional parameters
1515
1515
  # @option opts [Integer] :size Optional result size limit. Note an automatic limit of 100 results is applied. See the paginated &#x60;getAllEmails&#x60; for larger queries. (default to 100)
1516
1516
  # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
@@ -1523,7 +1523,7 @@ module MailSlurpClient
1523
1523
  end
1524
1524
 
1525
1525
  # List Inboxes and email addresses
1526
- # List the inboxes you have created. Note use of the more advanced &#x60;getAllEmails&#x60; is recommended and allows paginated access using a limit and sort parameter.
1526
+ # List the inboxes you have created. Note use of the more advanced &#x60;getAllInboxes&#x60; is recommended and allows paginated access using a limit and sort parameter.
1527
1527
  # @param [Hash] opts the optional parameters
1528
1528
  # @option opts [Integer] :size Optional result size limit. Note an automatic limit of 100 results is applied. See the paginated &#x60;getAllEmails&#x60; for larger queries.
1529
1529
  # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
@@ -487,6 +487,8 @@ module MailSlurpClient
487
487
  # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'DESC')
488
488
  # @option opts [String] :search_filter Optional search filter
489
489
  # @option opts [DateTime] :since Filter by created at after the given timestamp
490
+ # @option opts [String] :inbox_id Filter by inboxId
491
+ # @option opts [String] :phone_id Filter by phoneId
490
492
  # @option opts [DateTime] :before Filter by created at before the given timestamp
491
493
  # @return [PageWebhookProjection]
492
494
  def get_all_webhooks(opts = {})
@@ -502,6 +504,8 @@ module MailSlurpClient
502
504
  # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
503
505
  # @option opts [String] :search_filter Optional search filter
504
506
  # @option opts [DateTime] :since Filter by created at after the given timestamp
507
+ # @option opts [String] :inbox_id Filter by inboxId
508
+ # @option opts [String] :phone_id Filter by phoneId
505
509
  # @option opts [DateTime] :before Filter by created at before the given timestamp
506
510
  # @return [Array<(PageWebhookProjection, Integer, Hash)>] PageWebhookProjection data, response status code and response headers
507
511
  def get_all_webhooks_with_http_info(opts = {})
@@ -538,6 +542,8 @@ module MailSlurpClient
538
542
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
539
543
  query_params[:'searchFilter'] = opts[:'search_filter'] if !opts[:'search_filter'].nil?
540
544
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
545
+ query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
546
+ query_params[:'phoneId'] = opts[:'phone_id'] if !opts[:'phone_id'].nil?
541
547
  query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
542
548
 
543
549
  # header parameters
@@ -677,7 +683,7 @@ module MailSlurpClient
677
683
  fail ArgumentError, "Missing the required parameter 'event' when calling WebhookControllerApi.get_json_schema_for_webhook_event"
678
684
  end
679
685
  # verify enum value
680
- allowable_values = ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"]
686
+ allowable_values = ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"]
681
687
  if @api_client.config.client_side_validation && !allowable_values.include?(event)
682
688
  fail ArgumentError, "invalid value for \"event\", must be one of #{allowable_values}"
683
689
  end
@@ -781,6 +787,85 @@ module MailSlurpClient
781
787
  return data, status_code, headers
782
788
  end
783
789
 
790
+ # Get paginated webhooks for a phone number
791
+ # @param phone_id [String]
792
+ # @param [Hash] opts the optional parameters
793
+ # @option opts [Integer] :page Optional page index in list pagination (default to 0)
794
+ # @option opts [Integer] :size Optional page size in list pagination (default to 20)
795
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC (default to 'ASC')
796
+ # @option opts [DateTime] :since Filter by created at after the given timestamp
797
+ # @option opts [DateTime] :before Filter by created at before the given timestamp
798
+ # @return [PageWebhookProjection]
799
+ def get_phone_number_webhooks_paginated(phone_id, opts = {})
800
+ data, _status_code, _headers = get_phone_number_webhooks_paginated_with_http_info(phone_id, opts)
801
+ data
802
+ end
803
+
804
+ # Get paginated webhooks for a phone number
805
+ # @param phone_id [String]
806
+ # @param [Hash] opts the optional parameters
807
+ # @option opts [Integer] :page Optional page index in list pagination
808
+ # @option opts [Integer] :size Optional page size in list pagination
809
+ # @option opts [String] :sort Optional createdAt sort direction ASC or DESC
810
+ # @option opts [DateTime] :since Filter by created at after the given timestamp
811
+ # @option opts [DateTime] :before Filter by created at before the given timestamp
812
+ # @return [Array<(PageWebhookProjection, Integer, Hash)>] PageWebhookProjection data, response status code and response headers
813
+ def get_phone_number_webhooks_paginated_with_http_info(phone_id, opts = {})
814
+ if @api_client.config.debugging
815
+ @api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_phone_number_webhooks_paginated ...'
816
+ end
817
+ # verify the required parameter 'phone_id' is set
818
+ if @api_client.config.client_side_validation && phone_id.nil?
819
+ fail ArgumentError, "Missing the required parameter 'phone_id' when calling WebhookControllerApi.get_phone_number_webhooks_paginated"
820
+ end
821
+ allowable_values = ["ASC", "DESC"]
822
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
823
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
824
+ end
825
+ # resource path
826
+ local_var_path = '/phone/numbers/{phoneId}/webhooks/paginated'.sub('{' + 'phoneId' + '}', CGI.escape(phone_id.to_s))
827
+
828
+ # query parameters
829
+ query_params = opts[:query_params] || {}
830
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
831
+ query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil?
832
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
833
+ query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
834
+ query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
835
+
836
+ # header parameters
837
+ header_params = opts[:header_params] || {}
838
+ # HTTP header 'Accept' (if needed)
839
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
840
+
841
+ # form parameters
842
+ form_params = opts[:form_params] || {}
843
+
844
+ # http body (model)
845
+ post_body = opts[:body]
846
+
847
+ # return_type
848
+ return_type = opts[:return_type] || 'PageWebhookProjection'
849
+
850
+ # auth_names
851
+ auth_names = opts[:auth_names] || ['API_KEY']
852
+
853
+ new_options = opts.merge(
854
+ :header_params => header_params,
855
+ :query_params => query_params,
856
+ :form_params => form_params,
857
+ :body => post_body,
858
+ :auth_names => auth_names,
859
+ :return_type => return_type
860
+ )
861
+
862
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
863
+ if @api_client.config.debugging
864
+ @api_client.config.logger.debug "API called: WebhookControllerApi#get_phone_number_webhooks_paginated\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
865
+ end
866
+ return data, status_code, headers
867
+ end
868
+
784
869
  # Get test webhook payload example. Response content depends on eventName passed. Uses `EMAIL_RECEIVED` as default.
785
870
  # @param [Hash] opts the optional parameters
786
871
  # @option opts [String] :event_name
@@ -798,7 +883,7 @@ module MailSlurpClient
798
883
  if @api_client.config.debugging
799
884
  @api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_test_webhook_payload ...'
800
885
  end
801
- allowable_values = ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"]
886
+ allowable_values = ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"]
802
887
  if @api_client.config.client_side_validation && opts[:'event_name'] && !allowable_values.include?(opts[:'event_name'])
803
888
  fail ArgumentError, "invalid value for \"event_name\", must be one of #{allowable_values}"
804
889
  end
@@ -950,6 +1035,60 @@ module MailSlurpClient
950
1035
  return data, status_code, headers
951
1036
  end
952
1037
 
1038
+ # Get webhook test payload for delivery status event
1039
+ # @param [Hash] opts the optional parameters
1040
+ # @return [WebhookDeliveryStatusPayload]
1041
+ def get_test_webhook_payload_delivery_status(opts = {})
1042
+ data, _status_code, _headers = get_test_webhook_payload_delivery_status_with_http_info(opts)
1043
+ data
1044
+ end
1045
+
1046
+ # Get webhook test payload for delivery status event
1047
+ # @param [Hash] opts the optional parameters
1048
+ # @return [Array<(WebhookDeliveryStatusPayload, Integer, Hash)>] WebhookDeliveryStatusPayload data, response status code and response headers
1049
+ def get_test_webhook_payload_delivery_status_with_http_info(opts = {})
1050
+ if @api_client.config.debugging
1051
+ @api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_test_webhook_payload_delivery_status ...'
1052
+ end
1053
+ # resource path
1054
+ local_var_path = '/webhooks/test/delivery-status-payload'
1055
+
1056
+ # query parameters
1057
+ query_params = opts[:query_params] || {}
1058
+
1059
+ # header parameters
1060
+ header_params = opts[:header_params] || {}
1061
+ # HTTP header 'Accept' (if needed)
1062
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1063
+
1064
+ # form parameters
1065
+ form_params = opts[:form_params] || {}
1066
+
1067
+ # http body (model)
1068
+ post_body = opts[:body]
1069
+
1070
+ # return_type
1071
+ return_type = opts[:return_type] || 'WebhookDeliveryStatusPayload'
1072
+
1073
+ # auth_names
1074
+ auth_names = opts[:auth_names] || ['API_KEY']
1075
+
1076
+ new_options = opts.merge(
1077
+ :header_params => header_params,
1078
+ :query_params => query_params,
1079
+ :form_params => form_params,
1080
+ :body => post_body,
1081
+ :auth_names => auth_names,
1082
+ :return_type => return_type
1083
+ )
1084
+
1085
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1086
+ if @api_client.config.debugging
1087
+ @api_client.config.logger.debug "API called: WebhookControllerApi#get_test_webhook_payload_delivery_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1088
+ end
1089
+ return data, status_code, headers
1090
+ end
1091
+
953
1092
  # Get webhook test payload for email opened event
954
1093
  # @param [Hash] opts the optional parameters
955
1094
  # @return [WebhookEmailOpenedPayload]
@@ -1280,6 +1419,60 @@ module MailSlurpClient
1280
1419
  return data, status_code, headers
1281
1420
  end
1282
1421
 
1422
+ # Get webhook test payload for new sms event
1423
+ # @param [Hash] opts the optional parameters
1424
+ # @return [WebhookNewSmsPayload]
1425
+ def get_test_webhook_payload_new_sms(opts = {})
1426
+ data, _status_code, _headers = get_test_webhook_payload_new_sms_with_http_info(opts)
1427
+ data
1428
+ end
1429
+
1430
+ # Get webhook test payload for new sms event
1431
+ # @param [Hash] opts the optional parameters
1432
+ # @return [Array<(WebhookNewSmsPayload, Integer, Hash)>] WebhookNewSmsPayload data, response status code and response headers
1433
+ def get_test_webhook_payload_new_sms_with_http_info(opts = {})
1434
+ if @api_client.config.debugging
1435
+ @api_client.config.logger.debug 'Calling API: WebhookControllerApi.get_test_webhook_payload_new_sms ...'
1436
+ end
1437
+ # resource path
1438
+ local_var_path = '/webhooks/test/new-sms-payload'
1439
+
1440
+ # query parameters
1441
+ query_params = opts[:query_params] || {}
1442
+
1443
+ # header parameters
1444
+ header_params = opts[:header_params] || {}
1445
+ # HTTP header 'Accept' (if needed)
1446
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
1447
+
1448
+ # form parameters
1449
+ form_params = opts[:form_params] || {}
1450
+
1451
+ # http body (model)
1452
+ post_body = opts[:body]
1453
+
1454
+ # return_type
1455
+ return_type = opts[:return_type] || 'WebhookNewSmsPayload'
1456
+
1457
+ # auth_names
1458
+ auth_names = opts[:auth_names] || ['API_KEY']
1459
+
1460
+ new_options = opts.merge(
1461
+ :header_params => header_params,
1462
+ :query_params => query_params,
1463
+ :form_params => form_params,
1464
+ :body => post_body,
1465
+ :auth_names => auth_names,
1466
+ :return_type => return_type
1467
+ )
1468
+
1469
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1470
+ if @api_client.config.debugging
1471
+ @api_client.config.logger.debug "API called: WebhookControllerApi#get_test_webhook_payload_new_sms\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1472
+ end
1473
+ return data, status_code, headers
1474
+ end
1475
+
1283
1476
  # Get a webhook
1284
1477
  # @param webhook_id [String]
1285
1478
  # @param [Hash] opts the optional parameters
@@ -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", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"])
129
+ event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"])
130
130
  return false unless event_name_validator.valid?(@event_name)
131
131
  return false if @message_id.nil?
132
132
  return false if @webhook_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", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"])
139
+ validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"])
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
@@ -17,10 +17,10 @@ module MailSlurpClient
17
17
  class BounceProjection
18
18
  attr_accessor :id
19
19
 
20
- attr_accessor :subject
21
-
22
20
  attr_accessor :sender
23
21
 
22
+ attr_accessor :subject
23
+
24
24
  attr_accessor :created_at
25
25
 
26
26
  attr_accessor :bounce_type
@@ -31,8 +31,8 @@ module MailSlurpClient
31
31
  def self.attribute_map
32
32
  {
33
33
  :'id' => :'id',
34
- :'subject' => :'subject',
35
34
  :'sender' => :'sender',
35
+ :'subject' => :'subject',
36
36
  :'created_at' => :'createdAt',
37
37
  :'bounce_type' => :'bounceType',
38
38
  :'bounce_mta' => :'bounceMta'
@@ -43,8 +43,8 @@ module MailSlurpClient
43
43
  def self.openapi_types
44
44
  {
45
45
  :'id' => :'String',
46
- :'subject' => :'String',
47
46
  :'sender' => :'String',
47
+ :'subject' => :'String',
48
48
  :'created_at' => :'DateTime',
49
49
  :'bounce_type' => :'String',
50
50
  :'bounce_mta' => :'String'
@@ -76,14 +76,14 @@ module MailSlurpClient
76
76
  self.id = attributes[:'id']
77
77
  end
78
78
 
79
- if attributes.key?(:'subject')
80
- self.subject = attributes[:'subject']
81
- end
82
-
83
79
  if attributes.key?(:'sender')
84
80
  self.sender = attributes[:'sender']
85
81
  end
86
82
 
83
+ if attributes.key?(:'subject')
84
+ self.subject = attributes[:'subject']
85
+ end
86
+
87
87
  if attributes.key?(:'created_at')
88
88
  self.created_at = attributes[:'created_at']
89
89
  end
@@ -126,8 +126,8 @@ module MailSlurpClient
126
126
  return true if self.equal?(o)
127
127
  self.class == o.class &&
128
128
  id == o.id &&
129
- subject == o.subject &&
130
129
  sender == o.sender &&
130
+ subject == o.subject &&
131
131
  created_at == o.created_at &&
132
132
  bounce_type == o.bounce_type &&
133
133
  bounce_mta == o.bounce_mta
@@ -142,7 +142,7 @@ module MailSlurpClient
142
142
  # Calculates hash code according to all attributes.
143
143
  # @return [Integer] Hash code
144
144
  def hash
145
- [id, subject, sender, created_at, bounce_type, bounce_mta].hash
145
+ [id, sender, subject, created_at, bounce_type, bounce_mta].hash
146
146
  end
147
147
 
148
148
  # Builds the object from hash
@@ -130,7 +130,7 @@ module MailSlurpClient
130
130
  # @return true if the model is valid
131
131
  def valid?
132
132
  return false if @url.nil?
133
- event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"])
133
+ event_name_validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"])
134
134
  return false unless event_name_validator.valid?(@event_name)
135
135
  true
136
136
  end
@@ -138,7 +138,7 @@ module MailSlurpClient
138
138
  # Custom attribute writer method checking allowed values (enum).
139
139
  # @param [Object] event_name Object to be assigned
140
140
  def event_name=(event_name)
141
- validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"])
141
+ validator = EnumAttributeValidator.new('String', ["EMAIL_RECEIVED", "NEW_EMAIL", "NEW_CONTACT", "NEW_ATTACHMENT", "EMAIL_OPENED", "EMAIL_READ", "DELIVERY_STATUS", "BOUNCE", "BOUNCE_RECIPIENT", "NEW_SMS"])
142
142
  unless validator.valid?(event_name)
143
143
  fail ArgumentError, "invalid value for \"event_name\", must be one of #{validator.allowable_values}."
144
144
  end
@@ -21,10 +21,10 @@ module MailSlurpClient
21
21
 
22
22
  attr_accessor :subject
23
23
 
24
- attr_accessor :inbox_id
25
-
26
24
  attr_accessor :attachments
27
25
 
26
+ attr_accessor :inbox_id
27
+
28
28
  attr_accessor :to
29
29
 
30
30
  attr_accessor :bcc
@@ -49,8 +49,8 @@ module MailSlurpClient
49
49
  :'id' => :'id',
50
50
  :'from' => :'from',
51
51
  :'subject' => :'subject',
52
- :'inbox_id' => :'inboxId',
53
52
  :'attachments' => :'attachments',
53
+ :'inbox_id' => :'inboxId',
54
54
  :'to' => :'to',
55
55
  :'bcc' => :'bcc',
56
56
  :'cc' => :'cc',
@@ -69,8 +69,8 @@ module MailSlurpClient
69
69
  :'id' => :'String',
70
70
  :'from' => :'String',
71
71
  :'subject' => :'String',
72
- :'inbox_id' => :'String',
73
72
  :'attachments' => :'Array<String>',
73
+ :'inbox_id' => :'String',
74
74
  :'to' => :'Array<String>',
75
75
  :'bcc' => :'Array<String>',
76
76
  :'cc' => :'Array<String>',
@@ -116,16 +116,16 @@ module MailSlurpClient
116
116
  self.subject = attributes[:'subject']
117
117
  end
118
118
 
119
- if attributes.key?(:'inbox_id')
120
- self.inbox_id = attributes[:'inbox_id']
121
- end
122
-
123
119
  if attributes.key?(:'attachments')
124
120
  if (value = attributes[:'attachments']).is_a?(Array)
125
121
  self.attachments = value
126
122
  end
127
123
  end
128
124
 
125
+ if attributes.key?(:'inbox_id')
126
+ self.inbox_id = attributes[:'inbox_id']
127
+ end
128
+
129
129
  if attributes.key?(:'to')
130
130
  if (value = attributes[:'to']).is_a?(Array)
131
131
  self.to = value
@@ -220,8 +220,8 @@ module MailSlurpClient
220
220
  id == o.id &&
221
221
  from == o.from &&
222
222
  subject == o.subject &&
223
- inbox_id == o.inbox_id &&
224
223
  attachments == o.attachments &&
224
+ inbox_id == o.inbox_id &&
225
225
  to == o.to &&
226
226
  bcc == o.bcc &&
227
227
  cc == o.cc &&
@@ -242,7 +242,7 @@ module MailSlurpClient
242
242
  # Calculates hash code according to all attributes.
243
243
  # @return [Integer] Hash code
244
244
  def hash
245
- [id, from, subject, inbox_id, attachments, to, bcc, cc, created_at, domain_id, read, team_access, body_md5_hash, body_excerpt].hash
245
+ [id, from, subject, attachments, inbox_id, to, bcc, cc, created_at, domain_id, read, team_access, body_md5_hash, body_excerpt].hash
246
246
  end
247
247
 
248
248
  # Builds the object from hash