mailslurp_client 15.4.1 → 15.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mailslurp_client/api/inbox_controller_api.rb +70 -0
- data/lib/mailslurp_client/models/attachment_projection.rb +15 -15
- data/lib/mailslurp_client/models/contact_projection.rb +13 -13
- data/lib/mailslurp_client/models/email_projection.rb +18 -18
- data/lib/mailslurp_client/models/send_smtp_envelope_options.rb +242 -0
- data/lib/mailslurp_client/models/sent_email_projection.rb +26 -26
- data/lib/mailslurp_client/models/thread_projection.rb +10 -10
- data/lib/mailslurp_client/version.rb +1 -1
- data/lib/mailslurp_client.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2732728fb102413fbc4d84c30e6b6fc8a4da192e569d1b3cb5ed0cb7a77db750
|
4
|
+
data.tar.gz: b85e2541f0b53d20d460e2e5cd6099f55ed7dff5ad9df1e53d4dbb5fc502565b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16680ce38d426581fd23fcbf1cc92cd32c9395868494c7bdeec0ef9dab595a922509b5c2feaaef58d9293c0f0a93ff78eefbac8db42b32fe73174adcfcf9e076
|
7
|
+
data.tar.gz: 9e022a0c01c1644a5d429e3e0a4b06ca1b9ee7ba08151eaaa1058b41e16bb3f3f3fd618131b3201f54e27db28f560cd569498101cacc3ce2bbd469f279c90350
|
@@ -1754,6 +1754,76 @@ module MailSlurpClient
|
|
1754
1754
|
return data, status_code, headers
|
1755
1755
|
end
|
1756
1756
|
|
1757
|
+
# Send email using an SMTP mail envelope and message body and return sent confirmation
|
1758
|
+
# Send email using an SMTP envelope containing RCPT TO, MAIL FROM, and a SMTP BODY.
|
1759
|
+
# @param inbox_id [String] ID of the inbox you want to send the email from
|
1760
|
+
# @param send_smtp_envelope_options [SendSMTPEnvelopeOptions]
|
1761
|
+
# @param [Hash] opts the optional parameters
|
1762
|
+
# @return [SentEmailDto]
|
1763
|
+
def send_smtp_envelope(inbox_id, send_smtp_envelope_options, opts = {})
|
1764
|
+
data, _status_code, _headers = send_smtp_envelope_with_http_info(inbox_id, send_smtp_envelope_options, opts)
|
1765
|
+
data
|
1766
|
+
end
|
1767
|
+
|
1768
|
+
# Send email using an SMTP mail envelope and message body and return sent confirmation
|
1769
|
+
# Send email using an SMTP envelope containing RCPT TO, MAIL FROM, and a SMTP BODY.
|
1770
|
+
# @param inbox_id [String] ID of the inbox you want to send the email from
|
1771
|
+
# @param send_smtp_envelope_options [SendSMTPEnvelopeOptions]
|
1772
|
+
# @param [Hash] opts the optional parameters
|
1773
|
+
# @return [Array<(SentEmailDto, Integer, Hash)>] SentEmailDto data, response status code and response headers
|
1774
|
+
def send_smtp_envelope_with_http_info(inbox_id, send_smtp_envelope_options, opts = {})
|
1775
|
+
if @api_client.config.debugging
|
1776
|
+
@api_client.config.logger.debug 'Calling API: InboxControllerApi.send_smtp_envelope ...'
|
1777
|
+
end
|
1778
|
+
# verify the required parameter 'inbox_id' is set
|
1779
|
+
if @api_client.config.client_side_validation && inbox_id.nil?
|
1780
|
+
fail ArgumentError, "Missing the required parameter 'inbox_id' when calling InboxControllerApi.send_smtp_envelope"
|
1781
|
+
end
|
1782
|
+
# verify the required parameter 'send_smtp_envelope_options' is set
|
1783
|
+
if @api_client.config.client_side_validation && send_smtp_envelope_options.nil?
|
1784
|
+
fail ArgumentError, "Missing the required parameter 'send_smtp_envelope_options' when calling InboxControllerApi.send_smtp_envelope"
|
1785
|
+
end
|
1786
|
+
# resource path
|
1787
|
+
local_var_path = '/inboxes/{inboxId}/smtp-envelope'.sub('{' + 'inboxId' + '}', CGI.escape(inbox_id.to_s))
|
1788
|
+
|
1789
|
+
# query parameters
|
1790
|
+
query_params = opts[:query_params] || {}
|
1791
|
+
|
1792
|
+
# header parameters
|
1793
|
+
header_params = opts[:header_params] || {}
|
1794
|
+
# HTTP header 'Accept' (if needed)
|
1795
|
+
header_params['Accept'] = @api_client.select_header_accept(['*/*'])
|
1796
|
+
# HTTP header 'Content-Type'
|
1797
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
|
1798
|
+
|
1799
|
+
# form parameters
|
1800
|
+
form_params = opts[:form_params] || {}
|
1801
|
+
|
1802
|
+
# http body (model)
|
1803
|
+
post_body = opts[:body] || @api_client.object_to_http_body(send_smtp_envelope_options)
|
1804
|
+
|
1805
|
+
# return_type
|
1806
|
+
return_type = opts[:return_type] || 'SentEmailDto'
|
1807
|
+
|
1808
|
+
# auth_names
|
1809
|
+
auth_names = opts[:auth_names] || ['API_KEY']
|
1810
|
+
|
1811
|
+
new_options = opts.merge(
|
1812
|
+
:header_params => header_params,
|
1813
|
+
:query_params => query_params,
|
1814
|
+
:form_params => form_params,
|
1815
|
+
:body => post_body,
|
1816
|
+
:auth_names => auth_names,
|
1817
|
+
:return_type => return_type
|
1818
|
+
)
|
1819
|
+
|
1820
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
1821
|
+
if @api_client.config.debugging
|
1822
|
+
@api_client.config.logger.debug "API called: InboxControllerApi#send_smtp_envelope\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1823
|
+
end
|
1824
|
+
return data, status_code, headers
|
1825
|
+
end
|
1826
|
+
|
1757
1827
|
# Send a test email to inbox
|
1758
1828
|
# Send an inbox a test email to test email receiving is working
|
1759
1829
|
# @param inbox_id [String]
|
@@ -21,11 +21,11 @@ module MailSlurpClient
|
|
21
21
|
|
22
22
|
attr_accessor :user_id
|
23
23
|
|
24
|
-
attr_accessor :created_at
|
25
|
-
|
26
24
|
# Attachment ID
|
27
25
|
attr_accessor :attachment_id
|
28
26
|
|
27
|
+
attr_accessor :created_at
|
28
|
+
|
29
29
|
attr_accessor :updated_at
|
30
30
|
|
31
31
|
# Content type of attachment.
|
@@ -37,8 +37,8 @@ module MailSlurpClient
|
|
37
37
|
:'name' => :'name',
|
38
38
|
:'content_length' => :'contentLength',
|
39
39
|
:'user_id' => :'userId',
|
40
|
-
:'created_at' => :'createdAt',
|
41
40
|
:'attachment_id' => :'attachmentId',
|
41
|
+
:'created_at' => :'createdAt',
|
42
42
|
:'updated_at' => :'updatedAt',
|
43
43
|
:'content_type' => :'contentType'
|
44
44
|
}
|
@@ -50,8 +50,8 @@ module MailSlurpClient
|
|
50
50
|
:'name' => :'String',
|
51
51
|
:'content_length' => :'Integer',
|
52
52
|
:'user_id' => :'String',
|
53
|
-
:'created_at' => :'DateTime',
|
54
53
|
:'attachment_id' => :'String',
|
54
|
+
:'created_at' => :'DateTime',
|
55
55
|
:'updated_at' => :'DateTime',
|
56
56
|
:'content_type' => :'String'
|
57
57
|
}
|
@@ -90,14 +90,14 @@ module MailSlurpClient
|
|
90
90
|
self.user_id = attributes[:'user_id']
|
91
91
|
end
|
92
92
|
|
93
|
-
if attributes.key?(:'created_at')
|
94
|
-
self.created_at = attributes[:'created_at']
|
95
|
-
end
|
96
|
-
|
97
93
|
if attributes.key?(:'attachment_id')
|
98
94
|
self.attachment_id = attributes[:'attachment_id']
|
99
95
|
end
|
100
96
|
|
97
|
+
if attributes.key?(:'created_at')
|
98
|
+
self.created_at = attributes[:'created_at']
|
99
|
+
end
|
100
|
+
|
101
101
|
if attributes.key?(:'updated_at')
|
102
102
|
self.updated_at = attributes[:'updated_at']
|
103
103
|
end
|
@@ -115,14 +115,14 @@ module MailSlurpClient
|
|
115
115
|
invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
|
116
116
|
end
|
117
117
|
|
118
|
-
if @created_at.nil?
|
119
|
-
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
120
|
-
end
|
121
|
-
|
122
118
|
if @attachment_id.nil?
|
123
119
|
invalid_properties.push('invalid value for "attachment_id", attachment_id cannot be nil.')
|
124
120
|
end
|
125
121
|
|
122
|
+
if @created_at.nil?
|
123
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
124
|
+
end
|
125
|
+
|
126
126
|
if @updated_at.nil?
|
127
127
|
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
128
128
|
end
|
@@ -134,8 +134,8 @@ module MailSlurpClient
|
|
134
134
|
# @return true if the model is valid
|
135
135
|
def valid?
|
136
136
|
return false if @user_id.nil?
|
137
|
-
return false if @created_at.nil?
|
138
137
|
return false if @attachment_id.nil?
|
138
|
+
return false if @created_at.nil?
|
139
139
|
return false if @updated_at.nil?
|
140
140
|
true
|
141
141
|
end
|
@@ -148,8 +148,8 @@ module MailSlurpClient
|
|
148
148
|
name == o.name &&
|
149
149
|
content_length == o.content_length &&
|
150
150
|
user_id == o.user_id &&
|
151
|
-
created_at == o.created_at &&
|
152
151
|
attachment_id == o.attachment_id &&
|
152
|
+
created_at == o.created_at &&
|
153
153
|
updated_at == o.updated_at &&
|
154
154
|
content_type == o.content_type
|
155
155
|
end
|
@@ -163,7 +163,7 @@ module MailSlurpClient
|
|
163
163
|
# Calculates hash code according to all attributes.
|
164
164
|
# @return [Integer] Hash code
|
165
165
|
def hash
|
166
|
-
[name, content_length, user_id,
|
166
|
+
[name, content_length, user_id, attachment_id, created_at, updated_at, content_type].hash
|
167
167
|
end
|
168
168
|
|
169
169
|
# Builds the object from hash
|
@@ -18,8 +18,6 @@ module MailSlurpClient
|
|
18
18
|
|
19
19
|
attr_accessor :group_id
|
20
20
|
|
21
|
-
attr_accessor :created_at
|
22
|
-
|
23
21
|
attr_accessor :first_name
|
24
22
|
|
25
23
|
attr_accessor :last_name
|
@@ -30,17 +28,19 @@ module MailSlurpClient
|
|
30
28
|
|
31
29
|
attr_accessor :opt_out
|
32
30
|
|
31
|
+
attr_accessor :created_at
|
32
|
+
|
33
33
|
# Attribute mapping from ruby-style variable name to JSON key.
|
34
34
|
def self.attribute_map
|
35
35
|
{
|
36
36
|
:'id' => :'id',
|
37
37
|
:'group_id' => :'groupId',
|
38
|
-
:'created_at' => :'createdAt',
|
39
38
|
:'first_name' => :'firstName',
|
40
39
|
:'last_name' => :'lastName',
|
41
40
|
:'company' => :'company',
|
42
41
|
:'email_addresses' => :'emailAddresses',
|
43
|
-
:'opt_out' => :'optOut'
|
42
|
+
:'opt_out' => :'optOut',
|
43
|
+
:'created_at' => :'createdAt'
|
44
44
|
}
|
45
45
|
end
|
46
46
|
|
@@ -49,12 +49,12 @@ module MailSlurpClient
|
|
49
49
|
{
|
50
50
|
:'id' => :'String',
|
51
51
|
:'group_id' => :'String',
|
52
|
-
:'created_at' => :'DateTime',
|
53
52
|
:'first_name' => :'String',
|
54
53
|
:'last_name' => :'String',
|
55
54
|
:'company' => :'String',
|
56
55
|
:'email_addresses' => :'Array<String>',
|
57
|
-
:'opt_out' => :'Boolean'
|
56
|
+
:'opt_out' => :'Boolean',
|
57
|
+
:'created_at' => :'DateTime'
|
58
58
|
}
|
59
59
|
end
|
60
60
|
|
@@ -87,10 +87,6 @@ module MailSlurpClient
|
|
87
87
|
self.group_id = attributes[:'group_id']
|
88
88
|
end
|
89
89
|
|
90
|
-
if attributes.key?(:'created_at')
|
91
|
-
self.created_at = attributes[:'created_at']
|
92
|
-
end
|
93
|
-
|
94
90
|
if attributes.key?(:'first_name')
|
95
91
|
self.first_name = attributes[:'first_name']
|
96
92
|
end
|
@@ -112,6 +108,10 @@ module MailSlurpClient
|
|
112
108
|
if attributes.key?(:'opt_out')
|
113
109
|
self.opt_out = attributes[:'opt_out']
|
114
110
|
end
|
111
|
+
|
112
|
+
if attributes.key?(:'created_at')
|
113
|
+
self.created_at = attributes[:'created_at']
|
114
|
+
end
|
115
115
|
end
|
116
116
|
|
117
117
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -144,12 +144,12 @@ module MailSlurpClient
|
|
144
144
|
self.class == o.class &&
|
145
145
|
id == o.id &&
|
146
146
|
group_id == o.group_id &&
|
147
|
-
created_at == o.created_at &&
|
148
147
|
first_name == o.first_name &&
|
149
148
|
last_name == o.last_name &&
|
150
149
|
company == o.company &&
|
151
150
|
email_addresses == o.email_addresses &&
|
152
|
-
opt_out == o.opt_out
|
151
|
+
opt_out == o.opt_out &&
|
152
|
+
created_at == o.created_at
|
153
153
|
end
|
154
154
|
|
155
155
|
# @see the `==` method
|
@@ -161,7 +161,7 @@ module MailSlurpClient
|
|
161
161
|
# Calculates hash code according to all attributes.
|
162
162
|
# @return [Integer] Hash code
|
163
163
|
def hash
|
164
|
-
[id, group_id,
|
164
|
+
[id, group_id, first_name, last_name, company, email_addresses, opt_out, created_at].hash
|
165
165
|
end
|
166
166
|
|
167
167
|
# Builds the object from hash
|
@@ -23,16 +23,16 @@ module MailSlurpClient
|
|
23
23
|
|
24
24
|
attr_accessor :inbox_id
|
25
25
|
|
26
|
-
attr_accessor :to
|
27
|
-
|
28
26
|
attr_accessor :attachments
|
29
27
|
|
30
|
-
attr_accessor :
|
28
|
+
attr_accessor :to
|
31
29
|
|
32
30
|
attr_accessor :bcc
|
33
31
|
|
34
32
|
attr_accessor :cc
|
35
33
|
|
34
|
+
attr_accessor :created_at
|
35
|
+
|
36
36
|
attr_accessor :team_access
|
37
37
|
|
38
38
|
attr_accessor :read
|
@@ -48,11 +48,11 @@ module MailSlurpClient
|
|
48
48
|
:'from' => :'from',
|
49
49
|
:'subject' => :'subject',
|
50
50
|
:'inbox_id' => :'inboxId',
|
51
|
-
:'to' => :'to',
|
52
51
|
:'attachments' => :'attachments',
|
53
|
-
:'
|
52
|
+
:'to' => :'to',
|
54
53
|
:'bcc' => :'bcc',
|
55
54
|
:'cc' => :'cc',
|
55
|
+
:'created_at' => :'createdAt',
|
56
56
|
:'team_access' => :'teamAccess',
|
57
57
|
:'read' => :'read',
|
58
58
|
:'body_md5_hash' => :'bodyMD5Hash',
|
@@ -67,11 +67,11 @@ module MailSlurpClient
|
|
67
67
|
:'from' => :'String',
|
68
68
|
:'subject' => :'String',
|
69
69
|
:'inbox_id' => :'String',
|
70
|
-
:'to' => :'Array<String>',
|
71
70
|
:'attachments' => :'Array<String>',
|
72
|
-
:'
|
71
|
+
:'to' => :'Array<String>',
|
73
72
|
:'bcc' => :'Array<String>',
|
74
73
|
:'cc' => :'Array<String>',
|
74
|
+
:'created_at' => :'DateTime',
|
75
75
|
:'team_access' => :'Boolean',
|
76
76
|
:'read' => :'Boolean',
|
77
77
|
:'body_md5_hash' => :'String',
|
@@ -116,20 +116,16 @@ module MailSlurpClient
|
|
116
116
|
self.inbox_id = attributes[:'inbox_id']
|
117
117
|
end
|
118
118
|
|
119
|
-
if attributes.key?(:'to')
|
120
|
-
if (value = attributes[:'to']).is_a?(Array)
|
121
|
-
self.to = value
|
122
|
-
end
|
123
|
-
end
|
124
|
-
|
125
119
|
if attributes.key?(:'attachments')
|
126
120
|
if (value = attributes[:'attachments']).is_a?(Array)
|
127
121
|
self.attachments = value
|
128
122
|
end
|
129
123
|
end
|
130
124
|
|
131
|
-
if attributes.key?(:'
|
132
|
-
|
125
|
+
if attributes.key?(:'to')
|
126
|
+
if (value = attributes[:'to']).is_a?(Array)
|
127
|
+
self.to = value
|
128
|
+
end
|
133
129
|
end
|
134
130
|
|
135
131
|
if attributes.key?(:'bcc')
|
@@ -144,6 +140,10 @@ module MailSlurpClient
|
|
144
140
|
end
|
145
141
|
end
|
146
142
|
|
143
|
+
if attributes.key?(:'created_at')
|
144
|
+
self.created_at = attributes[:'created_at']
|
145
|
+
end
|
146
|
+
|
147
147
|
if attributes.key?(:'team_access')
|
148
148
|
self.team_access = attributes[:'team_access']
|
149
149
|
end
|
@@ -203,11 +203,11 @@ module MailSlurpClient
|
|
203
203
|
from == o.from &&
|
204
204
|
subject == o.subject &&
|
205
205
|
inbox_id == o.inbox_id &&
|
206
|
-
to == o.to &&
|
207
206
|
attachments == o.attachments &&
|
208
|
-
|
207
|
+
to == o.to &&
|
209
208
|
bcc == o.bcc &&
|
210
209
|
cc == o.cc &&
|
210
|
+
created_at == o.created_at &&
|
211
211
|
team_access == o.team_access &&
|
212
212
|
read == o.read &&
|
213
213
|
body_md5_hash == o.body_md5_hash &&
|
@@ -223,7 +223,7 @@ module MailSlurpClient
|
|
223
223
|
# Calculates hash code according to all attributes.
|
224
224
|
# @return [Integer] Hash code
|
225
225
|
def hash
|
226
|
-
[id, from, subject, inbox_id,
|
226
|
+
[id, from, subject, inbox_id, attachments, to, bcc, cc, created_at, team_access, read, body_md5_hash, body_excerpt].hash
|
227
227
|
end
|
228
228
|
|
229
229
|
# Builds the object from hash
|
@@ -0,0 +1,242 @@
|
|
1
|
+
=begin
|
2
|
+
#MailSlurp API
|
3
|
+
|
4
|
+
#MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 6.5.2
|
7
|
+
Contact: contact@mailslurp.dev
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module MailSlurpClient
|
16
|
+
# Options for the email envelope
|
17
|
+
class SendSMTPEnvelopeOptions
|
18
|
+
attr_accessor :rcpt_to
|
19
|
+
|
20
|
+
attr_accessor :mail_from
|
21
|
+
|
22
|
+
attr_accessor :data
|
23
|
+
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
25
|
+
def self.attribute_map
|
26
|
+
{
|
27
|
+
:'rcpt_to' => :'rcptTo',
|
28
|
+
:'mail_from' => :'mailFrom',
|
29
|
+
:'data' => :'data'
|
30
|
+
}
|
31
|
+
end
|
32
|
+
|
33
|
+
# Attribute type mapping.
|
34
|
+
def self.openapi_types
|
35
|
+
{
|
36
|
+
:'rcpt_to' => :'Array<String>',
|
37
|
+
:'mail_from' => :'String',
|
38
|
+
:'data' => :'String'
|
39
|
+
}
|
40
|
+
end
|
41
|
+
|
42
|
+
# List of attributes with nullable: true
|
43
|
+
def self.openapi_nullable
|
44
|
+
Set.new([
|
45
|
+
])
|
46
|
+
end
|
47
|
+
|
48
|
+
# Initializes the object
|
49
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
50
|
+
def initialize(attributes = {})
|
51
|
+
if (!attributes.is_a?(Hash))
|
52
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::SendSMTPEnvelopeOptions` initialize method"
|
53
|
+
end
|
54
|
+
|
55
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
56
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
57
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
58
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::SendSMTPEnvelopeOptions`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
59
|
+
end
|
60
|
+
h[k.to_sym] = v
|
61
|
+
}
|
62
|
+
|
63
|
+
if attributes.key?(:'rcpt_to')
|
64
|
+
if (value = attributes[:'rcpt_to']).is_a?(Array)
|
65
|
+
self.rcpt_to = value
|
66
|
+
end
|
67
|
+
end
|
68
|
+
|
69
|
+
if attributes.key?(:'mail_from')
|
70
|
+
self.mail_from = attributes[:'mail_from']
|
71
|
+
end
|
72
|
+
|
73
|
+
if attributes.key?(:'data')
|
74
|
+
self.data = attributes[:'data']
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
79
|
+
# @return Array for valid properties with the reasons
|
80
|
+
def list_invalid_properties
|
81
|
+
invalid_properties = Array.new
|
82
|
+
if @rcpt_to.nil?
|
83
|
+
invalid_properties.push('invalid value for "rcpt_to", rcpt_to cannot be nil.')
|
84
|
+
end
|
85
|
+
|
86
|
+
if @mail_from.nil?
|
87
|
+
invalid_properties.push('invalid value for "mail_from", mail_from cannot be nil.')
|
88
|
+
end
|
89
|
+
|
90
|
+
if @data.nil?
|
91
|
+
invalid_properties.push('invalid value for "data", data cannot be nil.')
|
92
|
+
end
|
93
|
+
|
94
|
+
invalid_properties
|
95
|
+
end
|
96
|
+
|
97
|
+
# Check to see if the all the properties in the model are valid
|
98
|
+
# @return true if the model is valid
|
99
|
+
def valid?
|
100
|
+
return false if @rcpt_to.nil?
|
101
|
+
return false if @mail_from.nil?
|
102
|
+
return false if @data.nil?
|
103
|
+
true
|
104
|
+
end
|
105
|
+
|
106
|
+
# Checks equality by comparing each attribute.
|
107
|
+
# @param [Object] Object to be compared
|
108
|
+
def ==(o)
|
109
|
+
return true if self.equal?(o)
|
110
|
+
self.class == o.class &&
|
111
|
+
rcpt_to == o.rcpt_to &&
|
112
|
+
mail_from == o.mail_from &&
|
113
|
+
data == o.data
|
114
|
+
end
|
115
|
+
|
116
|
+
# @see the `==` method
|
117
|
+
# @param [Object] Object to be compared
|
118
|
+
def eql?(o)
|
119
|
+
self == o
|
120
|
+
end
|
121
|
+
|
122
|
+
# Calculates hash code according to all attributes.
|
123
|
+
# @return [Integer] Hash code
|
124
|
+
def hash
|
125
|
+
[rcpt_to, mail_from, data].hash
|
126
|
+
end
|
127
|
+
|
128
|
+
# Builds the object from hash
|
129
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
130
|
+
# @return [Object] Returns the model itself
|
131
|
+
def self.build_from_hash(attributes)
|
132
|
+
new.build_from_hash(attributes)
|
133
|
+
end
|
134
|
+
|
135
|
+
# Builds the object from hash
|
136
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
137
|
+
# @return [Object] Returns the model itself
|
138
|
+
def build_from_hash(attributes)
|
139
|
+
return nil unless attributes.is_a?(Hash)
|
140
|
+
self.class.openapi_types.each_pair do |key, type|
|
141
|
+
if type =~ /\AArray<(.*)>/i
|
142
|
+
# check to ensure the input is an array given that the attribute
|
143
|
+
# is documented as an array but the input is not
|
144
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
145
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
146
|
+
end
|
147
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
148
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
149
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
150
|
+
end
|
151
|
+
|
152
|
+
self
|
153
|
+
end
|
154
|
+
|
155
|
+
# Deserializes the data based on type
|
156
|
+
# @param string type Data type
|
157
|
+
# @param string value Value to be deserialized
|
158
|
+
# @return [Object] Deserialized data
|
159
|
+
def _deserialize(type, value)
|
160
|
+
case type.to_sym
|
161
|
+
when :DateTime
|
162
|
+
DateTime.parse(value)
|
163
|
+
when :Date
|
164
|
+
Date.parse(value)
|
165
|
+
when :String
|
166
|
+
value.to_s
|
167
|
+
when :Integer
|
168
|
+
value.to_i
|
169
|
+
when :Float
|
170
|
+
value.to_f
|
171
|
+
when :Boolean
|
172
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
173
|
+
true
|
174
|
+
else
|
175
|
+
false
|
176
|
+
end
|
177
|
+
when :Object
|
178
|
+
# generic object (usually a Hash), return directly
|
179
|
+
value
|
180
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
181
|
+
inner_type = Regexp.last_match[:inner_type]
|
182
|
+
value.map { |v| _deserialize(inner_type, v) }
|
183
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
184
|
+
k_type = Regexp.last_match[:k_type]
|
185
|
+
v_type = Regexp.last_match[:v_type]
|
186
|
+
{}.tap do |hash|
|
187
|
+
value.each do |k, v|
|
188
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
189
|
+
end
|
190
|
+
end
|
191
|
+
else # model
|
192
|
+
MailSlurpClient.const_get(type).build_from_hash(value)
|
193
|
+
end
|
194
|
+
end
|
195
|
+
|
196
|
+
# Returns the string representation of the object
|
197
|
+
# @return [String] String presentation of the object
|
198
|
+
def to_s
|
199
|
+
to_hash.to_s
|
200
|
+
end
|
201
|
+
|
202
|
+
# to_body is an alias to to_hash (backward compatibility)
|
203
|
+
# @return [Hash] Returns the object in the form of hash
|
204
|
+
def to_body
|
205
|
+
to_hash
|
206
|
+
end
|
207
|
+
|
208
|
+
# Returns the object in the form of hash
|
209
|
+
# @return [Hash] Returns the object in the form of hash
|
210
|
+
def to_hash
|
211
|
+
hash = {}
|
212
|
+
self.class.attribute_map.each_pair do |attr, param|
|
213
|
+
value = self.send(attr)
|
214
|
+
if value.nil?
|
215
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
216
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
217
|
+
end
|
218
|
+
|
219
|
+
hash[param] = _to_hash(value)
|
220
|
+
end
|
221
|
+
hash
|
222
|
+
end
|
223
|
+
|
224
|
+
# Outputs non-array value in the form of hash
|
225
|
+
# For object, use to_hash. Otherwise, just return the value
|
226
|
+
# @param [Object] value Any valid value
|
227
|
+
# @return [Hash] Returns the value in the form of hash
|
228
|
+
def _to_hash(value)
|
229
|
+
if value.is_a?(Array)
|
230
|
+
value.compact.map { |v| _to_hash(v) }
|
231
|
+
elsif value.is_a?(Hash)
|
232
|
+
{}.tap do |hash|
|
233
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
234
|
+
end
|
235
|
+
elsif value.respond_to? :to_hash
|
236
|
+
value.to_hash
|
237
|
+
else
|
238
|
+
value
|
239
|
+
end
|
240
|
+
end
|
241
|
+
end
|
242
|
+
end
|
@@ -25,16 +25,16 @@ module MailSlurpClient
|
|
25
25
|
|
26
26
|
attr_accessor :inbox_id
|
27
27
|
|
28
|
-
attr_accessor :to
|
29
|
-
|
30
28
|
attr_accessor :attachments
|
31
29
|
|
32
|
-
attr_accessor :
|
30
|
+
attr_accessor :to
|
33
31
|
|
34
32
|
attr_accessor :bcc
|
35
33
|
|
36
34
|
attr_accessor :cc
|
37
35
|
|
36
|
+
attr_accessor :created_at
|
37
|
+
|
38
38
|
attr_accessor :body_md5_hash
|
39
39
|
|
40
40
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -45,11 +45,11 @@ module MailSlurpClient
|
|
45
45
|
:'user_id' => :'userId',
|
46
46
|
:'subject' => :'subject',
|
47
47
|
:'inbox_id' => :'inboxId',
|
48
|
-
:'to' => :'to',
|
49
48
|
:'attachments' => :'attachments',
|
50
|
-
:'
|
49
|
+
:'to' => :'to',
|
51
50
|
:'bcc' => :'bcc',
|
52
51
|
:'cc' => :'cc',
|
52
|
+
:'created_at' => :'createdAt',
|
53
53
|
:'body_md5_hash' => :'bodyMD5Hash'
|
54
54
|
}
|
55
55
|
end
|
@@ -62,11 +62,11 @@ module MailSlurpClient
|
|
62
62
|
:'user_id' => :'String',
|
63
63
|
:'subject' => :'String',
|
64
64
|
:'inbox_id' => :'String',
|
65
|
-
:'to' => :'Array<String>',
|
66
65
|
:'attachments' => :'Array<String>',
|
67
|
-
:'
|
66
|
+
:'to' => :'Array<String>',
|
68
67
|
:'bcc' => :'Array<String>',
|
69
68
|
:'cc' => :'Array<String>',
|
69
|
+
:'created_at' => :'DateTime',
|
70
70
|
:'body_md5_hash' => :'String'
|
71
71
|
}
|
72
72
|
end
|
@@ -112,20 +112,16 @@ module MailSlurpClient
|
|
112
112
|
self.inbox_id = attributes[:'inbox_id']
|
113
113
|
end
|
114
114
|
|
115
|
-
if attributes.key?(:'to')
|
116
|
-
if (value = attributes[:'to']).is_a?(Array)
|
117
|
-
self.to = value
|
118
|
-
end
|
119
|
-
end
|
120
|
-
|
121
115
|
if attributes.key?(:'attachments')
|
122
116
|
if (value = attributes[:'attachments']).is_a?(Array)
|
123
117
|
self.attachments = value
|
124
118
|
end
|
125
119
|
end
|
126
120
|
|
127
|
-
if attributes.key?(:'
|
128
|
-
|
121
|
+
if attributes.key?(:'to')
|
122
|
+
if (value = attributes[:'to']).is_a?(Array)
|
123
|
+
self.to = value
|
124
|
+
end
|
129
125
|
end
|
130
126
|
|
131
127
|
if attributes.key?(:'bcc')
|
@@ -140,6 +136,10 @@ module MailSlurpClient
|
|
140
136
|
end
|
141
137
|
end
|
142
138
|
|
139
|
+
if attributes.key?(:'created_at')
|
140
|
+
self.created_at = attributes[:'created_at']
|
141
|
+
end
|
142
|
+
|
143
143
|
if attributes.key?(:'body_md5_hash')
|
144
144
|
self.body_md5_hash = attributes[:'body_md5_hash']
|
145
145
|
end
|
@@ -161,16 +161,12 @@ module MailSlurpClient
|
|
161
161
|
invalid_properties.push('invalid value for "inbox_id", inbox_id cannot be nil.')
|
162
162
|
end
|
163
163
|
|
164
|
-
if @to.nil?
|
165
|
-
invalid_properties.push('invalid value for "to", to cannot be nil.')
|
166
|
-
end
|
167
|
-
|
168
164
|
if @attachments.nil?
|
169
165
|
invalid_properties.push('invalid value for "attachments", attachments cannot be nil.')
|
170
166
|
end
|
171
167
|
|
172
|
-
if @
|
173
|
-
invalid_properties.push('invalid value for "
|
168
|
+
if @to.nil?
|
169
|
+
invalid_properties.push('invalid value for "to", to cannot be nil.')
|
174
170
|
end
|
175
171
|
|
176
172
|
if @bcc.nil?
|
@@ -181,6 +177,10 @@ module MailSlurpClient
|
|
181
177
|
invalid_properties.push('invalid value for "cc", cc cannot be nil.')
|
182
178
|
end
|
183
179
|
|
180
|
+
if @created_at.nil?
|
181
|
+
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
182
|
+
end
|
183
|
+
|
184
184
|
invalid_properties
|
185
185
|
end
|
186
186
|
|
@@ -190,11 +190,11 @@ module MailSlurpClient
|
|
190
190
|
return false if @id.nil?
|
191
191
|
return false if @user_id.nil?
|
192
192
|
return false if @inbox_id.nil?
|
193
|
-
return false if @to.nil?
|
194
193
|
return false if @attachments.nil?
|
195
|
-
return false if @
|
194
|
+
return false if @to.nil?
|
196
195
|
return false if @bcc.nil?
|
197
196
|
return false if @cc.nil?
|
197
|
+
return false if @created_at.nil?
|
198
198
|
true
|
199
199
|
end
|
200
200
|
|
@@ -208,11 +208,11 @@ module MailSlurpClient
|
|
208
208
|
user_id == o.user_id &&
|
209
209
|
subject == o.subject &&
|
210
210
|
inbox_id == o.inbox_id &&
|
211
|
-
to == o.to &&
|
212
211
|
attachments == o.attachments &&
|
213
|
-
|
212
|
+
to == o.to &&
|
214
213
|
bcc == o.bcc &&
|
215
214
|
cc == o.cc &&
|
215
|
+
created_at == o.created_at &&
|
216
216
|
body_md5_hash == o.body_md5_hash
|
217
217
|
end
|
218
218
|
|
@@ -225,7 +225,7 @@ module MailSlurpClient
|
|
225
225
|
# Calculates hash code according to all attributes.
|
226
226
|
# @return [Integer] Hash code
|
227
227
|
def hash
|
228
|
-
[id, from, user_id, subject, inbox_id,
|
228
|
+
[id, from, user_id, subject, inbox_id, attachments, to, bcc, cc, created_at, body_md5_hash].hash
|
229
229
|
end
|
230
230
|
|
231
231
|
# Builds the object from hash
|
@@ -27,12 +27,12 @@ module MailSlurpClient
|
|
27
27
|
|
28
28
|
attr_accessor :to
|
29
29
|
|
30
|
-
attr_accessor :created_at
|
31
|
-
|
32
30
|
attr_accessor :bcc
|
33
31
|
|
34
32
|
attr_accessor :cc
|
35
33
|
|
34
|
+
attr_accessor :created_at
|
35
|
+
|
36
36
|
attr_accessor :updated_at
|
37
37
|
|
38
38
|
attr_accessor :alias_id
|
@@ -46,9 +46,9 @@ module MailSlurpClient
|
|
46
46
|
:'user_id' => :'userId',
|
47
47
|
:'inbox_id' => :'inboxId',
|
48
48
|
:'to' => :'to',
|
49
|
-
:'created_at' => :'createdAt',
|
50
49
|
:'bcc' => :'bcc',
|
51
50
|
:'cc' => :'cc',
|
51
|
+
:'created_at' => :'createdAt',
|
52
52
|
:'updated_at' => :'updatedAt',
|
53
53
|
:'alias_id' => :'aliasId'
|
54
54
|
}
|
@@ -63,9 +63,9 @@ module MailSlurpClient
|
|
63
63
|
:'user_id' => :'String',
|
64
64
|
:'inbox_id' => :'String',
|
65
65
|
:'to' => :'Array<String>',
|
66
|
-
:'created_at' => :'DateTime',
|
67
66
|
:'bcc' => :'Array<String>',
|
68
67
|
:'cc' => :'Array<String>',
|
68
|
+
:'created_at' => :'DateTime',
|
69
69
|
:'updated_at' => :'DateTime',
|
70
70
|
:'alias_id' => :'String'
|
71
71
|
}
|
@@ -118,10 +118,6 @@ module MailSlurpClient
|
|
118
118
|
end
|
119
119
|
end
|
120
120
|
|
121
|
-
if attributes.key?(:'created_at')
|
122
|
-
self.created_at = attributes[:'created_at']
|
123
|
-
end
|
124
|
-
|
125
121
|
if attributes.key?(:'bcc')
|
126
122
|
if (value = attributes[:'bcc']).is_a?(Array)
|
127
123
|
self.bcc = value
|
@@ -134,6 +130,10 @@ module MailSlurpClient
|
|
134
130
|
end
|
135
131
|
end
|
136
132
|
|
133
|
+
if attributes.key?(:'created_at')
|
134
|
+
self.created_at = attributes[:'created_at']
|
135
|
+
end
|
136
|
+
|
137
137
|
if attributes.key?(:'updated_at')
|
138
138
|
self.updated_at = attributes[:'updated_at']
|
139
139
|
end
|
@@ -202,9 +202,9 @@ module MailSlurpClient
|
|
202
202
|
user_id == o.user_id &&
|
203
203
|
inbox_id == o.inbox_id &&
|
204
204
|
to == o.to &&
|
205
|
-
created_at == o.created_at &&
|
206
205
|
bcc == o.bcc &&
|
207
206
|
cc == o.cc &&
|
207
|
+
created_at == o.created_at &&
|
208
208
|
updated_at == o.updated_at &&
|
209
209
|
alias_id == o.alias_id
|
210
210
|
end
|
@@ -218,7 +218,7 @@ module MailSlurpClient
|
|
218
218
|
# Calculates hash code according to all attributes.
|
219
219
|
# @return [Integer] Hash code
|
220
220
|
def hash
|
221
|
-
[name, id, subject, user_id, inbox_id, to,
|
221
|
+
[name, id, subject, user_id, inbox_id, to, bcc, cc, created_at, updated_at, alias_id].hash
|
222
222
|
end
|
223
223
|
|
224
224
|
# Builds the object from hash
|
data/lib/mailslurp_client.rb
CHANGED
@@ -123,6 +123,7 @@ require 'mailslurp_client/models/recipient'
|
|
123
123
|
require 'mailslurp_client/models/reply_to_alias_email_options'
|
124
124
|
require 'mailslurp_client/models/reply_to_email_options'
|
125
125
|
require 'mailslurp_client/models/send_email_options'
|
126
|
+
require 'mailslurp_client/models/send_smtp_envelope_options'
|
126
127
|
require 'mailslurp_client/models/sender'
|
127
128
|
require 'mailslurp_client/models/sent_email_dto'
|
128
129
|
require 'mailslurp_client/models/sent_email_projection'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mailslurp_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 15.4.
|
4
|
+
version: 15.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mailslurp
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-01-
|
11
|
+
date: 2022-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Create emails addresses in Ruby then send and receive real emails and
|
14
14
|
attachments. See https://www.mailslurp.com/docs/ruby/ for full Ruby documentation.
|
@@ -154,6 +154,7 @@ files:
|
|
154
154
|
- lib/mailslurp_client/models/reply_to_alias_email_options.rb
|
155
155
|
- lib/mailslurp_client/models/reply_to_email_options.rb
|
156
156
|
- lib/mailslurp_client/models/send_email_options.rb
|
157
|
+
- lib/mailslurp_client/models/send_smtp_envelope_options.rb
|
157
158
|
- lib/mailslurp_client/models/sender.rb
|
158
159
|
- lib/mailslurp_client/models/sent_email_dto.rb
|
159
160
|
- lib/mailslurp_client/models/sent_email_projection.rb
|