mailslurp_client 15.17.40 → 15.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +23 -22
- data/lib/mailslurp_client/api/email_controller_api.rb +62 -0
- data/lib/mailslurp_client/api/tools_controller_api.rb +175 -0
- data/lib/mailslurp_client/models/alias_projection.rb +39 -39
- data/lib/mailslurp_client/models/attachment_projection.rb +29 -29
- data/lib/mailslurp_client/models/bounce_projection.rb +15 -15
- data/lib/mailslurp_client/models/bounce_recipient_projection.rb +15 -15
- data/lib/mailslurp_client/models/check_email_body_results.rb +259 -0
- data/lib/mailslurp_client/models/connector_projection.rb +24 -24
- data/lib/mailslurp_client/models/connector_sync_event_projection.rb +15 -15
- data/lib/mailslurp_client/models/contact_projection.rb +10 -10
- data/lib/mailslurp_client/models/email_projection.rb +21 -21
- data/lib/mailslurp_client/models/expired_inbox_record_projection.rb +19 -19
- data/lib/mailslurp_client/models/fake_email_dto.rb +305 -0
- data/lib/mailslurp_client/models/fake_email_preview.rb +291 -0
- data/lib/mailslurp_client/models/fake_email_result.rb +206 -0
- data/lib/mailslurp_client/models/image_issue.rb +282 -0
- data/lib/mailslurp_client/models/imap_smtp_access_details.rb +15 -4
- data/lib/mailslurp_client/models/inbox_forwarder_event_projection.rb +20 -20
- data/lib/mailslurp_client/models/inbox_replier_event_projection.rb +20 -20
- data/lib/mailslurp_client/models/link_issue.rb +282 -0
- data/lib/mailslurp_client/models/list_unsubscribe_recipient_projection.rb +15 -15
- data/lib/mailslurp_client/models/missed_email_projection.rb +10 -10
- data/lib/mailslurp_client/models/new_fake_email_address_result.rb +211 -0
- data/lib/mailslurp_client/models/phone_number_projection.rb +15 -15
- data/lib/mailslurp_client/models/sent_email_projection.rb +44 -44
- data/lib/mailslurp_client/models/sms_projection.rb +29 -29
- data/lib/mailslurp_client/models/spelling_issue.rb +287 -0
- data/lib/mailslurp_client/models/template_projection.rb +17 -17
- data/lib/mailslurp_client/models/thread_projection.rb +41 -41
- data/lib/mailslurp_client/models/tracking_pixel_projection.rb +27 -27
- data/lib/mailslurp_client/models/unknown_missed_email_projection.rb +10 -10
- data/lib/mailslurp_client/models/webhook_projection.rb +25 -25
- data/lib/mailslurp_client/version.rb +1 -1
- data/lib/mailslurp_client.rb +8 -0
- metadata +10 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 96f2ee0b9fa00bd27168e375f4419cccfd5811bad7a3aeceb5f7e47baa7d23bb
|
4
|
+
data.tar.gz: 401bad35b1fa9be9e2d80f9a693a2e80d2230420ea2c61258d95138730e8902e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 405899d03e5aa1c9422dec53847a4e8cd270357081001e435f9351d239357019f8c899d0c156635b8fd96f9680d8dce831aaed9044b7654a611302a788c56f62
|
7
|
+
data.tar.gz: 2dafa4aa1ca764cb09fac879f50731dfe26850b8b2ab4a06134dd69c446be379d4ac72b4287274944f97cb83b9e202840504cba852bd3b92aeae123ba5d13fe3
|
data/README.md
CHANGED
@@ -4,6 +4,8 @@
|
|
4
4
|
|
5
5
|
MailSlurp is an email API service that lets you create real email addresses in code. You can then send and receive emails and attachments in Ruby applications and tests.
|
6
6
|
|
7
|
+
[![ruby smtp tutorial](https://www.mailslurp.com/video-thumbnails/ruby-tutorial.jpg)](https://youtu.be/NEIIrU1E3H8)
|
8
|
+
|
7
9
|
## Quick links
|
8
10
|
|
9
11
|
- [API documentation](https://docs.mailslurp.com/api/)
|
@@ -48,9 +50,7 @@ gem install mailslurp_client
|
|
48
50
|
|
49
51
|
Or in your `Gemfile`:
|
50
52
|
|
51
|
-
|
52
|
-
gem 'mailslurp_client', '~> 8.3', '>= 8.3.0'
|
53
|
-
```
|
53
|
+
{{<gen_ruby_ruby_minitest_gemspec>}}
|
54
54
|
|
55
55
|
And then run bundler install:
|
56
56
|
|
@@ -63,17 +63,19 @@ bundle install
|
|
63
63
|
|
64
64
|
You may need to install `typhoeus` if you encounter libcurl errors.
|
65
65
|
|
66
|
+
```
|
67
|
+
gem 'typhoeus'
|
68
|
+
```
|
69
|
+
|
66
70
|
|
67
71
|
### Configure the client
|
68
72
|
|
69
|
-
|
70
|
-
require 'mailslurp_client'
|
73
|
+
{{<gen_ruby_ruby_minitest_configure>}}
|
71
74
|
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
```
|
75
|
+
### Create controllers
|
76
|
+
To call the API create a controller like this:
|
77
|
+
|
78
|
+
{{<gen_ruby_ruby_minitest_create_controller>}}
|
77
79
|
|
78
80
|
## Common uses
|
79
81
|
|
@@ -85,10 +87,7 @@ Here are some common uses:
|
|
85
87
|
|
86
88
|
To use MailSlurp you need to create inboxes. These are email accounts that have an ID and a real email address. See methods on the [inbox controller](https://ruby.mailslurp.com/MailSlurpClient/InboxControllerApi.html) for more information.
|
87
89
|
|
88
|
-
|
89
|
-
inbox_controller = MailSlurpClient::InboxControllerApi.new
|
90
|
-
inbox = inbox_controller.create_inbox
|
91
|
-
```
|
90
|
+
{{<gen_ruby_ruby_minitest_create_inbox>}}
|
92
91
|
|
93
92
|
In a test:
|
94
93
|
|
@@ -199,6 +198,9 @@ end
|
|
199
198
|
### Send emails
|
200
199
|
|
201
200
|
You can send HTML emails easily with the inbox controller. First create an inbox then use its ID with the `send_email` method.
|
201
|
+
|
202
|
+
{{<gen_ruby_ruby_minitest_send_email>}}
|
203
|
+
|
202
204
|
To send attachments see the [Method Documentation](https://ruby.mailslurp.com/).
|
203
205
|
|
204
206
|
```ruby
|
@@ -238,23 +240,22 @@ opts = {
|
|
238
240
|
inbox_controller.send_email(inbox_1.id, opts)
|
239
241
|
```
|
240
242
|
|
243
|
+
### Send with SMTP
|
244
|
+
|
245
|
+
{{<gen_ruby_ruby_minitest_smtp_send>}}
|
246
|
+
|
241
247
|
### Receive emails
|
242
248
|
|
243
249
|
To read already existing emails use the [Email Controller](https://ruby.mailslurp.com/MailSlurpClient/EmailControllerApi.html). To wait for expected emails to arrive use the [WaitFor Controller](https://ruby.mailslurp.com/MailSlurpClient/WaitForControllerApi.html).
|
244
250
|
You can use MailSlurp to wait for at least 1 unread email in an inbox and return it.
|
245
251
|
If a timeout is exceeded it will throw an error instead:
|
246
252
|
|
247
|
-
|
248
|
-
waitfor_controller = MailSlurpClient::WaitForControllerApi.new
|
249
|
-
email = waitfor_controller.wait_for_latest_email({ inbox_id: inbox.id, unread_only: true, timeout: 30_000 })
|
250
|
-
|
251
|
-
# verify email contents
|
252
|
-
expect(email.subject).to include("Test")
|
253
|
-
expect(email.body).to include("Your email body")
|
254
|
-
```
|
253
|
+
{{<gen_ruby_ruby_minitest_receive_email>}}
|
255
254
|
|
256
255
|
### Extract email content
|
257
256
|
|
257
|
+
{{<gen_ruby_ruby_minitest_extract_code>}}
|
258
|
+
|
258
259
|
To parse an email and extract content use regex patterns like so:
|
259
260
|
|
260
261
|
```ruby
|
@@ -160,6 +160,68 @@ module MailSlurpClient
|
|
160
160
|
return data, status_code, headers
|
161
161
|
end
|
162
162
|
|
163
|
+
# Detect broken links, spelling, and images in email content
|
164
|
+
# Find dead links, broken images, and spelling mistakes in email body. Will call included links via HTTP so do not invoke if your links are sensitive or stateful.
|
165
|
+
# @param email_id [String]
|
166
|
+
# @param [Hash] opts the optional parameters
|
167
|
+
# @return [CheckEmailBodyResults]
|
168
|
+
def check_email_body(email_id, opts = {})
|
169
|
+
data, _status_code, _headers = check_email_body_with_http_info(email_id, opts)
|
170
|
+
data
|
171
|
+
end
|
172
|
+
|
173
|
+
# Detect broken links, spelling, and images in email content
|
174
|
+
# Find dead links, broken images, and spelling mistakes in email body. Will call included links via HTTP so do not invoke if your links are sensitive or stateful.
|
175
|
+
# @param email_id [String]
|
176
|
+
# @param [Hash] opts the optional parameters
|
177
|
+
# @return [Array<(CheckEmailBodyResults, Integer, Hash)>] CheckEmailBodyResults data, response status code and response headers
|
178
|
+
def check_email_body_with_http_info(email_id, opts = {})
|
179
|
+
if @api_client.config.debugging
|
180
|
+
@api_client.config.logger.debug 'Calling API: EmailControllerApi.check_email_body ...'
|
181
|
+
end
|
182
|
+
# verify the required parameter 'email_id' is set
|
183
|
+
if @api_client.config.client_side_validation && email_id.nil?
|
184
|
+
fail ArgumentError, "Missing the required parameter 'email_id' when calling EmailControllerApi.check_email_body"
|
185
|
+
end
|
186
|
+
# resource path
|
187
|
+
local_var_path = '/emails/{emailId}/check-email-body'.sub('{' + 'emailId' + '}', CGI.escape(email_id.to_s))
|
188
|
+
|
189
|
+
# query parameters
|
190
|
+
query_params = opts[:query_params] || {}
|
191
|
+
|
192
|
+
# header parameters
|
193
|
+
header_params = opts[:header_params] || {}
|
194
|
+
# HTTP header 'Accept' (if needed)
|
195
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
196
|
+
|
197
|
+
# form parameters
|
198
|
+
form_params = opts[:form_params] || {}
|
199
|
+
|
200
|
+
# http body (model)
|
201
|
+
post_body = opts[:body]
|
202
|
+
|
203
|
+
# return_type
|
204
|
+
return_type = opts[:return_type] || 'CheckEmailBodyResults'
|
205
|
+
|
206
|
+
# auth_names
|
207
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
208
|
+
|
209
|
+
new_options = opts.merge(
|
210
|
+
:header_params => header_params,
|
211
|
+
:query_params => query_params,
|
212
|
+
:form_params => form_params,
|
213
|
+
:body => post_body,
|
214
|
+
:auth_names => auth_names,
|
215
|
+
:return_type => return_type
|
216
|
+
)
|
217
|
+
|
218
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
219
|
+
if @api_client.config.debugging
|
220
|
+
@api_client.config.logger.debug "API called: EmailControllerApi#check_email_body\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
221
|
+
end
|
222
|
+
return data, status_code, headers
|
223
|
+
end
|
224
|
+
|
163
225
|
# Show which mail clients support the HTML and CSS features used in an email body.
|
164
226
|
# Detect HTML and CSS features inside an email body and return a report of email client support across different platforms and versions.
|
165
227
|
# @param email_id [String]
|
@@ -81,6 +81,60 @@ module MailSlurpClient
|
|
81
81
|
return data, status_code, headers
|
82
82
|
end
|
83
83
|
|
84
|
+
# Create a new email address using the fake email domains
|
85
|
+
# @param [Hash] opts the optional parameters
|
86
|
+
# @return [NewFakeEmailAddressResult]
|
87
|
+
def create_new_fake_email_address(opts = {})
|
88
|
+
data, _status_code, _headers = create_new_fake_email_address_with_http_info(opts)
|
89
|
+
data
|
90
|
+
end
|
91
|
+
|
92
|
+
# Create a new email address using the fake email domains
|
93
|
+
# @param [Hash] opts the optional parameters
|
94
|
+
# @return [Array<(NewFakeEmailAddressResult, Integer, Hash)>] NewFakeEmailAddressResult data, response status code and response headers
|
95
|
+
def create_new_fake_email_address_with_http_info(opts = {})
|
96
|
+
if @api_client.config.debugging
|
97
|
+
@api_client.config.logger.debug 'Calling API: ToolsControllerApi.create_new_fake_email_address ...'
|
98
|
+
end
|
99
|
+
# resource path
|
100
|
+
local_var_path = '/tools/fake-email'
|
101
|
+
|
102
|
+
# query parameters
|
103
|
+
query_params = opts[:query_params] || {}
|
104
|
+
|
105
|
+
# header parameters
|
106
|
+
header_params = opts[:header_params] || {}
|
107
|
+
# HTTP header 'Accept' (if needed)
|
108
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
109
|
+
|
110
|
+
# form parameters
|
111
|
+
form_params = opts[:form_params] || {}
|
112
|
+
|
113
|
+
# http body (model)
|
114
|
+
post_body = opts[:body]
|
115
|
+
|
116
|
+
# return_type
|
117
|
+
return_type = opts[:return_type] || 'NewFakeEmailAddressResult'
|
118
|
+
|
119
|
+
# auth_names
|
120
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
121
|
+
|
122
|
+
new_options = opts.merge(
|
123
|
+
:header_params => header_params,
|
124
|
+
:query_params => query_params,
|
125
|
+
:form_params => form_params,
|
126
|
+
:body => post_body,
|
127
|
+
:auth_names => auth_names,
|
128
|
+
:return_type => return_type
|
129
|
+
)
|
130
|
+
|
131
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
132
|
+
if @api_client.config.debugging
|
133
|
+
@api_client.config.logger.debug "API called: ToolsControllerApi#create_new_fake_email_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
134
|
+
end
|
135
|
+
return data, status_code, headers
|
136
|
+
end
|
137
|
+
|
84
138
|
# Create a BIMI record policy
|
85
139
|
# @param generate_bimi_record_options [GenerateBimiRecordOptions]
|
86
140
|
# @param [Hash] opts the optional parameters
|
@@ -329,6 +383,127 @@ module MailSlurpClient
|
|
329
383
|
return data, status_code, headers
|
330
384
|
end
|
331
385
|
|
386
|
+
# @param id [String]
|
387
|
+
# @param [Hash] opts the optional parameters
|
388
|
+
# @return [FakeEmailResult]
|
389
|
+
def get_fake_email_by_id(id, opts = {})
|
390
|
+
data, _status_code, _headers = get_fake_email_by_id_with_http_info(id, opts)
|
391
|
+
data
|
392
|
+
end
|
393
|
+
|
394
|
+
# @param id [String]
|
395
|
+
# @param [Hash] opts the optional parameters
|
396
|
+
# @return [Array<(FakeEmailResult, Integer, Hash)>] FakeEmailResult data, response status code and response headers
|
397
|
+
def get_fake_email_by_id_with_http_info(id, opts = {})
|
398
|
+
if @api_client.config.debugging
|
399
|
+
@api_client.config.logger.debug 'Calling API: ToolsControllerApi.get_fake_email_by_id ...'
|
400
|
+
end
|
401
|
+
# verify the required parameter 'id' is set
|
402
|
+
if @api_client.config.client_side_validation && id.nil?
|
403
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling ToolsControllerApi.get_fake_email_by_id"
|
404
|
+
end
|
405
|
+
# resource path
|
406
|
+
local_var_path = '/tools/fake-email'
|
407
|
+
|
408
|
+
# query parameters
|
409
|
+
query_params = opts[:query_params] || {}
|
410
|
+
query_params[:'id'] = id
|
411
|
+
|
412
|
+
# header parameters
|
413
|
+
header_params = opts[:header_params] || {}
|
414
|
+
# HTTP header 'Accept' (if needed)
|
415
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
416
|
+
|
417
|
+
# form parameters
|
418
|
+
form_params = opts[:form_params] || {}
|
419
|
+
|
420
|
+
# http body (model)
|
421
|
+
post_body = opts[:body]
|
422
|
+
|
423
|
+
# return_type
|
424
|
+
return_type = opts[:return_type] || 'FakeEmailResult'
|
425
|
+
|
426
|
+
# auth_names
|
427
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
428
|
+
|
429
|
+
new_options = opts.merge(
|
430
|
+
:header_params => header_params,
|
431
|
+
:query_params => query_params,
|
432
|
+
:form_params => form_params,
|
433
|
+
:body => post_body,
|
434
|
+
:auth_names => auth_names,
|
435
|
+
:return_type => return_type
|
436
|
+
)
|
437
|
+
|
438
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
439
|
+
if @api_client.config.debugging
|
440
|
+
@api_client.config.logger.debug "API called: ToolsControllerApi#get_fake_email_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
441
|
+
end
|
442
|
+
return data, status_code, headers
|
443
|
+
end
|
444
|
+
|
445
|
+
# @param email_address [String]
|
446
|
+
# @param [Hash] opts the optional parameters
|
447
|
+
# @option opts [Integer] :page
|
448
|
+
# @return [Array<FakeEmailPreview>]
|
449
|
+
def get_fake_emails_for_address(email_address, opts = {})
|
450
|
+
data, _status_code, _headers = get_fake_emails_for_address_with_http_info(email_address, opts)
|
451
|
+
data
|
452
|
+
end
|
453
|
+
|
454
|
+
# @param email_address [String]
|
455
|
+
# @param [Hash] opts the optional parameters
|
456
|
+
# @option opts [Integer] :page
|
457
|
+
# @return [Array<(Array<FakeEmailPreview>, Integer, Hash)>] Array<FakeEmailPreview> data, response status code and response headers
|
458
|
+
def get_fake_emails_for_address_with_http_info(email_address, opts = {})
|
459
|
+
if @api_client.config.debugging
|
460
|
+
@api_client.config.logger.debug 'Calling API: ToolsControllerApi.get_fake_emails_for_address ...'
|
461
|
+
end
|
462
|
+
# verify the required parameter 'email_address' is set
|
463
|
+
if @api_client.config.client_side_validation && email_address.nil?
|
464
|
+
fail ArgumentError, "Missing the required parameter 'email_address' when calling ToolsControllerApi.get_fake_emails_for_address"
|
465
|
+
end
|
466
|
+
# resource path
|
467
|
+
local_var_path = '/tools/fake-emails'
|
468
|
+
|
469
|
+
# query parameters
|
470
|
+
query_params = opts[:query_params] || {}
|
471
|
+
query_params[:'emailAddress'] = email_address
|
472
|
+
query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
|
473
|
+
|
474
|
+
# header parameters
|
475
|
+
header_params = opts[:header_params] || {}
|
476
|
+
# HTTP header 'Accept' (if needed)
|
477
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
478
|
+
|
479
|
+
# form parameters
|
480
|
+
form_params = opts[:form_params] || {}
|
481
|
+
|
482
|
+
# http body (model)
|
483
|
+
post_body = opts[:body]
|
484
|
+
|
485
|
+
# return_type
|
486
|
+
return_type = opts[:return_type] || 'Array<FakeEmailPreview>'
|
487
|
+
|
488
|
+
# auth_names
|
489
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
490
|
+
|
491
|
+
new_options = opts.merge(
|
492
|
+
:header_params => header_params,
|
493
|
+
:query_params => query_params,
|
494
|
+
:form_params => form_params,
|
495
|
+
:body => post_body,
|
496
|
+
:auth_names => auth_names,
|
497
|
+
:return_type => return_type
|
498
|
+
)
|
499
|
+
|
500
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
501
|
+
if @api_client.config.debugging
|
502
|
+
@api_client.config.logger.debug "API called: ToolsControllerApi#get_fake_emails_for_address\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
503
|
+
end
|
504
|
+
return data, status_code, headers
|
505
|
+
end
|
506
|
+
|
332
507
|
# Lookup a BIMI record policy
|
333
508
|
# @param lookup_bimi_domain_options [LookupBimiDomainOptions]
|
334
509
|
# @param [Hash] opts the optional parameters
|
@@ -15,17 +15,17 @@ require 'date'
|
|
15
15
|
module MailSlurpClient
|
16
16
|
# Representation of a alias
|
17
17
|
class AliasProjection
|
18
|
-
attr_accessor :
|
18
|
+
attr_accessor :inbox_id
|
19
19
|
|
20
|
-
attr_accessor :
|
20
|
+
attr_accessor :user_id
|
21
21
|
|
22
22
|
attr_accessor :email_address
|
23
23
|
|
24
|
-
attr_accessor :
|
24
|
+
attr_accessor :use_threads
|
25
25
|
|
26
|
-
attr_accessor :
|
26
|
+
attr_accessor :created_at
|
27
27
|
|
28
|
-
attr_accessor :
|
28
|
+
attr_accessor :updated_at
|
29
29
|
|
30
30
|
attr_accessor :name
|
31
31
|
|
@@ -34,12 +34,12 @@ module MailSlurpClient
|
|
34
34
|
# Attribute mapping from ruby-style variable name to JSON key.
|
35
35
|
def self.attribute_map
|
36
36
|
{
|
37
|
-
:'created_at' => :'createdAt',
|
38
|
-
:'updated_at' => :'updatedAt',
|
39
|
-
:'email_address' => :'emailAddress',
|
40
|
-
:'user_id' => :'userId',
|
41
37
|
:'inbox_id' => :'inboxId',
|
38
|
+
:'user_id' => :'userId',
|
39
|
+
:'email_address' => :'emailAddress',
|
42
40
|
:'use_threads' => :'useThreads',
|
41
|
+
:'created_at' => :'createdAt',
|
42
|
+
:'updated_at' => :'updatedAt',
|
43
43
|
:'name' => :'name',
|
44
44
|
:'id' => :'id'
|
45
45
|
}
|
@@ -48,12 +48,12 @@ module MailSlurpClient
|
|
48
48
|
# Attribute type mapping.
|
49
49
|
def self.openapi_types
|
50
50
|
{
|
51
|
-
:'created_at' => :'DateTime',
|
52
|
-
:'updated_at' => :'DateTime',
|
53
|
-
:'email_address' => :'String',
|
54
|
-
:'user_id' => :'String',
|
55
51
|
:'inbox_id' => :'String',
|
52
|
+
:'user_id' => :'String',
|
53
|
+
:'email_address' => :'String',
|
56
54
|
:'use_threads' => :'Boolean',
|
55
|
+
:'created_at' => :'DateTime',
|
56
|
+
:'updated_at' => :'DateTime',
|
57
57
|
:'name' => :'String',
|
58
58
|
:'id' => :'String'
|
59
59
|
}
|
@@ -80,28 +80,28 @@ module MailSlurpClient
|
|
80
80
|
h[k.to_sym] = v
|
81
81
|
}
|
82
82
|
|
83
|
-
if attributes.key?(:'
|
84
|
-
self.
|
83
|
+
if attributes.key?(:'inbox_id')
|
84
|
+
self.inbox_id = attributes[:'inbox_id']
|
85
85
|
end
|
86
86
|
|
87
|
-
if attributes.key?(:'
|
88
|
-
self.
|
87
|
+
if attributes.key?(:'user_id')
|
88
|
+
self.user_id = attributes[:'user_id']
|
89
89
|
end
|
90
90
|
|
91
91
|
if attributes.key?(:'email_address')
|
92
92
|
self.email_address = attributes[:'email_address']
|
93
93
|
end
|
94
94
|
|
95
|
-
if attributes.key?(:'
|
96
|
-
self.
|
95
|
+
if attributes.key?(:'use_threads')
|
96
|
+
self.use_threads = attributes[:'use_threads']
|
97
97
|
end
|
98
98
|
|
99
|
-
if attributes.key?(:'
|
100
|
-
self.
|
99
|
+
if attributes.key?(:'created_at')
|
100
|
+
self.created_at = attributes[:'created_at']
|
101
101
|
end
|
102
102
|
|
103
|
-
if attributes.key?(:'
|
104
|
-
self.
|
103
|
+
if attributes.key?(:'updated_at')
|
104
|
+
self.updated_at = attributes[:'updated_at']
|
105
105
|
end
|
106
106
|
|
107
107
|
if attributes.key?(:'name')
|
@@ -117,24 +117,24 @@ module MailSlurpClient
|
|
117
117
|
# @return Array for valid properties with the reasons
|
118
118
|
def list_invalid_properties
|
119
119
|
invalid_properties = Array.new
|
120
|
-
if @
|
121
|
-
invalid_properties.push('invalid value for "
|
120
|
+
if @inbox_id.nil?
|
121
|
+
invalid_properties.push('invalid value for "inbox_id", inbox_id cannot be nil.')
|
122
122
|
end
|
123
123
|
|
124
|
-
if @
|
125
|
-
invalid_properties.push('invalid value for "
|
124
|
+
if @user_id.nil?
|
125
|
+
invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
|
126
126
|
end
|
127
127
|
|
128
128
|
if @email_address.nil?
|
129
129
|
invalid_properties.push('invalid value for "email_address", email_address cannot be nil.')
|
130
130
|
end
|
131
131
|
|
132
|
-
if @
|
133
|
-
invalid_properties.push('invalid value for "
|
132
|
+
if @created_at.nil?
|
133
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
134
134
|
end
|
135
135
|
|
136
|
-
if @
|
137
|
-
invalid_properties.push('invalid value for "
|
136
|
+
if @updated_at.nil?
|
137
|
+
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
138
138
|
end
|
139
139
|
|
140
140
|
if @id.nil?
|
@@ -147,11 +147,11 @@ module MailSlurpClient
|
|
147
147
|
# Check to see if the all the properties in the model are valid
|
148
148
|
# @return true if the model is valid
|
149
149
|
def valid?
|
150
|
+
return false if @inbox_id.nil?
|
151
|
+
return false if @user_id.nil?
|
152
|
+
return false if @email_address.nil?
|
150
153
|
return false if @created_at.nil?
|
151
154
|
return false if @updated_at.nil?
|
152
|
-
return false if @email_address.nil?
|
153
|
-
return false if @user_id.nil?
|
154
|
-
return false if @inbox_id.nil?
|
155
155
|
return false if @id.nil?
|
156
156
|
true
|
157
157
|
end
|
@@ -161,12 +161,12 @@ module MailSlurpClient
|
|
161
161
|
def ==(o)
|
162
162
|
return true if self.equal?(o)
|
163
163
|
self.class == o.class &&
|
164
|
-
created_at == o.created_at &&
|
165
|
-
updated_at == o.updated_at &&
|
166
|
-
email_address == o.email_address &&
|
167
|
-
user_id == o.user_id &&
|
168
164
|
inbox_id == o.inbox_id &&
|
165
|
+
user_id == o.user_id &&
|
166
|
+
email_address == o.email_address &&
|
169
167
|
use_threads == o.use_threads &&
|
168
|
+
created_at == o.created_at &&
|
169
|
+
updated_at == o.updated_at &&
|
170
170
|
name == o.name &&
|
171
171
|
id == o.id
|
172
172
|
end
|
@@ -180,7 +180,7 @@ module MailSlurpClient
|
|
180
180
|
# Calculates hash code according to all attributes.
|
181
181
|
# @return [Integer] Hash code
|
182
182
|
def hash
|
183
|
-
[
|
183
|
+
[inbox_id, user_id, email_address, use_threads, created_at, updated_at, name, id].hash
|
184
184
|
end
|
185
185
|
|
186
186
|
# Builds the object from hash
|
@@ -15,10 +15,6 @@ require 'date'
|
|
15
15
|
module MailSlurpClient
|
16
16
|
# Email attachment data
|
17
17
|
class AttachmentProjection
|
18
|
-
attr_accessor :created_at
|
19
|
-
|
20
|
-
attr_accessor :updated_at
|
21
|
-
|
22
18
|
attr_accessor :user_id
|
23
19
|
|
24
20
|
# Content ID of attachment.
|
@@ -27,6 +23,10 @@ module MailSlurpClient
|
|
27
23
|
# Attachment ID
|
28
24
|
attr_accessor :attachment_id
|
29
25
|
|
26
|
+
attr_accessor :created_at
|
27
|
+
|
28
|
+
attr_accessor :updated_at
|
29
|
+
|
30
30
|
attr_accessor :name
|
31
31
|
|
32
32
|
# Content length of attachment in bytes
|
@@ -38,11 +38,11 @@ module MailSlurpClient
|
|
38
38
|
# Attribute mapping from ruby-style variable name to JSON key.
|
39
39
|
def self.attribute_map
|
40
40
|
{
|
41
|
-
:'created_at' => :'createdAt',
|
42
|
-
:'updated_at' => :'updatedAt',
|
43
41
|
:'user_id' => :'userId',
|
44
42
|
:'content_id' => :'contentId',
|
45
43
|
:'attachment_id' => :'attachmentId',
|
44
|
+
:'created_at' => :'createdAt',
|
45
|
+
:'updated_at' => :'updatedAt',
|
46
46
|
:'name' => :'name',
|
47
47
|
:'content_length' => :'contentLength',
|
48
48
|
:'content_type' => :'contentType'
|
@@ -52,11 +52,11 @@ module MailSlurpClient
|
|
52
52
|
# Attribute type mapping.
|
53
53
|
def self.openapi_types
|
54
54
|
{
|
55
|
-
:'created_at' => :'DateTime',
|
56
|
-
:'updated_at' => :'DateTime',
|
57
55
|
:'user_id' => :'String',
|
58
56
|
:'content_id' => :'String',
|
59
57
|
:'attachment_id' => :'String',
|
58
|
+
:'created_at' => :'DateTime',
|
59
|
+
:'updated_at' => :'DateTime',
|
60
60
|
:'name' => :'String',
|
61
61
|
:'content_length' => :'Integer',
|
62
62
|
:'content_type' => :'String'
|
@@ -88,14 +88,6 @@ module MailSlurpClient
|
|
88
88
|
h[k.to_sym] = v
|
89
89
|
}
|
90
90
|
|
91
|
-
if attributes.key?(:'created_at')
|
92
|
-
self.created_at = attributes[:'created_at']
|
93
|
-
end
|
94
|
-
|
95
|
-
if attributes.key?(:'updated_at')
|
96
|
-
self.updated_at = attributes[:'updated_at']
|
97
|
-
end
|
98
|
-
|
99
91
|
if attributes.key?(:'user_id')
|
100
92
|
self.user_id = attributes[:'user_id']
|
101
93
|
end
|
@@ -108,6 +100,14 @@ module MailSlurpClient
|
|
108
100
|
self.attachment_id = attributes[:'attachment_id']
|
109
101
|
end
|
110
102
|
|
103
|
+
if attributes.key?(:'created_at')
|
104
|
+
self.created_at = attributes[:'created_at']
|
105
|
+
end
|
106
|
+
|
107
|
+
if attributes.key?(:'updated_at')
|
108
|
+
self.updated_at = attributes[:'updated_at']
|
109
|
+
end
|
110
|
+
|
111
111
|
if attributes.key?(:'name')
|
112
112
|
self.name = attributes[:'name']
|
113
113
|
end
|
@@ -125,14 +125,6 @@ module MailSlurpClient
|
|
125
125
|
# @return Array for valid properties with the reasons
|
126
126
|
def list_invalid_properties
|
127
127
|
invalid_properties = Array.new
|
128
|
-
if @created_at.nil?
|
129
|
-
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
130
|
-
end
|
131
|
-
|
132
|
-
if @updated_at.nil?
|
133
|
-
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
134
|
-
end
|
135
|
-
|
136
128
|
if @user_id.nil?
|
137
129
|
invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
|
138
130
|
end
|
@@ -141,16 +133,24 @@ module MailSlurpClient
|
|
141
133
|
invalid_properties.push('invalid value for "attachment_id", attachment_id cannot be nil.')
|
142
134
|
end
|
143
135
|
|
136
|
+
if @created_at.nil?
|
137
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
138
|
+
end
|
139
|
+
|
140
|
+
if @updated_at.nil?
|
141
|
+
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
142
|
+
end
|
143
|
+
|
144
144
|
invalid_properties
|
145
145
|
end
|
146
146
|
|
147
147
|
# Check to see if the all the properties in the model are valid
|
148
148
|
# @return true if the model is valid
|
149
149
|
def valid?
|
150
|
-
return false if @created_at.nil?
|
151
|
-
return false if @updated_at.nil?
|
152
150
|
return false if @user_id.nil?
|
153
151
|
return false if @attachment_id.nil?
|
152
|
+
return false if @created_at.nil?
|
153
|
+
return false if @updated_at.nil?
|
154
154
|
true
|
155
155
|
end
|
156
156
|
|
@@ -159,11 +159,11 @@ module MailSlurpClient
|
|
159
159
|
def ==(o)
|
160
160
|
return true if self.equal?(o)
|
161
161
|
self.class == o.class &&
|
162
|
-
created_at == o.created_at &&
|
163
|
-
updated_at == o.updated_at &&
|
164
162
|
user_id == o.user_id &&
|
165
163
|
content_id == o.content_id &&
|
166
164
|
attachment_id == o.attachment_id &&
|
165
|
+
created_at == o.created_at &&
|
166
|
+
updated_at == o.updated_at &&
|
167
167
|
name == o.name &&
|
168
168
|
content_length == o.content_length &&
|
169
169
|
content_type == o.content_type
|
@@ -178,7 +178,7 @@ module MailSlurpClient
|
|
178
178
|
# Calculates hash code according to all attributes.
|
179
179
|
# @return [Integer] Hash code
|
180
180
|
def hash
|
181
|
-
[
|
181
|
+
[user_id, content_id, attachment_id, created_at, updated_at, name, content_length, content_type].hash
|
182
182
|
end
|
183
183
|
|
184
184
|
# Builds the object from hash
|