mailslurp_client 15.0.3 → 15.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (170) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/lib/mailslurp_client/api/alias_controller_api.rb +60 -56
  4. data/lib/mailslurp_client/api/attachment_controller_api.rb +50 -61
  5. data/lib/mailslurp_client/api/bounce_controller_api.rb +27 -19
  6. data/lib/mailslurp_client/api/bulk_actions_controller_api.rb +16 -16
  7. data/lib/mailslurp_client/api/common_actions_controller_api.rb +129 -68
  8. data/lib/mailslurp_client/api/contact_controller_api.rb +23 -23
  9. data/lib/mailslurp_client/api/domain_controller_api.rb +33 -33
  10. data/lib/mailslurp_client/api/email_controller_api.rb +145 -122
  11. data/lib/mailslurp_client/api/expired_controller_api.rb +20 -20
  12. data/lib/mailslurp_client/api/export_controller_api.rb +39 -39
  13. data/lib/mailslurp_client/api/form_controller_api.rb +17 -19
  14. data/lib/mailslurp_client/api/group_controller_api.rb +53 -53
  15. data/lib/mailslurp_client/api/inbox_controller_api.rb +198 -178
  16. data/lib/mailslurp_client/api/inbox_forwarder_controller_api.rb +34 -30
  17. data/lib/mailslurp_client/api/inbox_ruleset_controller_api.rb +34 -30
  18. data/lib/mailslurp_client/api/mail_server_controller_api.rb +27 -27
  19. data/lib/mailslurp_client/api/missed_email_controller_api.rb +55 -43
  20. data/lib/mailslurp_client/api/sent_emails_controller_api.rb +158 -48
  21. data/lib/mailslurp_client/api/template_controller_api.rb +22 -22
  22. data/lib/mailslurp_client/api/tracking_controller_api.rb +17 -17
  23. data/lib/mailslurp_client/api/wait_for_controller_api.rb +129 -89
  24. data/lib/mailslurp_client/api/webhook_controller_api.rb +103 -87
  25. data/lib/mailslurp_client/api_client.rb +1 -1
  26. data/lib/mailslurp_client/api_error.rb +1 -1
  27. data/lib/mailslurp_client/configuration.rb +3 -3
  28. data/lib/mailslurp_client/models/abstract_webhook_payload.rb +22 -22
  29. data/lib/mailslurp_client/models/alias_dto.rb +64 -49
  30. data/lib/mailslurp_client/models/alias_projection.rb +50 -50
  31. data/lib/mailslurp_client/models/attachment_entity.rb +40 -40
  32. data/lib/mailslurp_client/models/attachment_meta_data.rb +42 -22
  33. data/lib/mailslurp_client/models/attachment_projection.rb +38 -33
  34. data/lib/mailslurp_client/models/basic_auth_options.rb +1 -1
  35. data/lib/mailslurp_client/models/bounce_projection.rb +19 -19
  36. data/lib/mailslurp_client/models/bounce_recipient.rb +31 -31
  37. data/lib/mailslurp_client/models/bounced_email_dto.rb +63 -63
  38. data/lib/mailslurp_client/models/bounced_recipient_dto.rb +23 -23
  39. data/lib/mailslurp_client/models/bulk_send_email_options.rb +11 -1
  40. data/lib/mailslurp_client/models/condition_option.rb +13 -3
  41. data/lib/mailslurp_client/models/contact_dto.rb +63 -63
  42. data/lib/mailslurp_client/models/contact_projection.rb +39 -39
  43. data/lib/mailslurp_client/models/content_match_options.rb +6 -1
  44. data/lib/mailslurp_client/models/count_dto.rb +1 -1
  45. data/lib/mailslurp_client/models/create_alias_options.rb +11 -1
  46. data/lib/mailslurp_client/models/create_contact_options.rb +43 -43
  47. data/lib/mailslurp_client/models/create_domain_options.rb +22 -17
  48. data/lib/mailslurp_client/models/create_group_options.rb +1 -1
  49. data/lib/mailslurp_client/models/create_inbox_dto.rb +59 -59
  50. data/lib/mailslurp_client/models/create_inbox_forwarder_options.rb +30 -15
  51. data/lib/mailslurp_client/models/create_inbox_ruleset_options.rb +39 -24
  52. data/lib/mailslurp_client/models/create_template_options.rb +1 -1
  53. data/lib/mailslurp_client/models/create_tracking_pixel_options.rb +1 -1
  54. data/lib/mailslurp_client/models/create_webhook_options.rb +24 -19
  55. data/lib/mailslurp_client/models/describe_domain_options.rb +1 -1
  56. data/lib/mailslurp_client/models/describe_mail_server_domain_result.rb +21 -21
  57. data/lib/mailslurp_client/models/dns_lookup_options.rb +30 -15
  58. data/lib/mailslurp_client/models/dns_lookup_result.rb +34 -33
  59. data/lib/mailslurp_client/models/dns_lookup_results.rb +1 -1
  60. data/lib/mailslurp_client/models/domain_dto.rb +100 -70
  61. data/lib/mailslurp_client/models/domain_name_record.rb +18 -17
  62. data/lib/mailslurp_client/models/domain_preview.rb +29 -28
  63. data/lib/mailslurp_client/models/download_attachment_dto.rb +16 -1
  64. data/lib/mailslurp_client/models/email.rb +179 -139
  65. data/lib/mailslurp_client/models/email_analysis.rb +29 -29
  66. data/lib/mailslurp_client/models/email_content_match_result.rb +19 -19
  67. data/lib/mailslurp_client/models/email_links_result.rb +19 -19
  68. data/lib/mailslurp_client/models/email_preview.rb +63 -48
  69. data/lib/mailslurp_client/models/email_projection.rb +77 -77
  70. data/lib/mailslurp_client/models/email_recipients.rb +17 -16
  71. data/lib/mailslurp_client/models/email_text_lines_result.rb +19 -19
  72. data/lib/mailslurp_client/models/email_verification_result.rb +22 -22
  73. data/lib/mailslurp_client/models/expiration_defaults.rb +17 -17
  74. data/lib/mailslurp_client/models/expired_inbox_dto.rb +19 -19
  75. data/lib/mailslurp_client/models/expired_inbox_record_projection.rb +33 -33
  76. data/lib/mailslurp_client/models/export_link.rb +1 -1
  77. data/lib/mailslurp_client/models/export_options.rb +2 -2
  78. data/lib/mailslurp_client/models/flush_expired_inboxes_result.rb +19 -19
  79. data/lib/mailslurp_client/models/forward_email_options.rb +37 -32
  80. data/lib/mailslurp_client/models/gravatar_url.rb +19 -19
  81. data/lib/mailslurp_client/models/group_contacts_dto.rb +19 -19
  82. data/lib/mailslurp_client/models/group_dto.rb +28 -28
  83. data/lib/mailslurp_client/models/group_projection.rb +29 -29
  84. data/lib/mailslurp_client/models/html_validation_result.rb +27 -12
  85. data/lib/mailslurp_client/models/{inbox.rb → inbox_dto.rb} +72 -57
  86. data/lib/mailslurp_client/models/inbox_exists_dto.rb +1 -1
  87. data/lib/mailslurp_client/models/inbox_forwarder_dto.rb +48 -48
  88. data/lib/mailslurp_client/models/inbox_forwarder_test_options.rb +1 -1
  89. data/lib/mailslurp_client/models/inbox_forwarder_test_result.rb +19 -19
  90. data/lib/mailslurp_client/models/inbox_preview.rb +59 -39
  91. data/lib/mailslurp_client/models/inbox_ruleset_dto.rb +61 -61
  92. data/lib/mailslurp_client/models/inbox_ruleset_test_options.rb +1 -1
  93. data/lib/mailslurp_client/models/inbox_ruleset_test_result.rb +19 -14
  94. data/lib/mailslurp_client/models/inline_object.rb +221 -0
  95. data/lib/mailslurp_client/models/ip_address_result.rb +1 -1
  96. data/lib/mailslurp_client/models/json_schema_dto.rb +1 -1
  97. data/lib/mailslurp_client/models/match_option.rb +18 -3
  98. data/lib/mailslurp_client/models/match_options.rb +17 -17
  99. data/lib/mailslurp_client/models/missed_email.rb +77 -77
  100. data/lib/mailslurp_client/models/missed_email_projection.rb +25 -25
  101. data/lib/mailslurp_client/models/name_server_record.rb +16 -16
  102. data/lib/mailslurp_client/models/organization_inbox_projection.rb +70 -45
  103. data/lib/mailslurp_client/models/page_alias.rb +59 -50
  104. data/lib/mailslurp_client/models/page_attachment_entity.rb +59 -50
  105. data/lib/mailslurp_client/models/page_bounced_email.rb +59 -50
  106. data/lib/mailslurp_client/models/page_bounced_recipients.rb +59 -50
  107. data/lib/mailslurp_client/models/page_contact_projection.rb +59 -50
  108. data/lib/mailslurp_client/models/page_email_preview.rb +59 -50
  109. data/lib/mailslurp_client/models/page_email_projection.rb +59 -50
  110. data/lib/mailslurp_client/models/page_expired_inbox_record_projection.rb +59 -50
  111. data/lib/mailslurp_client/models/page_group_projection.rb +59 -50
  112. data/lib/mailslurp_client/models/page_inbox_forwarder_dto.rb +59 -50
  113. data/lib/mailslurp_client/models/page_inbox_projection.rb +59 -50
  114. data/lib/mailslurp_client/models/page_inbox_ruleset_dto.rb +59 -50
  115. data/lib/mailslurp_client/models/page_missed_email_projection.rb +59 -50
  116. data/lib/mailslurp_client/models/page_organization_inbox_projection.rb +59 -50
  117. data/lib/mailslurp_client/models/page_sent_email_projection.rb +86 -47
  118. data/lib/mailslurp_client/models/page_template_projection.rb +59 -50
  119. data/lib/mailslurp_client/models/page_thread_projection.rb +59 -50
  120. data/lib/mailslurp_client/models/page_tracking_pixel_projection.rb +59 -50
  121. data/lib/mailslurp_client/models/page_unknown_missed_email_projection.rb +59 -50
  122. data/lib/mailslurp_client/models/page_webhook_projection.rb +59 -50
  123. data/lib/mailslurp_client/models/page_webhook_result.rb +59 -50
  124. data/lib/mailslurp_client/models/{pageable.rb → pageable_object.rb} +32 -32
  125. data/lib/mailslurp_client/models/raw_email_json.rb +1 -1
  126. data/lib/mailslurp_client/models/recipient.rb +19 -19
  127. data/lib/mailslurp_client/models/reply_to_alias_email_options.rb +47 -35
  128. data/lib/mailslurp_client/models/reply_to_email_options.rb +57 -45
  129. data/lib/mailslurp_client/models/send_email_options.rb +112 -110
  130. data/lib/mailslurp_client/models/sender.rb +20 -19
  131. data/lib/mailslurp_client/models/sent_email_dto.rb +110 -95
  132. data/lib/mailslurp_client/models/sent_email_projection.rb +88 -87
  133. data/lib/mailslurp_client/models/set_inbox_favourited_options.rb +6 -1
  134. data/lib/mailslurp_client/models/simple_send_email_options.rb +30 -25
  135. data/lib/mailslurp_client/models/sort.rb +1 -1
  136. data/lib/mailslurp_client/models/template_dto.rb +33 -33
  137. data/lib/mailslurp_client/models/template_projection.rb +37 -37
  138. data/lib/mailslurp_client/models/template_variable.rb +1 -1
  139. data/lib/mailslurp_client/models/test_new_inbox_forwarder_options.rb +1 -1
  140. data/lib/mailslurp_client/models/test_new_inbox_ruleset_options.rb +1 -1
  141. data/lib/mailslurp_client/models/thread_projection.rb +71 -71
  142. data/lib/mailslurp_client/models/tracking_pixel_dto.rb +54 -54
  143. data/lib/mailslurp_client/models/tracking_pixel_projection.rb +42 -42
  144. data/lib/mailslurp_client/models/unknown_missed_email_projection.rb +25 -25
  145. data/lib/mailslurp_client/models/unread_count.rb +1 -1
  146. data/lib/mailslurp_client/models/unseen_error_count_dto.rb +1 -1
  147. data/lib/mailslurp_client/models/update_alias_options.rb +1 -1
  148. data/lib/mailslurp_client/models/update_domain_options.rb +1 -1
  149. data/lib/mailslurp_client/models/update_group_contacts.rb +1 -1
  150. data/lib/mailslurp_client/models/update_inbox_options.rb +27 -27
  151. data/lib/mailslurp_client/models/upload_attachment_options.rb +15 -15
  152. data/lib/mailslurp_client/models/validation_dto.rb +11 -1
  153. data/lib/mailslurp_client/models/validation_message.rb +2 -1
  154. data/lib/mailslurp_client/models/verify_email_address_options.rb +1 -1
  155. data/lib/mailslurp_client/models/wait_for_conditions.rb +53 -53
  156. data/lib/mailslurp_client/models/webhook_dto.rb +105 -65
  157. data/lib/mailslurp_client/models/webhook_email_opened_payload.rb +83 -43
  158. data/lib/mailslurp_client/models/webhook_email_read_payload.rb +85 -50
  159. data/lib/mailslurp_client/models/webhook_new_attachment_payload.rb +79 -44
  160. data/lib/mailslurp_client/models/webhook_new_contact_payload.rb +98 -83
  161. data/lib/mailslurp_client/models/webhook_new_email_payload.rb +140 -85
  162. data/lib/mailslurp_client/models/webhook_projection.rb +47 -47
  163. data/lib/mailslurp_client/models/webhook_redrive_result.rb +19 -19
  164. data/lib/mailslurp_client/models/webhook_result_dto.rb +102 -102
  165. data/lib/mailslurp_client/models/webhook_test_request.rb +28 -28
  166. data/lib/mailslurp_client/models/webhook_test_response.rb +14 -14
  167. data/lib/mailslurp_client/models/webhook_test_result.rb +19 -19
  168. data/lib/mailslurp_client/version.rb +2 -2
  169. data/lib/mailslurp_client.rb +4 -3
  170. metadata +5 -4
@@ -4,7 +4,7 @@
4
4
  #MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
5
5
 
6
6
  The version of the OpenAPI document: 6.5.2
7
-
7
+ Contact: contact@mailslurp.dev
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 4.3.1
10
10
 
@@ -21,23 +21,27 @@ module MailSlurpClient
21
21
  end
22
22
  # Wait for an email to match the provided filter conditions such as subject contains keyword.
23
23
  # Generic waitFor method that will wait until an inbox meets given conditions or return immediately if already met
24
+ # @param wait_for_conditions [WaitForConditions]
24
25
  # @param [Hash] opts the optional parameters
25
- # @option opts [WaitForConditions] :wait_for_conditions Conditions to apply to emails that you are waiting for
26
26
  # @return [Array<EmailPreview>]
27
- def wait_for(opts = {})
28
- data, _status_code, _headers = wait_for_with_http_info(opts)
27
+ def wait_for(wait_for_conditions, opts = {})
28
+ data, _status_code, _headers = wait_for_with_http_info(wait_for_conditions, opts)
29
29
  data
30
30
  end
31
31
 
32
32
  # Wait for an email to match the provided filter conditions such as subject contains keyword.
33
33
  # Generic waitFor method that will wait until an inbox meets given conditions or return immediately if already met
34
+ # @param wait_for_conditions [WaitForConditions]
34
35
  # @param [Hash] opts the optional parameters
35
- # @option opts [WaitForConditions] :wait_for_conditions Conditions to apply to emails that you are waiting for
36
36
  # @return [Array<(Array<EmailPreview>, Integer, Hash)>] Array<EmailPreview> data, response status code and response headers
37
- def wait_for_with_http_info(opts = {})
37
+ def wait_for_with_http_info(wait_for_conditions, opts = {})
38
38
  if @api_client.config.debugging
39
39
  @api_client.config.logger.debug 'Calling API: WaitForControllerApi.wait_for ...'
40
40
  end
41
+ # verify the required parameter 'wait_for_conditions' is set
42
+ if @api_client.config.client_side_validation && wait_for_conditions.nil?
43
+ fail ArgumentError, "Missing the required parameter 'wait_for_conditions' when calling WaitForControllerApi.wait_for"
44
+ end
41
45
  # resource path
42
46
  local_var_path = '/waitFor'
43
47
 
@@ -47,7 +51,7 @@ module MailSlurpClient
47
51
  # header parameters
48
52
  header_params = opts[:header_params] || {}
49
53
  # HTTP header 'Accept' (if needed)
50
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
54
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
51
55
  # HTTP header 'Content-Type'
52
56
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
53
57
 
@@ -55,7 +59,7 @@ module MailSlurpClient
55
59
  form_params = opts[:form_params] || {}
56
60
 
57
61
  # http body (model)
58
- post_body = opts[:body] || @api_client.object_to_http_body(opts[:'wait_for_conditions'])
62
+ post_body = opts[:body] || @api_client.object_to_http_body(wait_for_conditions)
59
63
 
60
64
  # return_type
61
65
  return_type = opts[:return_type] || 'Array<EmailPreview>'
@@ -81,37 +85,49 @@ module MailSlurpClient
81
85
 
82
86
  # Wait for and return count number of emails. Hold connection until inbox count matches expected or timeout occurs
83
87
  # If inbox contains count or more emails at time of request then return count worth of emails. If not wait until the count is reached and return those or return an error if timeout is exceeded.
88
+ # @param inbox_id [String] Id of the inbox we are fetching emails from
89
+ # @param count [Integer] Number of emails to wait for. Must be greater that 1
84
90
  # @param [Hash] opts the optional parameters
91
+ # @option opts [Integer] :timeout Max milliseconds to wait
92
+ # @option opts [Boolean] :unread_only Optional filter for unread only (default to false)
85
93
  # @option opts [DateTime] :before Filter for emails that were received before the given timestamp
86
- # @option opts [Integer] :count Number of emails to wait for. Must be greater that 1
87
- # @option opts [Integer] :delay Max milliseconds delay between calls
88
- # @option opts [String] :inbox_id Id of the inbox we are fetching emails from
89
94
  # @option opts [DateTime] :since Filter for emails that were received after the given timestamp
90
95
  # @option opts [String] :sort Sort direction
91
- # @option opts [Integer] :timeout Max milliseconds to wait
92
- # @option opts [Boolean] :unread_only Optional filter for unread only (default to false)
96
+ # @option opts [Integer] :delay Max milliseconds delay between calls
93
97
  # @return [Array<EmailPreview>]
94
- def wait_for_email_count(opts = {})
95
- data, _status_code, _headers = wait_for_email_count_with_http_info(opts)
98
+ def wait_for_email_count(inbox_id, count, opts = {})
99
+ data, _status_code, _headers = wait_for_email_count_with_http_info(inbox_id, count, opts)
96
100
  data
97
101
  end
98
102
 
99
103
  # Wait for and return count number of emails. Hold connection until inbox count matches expected or timeout occurs
100
104
  # If inbox contains count or more emails at time of request then return count worth of emails. If not wait until the count is reached and return those or return an error if timeout is exceeded.
105
+ # @param inbox_id [String] Id of the inbox we are fetching emails from
106
+ # @param count [Integer] Number of emails to wait for. Must be greater that 1
101
107
  # @param [Hash] opts the optional parameters
108
+ # @option opts [Integer] :timeout Max milliseconds to wait
109
+ # @option opts [Boolean] :unread_only Optional filter for unread only
102
110
  # @option opts [DateTime] :before Filter for emails that were received before the given timestamp
103
- # @option opts [Integer] :count Number of emails to wait for. Must be greater that 1
104
- # @option opts [Integer] :delay Max milliseconds delay between calls
105
- # @option opts [String] :inbox_id Id of the inbox we are fetching emails from
106
111
  # @option opts [DateTime] :since Filter for emails that were received after the given timestamp
107
112
  # @option opts [String] :sort Sort direction
108
- # @option opts [Integer] :timeout Max milliseconds to wait
109
- # @option opts [Boolean] :unread_only Optional filter for unread only
113
+ # @option opts [Integer] :delay Max milliseconds delay between calls
110
114
  # @return [Array<(Array<EmailPreview>, Integer, Hash)>] Array<EmailPreview> data, response status code and response headers
111
- def wait_for_email_count_with_http_info(opts = {})
115
+ def wait_for_email_count_with_http_info(inbox_id, count, opts = {})
112
116
  if @api_client.config.debugging
113
117
  @api_client.config.logger.debug 'Calling API: WaitForControllerApi.wait_for_email_count ...'
114
118
  end
119
+ # verify the required parameter 'inbox_id' is set
120
+ if @api_client.config.client_side_validation && inbox_id.nil?
121
+ fail ArgumentError, "Missing the required parameter 'inbox_id' when calling WaitForControllerApi.wait_for_email_count"
122
+ end
123
+ # verify the required parameter 'count' is set
124
+ if @api_client.config.client_side_validation && count.nil?
125
+ fail ArgumentError, "Missing the required parameter 'count' when calling WaitForControllerApi.wait_for_email_count"
126
+ end
127
+ if @api_client.config.client_side_validation && count < 1
128
+ fail ArgumentError, 'invalid value for "count" when calling WaitForControllerApi.wait_for_email_count, must be greater than or equal to 1.'
129
+ end
130
+
115
131
  allowable_values = ["ASC", "DESC"]
116
132
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
117
133
  fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
@@ -121,19 +137,19 @@ module MailSlurpClient
121
137
 
122
138
  # query parameters
123
139
  query_params = opts[:query_params] || {}
140
+ query_params[:'inboxId'] = inbox_id
141
+ query_params[:'count'] = count
142
+ query_params[:'timeout'] = opts[:'timeout'] if !opts[:'timeout'].nil?
143
+ query_params[:'unreadOnly'] = opts[:'unread_only'] if !opts[:'unread_only'].nil?
124
144
  query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
125
- query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
126
- query_params[:'delay'] = opts[:'delay'] if !opts[:'delay'].nil?
127
- query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
128
145
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
129
146
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
130
- query_params[:'timeout'] = opts[:'timeout'] if !opts[:'timeout'].nil?
131
- query_params[:'unreadOnly'] = opts[:'unread_only'] if !opts[:'unread_only'].nil?
147
+ query_params[:'delay'] = opts[:'delay'] if !opts[:'delay'].nil?
132
148
 
133
149
  # header parameters
134
150
  header_params = opts[:header_params] || {}
135
151
  # HTTP header 'Accept' (if needed)
136
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
152
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
137
153
 
138
154
  # form parameters
139
155
  form_params = opts[:form_params] || {}
@@ -166,13 +182,13 @@ module MailSlurpClient
166
182
  # Fetch inbox's latest email or if empty wait for an email to arrive
167
183
  # Will return either the last received email or wait for an email to arrive and return that. If you need to wait for an email for a non-empty inbox set `unreadOnly=true` or see the other receive methods such as `waitForNthEmail` or `waitForEmailCount`.
168
184
  # @param [Hash] opts the optional parameters
169
- # @option opts [DateTime] :before Filter for emails that were before after the given timestamp
170
- # @option opts [Integer] :delay Max milliseconds delay between calls
171
185
  # @option opts [String] :inbox_id Id of the inbox we are fetching emails from
172
- # @option opts [DateTime] :since Filter for emails that were received after the given timestamp
173
- # @option opts [String] :sort Sort direction
174
186
  # @option opts [Integer] :timeout Max milliseconds to wait
175
187
  # @option opts [Boolean] :unread_only Optional filter for unread only. (default to false)
188
+ # @option opts [DateTime] :before Filter for emails that were before after the given timestamp
189
+ # @option opts [DateTime] :since Filter for emails that were received after the given timestamp
190
+ # @option opts [String] :sort Sort direction
191
+ # @option opts [Integer] :delay Max milliseconds delay between calls
176
192
  # @return [Email]
177
193
  def wait_for_latest_email(opts = {})
178
194
  data, _status_code, _headers = wait_for_latest_email_with_http_info(opts)
@@ -182,13 +198,13 @@ module MailSlurpClient
182
198
  # Fetch inbox&#39;s latest email or if empty wait for an email to arrive
183
199
  # Will return either the last received email or wait for an email to arrive and return that. If you need to wait for an email for a non-empty inbox set &#x60;unreadOnly&#x3D;true&#x60; or see the other receive methods such as &#x60;waitForNthEmail&#x60; or &#x60;waitForEmailCount&#x60;.
184
200
  # @param [Hash] opts the optional parameters
185
- # @option opts [DateTime] :before Filter for emails that were before after the given timestamp
186
- # @option opts [Integer] :delay Max milliseconds delay between calls
187
201
  # @option opts [String] :inbox_id Id of the inbox we are fetching emails from
188
- # @option opts [DateTime] :since Filter for emails that were received after the given timestamp
189
- # @option opts [String] :sort Sort direction
190
202
  # @option opts [Integer] :timeout Max milliseconds to wait
191
203
  # @option opts [Boolean] :unread_only Optional filter for unread only.
204
+ # @option opts [DateTime] :before Filter for emails that were before after the given timestamp
205
+ # @option opts [DateTime] :since Filter for emails that were received after the given timestamp
206
+ # @option opts [String] :sort Sort direction
207
+ # @option opts [Integer] :delay Max milliseconds delay between calls
192
208
  # @return [Array<(Email, Integer, Hash)>] Email data, response status code and response headers
193
209
  def wait_for_latest_email_with_http_info(opts = {})
194
210
  if @api_client.config.debugging
@@ -203,18 +219,18 @@ module MailSlurpClient
203
219
 
204
220
  # query parameters
205
221
  query_params = opts[:query_params] || {}
206
- query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
207
- query_params[:'delay'] = opts[:'delay'] if !opts[:'delay'].nil?
208
222
  query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
209
- query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
210
- query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
211
223
  query_params[:'timeout'] = opts[:'timeout'] if !opts[:'timeout'].nil?
212
224
  query_params[:'unreadOnly'] = opts[:'unread_only'] if !opts[:'unread_only'].nil?
225
+ query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
226
+ query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
227
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
228
+ query_params[:'delay'] = opts[:'delay'] if !opts[:'delay'].nil?
213
229
 
214
230
  # header parameters
215
231
  header_params = opts[:header_params] || {}
216
232
  # HTTP header 'Accept' (if needed)
217
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
233
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
218
234
 
219
235
  # form parameters
220
236
  form_params = opts[:form_params] || {}
@@ -246,39 +262,51 @@ module MailSlurpClient
246
262
 
247
263
  # Wait or return list of emails that match simple matching patterns
248
264
  # Perform a search of emails in an inbox with the given patterns. If results match expected count then return or else retry the search until results are found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the `MatchOptions` object for options. An example payload is `{ matches: [{field: 'SUBJECT',should:'CONTAIN',value:'needle'}] }`. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController `getEmailContentMatch` method.
249
- # @param match_options [MatchOptions] matchOptions
265
+ # @param inbox_id [String] Id of the inbox we are fetching emails from
266
+ # @param count [Integer] Number of emails to wait for. Must be greater or equal to 1
267
+ # @param match_options [MatchOptions]
250
268
  # @param [Hash] opts the optional parameters
251
269
  # @option opts [DateTime] :before Filter for emails that were received before the given timestamp
252
- # @option opts [Integer] :count Number of emails to wait for. Must be greater or equal to 1
253
- # @option opts [Integer] :delay Max milliseconds delay between calls
254
- # @option opts [String] :inbox_id Id of the inbox we are fetching emails from
255
270
  # @option opts [DateTime] :since Filter for emails that were received after the given timestamp
256
271
  # @option opts [String] :sort Sort direction
272
+ # @option opts [Integer] :delay Max milliseconds delay between calls
257
273
  # @option opts [Integer] :timeout Max milliseconds to wait
258
274
  # @option opts [Boolean] :unread_only Optional filter for unread only (default to false)
259
275
  # @return [Array<EmailPreview>]
260
- def wait_for_matching_emails(match_options, opts = {})
261
- data, _status_code, _headers = wait_for_matching_emails_with_http_info(match_options, opts)
276
+ def wait_for_matching_emails(inbox_id, count, match_options, opts = {})
277
+ data, _status_code, _headers = wait_for_matching_emails_with_http_info(inbox_id, count, match_options, opts)
262
278
  data
263
279
  end
264
280
 
265
281
  # Wait or return list of emails that match simple matching patterns
266
282
  # Perform a search of emails in an inbox with the given patterns. If results match expected count then return or else retry the search until results are found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the &#x60;MatchOptions&#x60; object for options. An example payload is &#x60;{ matches: [{field: &#39;SUBJECT&#39;,should:&#39;CONTAIN&#39;,value:&#39;needle&#39;}] }&#x60;. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController &#x60;getEmailContentMatch&#x60; method.
267
- # @param match_options [MatchOptions] matchOptions
283
+ # @param inbox_id [String] Id of the inbox we are fetching emails from
284
+ # @param count [Integer] Number of emails to wait for. Must be greater or equal to 1
285
+ # @param match_options [MatchOptions]
268
286
  # @param [Hash] opts the optional parameters
269
287
  # @option opts [DateTime] :before Filter for emails that were received before the given timestamp
270
- # @option opts [Integer] :count Number of emails to wait for. Must be greater or equal to 1
271
- # @option opts [Integer] :delay Max milliseconds delay between calls
272
- # @option opts [String] :inbox_id Id of the inbox we are fetching emails from
273
288
  # @option opts [DateTime] :since Filter for emails that were received after the given timestamp
274
289
  # @option opts [String] :sort Sort direction
290
+ # @option opts [Integer] :delay Max milliseconds delay between calls
275
291
  # @option opts [Integer] :timeout Max milliseconds to wait
276
292
  # @option opts [Boolean] :unread_only Optional filter for unread only
277
293
  # @return [Array<(Array<EmailPreview>, Integer, Hash)>] Array<EmailPreview> data, response status code and response headers
278
- def wait_for_matching_emails_with_http_info(match_options, opts = {})
294
+ def wait_for_matching_emails_with_http_info(inbox_id, count, match_options, opts = {})
279
295
  if @api_client.config.debugging
280
296
  @api_client.config.logger.debug 'Calling API: WaitForControllerApi.wait_for_matching_emails ...'
281
297
  end
298
+ # verify the required parameter 'inbox_id' is set
299
+ if @api_client.config.client_side_validation && inbox_id.nil?
300
+ fail ArgumentError, "Missing the required parameter 'inbox_id' when calling WaitForControllerApi.wait_for_matching_emails"
301
+ end
302
+ # verify the required parameter 'count' is set
303
+ if @api_client.config.client_side_validation && count.nil?
304
+ fail ArgumentError, "Missing the required parameter 'count' when calling WaitForControllerApi.wait_for_matching_emails"
305
+ end
306
+ if @api_client.config.client_side_validation && count < 1
307
+ fail ArgumentError, 'invalid value for "count" when calling WaitForControllerApi.wait_for_matching_emails, must be greater than or equal to 1.'
308
+ end
309
+
282
310
  # verify the required parameter 'match_options' is set
283
311
  if @api_client.config.client_side_validation && match_options.nil?
284
312
  fail ArgumentError, "Missing the required parameter 'match_options' when calling WaitForControllerApi.wait_for_matching_emails"
@@ -292,19 +320,19 @@ module MailSlurpClient
292
320
 
293
321
  # query parameters
294
322
  query_params = opts[:query_params] || {}
323
+ query_params[:'inboxId'] = inbox_id
324
+ query_params[:'count'] = count
295
325
  query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
296
- query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
297
- query_params[:'delay'] = opts[:'delay'] if !opts[:'delay'].nil?
298
- query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
299
326
  query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
300
327
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
328
+ query_params[:'delay'] = opts[:'delay'] if !opts[:'delay'].nil?
301
329
  query_params[:'timeout'] = opts[:'timeout'] if !opts[:'timeout'].nil?
302
330
  query_params[:'unreadOnly'] = opts[:'unread_only'] if !opts[:'unread_only'].nil?
303
331
 
304
332
  # header parameters
305
333
  header_params = opts[:header_params] || {}
306
334
  # HTTP header 'Accept' (if needed)
307
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
335
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
308
336
  # HTTP header 'Content-Type'
309
337
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
310
338
 
@@ -338,37 +366,41 @@ module MailSlurpClient
338
366
 
339
367
  # Wait for or return the first email that matches provided MatchOptions array
340
368
  # Perform a search of emails in an inbox with the given patterns. If a result if found then return or else retry the search until a result is found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the `MatchOptions` object for options. An example payload is `{ matches: [{field: 'SUBJECT',should:'CONTAIN',value:'needle'}] }`. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController `getEmailContentMatch` method.
341
- # @param match_options [MatchOptions] matchOptions
369
+ # @param inbox_id [String] Id of the inbox we are matching an email for
370
+ # @param match_options [MatchOptions]
342
371
  # @param [Hash] opts the optional parameters
343
- # @option opts [DateTime] :before Filter for emails that were received before the given timestamp
344
- # @option opts [Integer] :delay Max milliseconds delay between calls
345
- # @option opts [String] :inbox_id Id of the inbox we are matching an email for
346
- # @option opts [DateTime] :since Filter for emails that were received after the given timestamp
347
- # @option opts [String] :sort Sort direction
348
372
  # @option opts [Integer] :timeout Max milliseconds to wait
349
373
  # @option opts [Boolean] :unread_only Optional filter for unread only (default to false)
374
+ # @option opts [DateTime] :since Filter for emails that were received after the given timestamp
375
+ # @option opts [DateTime] :before Filter for emails that were received before the given timestamp
376
+ # @option opts [String] :sort Sort direction
377
+ # @option opts [Integer] :delay Max milliseconds delay between calls
350
378
  # @return [Email]
351
- def wait_for_matching_first_email(match_options, opts = {})
352
- data, _status_code, _headers = wait_for_matching_first_email_with_http_info(match_options, opts)
379
+ def wait_for_matching_first_email(inbox_id, match_options, opts = {})
380
+ data, _status_code, _headers = wait_for_matching_first_email_with_http_info(inbox_id, match_options, opts)
353
381
  data
354
382
  end
355
383
 
356
384
  # Wait for or return the first email that matches provided MatchOptions array
357
385
  # Perform a search of emails in an inbox with the given patterns. If a result if found then return or else retry the search until a result is found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the &#x60;MatchOptions&#x60; object for options. An example payload is &#x60;{ matches: [{field: &#39;SUBJECT&#39;,should:&#39;CONTAIN&#39;,value:&#39;needle&#39;}] }&#x60;. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController &#x60;getEmailContentMatch&#x60; method.
358
- # @param match_options [MatchOptions] matchOptions
386
+ # @param inbox_id [String] Id of the inbox we are matching an email for
387
+ # @param match_options [MatchOptions]
359
388
  # @param [Hash] opts the optional parameters
360
- # @option opts [DateTime] :before Filter for emails that were received before the given timestamp
361
- # @option opts [Integer] :delay Max milliseconds delay between calls
362
- # @option opts [String] :inbox_id Id of the inbox we are matching an email for
363
- # @option opts [DateTime] :since Filter for emails that were received after the given timestamp
364
- # @option opts [String] :sort Sort direction
365
389
  # @option opts [Integer] :timeout Max milliseconds to wait
366
390
  # @option opts [Boolean] :unread_only Optional filter for unread only
391
+ # @option opts [DateTime] :since Filter for emails that were received after the given timestamp
392
+ # @option opts [DateTime] :before Filter for emails that were received before the given timestamp
393
+ # @option opts [String] :sort Sort direction
394
+ # @option opts [Integer] :delay Max milliseconds delay between calls
367
395
  # @return [Array<(Email, Integer, Hash)>] Email data, response status code and response headers
368
- def wait_for_matching_first_email_with_http_info(match_options, opts = {})
396
+ def wait_for_matching_first_email_with_http_info(inbox_id, match_options, opts = {})
369
397
  if @api_client.config.debugging
370
398
  @api_client.config.logger.debug 'Calling API: WaitForControllerApi.wait_for_matching_first_email ...'
371
399
  end
400
+ # verify the required parameter 'inbox_id' is set
401
+ if @api_client.config.client_side_validation && inbox_id.nil?
402
+ fail ArgumentError, "Missing the required parameter 'inbox_id' when calling WaitForControllerApi.wait_for_matching_first_email"
403
+ end
372
404
  # verify the required parameter 'match_options' is set
373
405
  if @api_client.config.client_side_validation && match_options.nil?
374
406
  fail ArgumentError, "Missing the required parameter 'match_options' when calling WaitForControllerApi.wait_for_matching_first_email"
@@ -382,18 +414,18 @@ module MailSlurpClient
382
414
 
383
415
  # query parameters
384
416
  query_params = opts[:query_params] || {}
385
- query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
386
- query_params[:'delay'] = opts[:'delay'] if !opts[:'delay'].nil?
387
- query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
388
- query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
389
- query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
417
+ query_params[:'inboxId'] = inbox_id
390
418
  query_params[:'timeout'] = opts[:'timeout'] if !opts[:'timeout'].nil?
391
419
  query_params[:'unreadOnly'] = opts[:'unread_only'] if !opts[:'unread_only'].nil?
420
+ query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
421
+ query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
422
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
423
+ query_params[:'delay'] = opts[:'delay'] if !opts[:'delay'].nil?
392
424
 
393
425
  # header parameters
394
426
  header_params = opts[:header_params] || {}
395
427
  # HTTP header 'Accept' (if needed)
396
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
428
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
397
429
  # HTTP header 'Content-Type'
398
430
  header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
399
431
 
@@ -428,14 +460,14 @@ module MailSlurpClient
428
460
  # Wait for or fetch the email with a given index in the inbox specified. If index doesn't exist waits for it to exist or timeout to occur.
429
461
  # If nth email is already present in inbox then return it. If not hold the connection open until timeout expires or the nth email is received and returned.
430
462
  # @param [Hash] opts the optional parameters
431
- # @option opts [DateTime] :before Filter for emails that were received before the given timestamp
432
- # @option opts [Integer] :delay Max milliseconds delay between calls
433
463
  # @option opts [String] :inbox_id Id of the inbox you are fetching emails from
434
464
  # @option opts [Integer] :index Zero based index of the email to wait for. If an inbox has 1 email already and you want to wait for the 2nd email pass index&#x3D;1 (default to 0)
435
- # @option opts [DateTime] :since Filter for emails that were received after the given timestamp
436
- # @option opts [String] :sort Sort direction
437
465
  # @option opts [Integer] :timeout Max milliseconds to wait for the nth email if not already present
438
466
  # @option opts [Boolean] :unread_only Optional filter for unread only (default to false)
467
+ # @option opts [DateTime] :since Filter for emails that were received after the given timestamp
468
+ # @option opts [DateTime] :before Filter for emails that were received before the given timestamp
469
+ # @option opts [String] :sort Sort direction
470
+ # @option opts [Integer] :delay Max milliseconds delay between calls
439
471
  # @return [Email]
440
472
  def wait_for_nth_email(opts = {})
441
473
  data, _status_code, _headers = wait_for_nth_email_with_http_info(opts)
@@ -445,19 +477,27 @@ module MailSlurpClient
445
477
  # Wait for or fetch the email with a given index in the inbox specified. If index doesn&#39;t exist waits for it to exist or timeout to occur.
446
478
  # If nth email is already present in inbox then return it. If not hold the connection open until timeout expires or the nth email is received and returned.
447
479
  # @param [Hash] opts the optional parameters
448
- # @option opts [DateTime] :before Filter for emails that were received before the given timestamp
449
- # @option opts [Integer] :delay Max milliseconds delay between calls
450
480
  # @option opts [String] :inbox_id Id of the inbox you are fetching emails from
451
481
  # @option opts [Integer] :index Zero based index of the email to wait for. If an inbox has 1 email already and you want to wait for the 2nd email pass index&#x3D;1
452
- # @option opts [DateTime] :since Filter for emails that were received after the given timestamp
453
- # @option opts [String] :sort Sort direction
454
482
  # @option opts [Integer] :timeout Max milliseconds to wait for the nth email if not already present
455
483
  # @option opts [Boolean] :unread_only Optional filter for unread only
484
+ # @option opts [DateTime] :since Filter for emails that were received after the given timestamp
485
+ # @option opts [DateTime] :before Filter for emails that were received before the given timestamp
486
+ # @option opts [String] :sort Sort direction
487
+ # @option opts [Integer] :delay Max milliseconds delay between calls
456
488
  # @return [Array<(Email, Integer, Hash)>] Email data, response status code and response headers
457
489
  def wait_for_nth_email_with_http_info(opts = {})
458
490
  if @api_client.config.debugging
459
491
  @api_client.config.logger.debug 'Calling API: WaitForControllerApi.wait_for_nth_email ...'
460
492
  end
493
+ if @api_client.config.client_side_validation && !opts[:'index'].nil? && opts[:'index'] > 2147483647
494
+ fail ArgumentError, 'invalid value for "opts[:"index"]" when calling WaitForControllerApi.wait_for_nth_email, must be smaller than or equal to 2147483647.'
495
+ end
496
+
497
+ if @api_client.config.client_side_validation && !opts[:'index'].nil? && opts[:'index'] < 0
498
+ fail ArgumentError, 'invalid value for "opts[:"index"]" when calling WaitForControllerApi.wait_for_nth_email, must be greater than or equal to 0.'
499
+ end
500
+
461
501
  allowable_values = ["ASC", "DESC"]
462
502
  if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
463
503
  fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
@@ -467,19 +507,19 @@ module MailSlurpClient
467
507
 
468
508
  # query parameters
469
509
  query_params = opts[:query_params] || {}
470
- query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
471
- query_params[:'delay'] = opts[:'delay'] if !opts[:'delay'].nil?
472
510
  query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
473
511
  query_params[:'index'] = opts[:'index'] if !opts[:'index'].nil?
474
- query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
475
- query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
476
512
  query_params[:'timeout'] = opts[:'timeout'] if !opts[:'timeout'].nil?
477
513
  query_params[:'unreadOnly'] = opts[:'unread_only'] if !opts[:'unread_only'].nil?
514
+ query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil?
515
+ query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil?
516
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
517
+ query_params[:'delay'] = opts[:'delay'] if !opts[:'delay'].nil?
478
518
 
479
519
  # header parameters
480
520
  header_params = opts[:header_params] || {}
481
521
  # HTTP header 'Accept' (if needed)
482
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
522
+ header_params['Accept'] = @api_client.select_header_accept(['*/*'])
483
523
 
484
524
  # form parameters
485
525
  form_params = opts[:form_params] || {}