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
data/LICENSE DELETED
@@ -1,22 +0,0 @@
1
-
2
- MIT License
3
-
4
- Copyright (c) MailSlurp, PettmanOU
5
-
6
- Permission is hereby granted, free of charge, to any person obtaining a copy
7
- of this software and associated documentation files (the "Software"), to deal
8
- in the Software without restriction, including without limitation the rights
9
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
- copies of the Software, and to permit persons to whom the Software is
11
- furnished to do so, subject to the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be included in all
14
- copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
- SOFTWARE.
data/README.md DELETED
@@ -1,139 +0,0 @@
1
- # mailslurp_client
2
-
3
- MailSlurpClient - the Ruby gem for the MailSlurp API
4
-
5
- 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/).
6
-
7
- This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
8
-
9
- - API version: 0.0.1-alpha
10
- - Package version: 5.0.0
11
- - Build package: org.openapitools.codegen.languages.RubyClientCodegen
12
- For more information, please visit [https://www.mailslurp.com](https://www.mailslurp.com)
13
-
14
- ## Installation
15
-
16
- ### Build a gem
17
-
18
- To build the Ruby code into a gem:
19
-
20
- ```shell
21
- gem build mailslurp_client.gemspec
22
- ```
23
-
24
- Then either install the gem locally:
25
-
26
- ```shell
27
- gem install ./mailslurp_client-5.0.0.gem
28
- ```
29
- (for development, run `gem install --dev ./mailslurp_client-5.0.0.gem` to install the development dependencies)
30
-
31
- or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
32
-
33
- Finally add this to the Gemfile:
34
-
35
- gem 'mailslurp_client', '~> 5.0.0'
36
-
37
- ### Install from Git
38
-
39
- If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
40
-
41
- gem 'mailslurp_client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
42
-
43
- ### Include the Ruby code directly
44
-
45
- Include the Ruby code directly using `-I` as follows:
46
-
47
- ```shell
48
- ruby -Ilib script.rb
49
- ```
50
-
51
- ## Getting Started
52
-
53
- Please follow the [installation](#installation) procedure and then run the following code:
54
- ```ruby
55
- # Load the gem
56
- require 'mailslurp_client'
57
-
58
- # Setup authorization
59
- MailSlurpClient.configure do |config|
60
- # Configure API key authorization: API_KEY
61
- config.api_key['x-api-key'] = 'YOUR API KEY'
62
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
63
- #config.api_key_prefix['x-api-key'] = 'Bearer'
64
- end
65
-
66
- api_instance = MailSlurpClient::CommonOperationsApi.new
67
-
68
- begin
69
- #Create new email address
70
- result = api_instance.create_new_email_address
71
- p result
72
- rescue MailSlurpClient::ApiError => e
73
- puts "Exception when calling CommonOperationsApi->create_new_email_address: #{e}"
74
- end
75
-
76
- ```
77
-
78
- ## Documentation for API Endpoints
79
-
80
- All URIs are relative to *https://api.mailslurp.com*
81
-
82
- Class | Method | HTTP request | Description
83
- ------------ | ------------- | ------------- | -------------
84
- *MailSlurpClient::CommonOperationsApi* | [**create_new_email_address**](docs/CommonOperationsApi.md#create_new_email_address) | **POST** /newEmailAddress | Create new email address
85
- *MailSlurpClient::CommonOperationsApi* | [**delete_email**](docs/CommonOperationsApi.md#delete_email) | **DELETE** /deleteEmail | Delete an email
86
- *MailSlurpClient::CommonOperationsApi* | [**delete_email_address**](docs/CommonOperationsApi.md#delete_email_address) | **DELETE** /deleteEmailAddress | Delete email address and its emails
87
- *MailSlurpClient::CommonOperationsApi* | [**empty_inbox**](docs/CommonOperationsApi.md#empty_inbox) | **DELETE** /emptyInbox | Delete all emails in an inbox
88
- *MailSlurpClient::CommonOperationsApi* | [**send_email_simple**](docs/CommonOperationsApi.md#send_email_simple) | **POST** /sendEmail | Send an email from a random email address
89
- *MailSlurpClient::CommonOperationsApi* | [**wait_for_email_count**](docs/CommonOperationsApi.md#wait_for_email_count) | **GET** /waitForEmailCount | Wait for and return count number of emails
90
- *MailSlurpClient::CommonOperationsApi* | [**wait_for_latest_email**](docs/CommonOperationsApi.md#wait_for_latest_email) | **GET** /waitForLatestEmail | Fetch inbox's latest email or if empty wait for email to arrive
91
- *MailSlurpClient::CommonOperationsApi* | [**wait_for_matching_email**](docs/CommonOperationsApi.md#wait_for_matching_email) | **POST** /waitForMatchingEmails | Wait or return list of emails that match simple matching patterns
92
- *MailSlurpClient::CommonOperationsApi* | [**wait_for_nth_email**](docs/CommonOperationsApi.md#wait_for_nth_email) | **GET** /waitForNthEmail | Wait for or fetch the email with a given index in the inbox specified
93
- *MailSlurpClient::ExtraOperationsApi* | [**bulk_create_inboxes**](docs/ExtraOperationsApi.md#bulk_create_inboxes) | **POST** /bulk/inboxes | Bulk create Inboxes (email addresses)
94
- *MailSlurpClient::ExtraOperationsApi* | [**bulk_delete_inboxes**](docs/ExtraOperationsApi.md#bulk_delete_inboxes) | **DELETE** /bulk/inboxes | Bulk Delete Inboxes
95
- *MailSlurpClient::ExtraOperationsApi* | [**bulk_send_emails**](docs/ExtraOperationsApi.md#bulk_send_emails) | **POST** /bulk/send | Bulk Send Emails
96
- *MailSlurpClient::ExtraOperationsApi* | [**create_inbox**](docs/ExtraOperationsApi.md#create_inbox) | **POST** /inboxes | Create an Inbox (email address)
97
- *MailSlurpClient::ExtraOperationsApi* | [**create_webhook**](docs/ExtraOperationsApi.md#create_webhook) | **POST** /inboxes/{inboxId}/webhooks | Attach a WebHook URL to an inbox
98
- *MailSlurpClient::ExtraOperationsApi* | [**delete_email1**](docs/ExtraOperationsApi.md#delete_email1) | **DELETE** /emails/{emailId} | Delete Email
99
- *MailSlurpClient::ExtraOperationsApi* | [**delete_inbox**](docs/ExtraOperationsApi.md#delete_inbox) | **DELETE** /inboxes/{inboxId} | Delete Inbox / Email Address
100
- *MailSlurpClient::ExtraOperationsApi* | [**delete_webhook**](docs/ExtraOperationsApi.md#delete_webhook) | **DELETE** /inboxes/{inboxId}/webhooks/{webhookId} | Delete and disable a WebHook for an Inbox
101
- *MailSlurpClient::ExtraOperationsApi* | [**download_attachment**](docs/ExtraOperationsApi.md#download_attachment) | **GET** /emails/{emailId}/attachments/{attachmentId} | Get email attachment
102
- *MailSlurpClient::ExtraOperationsApi* | [**forward_email**](docs/ExtraOperationsApi.md#forward_email) | **POST** /emails/{emailId}/forward | Forward Email
103
- *MailSlurpClient::ExtraOperationsApi* | [**get_email**](docs/ExtraOperationsApi.md#get_email) | **GET** /emails/{emailId} | Get Email Content
104
- *MailSlurpClient::ExtraOperationsApi* | [**get_emails**](docs/ExtraOperationsApi.md#get_emails) | **GET** /inboxes/{inboxId}/emails | List Emails in an Inbox / EmailAddress
105
- *MailSlurpClient::ExtraOperationsApi* | [**get_inbox**](docs/ExtraOperationsApi.md#get_inbox) | **GET** /inboxes/{inboxId} | Get Inbox / EmailAddress
106
- *MailSlurpClient::ExtraOperationsApi* | [**get_inboxes**](docs/ExtraOperationsApi.md#get_inboxes) | **GET** /inboxes | List Inboxes / Email Addresses
107
- *MailSlurpClient::ExtraOperationsApi* | [**get_raw_email_contents**](docs/ExtraOperationsApi.md#get_raw_email_contents) | **GET** /emails/{emailId}/raw | Get Raw Email Content
108
- *MailSlurpClient::ExtraOperationsApi* | [**get_webhooks**](docs/ExtraOperationsApi.md#get_webhooks) | **GET** /inboxes/{inboxId}/webhooks | Get all WebHooks for an Inbox
109
- *MailSlurpClient::ExtraOperationsApi* | [**send_email**](docs/ExtraOperationsApi.md#send_email) | **POST** /inboxes/{inboxId} | Send Email
110
- *MailSlurpClient::ExtraOperationsApi* | [**upload_attachment**](docs/ExtraOperationsApi.md#upload_attachment) | **POST** /attachments | Upload an attachment for sending
111
- *MailSlurpClient::ExtraOperationsApi* | [**upload_multipart_form**](docs/ExtraOperationsApi.md#upload_multipart_form) | **POST** /attachments/multipart | Upload an attachment for sending using Multipart Form
112
-
113
-
114
- ## Documentation for Models
115
-
116
- - [MailSlurpClient::BasicAuthOptions](docs/BasicAuthOptions.md)
117
- - [MailSlurpClient::BulkSendEmailOptions](docs/BulkSendEmailOptions.md)
118
- - [MailSlurpClient::CreateWebhookOptions](docs/CreateWebhookOptions.md)
119
- - [MailSlurpClient::Email](docs/Email.md)
120
- - [MailSlurpClient::EmailAnalysis](docs/EmailAnalysis.md)
121
- - [MailSlurpClient::EmailPreview](docs/EmailPreview.md)
122
- - [MailSlurpClient::ForwardEmailOptions](docs/ForwardEmailOptions.md)
123
- - [MailSlurpClient::Inbox](docs/Inbox.md)
124
- - [MailSlurpClient::MatchOption](docs/MatchOption.md)
125
- - [MailSlurpClient::MatchOptions](docs/MatchOptions.md)
126
- - [MailSlurpClient::SendEmailOptions](docs/SendEmailOptions.md)
127
- - [MailSlurpClient::UploadAttachmentOptions](docs/UploadAttachmentOptions.md)
128
- - [MailSlurpClient::Webhook](docs/Webhook.md)
129
-
130
-
131
- ## Documentation for Authorization
132
-
133
-
134
- ### API_KEY
135
-
136
- - **Type**: API key
137
- - **API key parameter name**: x-api-key
138
- - **Location**: HTTP header
139
-
data/Rakefile DELETED
@@ -1,10 +0,0 @@
1
- require "bundler/gem_tasks"
2
-
3
- begin
4
- require 'rspec/core/rake_task'
5
-
6
- RSpec::Core::RakeTask.new(:spec)
7
- task default: :spec
8
- rescue LoadError
9
- # no rspec available
10
- end
@@ -1,9 +0,0 @@
1
- # MailSlurpClient::BasicAuthOptions
2
-
3
- ## Properties
4
- Name | Type | Description | Notes
5
- ------------ | ------------- | ------------- | -------------
6
- **username** | **String** | |
7
- **password** | **String** | |
8
-
9
-
@@ -1,9 +0,0 @@
1
- # MailSlurpClient::BulkSendEmailOptions
2
-
3
- ## Properties
4
- Name | Type | Description | Notes
5
- ------------ | ------------- | ------------- | -------------
6
- **inbox_ids** | **Array<String>** | Inboxes to send from | [optional]
7
- **send_email_options** | [**SendEmailOptions**](SendEmailOptions.md) | |
8
-
9
-
@@ -1,499 +0,0 @@
1
- # MailSlurpClient::CommonOperationsApi
2
-
3
- All URIs are relative to *https://api.mailslurp.com*
4
-
5
- Method | HTTP request | Description
6
- ------------- | ------------- | -------------
7
- [**create_new_email_address**](CommonOperationsApi.md#create_new_email_address) | **POST** /newEmailAddress | Create new email address
8
- [**delete_email**](CommonOperationsApi.md#delete_email) | **DELETE** /deleteEmail | Delete an email
9
- [**delete_email_address**](CommonOperationsApi.md#delete_email_address) | **DELETE** /deleteEmailAddress | Delete email address and its emails
10
- [**empty_inbox**](CommonOperationsApi.md#empty_inbox) | **DELETE** /emptyInbox | Delete all emails in an inbox
11
- [**send_email_simple**](CommonOperationsApi.md#send_email_simple) | **POST** /sendEmail | Send an email from a random email address
12
- [**wait_for_email_count**](CommonOperationsApi.md#wait_for_email_count) | **GET** /waitForEmailCount | Wait for and return count number of emails
13
- [**wait_for_latest_email**](CommonOperationsApi.md#wait_for_latest_email) | **GET** /waitForLatestEmail | Fetch inbox's latest email or if empty wait for email to arrive
14
- [**wait_for_matching_email**](CommonOperationsApi.md#wait_for_matching_email) | **POST** /waitForMatchingEmails | Wait or return list of emails that match simple matching patterns
15
- [**wait_for_nth_email**](CommonOperationsApi.md#wait_for_nth_email) | **GET** /waitForNthEmail | Wait for or fetch the email with a given index in the inbox specified
16
-
17
-
18
- # **create_new_email_address**
19
- > Inbox create_new_email_address
20
-
21
- Create new email address
22
-
23
- Returns an Inbox with an `id` and an `emailAddress`
24
-
25
- ### Example
26
- ```ruby
27
- # load the gem
28
- require 'mailslurp_client'
29
- # setup authorization
30
- MailSlurpClient.configure do |config|
31
- # Configure API key authorization: API_KEY
32
- config.api_key['x-api-key'] = 'YOUR API KEY'
33
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
34
- #config.api_key_prefix['x-api-key'] = 'Bearer'
35
- end
36
-
37
- api_instance = MailSlurpClient::CommonOperationsApi.new
38
-
39
- begin
40
- #Create new email address
41
- result = api_instance.create_new_email_address
42
- p result
43
- rescue MailSlurpClient::ApiError => e
44
- puts "Exception when calling CommonOperationsApi->create_new_email_address: #{e}"
45
- end
46
- ```
47
-
48
- ### Parameters
49
- This endpoint does not need any parameter.
50
-
51
- ### Return type
52
-
53
- [**Inbox**](Inbox.md)
54
-
55
- ### Authorization
56
-
57
- [API_KEY](../README.md#API_KEY)
58
-
59
- ### HTTP request headers
60
-
61
- - **Content-Type**: Not defined
62
- - **Accept**: application/json
63
-
64
-
65
-
66
- # **delete_email**
67
- > delete_email(email_id)
68
-
69
- Delete an email
70
-
71
- Deletes an email
72
-
73
- ### Example
74
- ```ruby
75
- # load the gem
76
- require 'mailslurp_client'
77
- # setup authorization
78
- MailSlurpClient.configure do |config|
79
- # Configure API key authorization: API_KEY
80
- config.api_key['x-api-key'] = 'YOUR API KEY'
81
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
82
- #config.api_key_prefix['x-api-key'] = 'Bearer'
83
- end
84
-
85
- api_instance = MailSlurpClient::CommonOperationsApi.new
86
- email_id = 'email_id_example' # String | emailId
87
-
88
- begin
89
- #Delete an email
90
- api_instance.delete_email(email_id)
91
- rescue MailSlurpClient::ApiError => e
92
- puts "Exception when calling CommonOperationsApi->delete_email: #{e}"
93
- end
94
- ```
95
-
96
- ### Parameters
97
-
98
- Name | Type | Description | Notes
99
- ------------- | ------------- | ------------- | -------------
100
- **email_id** | [**String**](.md)| emailId |
101
-
102
- ### Return type
103
-
104
- nil (empty response body)
105
-
106
- ### Authorization
107
-
108
- [API_KEY](../README.md#API_KEY)
109
-
110
- ### HTTP request headers
111
-
112
- - **Content-Type**: Not defined
113
- - **Accept**: Not defined
114
-
115
-
116
-
117
- # **delete_email_address**
118
- > delete_email_address(inbox_id)
119
-
120
- Delete email address and its emails
121
-
122
- Deletes an inbox
123
-
124
- ### Example
125
- ```ruby
126
- # load the gem
127
- require 'mailslurp_client'
128
- # setup authorization
129
- MailSlurpClient.configure do |config|
130
- # Configure API key authorization: API_KEY
131
- config.api_key['x-api-key'] = 'YOUR API KEY'
132
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
133
- #config.api_key_prefix['x-api-key'] = 'Bearer'
134
- end
135
-
136
- api_instance = MailSlurpClient::CommonOperationsApi.new
137
- inbox_id = 'inbox_id_example' # String | inboxId
138
-
139
- begin
140
- #Delete email address and its emails
141
- api_instance.delete_email_address(inbox_id)
142
- rescue MailSlurpClient::ApiError => e
143
- puts "Exception when calling CommonOperationsApi->delete_email_address: #{e}"
144
- end
145
- ```
146
-
147
- ### Parameters
148
-
149
- Name | Type | Description | Notes
150
- ------------- | ------------- | ------------- | -------------
151
- **inbox_id** | [**String**](.md)| inboxId |
152
-
153
- ### Return type
154
-
155
- nil (empty response body)
156
-
157
- ### Authorization
158
-
159
- [API_KEY](../README.md#API_KEY)
160
-
161
- ### HTTP request headers
162
-
163
- - **Content-Type**: Not defined
164
- - **Accept**: Not defined
165
-
166
-
167
-
168
- # **empty_inbox**
169
- > empty_inbox(inbox_id)
170
-
171
- Delete all emails in an inbox
172
-
173
- Deletes all emails
174
-
175
- ### Example
176
- ```ruby
177
- # load the gem
178
- require 'mailslurp_client'
179
- # setup authorization
180
- MailSlurpClient.configure do |config|
181
- # Configure API key authorization: API_KEY
182
- config.api_key['x-api-key'] = 'YOUR API KEY'
183
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
184
- #config.api_key_prefix['x-api-key'] = 'Bearer'
185
- end
186
-
187
- api_instance = MailSlurpClient::CommonOperationsApi.new
188
- inbox_id = 'inbox_id_example' # String | inboxId
189
-
190
- begin
191
- #Delete all emails in an inbox
192
- api_instance.empty_inbox(inbox_id)
193
- rescue MailSlurpClient::ApiError => e
194
- puts "Exception when calling CommonOperationsApi->empty_inbox: #{e}"
195
- end
196
- ```
197
-
198
- ### Parameters
199
-
200
- Name | Type | Description | Notes
201
- ------------- | ------------- | ------------- | -------------
202
- **inbox_id** | [**String**](.md)| inboxId |
203
-
204
- ### Return type
205
-
206
- nil (empty response body)
207
-
208
- ### Authorization
209
-
210
- [API_KEY](../README.md#API_KEY)
211
-
212
- ### HTTP request headers
213
-
214
- - **Content-Type**: Not defined
215
- - **Accept**: Not defined
216
-
217
-
218
-
219
- # **send_email_simple**
220
- > send_email_simple(send_email_options)
221
-
222
- Send an email from a random email address
223
-
224
- To specify an email address first create an inbox and use that with the other send email methods
225
-
226
- ### Example
227
- ```ruby
228
- # load the gem
229
- require 'mailslurp_client'
230
- # setup authorization
231
- MailSlurpClient.configure do |config|
232
- # Configure API key authorization: API_KEY
233
- config.api_key['x-api-key'] = 'YOUR API KEY'
234
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
235
- #config.api_key_prefix['x-api-key'] = 'Bearer'
236
- end
237
-
238
- api_instance = MailSlurpClient::CommonOperationsApi.new
239
- send_email_options = MailSlurpClient::SendEmailOptions.new # SendEmailOptions | sendEmailOptions
240
-
241
- begin
242
- #Send an email from a random email address
243
- api_instance.send_email_simple(send_email_options)
244
- rescue MailSlurpClient::ApiError => e
245
- puts "Exception when calling CommonOperationsApi->send_email_simple: #{e}"
246
- end
247
- ```
248
-
249
- ### Parameters
250
-
251
- Name | Type | Description | Notes
252
- ------------- | ------------- | ------------- | -------------
253
- **send_email_options** | [**SendEmailOptions**](SendEmailOptions.md)| sendEmailOptions |
254
-
255
- ### Return type
256
-
257
- nil (empty response body)
258
-
259
- ### Authorization
260
-
261
- [API_KEY](../README.md#API_KEY)
262
-
263
- ### HTTP request headers
264
-
265
- - **Content-Type**: application/json
266
- - **Accept**: Not defined
267
-
268
-
269
-
270
- # **wait_for_email_count**
271
- > Array<EmailPreview> wait_for_email_count(opts)
272
-
273
- Wait for and return count number of emails
274
-
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
-
277
- ### Example
278
- ```ruby
279
- # load the gem
280
- require 'mailslurp_client'
281
- # setup authorization
282
- MailSlurpClient.configure do |config|
283
- # Configure API key authorization: API_KEY
284
- config.api_key['x-api-key'] = 'YOUR API KEY'
285
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
286
- #config.api_key_prefix['x-api-key'] = 'Bearer'
287
- end
288
-
289
- api_instance = MailSlurpClient::CommonOperationsApi.new
290
- opts = {
291
- count: 56, # Integer | Number of emails to wait for. Must be greater that 1
292
- inbox_id: 'inbox_id_example', # String | Id of the inbox we are fetching emails from
293
- timeout: 56 # Integer | Max milliseconds to wait
294
- }
295
-
296
- begin
297
- #Wait for and return count number of emails
298
- result = api_instance.wait_for_email_count(opts)
299
- p result
300
- rescue MailSlurpClient::ApiError => e
301
- puts "Exception when calling CommonOperationsApi->wait_for_email_count: #{e}"
302
- end
303
- ```
304
-
305
- ### Parameters
306
-
307
- Name | Type | Description | Notes
308
- ------------- | ------------- | ------------- | -------------
309
- **count** | **Integer**| Number of emails to wait for. Must be greater that 1 | [optional]
310
- **inbox_id** | [**String**](.md)| Id of the inbox we are fetching emails from | [optional]
311
- **timeout** | **Integer**| Max milliseconds to wait | [optional]
312
-
313
- ### Return type
314
-
315
- [**Array<EmailPreview>**](EmailPreview.md)
316
-
317
- ### Authorization
318
-
319
- [API_KEY](../README.md#API_KEY)
320
-
321
- ### HTTP request headers
322
-
323
- - **Content-Type**: Not defined
324
- - **Accept**: application/json
325
-
326
-
327
-
328
- # **wait_for_latest_email**
329
- > Email wait_for_latest_email(opts)
330
-
331
- Fetch inbox's latest email or if empty wait for email to arrive
332
-
333
- 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.
334
-
335
- ### Example
336
- ```ruby
337
- # load the gem
338
- require 'mailslurp_client'
339
- # setup authorization
340
- MailSlurpClient.configure do |config|
341
- # Configure API key authorization: API_KEY
342
- config.api_key['x-api-key'] = 'YOUR API KEY'
343
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
344
- #config.api_key_prefix['x-api-key'] = 'Bearer'
345
- end
346
-
347
- api_instance = MailSlurpClient::CommonOperationsApi.new
348
- opts = {
349
- inbox_id: 'inbox_id_example', # String | Id of the inbox we are fetching emails from
350
- timeout: 56 # Integer | Max milliseconds to wait
351
- }
352
-
353
- begin
354
- #Fetch inbox's latest email or if empty wait for email to arrive
355
- result = api_instance.wait_for_latest_email(opts)
356
- p result
357
- rescue MailSlurpClient::ApiError => e
358
- puts "Exception when calling CommonOperationsApi->wait_for_latest_email: #{e}"
359
- end
360
- ```
361
-
362
- ### Parameters
363
-
364
- Name | Type | Description | Notes
365
- ------------- | ------------- | ------------- | -------------
366
- **inbox_id** | [**String**](.md)| Id of the inbox we are fetching emails from | [optional]
367
- **timeout** | **Integer**| Max milliseconds to wait | [optional]
368
-
369
- ### Return type
370
-
371
- [**Email**](Email.md)
372
-
373
- ### Authorization
374
-
375
- [API_KEY](../README.md#API_KEY)
376
-
377
- ### HTTP request headers
378
-
379
- - **Content-Type**: Not defined
380
- - **Accept**: application/json
381
-
382
-
383
-
384
- # **wait_for_matching_email**
385
- > Array<EmailPreview> wait_for_matching_email(match_options, opts)
386
-
387
- Wait or return list of emails that match simple matching patterns
388
-
389
- Results must also meet provided count. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM.
390
-
391
- ### Example
392
- ```ruby
393
- # load the gem
394
- require 'mailslurp_client'
395
- # setup authorization
396
- MailSlurpClient.configure do |config|
397
- # Configure API key authorization: API_KEY
398
- config.api_key['x-api-key'] = 'YOUR API KEY'
399
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
400
- #config.api_key_prefix['x-api-key'] = 'Bearer'
401
- end
402
-
403
- api_instance = MailSlurpClient::CommonOperationsApi.new
404
- match_options = MailSlurpClient::MatchOptions.new # MatchOptions | matchOptions
405
- opts = {
406
- count: 56, # Integer | Number of emails to wait for. Must be greater that 1
407
- inbox_id: 'inbox_id_example', # String | Id of the inbox we are fetching emails from
408
- timeout: 56 # Integer | Max milliseconds to wait
409
- }
410
-
411
- begin
412
- #Wait or return list of emails that match simple matching patterns
413
- result = api_instance.wait_for_matching_email(match_options, opts)
414
- p result
415
- rescue MailSlurpClient::ApiError => e
416
- puts "Exception when calling CommonOperationsApi->wait_for_matching_email: #{e}"
417
- end
418
- ```
419
-
420
- ### Parameters
421
-
422
- Name | Type | Description | Notes
423
- ------------- | ------------- | ------------- | -------------
424
- **match_options** | [**MatchOptions**](MatchOptions.md)| matchOptions |
425
- **count** | **Integer**| Number of emails to wait for. Must be greater that 1 | [optional]
426
- **inbox_id** | [**String**](.md)| Id of the inbox we are fetching emails from | [optional]
427
- **timeout** | **Integer**| Max milliseconds to wait | [optional]
428
-
429
- ### Return type
430
-
431
- [**Array<EmailPreview>**](EmailPreview.md)
432
-
433
- ### Authorization
434
-
435
- [API_KEY](../README.md#API_KEY)
436
-
437
- ### HTTP request headers
438
-
439
- - **Content-Type**: application/json
440
- - **Accept**: application/json
441
-
442
-
443
-
444
- # **wait_for_nth_email**
445
- > Email wait_for_nth_email(opts)
446
-
447
- Wait for or fetch the email with a given index in the inbox specified
448
-
449
- ### Example
450
- ```ruby
451
- # load the gem
452
- require 'mailslurp_client'
453
- # setup authorization
454
- MailSlurpClient.configure do |config|
455
- # Configure API key authorization: API_KEY
456
- config.api_key['x-api-key'] = 'YOUR API KEY'
457
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
458
- #config.api_key_prefix['x-api-key'] = 'Bearer'
459
- end
460
-
461
- api_instance = MailSlurpClient::CommonOperationsApi.new
462
- opts = {
463
- inbox_id: 'inbox_id_example', # String | Id of the inbox we are fetching emails from
464
- index: 56, # Integer | Zero based index of the email to wait for
465
- timeout: 56 # Integer | Max milliseconds to wait
466
- }
467
-
468
- begin
469
- #Wait for or fetch the email with a given index in the inbox specified
470
- result = api_instance.wait_for_nth_email(opts)
471
- p result
472
- rescue MailSlurpClient::ApiError => e
473
- puts "Exception when calling CommonOperationsApi->wait_for_nth_email: #{e}"
474
- end
475
- ```
476
-
477
- ### Parameters
478
-
479
- Name | Type | Description | Notes
480
- ------------- | ------------- | ------------- | -------------
481
- **inbox_id** | [**String**](.md)| Id of the inbox we are fetching emails from | [optional]
482
- **index** | **Integer**| Zero based index of the email to wait for | [optional]
483
- **timeout** | **Integer**| Max milliseconds to wait | [optional]
484
-
485
- ### Return type
486
-
487
- [**Email**](Email.md)
488
-
489
- ### Authorization
490
-
491
- [API_KEY](../README.md#API_KEY)
492
-
493
- ### HTTP request headers
494
-
495
- - **Content-Type**: Not defined
496
- - **Accept**: application/json
497
-
498
-
499
-