mailmock 1.1.1.pre.34026500447
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 +9 -0
- data/README.md +111 -0
- data/Rakefile +10 -0
- data/docs/EmailApi.md +202 -0
- data/docs/EmailCreate200Response.md +20 -0
- data/docs/EmailCreateRequest.md +20 -0
- data/docs/EmailList200ResponseInner.md +26 -0
- data/docs/EmailListDefaultResponse.md +22 -0
- data/docs/EmailListDefaultResponseIssuesInner.md +18 -0
- data/docs/EmailRead200Response.md +36 -0
- data/docs/EmailRead200ResponseHeadersInner.md +20 -0
- data/docs/EmailReadRequest.md +20 -0
- data/docs/SendApi.md +70 -0
- data/docs/SendAws200Response.md +24 -0
- data/docs/SendAwsRequest.md +24 -0
- data/docs/SendAwsRequestMail.md +30 -0
- data/docs/SendAwsRequestMailCommonHeaders.md +28 -0
- data/docs/SendAwsRequestReceipt.md +34 -0
- data/docs/SendAwsRequestReceiptAction.md +22 -0
- data/docs/SendAwsRequestReceiptSpamVerdict.md +18 -0
- data/git_push.sh +57 -0
- data/lib/mailmock/api/email_api.rb +222 -0
- data/lib/mailmock/api/send_api.rb +86 -0
- data/lib/mailmock/api_client.rb +397 -0
- data/lib/mailmock/api_error.rb +58 -0
- data/lib/mailmock/api_model_base.rb +88 -0
- data/lib/mailmock/configuration.rb +308 -0
- data/lib/mailmock/models/email_create200_response.rb +190 -0
- data/lib/mailmock/models/email_create_request.rb +190 -0
- data/lib/mailmock/models/email_list200_response_inner.rb +292 -0
- data/lib/mailmock/models/email_list_default_response.rb +201 -0
- data/lib/mailmock/models/email_list_default_response_issues_inner.rb +164 -0
- data/lib/mailmock/models/email_read200_response.rb +370 -0
- data/lib/mailmock/models/email_read200_response_headers_inner.rb +190 -0
- data/lib/mailmock/models/email_read_request.rb +175 -0
- data/lib/mailmock/models/send_aws200_response.rb +242 -0
- data/lib/mailmock/models/send_aws_request.rb +242 -0
- data/lib/mailmock/models/send_aws_request_mail.rb +324 -0
- data/lib/mailmock/models/send_aws_request_mail_common_headers.rb +298 -0
- data/lib/mailmock/models/send_aws_request_receipt.rb +374 -0
- data/lib/mailmock/models/send_aws_request_receipt_action.rb +216 -0
- data/lib/mailmock/models/send_aws_request_receipt_spam_verdict.rb +164 -0
- data/lib/mailmock/version.rb +15 -0
- data/lib/mailmock.rb +57 -0
- data/mailmock.gemspec +39 -0
- data/spec/api/email_api_spec.rb +70 -0
- data/spec/api/send_api_spec.rb +45 -0
- data/spec/api_client_spec.rb +228 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/email_create200_response_spec.rb +40 -0
- data/spec/models/email_create_request_spec.rb +40 -0
- data/spec/models/email_list200_response_inner_spec.rb +62 -0
- data/spec/models/email_list_default_response_issues_inner_spec.rb +34 -0
- data/spec/models/email_list_default_response_spec.rb +46 -0
- data/spec/models/email_read200_response_headers_inner_spec.rb +40 -0
- data/spec/models/email_read200_response_spec.rb +88 -0
- data/spec/models/email_read_request_spec.rb +40 -0
- data/spec/models/send_aws200_response_spec.rb +52 -0
- data/spec/models/send_aws_request_mail_common_headers_spec.rb +64 -0
- data/spec/models/send_aws_request_mail_spec.rb +70 -0
- data/spec/models/send_aws_request_receipt_action_spec.rb +46 -0
- data/spec/models/send_aws_request_receipt_spam_verdict_spec.rb +34 -0
- data/spec/models/send_aws_request_receipt_spec.rb +82 -0
- data/spec/models/send_aws_request_spec.rb +52 -0
- data/spec/spec_helper.rb +111 -0
- metadata +168 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 9da3cff83330b726409c09535c793fa74d67d20331b7c14aed7ae6dc487ce3eb
|
|
4
|
+
data.tar.gz: 81b774f98fb309819d689b44326d05be9976a9a98410bd0f7013d5e35ee19beb
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 96b92a3956afa20381be75856dd151e3a842f9a02a8c5fa93f63d3ee3c08b1a424e780999ced4a4cdd42d48dbe1f4c418ab38156d231d030a6836564fa53efb5
|
|
7
|
+
data.tar.gz: d990c7c25dfb22efab40d5a2292a7e78be8e48aefeede4d138dbba1b72d65e2a44542a792e390b3c27e67ce19cfe4c759fd50d5d90089c8cf1f2260bd40cbd5b
|
data/Gemfile
ADDED
data/README.md
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# mailmock
|
|
2
|
+
|
|
3
|
+
Mailmock - the Ruby gem for the Mailmock API
|
|
4
|
+
|
|
5
|
+
Mailmock API
|
|
6
|
+
|
|
7
|
+
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
|
8
|
+
|
|
9
|
+
- API version: 1.0.0
|
|
10
|
+
- Package version: 1.1.1.pre.34026500447
|
|
11
|
+
- Generator version: 7.24.0
|
|
12
|
+
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
### Build a gem
|
|
17
|
+
|
|
18
|
+
To build the Ruby code into a gem:
|
|
19
|
+
|
|
20
|
+
```shell
|
|
21
|
+
gem build mailmock.gemspec
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Then either install the gem locally:
|
|
25
|
+
|
|
26
|
+
```shell
|
|
27
|
+
gem install ./mailmock-1.1.1.pre.34026500447.gem
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
(for development, run `gem install --dev ./mailmock-1.1.1.pre.34026500447.gem` to install the development dependencies)
|
|
31
|
+
|
|
32
|
+
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
|
33
|
+
|
|
34
|
+
Finally add this to the Gemfile:
|
|
35
|
+
|
|
36
|
+
gem 'mailmock', '~> 1.1.1.pre.34026500447'
|
|
37
|
+
|
|
38
|
+
### Install from Git
|
|
39
|
+
|
|
40
|
+
If the Ruby gem is hosted at a git repository: https://github.com/descope/mailmock, then add the following in the Gemfile:
|
|
41
|
+
|
|
42
|
+
gem 'mailmock', :git => 'https://github.com/descope/mailmock.git'
|
|
43
|
+
|
|
44
|
+
### Include the Ruby code directly
|
|
45
|
+
|
|
46
|
+
Include the Ruby code directly using `-I` as follows:
|
|
47
|
+
|
|
48
|
+
```shell
|
|
49
|
+
ruby -Ilib script.rb
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Getting Started
|
|
53
|
+
|
|
54
|
+
Please follow the [installation](#installation) procedure and then run the following code:
|
|
55
|
+
|
|
56
|
+
```ruby
|
|
57
|
+
# Load the gem
|
|
58
|
+
require 'mailmock'
|
|
59
|
+
|
|
60
|
+
api_instance = Mailmock::EmailApi.new
|
|
61
|
+
email_create_request = Mailmock::EmailCreateRequest.new({user: 'user_example', provider: 'provider_example'}) # EmailCreateRequest |
|
|
62
|
+
|
|
63
|
+
begin
|
|
64
|
+
#Create a new mailbox
|
|
65
|
+
result = api_instance.email_create(email_create_request)
|
|
66
|
+
p result
|
|
67
|
+
rescue Mailmock::ApiError => e
|
|
68
|
+
puts "Exception when calling EmailApi->email_create: #{e}"
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Documentation for API Endpoints
|
|
74
|
+
|
|
75
|
+
All URIs are relative to */api/trpc*
|
|
76
|
+
|
|
77
|
+
Class | Method | HTTP request | Description
|
|
78
|
+
------------ | ------------- | ------------- | -------------
|
|
79
|
+
*Mailmock::EmailApi* | [**email_create**](docs/EmailApi.md#email_create) | **PUT** /email | Create a new mailbox
|
|
80
|
+
*Mailmock::EmailApi* | [**email_list**](docs/EmailApi.md#email_list) | **GET** /email | List mailbox(es)
|
|
81
|
+
*Mailmock::EmailApi* | [**email_read**](docs/EmailApi.md#email_read) | **POST** /email | Fetch an email, optionally mark as read
|
|
82
|
+
*Mailmock::SendApi* | [**send_aws**](docs/SendApi.md#send_aws) | **POST** /aws |
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
## Documentation for Models
|
|
86
|
+
|
|
87
|
+
- [Mailmock::EmailCreate200Response](docs/EmailCreate200Response.md)
|
|
88
|
+
- [Mailmock::EmailCreateRequest](docs/EmailCreateRequest.md)
|
|
89
|
+
- [Mailmock::EmailList200ResponseInner](docs/EmailList200ResponseInner.md)
|
|
90
|
+
- [Mailmock::EmailListDefaultResponse](docs/EmailListDefaultResponse.md)
|
|
91
|
+
- [Mailmock::EmailListDefaultResponseIssuesInner](docs/EmailListDefaultResponseIssuesInner.md)
|
|
92
|
+
- [Mailmock::EmailRead200Response](docs/EmailRead200Response.md)
|
|
93
|
+
- [Mailmock::EmailRead200ResponseHeadersInner](docs/EmailRead200ResponseHeadersInner.md)
|
|
94
|
+
- [Mailmock::EmailReadRequest](docs/EmailReadRequest.md)
|
|
95
|
+
- [Mailmock::SendAws200Response](docs/SendAws200Response.md)
|
|
96
|
+
- [Mailmock::SendAwsRequest](docs/SendAwsRequest.md)
|
|
97
|
+
- [Mailmock::SendAwsRequestMail](docs/SendAwsRequestMail.md)
|
|
98
|
+
- [Mailmock::SendAwsRequestMailCommonHeaders](docs/SendAwsRequestMailCommonHeaders.md)
|
|
99
|
+
- [Mailmock::SendAwsRequestReceipt](docs/SendAwsRequestReceipt.md)
|
|
100
|
+
- [Mailmock::SendAwsRequestReceiptAction](docs/SendAwsRequestReceiptAction.md)
|
|
101
|
+
- [Mailmock::SendAwsRequestReceiptSpamVerdict](docs/SendAwsRequestReceiptSpamVerdict.md)
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
## Documentation for Authorization
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
Authentication schemes defined for the API:
|
|
108
|
+
### Authorization
|
|
109
|
+
|
|
110
|
+
- **Type**: Bearer authentication
|
|
111
|
+
|
data/Rakefile
ADDED
data/docs/EmailApi.md
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
# Mailmock::EmailApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to */api/trpc*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**email_create**](EmailApi.md#email_create) | **PUT** /email | Create a new mailbox |
|
|
8
|
+
| [**email_list**](EmailApi.md#email_list) | **GET** /email | List mailbox(es) |
|
|
9
|
+
| [**email_read**](EmailApi.md#email_read) | **POST** /email | Fetch an email, optionally mark as read |
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## email_create
|
|
13
|
+
|
|
14
|
+
> <EmailCreate200Response> email_create(email_create_request)
|
|
15
|
+
|
|
16
|
+
Create a new mailbox
|
|
17
|
+
|
|
18
|
+
### Examples
|
|
19
|
+
|
|
20
|
+
```ruby
|
|
21
|
+
require 'time'
|
|
22
|
+
require 'mailmock'
|
|
23
|
+
|
|
24
|
+
api_instance = Mailmock::EmailApi.new
|
|
25
|
+
email_create_request = Mailmock::EmailCreateRequest.new({user: 'user_example', provider: 'provider_example'}) # EmailCreateRequest |
|
|
26
|
+
|
|
27
|
+
begin
|
|
28
|
+
# Create a new mailbox
|
|
29
|
+
result = api_instance.email_create(email_create_request)
|
|
30
|
+
p result
|
|
31
|
+
rescue Mailmock::ApiError => e
|
|
32
|
+
puts "Error when calling EmailApi->email_create: #{e}"
|
|
33
|
+
end
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
#### Using the email_create_with_http_info variant
|
|
37
|
+
|
|
38
|
+
This returns an Array which contains the response data, status code and headers.
|
|
39
|
+
|
|
40
|
+
> <Array(<EmailCreate200Response>, Integer, Hash)> email_create_with_http_info(email_create_request)
|
|
41
|
+
|
|
42
|
+
```ruby
|
|
43
|
+
begin
|
|
44
|
+
# Create a new mailbox
|
|
45
|
+
data, status_code, headers = api_instance.email_create_with_http_info(email_create_request)
|
|
46
|
+
p status_code # => 2xx
|
|
47
|
+
p headers # => { ... }
|
|
48
|
+
p data # => <EmailCreate200Response>
|
|
49
|
+
rescue Mailmock::ApiError => e
|
|
50
|
+
puts "Error when calling EmailApi->email_create_with_http_info: #{e}"
|
|
51
|
+
end
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Parameters
|
|
55
|
+
|
|
56
|
+
| Name | Type | Description | Notes |
|
|
57
|
+
| ---- | ---- | ----------- | ----- |
|
|
58
|
+
| **email_create_request** | [**EmailCreateRequest**](EmailCreateRequest.md) | | |
|
|
59
|
+
|
|
60
|
+
### Return type
|
|
61
|
+
|
|
62
|
+
[**EmailCreate200Response**](EmailCreate200Response.md)
|
|
63
|
+
|
|
64
|
+
### Authorization
|
|
65
|
+
|
|
66
|
+
No authorization required
|
|
67
|
+
|
|
68
|
+
### HTTP request headers
|
|
69
|
+
|
|
70
|
+
- **Content-Type**: application/json
|
|
71
|
+
- **Accept**: application/json
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
## email_list
|
|
75
|
+
|
|
76
|
+
> <Array<EmailList200ResponseInner>> email_list(opts)
|
|
77
|
+
|
|
78
|
+
List mailbox(es)
|
|
79
|
+
|
|
80
|
+
### Examples
|
|
81
|
+
|
|
82
|
+
```ruby
|
|
83
|
+
require 'time'
|
|
84
|
+
require 'mailmock'
|
|
85
|
+
|
|
86
|
+
api_instance = Mailmock::EmailApi.new
|
|
87
|
+
opts = {
|
|
88
|
+
user: 'user_example', # String |
|
|
89
|
+
mailbox: 'mailbox_example', # String |
|
|
90
|
+
unread: 'true' # String |
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
begin
|
|
94
|
+
# List mailbox(es)
|
|
95
|
+
result = api_instance.email_list(opts)
|
|
96
|
+
p result
|
|
97
|
+
rescue Mailmock::ApiError => e
|
|
98
|
+
puts "Error when calling EmailApi->email_list: #{e}"
|
|
99
|
+
end
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
#### Using the email_list_with_http_info variant
|
|
103
|
+
|
|
104
|
+
This returns an Array which contains the response data, status code and headers.
|
|
105
|
+
|
|
106
|
+
> <Array(<Array<EmailList200ResponseInner>>, Integer, Hash)> email_list_with_http_info(opts)
|
|
107
|
+
|
|
108
|
+
```ruby
|
|
109
|
+
begin
|
|
110
|
+
# List mailbox(es)
|
|
111
|
+
data, status_code, headers = api_instance.email_list_with_http_info(opts)
|
|
112
|
+
p status_code # => 2xx
|
|
113
|
+
p headers # => { ... }
|
|
114
|
+
p data # => <Array<EmailList200ResponseInner>>
|
|
115
|
+
rescue Mailmock::ApiError => e
|
|
116
|
+
puts "Error when calling EmailApi->email_list_with_http_info: #{e}"
|
|
117
|
+
end
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### Parameters
|
|
121
|
+
|
|
122
|
+
| Name | Type | Description | Notes |
|
|
123
|
+
| ---- | ---- | ----------- | ----- |
|
|
124
|
+
| **user** | **String** | | [optional] |
|
|
125
|
+
| **mailbox** | **String** | | [optional] |
|
|
126
|
+
| **unread** | **String** | | [optional] |
|
|
127
|
+
|
|
128
|
+
### Return type
|
|
129
|
+
|
|
130
|
+
[**Array<EmailList200ResponseInner>**](EmailList200ResponseInner.md)
|
|
131
|
+
|
|
132
|
+
### Authorization
|
|
133
|
+
|
|
134
|
+
No authorization required
|
|
135
|
+
|
|
136
|
+
### HTTP request headers
|
|
137
|
+
|
|
138
|
+
- **Content-Type**: Not defined
|
|
139
|
+
- **Accept**: application/json
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
## email_read
|
|
143
|
+
|
|
144
|
+
> <EmailRead200Response> email_read(email_read_request)
|
|
145
|
+
|
|
146
|
+
Fetch an email, optionally mark as read
|
|
147
|
+
|
|
148
|
+
### Examples
|
|
149
|
+
|
|
150
|
+
```ruby
|
|
151
|
+
require 'time'
|
|
152
|
+
require 'mailmock'
|
|
153
|
+
|
|
154
|
+
api_instance = Mailmock::EmailApi.new
|
|
155
|
+
email_read_request = Mailmock::EmailReadRequest.new({message_id: 'message_id_example'}) # EmailReadRequest |
|
|
156
|
+
|
|
157
|
+
begin
|
|
158
|
+
# Fetch an email, optionally mark as read
|
|
159
|
+
result = api_instance.email_read(email_read_request)
|
|
160
|
+
p result
|
|
161
|
+
rescue Mailmock::ApiError => e
|
|
162
|
+
puts "Error when calling EmailApi->email_read: #{e}"
|
|
163
|
+
end
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
#### Using the email_read_with_http_info variant
|
|
167
|
+
|
|
168
|
+
This returns an Array which contains the response data, status code and headers.
|
|
169
|
+
|
|
170
|
+
> <Array(<EmailRead200Response>, Integer, Hash)> email_read_with_http_info(email_read_request)
|
|
171
|
+
|
|
172
|
+
```ruby
|
|
173
|
+
begin
|
|
174
|
+
# Fetch an email, optionally mark as read
|
|
175
|
+
data, status_code, headers = api_instance.email_read_with_http_info(email_read_request)
|
|
176
|
+
p status_code # => 2xx
|
|
177
|
+
p headers # => { ... }
|
|
178
|
+
p data # => <EmailRead200Response>
|
|
179
|
+
rescue Mailmock::ApiError => e
|
|
180
|
+
puts "Error when calling EmailApi->email_read_with_http_info: #{e}"
|
|
181
|
+
end
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### Parameters
|
|
185
|
+
|
|
186
|
+
| Name | Type | Description | Notes |
|
|
187
|
+
| ---- | ---- | ----------- | ----- |
|
|
188
|
+
| **email_read_request** | [**EmailReadRequest**](EmailReadRequest.md) | | |
|
|
189
|
+
|
|
190
|
+
### Return type
|
|
191
|
+
|
|
192
|
+
[**EmailRead200Response**](EmailRead200Response.md)
|
|
193
|
+
|
|
194
|
+
### Authorization
|
|
195
|
+
|
|
196
|
+
No authorization required
|
|
197
|
+
|
|
198
|
+
### HTTP request headers
|
|
199
|
+
|
|
200
|
+
- **Content-Type**: application/json
|
|
201
|
+
- **Accept**: application/json
|
|
202
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Mailmock::EmailCreate200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **mailbox** | **String** | | |
|
|
8
|
+
| **email** | **String** | | |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'mailmock'
|
|
14
|
+
|
|
15
|
+
instance = Mailmock::EmailCreate200Response.new(
|
|
16
|
+
mailbox: null,
|
|
17
|
+
email: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Mailmock::EmailCreateRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **user** | **String** | | |
|
|
8
|
+
| **provider** | **String** | | |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'mailmock'
|
|
14
|
+
|
|
15
|
+
instance = Mailmock::EmailCreateRequest.new(
|
|
16
|
+
user: null,
|
|
17
|
+
provider: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# Mailmock::EmailList200ResponseInner
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **user** | **String** | | |
|
|
8
|
+
| **mailbox** | **String** | | |
|
|
9
|
+
| **message_id** | **String** | | |
|
|
10
|
+
| **received** | **Float** | | |
|
|
11
|
+
| **unread** | **String** | | |
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```ruby
|
|
16
|
+
require 'mailmock'
|
|
17
|
+
|
|
18
|
+
instance = Mailmock::EmailList200ResponseInner.new(
|
|
19
|
+
user: null,
|
|
20
|
+
mailbox: null,
|
|
21
|
+
message_id: null,
|
|
22
|
+
received: null,
|
|
23
|
+
unread: null
|
|
24
|
+
)
|
|
25
|
+
```
|
|
26
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Mailmock::EmailListDefaultResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **message** | **String** | | |
|
|
8
|
+
| **code** | **String** | | |
|
|
9
|
+
| **issues** | [**Array<EmailListDefaultResponseIssuesInner>**](EmailListDefaultResponseIssuesInner.md) | | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'mailmock'
|
|
15
|
+
|
|
16
|
+
instance = Mailmock::EmailListDefaultResponse.new(
|
|
17
|
+
message: null,
|
|
18
|
+
code: null,
|
|
19
|
+
issues: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Mailmock::EmailListDefaultResponseIssuesInner
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **message** | **String** | | |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'mailmock'
|
|
13
|
+
|
|
14
|
+
instance = Mailmock::EmailListDefaultResponseIssuesInner.new(
|
|
15
|
+
message: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Mailmock::EmailRead200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **from** | **Array<String>** | | |
|
|
8
|
+
| **to** | **Array<String>** | | |
|
|
9
|
+
| **subject** | **String** | | |
|
|
10
|
+
| **headers** | [**Array<EmailRead200ResponseHeadersInner>**](EmailRead200ResponseHeadersInner.md) | | |
|
|
11
|
+
| **text** | **String** | | |
|
|
12
|
+
| **html** | **String** | | [optional] |
|
|
13
|
+
| **timestamp** | **Time** | | |
|
|
14
|
+
| **unread** | **Boolean** | | |
|
|
15
|
+
| **ttl** | **Float** | | |
|
|
16
|
+
| **error** | **String** | | [optional] |
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
|
|
20
|
+
```ruby
|
|
21
|
+
require 'mailmock'
|
|
22
|
+
|
|
23
|
+
instance = Mailmock::EmailRead200Response.new(
|
|
24
|
+
from: null,
|
|
25
|
+
to: null,
|
|
26
|
+
subject: null,
|
|
27
|
+
headers: null,
|
|
28
|
+
text: null,
|
|
29
|
+
html: null,
|
|
30
|
+
timestamp: null,
|
|
31
|
+
unread: null,
|
|
32
|
+
ttl: null,
|
|
33
|
+
error: null
|
|
34
|
+
)
|
|
35
|
+
```
|
|
36
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Mailmock::EmailRead200ResponseHeadersInner
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **name** | **String** | | |
|
|
8
|
+
| **value** | **String** | | |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'mailmock'
|
|
14
|
+
|
|
15
|
+
instance = Mailmock::EmailRead200ResponseHeadersInner.new(
|
|
16
|
+
name: null,
|
|
17
|
+
value: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Mailmock::EmailReadRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **message_id** | **String** | | |
|
|
8
|
+
| **mark_as_read** | **Boolean** | | [optional][default to true] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'mailmock'
|
|
14
|
+
|
|
15
|
+
instance = Mailmock::EmailReadRequest.new(
|
|
16
|
+
message_id: null,
|
|
17
|
+
mark_as_read: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
data/docs/SendApi.md
ADDED
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Mailmock::SendApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to */api/trpc*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**send_aws**](SendApi.md#send_aws) | **POST** /aws | |
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## send_aws
|
|
11
|
+
|
|
12
|
+
> <SendAws200Response> send_aws(send_aws_request)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
### Examples
|
|
17
|
+
|
|
18
|
+
```ruby
|
|
19
|
+
require 'time'
|
|
20
|
+
require 'mailmock'
|
|
21
|
+
|
|
22
|
+
api_instance = Mailmock::SendApi.new
|
|
23
|
+
send_aws_request = Mailmock::SendAwsRequest.new({notification_type: 'notification_type_example', mail: Mailmock::SendAwsRequestMail.new({timestamp: Time.now, source: 'source_example', message_id: 'message_id_example', destination: ['destination_example'], headers_truncated: false, headers: [Mailmock::EmailRead200ResponseHeadersInner.new({name: 'name_example', value: 'value_example'})], common_headers: Mailmock::SendAwsRequestMailCommonHeaders.new({return_path: 'return_path_example', from: ['from_example'], date: 'date_example', to: ['to_example'], message_id: 'message_id_example', subject: 'subject_example'})}), receipt: Mailmock::SendAwsRequestReceipt.new({timestamp: Time.now, processing_time_millis: 3.56, recipients: ['recipients_example'], spam_verdict: Mailmock::SendAwsRequestReceiptSpamVerdict.new({status: 'status_example'}), virus_verdict: Mailmock::SendAwsRequestReceiptSpamVerdict.new({status: 'status_example'}), spf_verdict: , dkim_verdict: , dmarc_verdict: , action: Mailmock::SendAwsRequestReceiptAction.new({type: 'type_example', topic_arn: 'topic_arn_example', encoding: 'encoding_example'})}), content: 'content_example'}) # SendAwsRequest |
|
|
24
|
+
|
|
25
|
+
begin
|
|
26
|
+
|
|
27
|
+
result = api_instance.send_aws(send_aws_request)
|
|
28
|
+
p result
|
|
29
|
+
rescue Mailmock::ApiError => e
|
|
30
|
+
puts "Error when calling SendApi->send_aws: #{e}"
|
|
31
|
+
end
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
#### Using the send_aws_with_http_info variant
|
|
35
|
+
|
|
36
|
+
This returns an Array which contains the response data, status code and headers.
|
|
37
|
+
|
|
38
|
+
> <Array(<SendAws200Response>, Integer, Hash)> send_aws_with_http_info(send_aws_request)
|
|
39
|
+
|
|
40
|
+
```ruby
|
|
41
|
+
begin
|
|
42
|
+
|
|
43
|
+
data, status_code, headers = api_instance.send_aws_with_http_info(send_aws_request)
|
|
44
|
+
p status_code # => 2xx
|
|
45
|
+
p headers # => { ... }
|
|
46
|
+
p data # => <SendAws200Response>
|
|
47
|
+
rescue Mailmock::ApiError => e
|
|
48
|
+
puts "Error when calling SendApi->send_aws_with_http_info: #{e}"
|
|
49
|
+
end
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Parameters
|
|
53
|
+
|
|
54
|
+
| Name | Type | Description | Notes |
|
|
55
|
+
| ---- | ---- | ----------- | ----- |
|
|
56
|
+
| **send_aws_request** | [**SendAwsRequest**](SendAwsRequest.md) | | |
|
|
57
|
+
|
|
58
|
+
### Return type
|
|
59
|
+
|
|
60
|
+
[**SendAws200Response**](SendAws200Response.md)
|
|
61
|
+
|
|
62
|
+
### Authorization
|
|
63
|
+
|
|
64
|
+
No authorization required
|
|
65
|
+
|
|
66
|
+
### HTTP request headers
|
|
67
|
+
|
|
68
|
+
- **Content-Type**: application/json
|
|
69
|
+
- **Accept**: application/json
|
|
70
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Mailmock::SendAws200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **user** | **String** | | |
|
|
8
|
+
| **mailbox** | **String** | | |
|
|
9
|
+
| **message_id** | **String** | | |
|
|
10
|
+
| **ttl** | **Float** | | |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'mailmock'
|
|
16
|
+
|
|
17
|
+
instance = Mailmock::SendAws200Response.new(
|
|
18
|
+
user: null,
|
|
19
|
+
mailbox: null,
|
|
20
|
+
message_id: null,
|
|
21
|
+
ttl: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Mailmock::SendAwsRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **notification_type** | **String** | | |
|
|
8
|
+
| **mail** | [**SendAwsRequestMail**](SendAwsRequestMail.md) | | |
|
|
9
|
+
| **receipt** | [**SendAwsRequestReceipt**](SendAwsRequestReceipt.md) | | |
|
|
10
|
+
| **content** | **String** | | |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'mailmock'
|
|
16
|
+
|
|
17
|
+
instance = Mailmock::SendAwsRequest.new(
|
|
18
|
+
notification_type: null,
|
|
19
|
+
mail: null,
|
|
20
|
+
receipt: null,
|
|
21
|
+
content: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Mailmock::SendAwsRequestMail
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **timestamp** | **Time** | | |
|
|
8
|
+
| **source** | **String** | | |
|
|
9
|
+
| **message_id** | **String** | | |
|
|
10
|
+
| **destination** | **Array<String>** | | |
|
|
11
|
+
| **headers_truncated** | **Boolean** | | |
|
|
12
|
+
| **headers** | [**Array<EmailRead200ResponseHeadersInner>**](EmailRead200ResponseHeadersInner.md) | | |
|
|
13
|
+
| **common_headers** | [**SendAwsRequestMailCommonHeaders**](SendAwsRequestMailCommonHeaders.md) | | |
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```ruby
|
|
18
|
+
require 'mailmock'
|
|
19
|
+
|
|
20
|
+
instance = Mailmock::SendAwsRequestMail.new(
|
|
21
|
+
timestamp: null,
|
|
22
|
+
source: null,
|
|
23
|
+
message_id: null,
|
|
24
|
+
destination: null,
|
|
25
|
+
headers_truncated: null,
|
|
26
|
+
headers: null,
|
|
27
|
+
common_headers: null
|
|
28
|
+
)
|
|
29
|
+
```
|
|
30
|
+
|