mailslurp_client 4.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +8 -0
- data/Gemfile.lock +79 -0
- data/LICENSE +22 -0
- data/README.md +126 -0
- data/Rakefile +10 -0
- data/docs/BasicAuthOptions.md +9 -0
- data/docs/BulkSendEmailOptions.md +9 -0
- data/docs/CommonOperationsApi.md +166 -0
- data/docs/CreateWebhookOptions.md +10 -0
- data/docs/Email.md +22 -0
- data/docs/EmailAnalysis.md +12 -0
- data/docs/EmailPreview.md +9 -0
- data/docs/ExtraOperationsApi.md +855 -0
- data/docs/Inbox.md +11 -0
- data/docs/SendEmailOptions.md +16 -0
- data/docs/Webhook.md +13 -0
- data/git_push.sh +55 -0
- data/lib/mailslurp_client.rb +50 -0
- data/lib/mailslurp_client/api/common_operations_api.rb +175 -0
- data/lib/mailslurp_client/api/extra_operations_api.rb +879 -0
- data/lib/mailslurp_client/api_client.rb +389 -0
- data/lib/mailslurp_client/api_error.rb +38 -0
- data/lib/mailslurp_client/configuration.rb +251 -0
- data/lib/mailslurp_client/models/basic_auth_options.rb +202 -0
- data/lib/mailslurp_client/models/bulk_send_email_options.rb +201 -0
- data/lib/mailslurp_client/models/create_webhook_options.rb +202 -0
- data/lib/mailslurp_client/models/email.rb +350 -0
- data/lib/mailslurp_client/models/email_analysis.rb +245 -0
- data/lib/mailslurp_client/models/email_preview.rb +203 -0
- data/lib/mailslurp_client/models/inbox.rb +212 -0
- data/lib/mailslurp_client/models/send_email_options.rb +275 -0
- data/lib/mailslurp_client/models/webhook.rb +242 -0
- data/lib/mailslurp_client/version.rb +15 -0
- data/mailslurp_client.gemspec +45 -0
- data/spec/api/common_operations_api_spec.rb +71 -0
- data/spec/api/extra_operations_api_spec.rb +231 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/basic_auth_options_spec.rb +47 -0
- data/spec/models/bulk_send_email_options_spec.rb +47 -0
- data/spec/models/create_webhook_options_spec.rb +53 -0
- data/spec/models/email_analysis_spec.rb +65 -0
- data/spec/models/email_preview_spec.rb +47 -0
- data/spec/models/email_spec.rb +125 -0
- data/spec/models/inbox_spec.rb +59 -0
- data/spec/models/send_email_options_spec.rb +89 -0
- data/spec/models/webhook_spec.rb +71 -0
- data/spec/spec_helper.rb +111 -0
- metadata +287 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 425d283104ec65eb164ab440b1fa03d1256a0701
|
4
|
+
data.tar.gz: d64d77df12dc5b3887d4c7be17f3748cc95da515
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: cd1072e27644b56dd5444f910b60d383b357ed43d5bb0d132aded2f0bcd66e9835195e81ca92186b3e59b155da884ad9c973cfa9cc01371826ad84a18c1d0296
|
7
|
+
data.tar.gz: bc2556c9292654fed1cc492d2ca678086974d78300f65530294f1d5772db386c3ee87a624a443cc04905bcfbc03a6f449604c66123e3ded3521870bc261d1a25
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,79 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
mailslurp_client (4.3.3)
|
5
|
+
json (~> 2.1, >= 2.1.0)
|
6
|
+
typhoeus (~> 1.0, >= 1.0.1)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
ZenTest (4.11.1)
|
12
|
+
addressable (2.5.2)
|
13
|
+
public_suffix (>= 2.0.2, < 4.0)
|
14
|
+
autotest (4.4.6)
|
15
|
+
ZenTest (>= 4.4.1)
|
16
|
+
autotest-fsevent (0.2.14)
|
17
|
+
sys-uname
|
18
|
+
autotest-growl (0.2.16)
|
19
|
+
autotest-rails-pure (4.1.2)
|
20
|
+
byebug (10.0.2)
|
21
|
+
coderay (1.1.2)
|
22
|
+
crack (0.4.3)
|
23
|
+
safe_yaml (~> 1.0.0)
|
24
|
+
diff-lcs (1.3)
|
25
|
+
ethon (0.11.0)
|
26
|
+
ffi (>= 1.3.0)
|
27
|
+
ffi (1.9.25)
|
28
|
+
hashdiff (0.3.7)
|
29
|
+
json (2.1.0)
|
30
|
+
method_source (0.9.0)
|
31
|
+
pry (0.11.3)
|
32
|
+
coderay (~> 1.1.0)
|
33
|
+
method_source (~> 0.9.0)
|
34
|
+
pry-byebug (3.6.0)
|
35
|
+
byebug (~> 10.0)
|
36
|
+
pry (~> 0.10)
|
37
|
+
public_suffix (3.0.3)
|
38
|
+
rake (12.0.0)
|
39
|
+
rspec (3.8.0)
|
40
|
+
rspec-core (~> 3.8.0)
|
41
|
+
rspec-expectations (~> 3.8.0)
|
42
|
+
rspec-mocks (~> 3.8.0)
|
43
|
+
rspec-core (3.8.0)
|
44
|
+
rspec-support (~> 3.8.0)
|
45
|
+
rspec-expectations (3.8.1)
|
46
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
47
|
+
rspec-support (~> 3.8.0)
|
48
|
+
rspec-mocks (3.8.0)
|
49
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
50
|
+
rspec-support (~> 3.8.0)
|
51
|
+
rspec-support (3.8.0)
|
52
|
+
safe_yaml (1.0.4)
|
53
|
+
sys-uname (1.0.3)
|
54
|
+
ffi (>= 1.0.0)
|
55
|
+
typhoeus (1.3.0)
|
56
|
+
ethon (>= 0.9.0)
|
57
|
+
vcr (3.0.3)
|
58
|
+
webmock (1.24.6)
|
59
|
+
addressable (>= 2.3.6)
|
60
|
+
crack (>= 0.3.2)
|
61
|
+
hashdiff
|
62
|
+
|
63
|
+
PLATFORMS
|
64
|
+
ruby
|
65
|
+
|
66
|
+
DEPENDENCIES
|
67
|
+
autotest (~> 4.4, >= 4.4.6)
|
68
|
+
autotest-fsevent (~> 0.2, >= 0.2.12)
|
69
|
+
autotest-growl (~> 0.2, >= 0.2.16)
|
70
|
+
autotest-rails-pure (~> 4.1, >= 4.1.2)
|
71
|
+
mailslurp_client!
|
72
|
+
pry-byebug
|
73
|
+
rake (~> 12.0.0)
|
74
|
+
rspec (~> 3.6, >= 3.6.0)
|
75
|
+
vcr (~> 3.0, >= 3.0.1)
|
76
|
+
webmock (~> 1.24, >= 1.24.3)
|
77
|
+
|
78
|
+
BUNDLED WITH
|
79
|
+
1.16.1
|
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
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
ADDED
@@ -0,0 +1,126 @@
|
|
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: 4.3.3
|
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-4.3.3.gem
|
28
|
+
```
|
29
|
+
(for development, run `gem install --dev ./mailslurp_client-4.3.3.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', '~> 4.3.3'
|
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* | [**send_email_simple**](docs/CommonOperationsApi.md#send_email_simple) | **POST** /sendEmail | Send an email from a random email address
|
86
|
+
*MailSlurpClient::CommonOperationsApi* | [**wait_for_latest_email**](docs/CommonOperationsApi.md#wait_for_latest_email) | **GET** /fetchLatestEmail | Fetch inbox's latest email or if empty wait for email to arrive
|
87
|
+
*MailSlurpClient::ExtraOperationsApi* | [**bulk_create_inboxes**](docs/ExtraOperationsApi.md#bulk_create_inboxes) | **POST** /bulk/inboxes | Bulk create Inboxes (email addresses)
|
88
|
+
*MailSlurpClient::ExtraOperationsApi* | [**bulk_delete_inboxes**](docs/ExtraOperationsApi.md#bulk_delete_inboxes) | **DELETE** /bulk/inboxes | Bulk Delete Inboxes
|
89
|
+
*MailSlurpClient::ExtraOperationsApi* | [**bulk_send_emails**](docs/ExtraOperationsApi.md#bulk_send_emails) | **POST** /bulk/send | Bulk Send Emails
|
90
|
+
*MailSlurpClient::ExtraOperationsApi* | [**create_inbox**](docs/ExtraOperationsApi.md#create_inbox) | **POST** /inboxes | Create an Inbox (email address)
|
91
|
+
*MailSlurpClient::ExtraOperationsApi* | [**create_webhook**](docs/ExtraOperationsApi.md#create_webhook) | **POST** /inboxes/{inboxId}/webhooks | Attach a WebHook URL to an inbox
|
92
|
+
*MailSlurpClient::ExtraOperationsApi* | [**delete_email**](docs/ExtraOperationsApi.md#delete_email) | **DELETE** /emails/{emailId} | Delete Email
|
93
|
+
*MailSlurpClient::ExtraOperationsApi* | [**delete_inbox**](docs/ExtraOperationsApi.md#delete_inbox) | **DELETE** /inboxes/{inboxId} | Delete Inbox / Email Address
|
94
|
+
*MailSlurpClient::ExtraOperationsApi* | [**delete_webhook**](docs/ExtraOperationsApi.md#delete_webhook) | **DELETE** /inboxes/{inboxId}/webhooks/{webhookId} | Delete and disable a WebHook for an Inbox
|
95
|
+
*MailSlurpClient::ExtraOperationsApi* | [**download_attachment**](docs/ExtraOperationsApi.md#download_attachment) | **GET** /emails/{emailId}/attachments/{attachmentId} | Get email attachment
|
96
|
+
*MailSlurpClient::ExtraOperationsApi* | [**get_email**](docs/ExtraOperationsApi.md#get_email) | **GET** /emails/{emailId} | Get Email Content
|
97
|
+
*MailSlurpClient::ExtraOperationsApi* | [**get_emails**](docs/ExtraOperationsApi.md#get_emails) | **GET** /inboxes/{inboxId}/emails | List Emails in an Inbox / EmailAddress
|
98
|
+
*MailSlurpClient::ExtraOperationsApi* | [**get_inbox**](docs/ExtraOperationsApi.md#get_inbox) | **GET** /inboxes/{inboxId} | Get Inbox / EmailAddress
|
99
|
+
*MailSlurpClient::ExtraOperationsApi* | [**get_inboxes**](docs/ExtraOperationsApi.md#get_inboxes) | **GET** /inboxes | List Inboxes / Email Addresses
|
100
|
+
*MailSlurpClient::ExtraOperationsApi* | [**get_raw_email_contents**](docs/ExtraOperationsApi.md#get_raw_email_contents) | **GET** /emails/{emailId}/raw | Get Raw Email Content
|
101
|
+
*MailSlurpClient::ExtraOperationsApi* | [**get_webhooks**](docs/ExtraOperationsApi.md#get_webhooks) | **GET** /inboxes/{inboxId}/webhooks | Get all WebHooks for an Inbox
|
102
|
+
*MailSlurpClient::ExtraOperationsApi* | [**send_email**](docs/ExtraOperationsApi.md#send_email) | **POST** /inboxes/{inboxId} | Send Email
|
103
|
+
|
104
|
+
|
105
|
+
## Documentation for Models
|
106
|
+
|
107
|
+
- [MailSlurpClient::BasicAuthOptions](docs/BasicAuthOptions.md)
|
108
|
+
- [MailSlurpClient::BulkSendEmailOptions](docs/BulkSendEmailOptions.md)
|
109
|
+
- [MailSlurpClient::CreateWebhookOptions](docs/CreateWebhookOptions.md)
|
110
|
+
- [MailSlurpClient::Email](docs/Email.md)
|
111
|
+
- [MailSlurpClient::EmailAnalysis](docs/EmailAnalysis.md)
|
112
|
+
- [MailSlurpClient::EmailPreview](docs/EmailPreview.md)
|
113
|
+
- [MailSlurpClient::Inbox](docs/Inbox.md)
|
114
|
+
- [MailSlurpClient::SendEmailOptions](docs/SendEmailOptions.md)
|
115
|
+
- [MailSlurpClient::Webhook](docs/Webhook.md)
|
116
|
+
|
117
|
+
|
118
|
+
## Documentation for Authorization
|
119
|
+
|
120
|
+
|
121
|
+
### API_KEY
|
122
|
+
|
123
|
+
- **Type**: API key
|
124
|
+
- **API key parameter name**: x-api-key
|
125
|
+
- **Location**: HTTP header
|
126
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,9 @@
|
|
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
|
+
|
@@ -0,0 +1,166 @@
|
|
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
|
+
[**send_email_simple**](CommonOperationsApi.md#send_email_simple) | **POST** /sendEmail | Send an email from a random email address
|
9
|
+
[**wait_for_latest_email**](CommonOperationsApi.md#wait_for_latest_email) | **GET** /fetchLatestEmail | Fetch inbox's latest email or if empty wait for email to arrive
|
10
|
+
|
11
|
+
|
12
|
+
# **create_new_email_address**
|
13
|
+
> Inbox create_new_email_address
|
14
|
+
|
15
|
+
Create new email address
|
16
|
+
|
17
|
+
Returns an Inbox with an `id` and an `emailAddress`
|
18
|
+
|
19
|
+
### Example
|
20
|
+
```ruby
|
21
|
+
# load the gem
|
22
|
+
require 'mailslurp_client'
|
23
|
+
# setup authorization
|
24
|
+
MailSlurpClient.configure do |config|
|
25
|
+
# Configure API key authorization: API_KEY
|
26
|
+
config.api_key['x-api-key'] = 'YOUR API KEY'
|
27
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
28
|
+
#config.api_key_prefix['x-api-key'] = 'Bearer'
|
29
|
+
end
|
30
|
+
|
31
|
+
api_instance = MailSlurpClient::CommonOperationsApi.new
|
32
|
+
|
33
|
+
begin
|
34
|
+
#Create new email address
|
35
|
+
result = api_instance.create_new_email_address
|
36
|
+
p result
|
37
|
+
rescue MailSlurpClient::ApiError => e
|
38
|
+
puts "Exception when calling CommonOperationsApi->create_new_email_address: #{e}"
|
39
|
+
end
|
40
|
+
```
|
41
|
+
|
42
|
+
### Parameters
|
43
|
+
This endpoint does not need any parameter.
|
44
|
+
|
45
|
+
### Return type
|
46
|
+
|
47
|
+
[**Inbox**](Inbox.md)
|
48
|
+
|
49
|
+
### Authorization
|
50
|
+
|
51
|
+
[API_KEY](../README.md#API_KEY)
|
52
|
+
|
53
|
+
### HTTP request headers
|
54
|
+
|
55
|
+
- **Content-Type**: Not defined
|
56
|
+
- **Accept**: application/json
|
57
|
+
|
58
|
+
|
59
|
+
|
60
|
+
# **send_email_simple**
|
61
|
+
> send_email_simple(send_email_options)
|
62
|
+
|
63
|
+
Send an email from a random email address
|
64
|
+
|
65
|
+
To specify an email address first create an inbox and use that with the other send email methods
|
66
|
+
|
67
|
+
### Example
|
68
|
+
```ruby
|
69
|
+
# load the gem
|
70
|
+
require 'mailslurp_client'
|
71
|
+
# setup authorization
|
72
|
+
MailSlurpClient.configure do |config|
|
73
|
+
# Configure API key authorization: API_KEY
|
74
|
+
config.api_key['x-api-key'] = 'YOUR API KEY'
|
75
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
76
|
+
#config.api_key_prefix['x-api-key'] = 'Bearer'
|
77
|
+
end
|
78
|
+
|
79
|
+
api_instance = MailSlurpClient::CommonOperationsApi.new
|
80
|
+
send_email_options = MailSlurpClient::SendEmailOptions.new # SendEmailOptions | sendEmailOptions
|
81
|
+
|
82
|
+
begin
|
83
|
+
#Send an email from a random email address
|
84
|
+
api_instance.send_email_simple(send_email_options)
|
85
|
+
rescue MailSlurpClient::ApiError => e
|
86
|
+
puts "Exception when calling CommonOperationsApi->send_email_simple: #{e}"
|
87
|
+
end
|
88
|
+
```
|
89
|
+
|
90
|
+
### Parameters
|
91
|
+
|
92
|
+
Name | Type | Description | Notes
|
93
|
+
------------- | ------------- | ------------- | -------------
|
94
|
+
**send_email_options** | [**SendEmailOptions**](SendEmailOptions.md)| sendEmailOptions |
|
95
|
+
|
96
|
+
### Return type
|
97
|
+
|
98
|
+
nil (empty response body)
|
99
|
+
|
100
|
+
### Authorization
|
101
|
+
|
102
|
+
[API_KEY](../README.md#API_KEY)
|
103
|
+
|
104
|
+
### HTTP request headers
|
105
|
+
|
106
|
+
- **Content-Type**: application/json
|
107
|
+
- **Accept**: Not defined
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
# **wait_for_latest_email**
|
112
|
+
> Email wait_for_latest_email(opts)
|
113
|
+
|
114
|
+
Fetch inbox's latest email or if empty wait for email to arrive
|
115
|
+
|
116
|
+
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.
|
117
|
+
|
118
|
+
### Example
|
119
|
+
```ruby
|
120
|
+
# load the gem
|
121
|
+
require 'mailslurp_client'
|
122
|
+
# setup authorization
|
123
|
+
MailSlurpClient.configure do |config|
|
124
|
+
# Configure API key authorization: API_KEY
|
125
|
+
config.api_key['x-api-key'] = 'YOUR API KEY'
|
126
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
127
|
+
#config.api_key_prefix['x-api-key'] = 'Bearer'
|
128
|
+
end
|
129
|
+
|
130
|
+
api_instance = MailSlurpClient::CommonOperationsApi.new
|
131
|
+
opts = {
|
132
|
+
inbox_email_address: 'inbox_email_address_example', # String | Email address of the inbox we are fetching emails from
|
133
|
+
inbox_id: 'inbox_id_example' # String | Id of the inbox we are fetching emails from
|
134
|
+
}
|
135
|
+
|
136
|
+
begin
|
137
|
+
#Fetch inbox's latest email or if empty wait for email to arrive
|
138
|
+
result = api_instance.wait_for_latest_email(opts)
|
139
|
+
p result
|
140
|
+
rescue MailSlurpClient::ApiError => e
|
141
|
+
puts "Exception when calling CommonOperationsApi->wait_for_latest_email: #{e}"
|
142
|
+
end
|
143
|
+
```
|
144
|
+
|
145
|
+
### Parameters
|
146
|
+
|
147
|
+
Name | Type | Description | Notes
|
148
|
+
------------- | ------------- | ------------- | -------------
|
149
|
+
**inbox_email_address** | **String**| Email address of the inbox we are fetching emails from | [optional]
|
150
|
+
**inbox_id** | [**String**](.md)| Id of the inbox we are fetching emails from | [optional]
|
151
|
+
|
152
|
+
### Return type
|
153
|
+
|
154
|
+
[**Email**](Email.md)
|
155
|
+
|
156
|
+
### Authorization
|
157
|
+
|
158
|
+
[API_KEY](../README.md#API_KEY)
|
159
|
+
|
160
|
+
### HTTP request headers
|
161
|
+
|
162
|
+
- **Content-Type**: Not defined
|
163
|
+
- **Accept**: application/json
|
164
|
+
|
165
|
+
|
166
|
+
|