mailslurp_client 5.0.0 → 7.2.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/lib/mailslurp_client.rb +72 -7
  3. metadata +14 -271
  4. data/Gemfile +0 -8
  5. data/Gemfile.lock +0 -79
  6. data/LICENSE +0 -22
  7. data/README.md +0 -139
  8. data/Rakefile +0 -10
  9. data/docs/BasicAuthOptions.md +0 -9
  10. data/docs/BulkSendEmailOptions.md +0 -9
  11. data/docs/CommonOperationsApi.md +0 -499
  12. data/docs/CreateWebhookOptions.md +0 -10
  13. data/docs/Email.md +0 -24
  14. data/docs/EmailAnalysis.md +0 -12
  15. data/docs/EmailPreview.md +0 -13
  16. data/docs/ExtraOperationsApi.md +0 -1021
  17. data/docs/ForwardEmailOptions.md +0 -11
  18. data/docs/Inbox.md +0 -11
  19. data/docs/MatchOption.md +0 -10
  20. data/docs/MatchOptions.md +0 -8
  21. data/docs/SendEmailOptions.md +0 -18
  22. data/docs/UploadAttachmentOptions.md +0 -10
  23. data/docs/Webhook.md +0 -13
  24. data/git_push.sh +0 -55
  25. data/lib/mailslurp_client/api/common_operations_api.rb +0 -502
  26. data/lib/mailslurp_client/api/extra_operations_api.rb +0 -1054
  27. data/lib/mailslurp_client/api_client.rb +0 -389
  28. data/lib/mailslurp_client/api_error.rb +0 -38
  29. data/lib/mailslurp_client/configuration.rb +0 -251
  30. data/lib/mailslurp_client/models/basic_auth_options.rb +0 -202
  31. data/lib/mailslurp_client/models/bulk_send_email_options.rb +0 -201
  32. data/lib/mailslurp_client/models/create_webhook_options.rb +0 -202
  33. data/lib/mailslurp_client/models/email.rb +0 -368
  34. data/lib/mailslurp_client/models/email_analysis.rb +0 -245
  35. data/lib/mailslurp_client/models/email_preview.rb +0 -250
  36. data/lib/mailslurp_client/models/forward_email_options.rb +0 -222
  37. data/lib/mailslurp_client/models/inbox.rb +0 -212
  38. data/lib/mailslurp_client/models/match_option.rb +0 -250
  39. data/lib/mailslurp_client/models/match_options.rb +0 -187
  40. data/lib/mailslurp_client/models/send_email_options.rb +0 -297
  41. data/lib/mailslurp_client/models/upload_attachment_options.rb +0 -205
  42. data/lib/mailslurp_client/models/webhook.rb +0 -242
  43. data/lib/mailslurp_client/version.rb +0 -15
  44. data/mailslurp_client.gemspec +0 -45
  45. data/spec/api/common_operations_api_spec.rb +0 -95
  46. data/spec/api/extra_operations_api_spec.rb +0 -231
  47. data/spec/api_client_spec.rb +0 -226
  48. data/spec/configuration_spec.rb +0 -42
  49. data/spec/models/basic_auth_options_spec.rb +0 -47
  50. data/spec/models/bulk_send_email_options_spec.rb +0 -47
  51. data/spec/models/create_webhook_options_spec.rb +0 -53
  52. data/spec/models/email_analysis_spec.rb +0 -65
  53. data/spec/models/email_preview_spec.rb +0 -47
  54. data/spec/models/email_spec.rb +0 -125
  55. data/spec/models/forward_email_options_spec.rb +0 -59
  56. data/spec/models/inbox_spec.rb +0 -59
  57. data/spec/models/match_option_spec.rb +0 -61
  58. data/spec/models/match_options_spec.rb +0 -41
  59. data/spec/models/send_email_options_spec.rb +0 -89
  60. data/spec/models/upload_attachment_options_spec.rb +0 -53
  61. data/spec/models/webhook_spec.rb +0 -71
  62. data/spec/spec_helper.rb +0 -111
@@ -1,11 +0,0 @@
1
- # MailSlurpClient::ForwardEmailOptions
2
-
3
- ## Properties
4
- Name | Type | Description | Notes
5
- ------------ | ------------- | ------------- | -------------
6
- **to** | **Array<String>** | |
7
- **subject** | **String** | | [optional]
8
- **cc** | **Array<String>** | | [optional]
9
- **bcc** | **Array<String>** | | [optional]
10
-
11
-
@@ -1,11 +0,0 @@
1
- # MailSlurpClient::Inbox
2
-
3
- ## Properties
4
- Name | Type | Description | Notes
5
- ------------ | ------------- | ------------- | -------------
6
- **created** | **DateTime** | | [optional]
7
- **email_address** | **String** | The inbox's email address. Send an email to this address and the inbox will receive it | [optional]
8
- **id** | **String** | | [optional]
9
- **user_id** | **String** | | [optional]
10
-
11
-
@@ -1,10 +0,0 @@
1
- # MailSlurpClient::MatchOption
2
-
3
- ## Properties
4
- Name | Type | Description | Notes
5
- ------------ | ------------- | ------------- | -------------
6
- **field** | **String** | The email property to match on. One of SUBJECT, TO, BCC, CC or FROM | [optional]
7
- **should** | **String** | What criteria to apply. CONTAIN or EQUAL. Note CONTAIN is recommended due to some SMTP servers adding new lines | [optional]
8
- **value** | **String** | The value to compare to the field using EQUAL or CONTAIN | [optional]
9
-
10
-
@@ -1,8 +0,0 @@
1
- # MailSlurpClient::MatchOptions
2
-
3
- ## Properties
4
- Name | Type | Description | Notes
5
- ------------ | ------------- | ------------- | -------------
6
- **matches** | [**Array<MatchOption>**](MatchOption.md) | 1 or more match options. Options are additive so if one does not match the email is excluded from results | [optional]
7
-
8
-
@@ -1,18 +0,0 @@
1
- # MailSlurpClient::SendEmailOptions
2
-
3
- ## Properties
4
- Name | Type | Description | Notes
5
- ------------ | ------------- | ------------- | -------------
6
- **attachments** | **Array<String>** | Optional list of attachment IDs to send with this email. You must first upload each attachment separately in order to obtain attachment IDs | [optional]
7
- **bcc** | **Array<String>** | Optional list of bcc destination email addresses | [optional]
8
- **body** | **String** | Contents of email. If HTML set isHTML to true. You can use moustache templates here if you provide a templateVariables option | [optional]
9
- **cc** | **Array<String>** | Optional list of cc destination email addresses | [optional]
10
- **charset** | **String** | Optional charset | [optional]
11
- **from** | **String** | Optional from address. If not set source inbox address will be used | [optional]
12
- **html** | **BOOLEAN** | | [optional]
13
- **reply_to** | **String** | Optional replyTo header | [optional]
14
- **subject** | **String** | Optional email subject line | [optional]
15
- **template_variables** | [**Object**](.md) | Optional map of template variables. Will replace moustache syntax variables in subject or body with the associated values | [optional]
16
- **to** | **Array<String>** | List of destination email addresses. Even single recipients must be in array form. |
17
-
18
-
@@ -1,10 +0,0 @@
1
- # MailSlurpClient::UploadAttachmentOptions
2
-
3
- ## Properties
4
- Name | Type | Description | Notes
5
- ------------ | ------------- | ------------- | -------------
6
- **base64_contents** | **String** | Base64 encoded string of file contents | [optional]
7
- **content_type** | **String** | Optional contentType for file. For instance application/pdf | [optional]
8
- **filename** | **String** | Optional filename to save upload with | [optional]
9
-
10
-
@@ -1,13 +0,0 @@
1
- # MailSlurpClient::Webhook
2
-
3
- ## Properties
4
- Name | Type | Description | Notes
5
- ------------ | ------------- | ------------- | -------------
6
- **basic_auth** | **BOOLEAN** | Does Webhook expect basic authentication | [optional]
7
- **created_at** | **DateTime** | |
8
- **id** | **String** | ID of the Webhook | [optional]
9
- **inbox_id** | **String** | The inbox that the Webhook will be triggered by | [optional]
10
- **name** | **String** | | [optional]
11
- **updated_at** | **DateTime** | |
12
-
13
-
@@ -1,55 +0,0 @@
1
- #!/bin/sh
2
- #
3
- # Generated by: https://openapi-generator.tech
4
- #
5
- # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
6
- #
7
- # Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update"
8
-
9
- git_user_id=$1
10
- git_repo_id=$2
11
- release_note=$3
12
-
13
- if [ "$git_user_id" = "" ]; then
14
- git_user_id="GIT_USER_ID"
15
- echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
16
- fi
17
-
18
- if [ "$git_repo_id" = "" ]; then
19
- git_repo_id="GIT_REPO_ID"
20
- echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
21
- fi
22
-
23
- if [ "$release_note" = "" ]; then
24
- release_note="Minor update"
25
- echo "[INFO] No command line input provided. Set \$release_note to $release_note"
26
- fi
27
-
28
- # Initialize the local directory as a Git repository
29
- git init
30
-
31
- # Adds the files in the local repository and stages them for commit.
32
- git add .
33
-
34
- # Commits the tracked changes and prepares them to be pushed to a remote repository.
35
- git commit -m "$release_note"
36
-
37
- # Sets the new remote
38
- git_remote=`git remote`
39
- if [ "$git_remote" = "" ]; then # git remote not defined
40
-
41
- if [ "$GIT_TOKEN" = "" ]; then
42
- echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
43
- git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
44
- else
45
- git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
46
- fi
47
-
48
- fi
49
-
50
- git pull origin master
51
-
52
- # Pushes (Forces) the changes in the local repository up to the remote repository
53
- echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
54
- git push origin master 2>&1 | grep -v 'To https'
55
-
@@ -1,502 +0,0 @@
1
- =begin
2
- #MailSlurp API
3
-
4
- #For documentation see [developer guide](https://www.mailslurp.com/developers). [Create an account](https://app.mailslurp.com) in the MailSlurp Dashboard to [view your API Key](https://app). For all bugs, feature requests, or help please [see support](https://www.mailslurp.com/support/).
5
-
6
- OpenAPI spec version: 0.0.1-alpha
7
- Contact: contact@mailslurp.dev
8
- Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 3.3.4
10
-
11
- =end
12
-
13
- require 'uri'
14
-
15
- module MailSlurpClient
16
- class CommonOperationsApi
17
- attr_accessor :api_client
18
-
19
- def initialize(api_client = ApiClient.default)
20
- @api_client = api_client
21
- end
22
- # Create new email address
23
- # Returns an Inbox with an `id` and an `emailAddress`
24
- # @param [Hash] opts the optional parameters
25
- # @return [Inbox]
26
- def create_new_email_address(opts = {})
27
- data, _status_code, _headers = create_new_email_address_with_http_info(opts)
28
- data
29
- end
30
-
31
- # Create new email address
32
- # Returns an Inbox with an `id` and an `emailAddress`
33
- # @param [Hash] opts the optional parameters
34
- # @return [Array<(Inbox, Fixnum, Hash)>] Inbox data, response status code and response headers
35
- def create_new_email_address_with_http_info(opts = {})
36
- if @api_client.config.debugging
37
- @api_client.config.logger.debug 'Calling API: CommonOperationsApi.create_new_email_address ...'
38
- end
39
- # resource path
40
- local_var_path = '/newEmailAddress'
41
-
42
- # query parameters
43
- query_params = {}
44
-
45
- # header parameters
46
- header_params = {}
47
- # HTTP header 'Accept' (if needed)
48
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
49
-
50
- # form parameters
51
- form_params = {}
52
-
53
- # http body (model)
54
- post_body = nil
55
- auth_names = ['API_KEY']
56
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
57
- :header_params => header_params,
58
- :query_params => query_params,
59
- :form_params => form_params,
60
- :body => post_body,
61
- :auth_names => auth_names,
62
- :return_type => 'Inbox')
63
- if @api_client.config.debugging
64
- @api_client.config.logger.debug "API called: CommonOperationsApi#create_new_email_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
65
- end
66
- return data, status_code, headers
67
- end
68
-
69
- # Delete an email
70
- # Deletes an email
71
- # @param email_id emailId
72
- # @param [Hash] opts the optional parameters
73
- # @return [nil]
74
- def delete_email(email_id, opts = {})
75
- delete_email_with_http_info(email_id, opts)
76
- nil
77
- end
78
-
79
- # Delete an email
80
- # Deletes an email
81
- # @param email_id emailId
82
- # @param [Hash] opts the optional parameters
83
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
84
- def delete_email_with_http_info(email_id, opts = {})
85
- if @api_client.config.debugging
86
- @api_client.config.logger.debug 'Calling API: CommonOperationsApi.delete_email ...'
87
- end
88
- # verify the required parameter 'email_id' is set
89
- if @api_client.config.client_side_validation && email_id.nil?
90
- fail ArgumentError, "Missing the required parameter 'email_id' when calling CommonOperationsApi.delete_email"
91
- end
92
- # resource path
93
- local_var_path = '/deleteEmail'
94
-
95
- # query parameters
96
- query_params = {}
97
- query_params[:'emailId'] = email_id
98
-
99
- # header parameters
100
- header_params = {}
101
-
102
- # form parameters
103
- form_params = {}
104
-
105
- # http body (model)
106
- post_body = nil
107
- auth_names = ['API_KEY']
108
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
109
- :header_params => header_params,
110
- :query_params => query_params,
111
- :form_params => form_params,
112
- :body => post_body,
113
- :auth_names => auth_names)
114
- if @api_client.config.debugging
115
- @api_client.config.logger.debug "API called: CommonOperationsApi#delete_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
116
- end
117
- return data, status_code, headers
118
- end
119
-
120
- # Delete email address and its emails
121
- # Deletes an inbox
122
- # @param inbox_id inboxId
123
- # @param [Hash] opts the optional parameters
124
- # @return [nil]
125
- def delete_email_address(inbox_id, opts = {})
126
- delete_email_address_with_http_info(inbox_id, opts)
127
- nil
128
- end
129
-
130
- # Delete email address and its emails
131
- # Deletes an inbox
132
- # @param inbox_id inboxId
133
- # @param [Hash] opts the optional parameters
134
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
135
- def delete_email_address_with_http_info(inbox_id, opts = {})
136
- if @api_client.config.debugging
137
- @api_client.config.logger.debug 'Calling API: CommonOperationsApi.delete_email_address ...'
138
- end
139
- # verify the required parameter 'inbox_id' is set
140
- if @api_client.config.client_side_validation && inbox_id.nil?
141
- fail ArgumentError, "Missing the required parameter 'inbox_id' when calling CommonOperationsApi.delete_email_address"
142
- end
143
- # resource path
144
- local_var_path = '/deleteEmailAddress'
145
-
146
- # query parameters
147
- query_params = {}
148
- query_params[:'inboxId'] = inbox_id
149
-
150
- # header parameters
151
- header_params = {}
152
-
153
- # form parameters
154
- form_params = {}
155
-
156
- # http body (model)
157
- post_body = nil
158
- auth_names = ['API_KEY']
159
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
160
- :header_params => header_params,
161
- :query_params => query_params,
162
- :form_params => form_params,
163
- :body => post_body,
164
- :auth_names => auth_names)
165
- if @api_client.config.debugging
166
- @api_client.config.logger.debug "API called: CommonOperationsApi#delete_email_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
167
- end
168
- return data, status_code, headers
169
- end
170
-
171
- # Delete all emails in an inbox
172
- # Deletes all emails
173
- # @param inbox_id inboxId
174
- # @param [Hash] opts the optional parameters
175
- # @return [nil]
176
- def empty_inbox(inbox_id, opts = {})
177
- empty_inbox_with_http_info(inbox_id, opts)
178
- nil
179
- end
180
-
181
- # Delete all emails in an inbox
182
- # Deletes all emails
183
- # @param inbox_id inboxId
184
- # @param [Hash] opts the optional parameters
185
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
186
- def empty_inbox_with_http_info(inbox_id, opts = {})
187
- if @api_client.config.debugging
188
- @api_client.config.logger.debug 'Calling API: CommonOperationsApi.empty_inbox ...'
189
- end
190
- # verify the required parameter 'inbox_id' is set
191
- if @api_client.config.client_side_validation && inbox_id.nil?
192
- fail ArgumentError, "Missing the required parameter 'inbox_id' when calling CommonOperationsApi.empty_inbox"
193
- end
194
- # resource path
195
- local_var_path = '/emptyInbox'
196
-
197
- # query parameters
198
- query_params = {}
199
- query_params[:'inboxId'] = inbox_id
200
-
201
- # header parameters
202
- header_params = {}
203
-
204
- # form parameters
205
- form_params = {}
206
-
207
- # http body (model)
208
- post_body = nil
209
- auth_names = ['API_KEY']
210
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
211
- :header_params => header_params,
212
- :query_params => query_params,
213
- :form_params => form_params,
214
- :body => post_body,
215
- :auth_names => auth_names)
216
- if @api_client.config.debugging
217
- @api_client.config.logger.debug "API called: CommonOperationsApi#empty_inbox\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
218
- end
219
- return data, status_code, headers
220
- end
221
-
222
- # Send an email from a random email address
223
- # To specify an email address first create an inbox and use that with the other send email methods
224
- # @param send_email_options sendEmailOptions
225
- # @param [Hash] opts the optional parameters
226
- # @return [nil]
227
- def send_email_simple(send_email_options, opts = {})
228
- send_email_simple_with_http_info(send_email_options, opts)
229
- nil
230
- end
231
-
232
- # Send an email from a random email address
233
- # To specify an email address first create an inbox and use that with the other send email methods
234
- # @param send_email_options sendEmailOptions
235
- # @param [Hash] opts the optional parameters
236
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
237
- def send_email_simple_with_http_info(send_email_options, opts = {})
238
- if @api_client.config.debugging
239
- @api_client.config.logger.debug 'Calling API: CommonOperationsApi.send_email_simple ...'
240
- end
241
- # verify the required parameter 'send_email_options' is set
242
- if @api_client.config.client_side_validation && send_email_options.nil?
243
- fail ArgumentError, "Missing the required parameter 'send_email_options' when calling CommonOperationsApi.send_email_simple"
244
- end
245
- # resource path
246
- local_var_path = '/sendEmail'
247
-
248
- # query parameters
249
- query_params = {}
250
-
251
- # header parameters
252
- header_params = {}
253
- # HTTP header 'Content-Type'
254
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
255
-
256
- # form parameters
257
- form_params = {}
258
-
259
- # http body (model)
260
- post_body = @api_client.object_to_http_body(send_email_options)
261
- auth_names = ['API_KEY']
262
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
263
- :header_params => header_params,
264
- :query_params => query_params,
265
- :form_params => form_params,
266
- :body => post_body,
267
- :auth_names => auth_names)
268
- if @api_client.config.debugging
269
- @api_client.config.logger.debug "API called: CommonOperationsApi#send_email_simple\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
270
- end
271
- return data, status_code, headers
272
- end
273
-
274
- # Wait for and return count number of emails
275
- # Will only wait if count is greater that the found emails in given inbox.If you need to wait for an email for a non-empty inbox see the other receive methods.
276
- # @param [Hash] opts the optional parameters
277
- # @option opts [Integer] :count Number of emails to wait for. Must be greater that 1
278
- # @option opts [String] :inbox_id Id of the inbox we are fetching emails from
279
- # @option opts [Integer] :timeout Max milliseconds to wait
280
- # @return [Array<EmailPreview>]
281
- def wait_for_email_count(opts = {})
282
- data, _status_code, _headers = wait_for_email_count_with_http_info(opts)
283
- data
284
- end
285
-
286
- # Wait for and return count number of emails
287
- # Will only wait if count is greater that the found emails in given inbox.If you need to wait for an email for a non-empty inbox see the other receive methods.
288
- # @param [Hash] opts the optional parameters
289
- # @option opts [Integer] :count Number of emails to wait for. Must be greater that 1
290
- # @option opts [String] :inbox_id Id of the inbox we are fetching emails from
291
- # @option opts [Integer] :timeout Max milliseconds to wait
292
- # @return [Array<(Array<EmailPreview>, Fixnum, Hash)>] Array<EmailPreview> data, response status code and response headers
293
- def wait_for_email_count_with_http_info(opts = {})
294
- if @api_client.config.debugging
295
- @api_client.config.logger.debug 'Calling API: CommonOperationsApi.wait_for_email_count ...'
296
- end
297
- # resource path
298
- local_var_path = '/waitForEmailCount'
299
-
300
- # query parameters
301
- query_params = {}
302
- query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
303
- query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
304
- query_params[:'timeout'] = opts[:'timeout'] if !opts[:'timeout'].nil?
305
-
306
- # header parameters
307
- header_params = {}
308
- # HTTP header 'Accept' (if needed)
309
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
310
-
311
- # form parameters
312
- form_params = {}
313
-
314
- # http body (model)
315
- post_body = nil
316
- auth_names = ['API_KEY']
317
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
318
- :header_params => header_params,
319
- :query_params => query_params,
320
- :form_params => form_params,
321
- :body => post_body,
322
- :auth_names => auth_names,
323
- :return_type => 'Array<EmailPreview>')
324
- if @api_client.config.debugging
325
- @api_client.config.logger.debug "API called: CommonOperationsApi#wait_for_email_count\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
326
- end
327
- return data, status_code, headers
328
- end
329
-
330
- # Fetch inbox's latest email or if empty wait for email to arrive
331
- # 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 see the other receive methods.
332
- # @param [Hash] opts the optional parameters
333
- # @option opts [String] :inbox_id Id of the inbox we are fetching emails from
334
- # @option opts [Integer] :timeout Max milliseconds to wait
335
- # @return [Email]
336
- def wait_for_latest_email(opts = {})
337
- data, _status_code, _headers = wait_for_latest_email_with_http_info(opts)
338
- data
339
- end
340
-
341
- # Fetch inbox&#39;s latest email or if empty wait for email to arrive
342
- # 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 see the other receive methods.
343
- # @param [Hash] opts the optional parameters
344
- # @option opts [String] :inbox_id Id of the inbox we are fetching emails from
345
- # @option opts [Integer] :timeout Max milliseconds to wait
346
- # @return [Array<(Email, Fixnum, Hash)>] Email data, response status code and response headers
347
- def wait_for_latest_email_with_http_info(opts = {})
348
- if @api_client.config.debugging
349
- @api_client.config.logger.debug 'Calling API: CommonOperationsApi.wait_for_latest_email ...'
350
- end
351
- # resource path
352
- local_var_path = '/waitForLatestEmail'
353
-
354
- # query parameters
355
- query_params = {}
356
- query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
357
- query_params[:'timeout'] = opts[:'timeout'] if !opts[:'timeout'].nil?
358
-
359
- # header parameters
360
- header_params = {}
361
- # HTTP header 'Accept' (if needed)
362
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
363
-
364
- # form parameters
365
- form_params = {}
366
-
367
- # http body (model)
368
- post_body = nil
369
- auth_names = ['API_KEY']
370
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
371
- :header_params => header_params,
372
- :query_params => query_params,
373
- :form_params => form_params,
374
- :body => post_body,
375
- :auth_names => auth_names,
376
- :return_type => 'Email')
377
- if @api_client.config.debugging
378
- @api_client.config.logger.debug "API called: CommonOperationsApi#wait_for_latest_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
379
- end
380
- return data, status_code, headers
381
- end
382
-
383
- # Wait or return list of emails that match simple matching patterns
384
- # Results must also meet provided count. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM.
385
- # @param match_options matchOptions
386
- # @param [Hash] opts the optional parameters
387
- # @option opts [Integer] :count Number of emails to wait for. Must be greater that 1
388
- # @option opts [String] :inbox_id Id of the inbox we are fetching emails from
389
- # @option opts [Integer] :timeout Max milliseconds to wait
390
- # @return [Array<EmailPreview>]
391
- def wait_for_matching_email(match_options, opts = {})
392
- data, _status_code, _headers = wait_for_matching_email_with_http_info(match_options, opts)
393
- data
394
- end
395
-
396
- # Wait or return list of emails that match simple matching patterns
397
- # Results must also meet provided count. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM.
398
- # @param match_options matchOptions
399
- # @param [Hash] opts the optional parameters
400
- # @option opts [Integer] :count Number of emails to wait for. Must be greater that 1
401
- # @option opts [String] :inbox_id Id of the inbox we are fetching emails from
402
- # @option opts [Integer] :timeout Max milliseconds to wait
403
- # @return [Array<(Array<EmailPreview>, Fixnum, Hash)>] Array<EmailPreview> data, response status code and response headers
404
- def wait_for_matching_email_with_http_info(match_options, opts = {})
405
- if @api_client.config.debugging
406
- @api_client.config.logger.debug 'Calling API: CommonOperationsApi.wait_for_matching_email ...'
407
- end
408
- # verify the required parameter 'match_options' is set
409
- if @api_client.config.client_side_validation && match_options.nil?
410
- fail ArgumentError, "Missing the required parameter 'match_options' when calling CommonOperationsApi.wait_for_matching_email"
411
- end
412
- # resource path
413
- local_var_path = '/waitForMatchingEmails'
414
-
415
- # query parameters
416
- query_params = {}
417
- query_params[:'count'] = opts[:'count'] if !opts[:'count'].nil?
418
- query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
419
- query_params[:'timeout'] = opts[:'timeout'] if !opts[:'timeout'].nil?
420
-
421
- # header parameters
422
- header_params = {}
423
- # HTTP header 'Accept' (if needed)
424
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
425
- # HTTP header 'Content-Type'
426
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
427
-
428
- # form parameters
429
- form_params = {}
430
-
431
- # http body (model)
432
- post_body = @api_client.object_to_http_body(match_options)
433
- auth_names = ['API_KEY']
434
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
435
- :header_params => header_params,
436
- :query_params => query_params,
437
- :form_params => form_params,
438
- :body => post_body,
439
- :auth_names => auth_names,
440
- :return_type => 'Array<EmailPreview>')
441
- if @api_client.config.debugging
442
- @api_client.config.logger.debug "API called: CommonOperationsApi#wait_for_matching_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
443
- end
444
- return data, status_code, headers
445
- end
446
-
447
- # Wait for or fetch the email with a given index in the inbox specified
448
- # @param [Hash] opts the optional parameters
449
- # @option opts [String] :inbox_id Id of the inbox we are fetching emails from
450
- # @option opts [Integer] :index Zero based index of the email to wait for
451
- # @option opts [Integer] :timeout Max milliseconds to wait
452
- # @return [Email]
453
- def wait_for_nth_email(opts = {})
454
- data, _status_code, _headers = wait_for_nth_email_with_http_info(opts)
455
- data
456
- end
457
-
458
- # Wait for or fetch the email with a given index in the inbox specified
459
- # @param [Hash] opts the optional parameters
460
- # @option opts [String] :inbox_id Id of the inbox we are fetching emails from
461
- # @option opts [Integer] :index Zero based index of the email to wait for
462
- # @option opts [Integer] :timeout Max milliseconds to wait
463
- # @return [Array<(Email, Fixnum, Hash)>] Email data, response status code and response headers
464
- def wait_for_nth_email_with_http_info(opts = {})
465
- if @api_client.config.debugging
466
- @api_client.config.logger.debug 'Calling API: CommonOperationsApi.wait_for_nth_email ...'
467
- end
468
- # resource path
469
- local_var_path = '/waitForNthEmail'
470
-
471
- # query parameters
472
- query_params = {}
473
- query_params[:'inboxId'] = opts[:'inbox_id'] if !opts[:'inbox_id'].nil?
474
- query_params[:'index'] = opts[:'index'] if !opts[:'index'].nil?
475
- query_params[:'timeout'] = opts[:'timeout'] if !opts[:'timeout'].nil?
476
-
477
- # header parameters
478
- header_params = {}
479
- # HTTP header 'Accept' (if needed)
480
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
481
-
482
- # form parameters
483
- form_params = {}
484
-
485
- # http body (model)
486
- post_body = nil
487
- auth_names = ['API_KEY']
488
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
489
- :header_params => header_params,
490
- :query_params => query_params,
491
- :form_params => form_params,
492
- :body => post_body,
493
- :auth_names => auth_names,
494
- :return_type => 'Email')
495
- if @api_client.config.debugging
496
- @api_client.config.logger.debug "API called: CommonOperationsApi#wait_for_nth_email\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
497
- end
498
- return data, status_code, headers
499
- end
500
-
501
- end
502
- end