mailslurp_client 5.0.0 → 7.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -0
- data/README.md +127 -40
- data/docs/AttachmentControllerApi.md +124 -0
- data/docs/AttachmentMetaData.md +23 -0
- data/docs/BasicAuthOptions.md +10 -0
- data/docs/BulkActionsControllerApi.md +165 -0
- data/docs/BulkSendEmailOptions.md +11 -1
- data/docs/CommonActionsControllerApi.md +167 -0
- data/docs/ContactControllerApi.md +274 -0
- data/docs/ContactDto.md +31 -0
- data/docs/ContactProjection.md +27 -0
- data/docs/CreateContactOptions.md +31 -0
- data/docs/CreateDomainOptions.md +17 -0
- data/docs/CreateGroupOptions.md +19 -0
- data/docs/CreateTemplateOptions.md +19 -0
- data/docs/CreateWebhookOptions.md +13 -2
- data/docs/DomainControllerApi.md +223 -0
- data/docs/DomainDto.md +29 -0
- data/docs/DomainPreview.md +21 -0
- data/docs/Email.md +40 -15
- data/docs/EmailAnalysis.md +18 -5
- data/docs/EmailControllerApi.md +740 -0
- data/docs/EmailPreview.md +24 -6
- data/docs/EmailProjection.md +33 -0
- data/docs/ForwardEmailOptions.md +12 -0
- data/docs/GroupContactsDto.md +19 -0
- data/docs/GroupControllerApi.md +437 -0
- data/docs/GroupDto.md +23 -0
- data/docs/GroupProjection.md +23 -0
- data/docs/HTMLValidationResult.md +21 -0
- data/docs/Inbox.md +26 -4
- data/docs/InboxControllerApi.md +652 -0
- data/docs/InboxProjection.md +29 -0
- data/docs/JsonNode.md +59 -0
- data/docs/MatchOption.md +13 -2
- data/docs/MatchOptions.md +9 -0
- data/docs/PageContactProjection.md +37 -0
- data/docs/PageEmailPreview.md +37 -0
- data/docs/PageEmailProjection.md +37 -0
- data/docs/PageGroupProjection.md +37 -0
- data/docs/PageInboxProjection.md +37 -0
- data/docs/PageTemplateProjection.md +37 -0
- data/docs/PageWebhookProjection.md +37 -0
- data/docs/Pageable.md +27 -0
- data/docs/RawEmailJson.md +17 -0
- data/docs/SendEmailOptions.md +33 -6
- data/docs/SetInboxFavouritedOptions.md +17 -0
- data/docs/Sort.md +21 -0
- data/docs/TemplateControllerApi.md +274 -0
- data/docs/TemplateDto.md +25 -0
- data/docs/TemplateProjection.md +25 -0
- data/docs/TemplateVariable.md +19 -0
- data/docs/UnreadCount.md +17 -0
- data/docs/UpdateGroupContacts.md +17 -0
- data/docs/UpdateInboxOptions.md +25 -0
- data/docs/UploadAttachmentOptions.md +12 -1
- data/docs/ValidationDto.md +19 -0
- data/docs/ValidationMessage.md +19 -0
- data/docs/WaitForConditions.md +29 -0
- data/docs/WaitForControllerApi.md +317 -0
- data/docs/WebhookControllerApi.md +339 -0
- data/docs/WebhookDto.md +33 -0
- data/docs/WebhookProjection.md +27 -0
- data/docs/WebhookTestRequest.md +23 -0
- data/docs/WebhookTestResponse.md +19 -0
- data/docs/WebhookTestResult.md +21 -0
- data/git_push.sh +10 -7
- data/lib/mailslurp_client.rb +56 -7
- data/lib/mailslurp_client/api/attachment_controller_api.rb +157 -0
- data/lib/mailslurp_client/api/bulk_actions_controller_api.rb +203 -0
- data/lib/mailslurp_client/api/common_actions_controller_api.rb +201 -0
- data/lib/mailslurp_client/api/contact_controller_api.rb +323 -0
- data/lib/mailslurp_client/api/domain_controller_api.rb +264 -0
- data/lib/mailslurp_client/api/email_controller_api.rb +852 -0
- data/lib/mailslurp_client/api/group_controller_api.rb +519 -0
- data/lib/mailslurp_client/api/inbox_controller_api.rb +763 -0
- data/lib/mailslurp_client/api/template_controller_api.rb +323 -0
- data/lib/mailslurp_client/api/wait_for_controller_api.rb +359 -0
- data/lib/mailslurp_client/api/webhook_controller_api.rb +405 -0
- data/lib/mailslurp_client/api_client.rb +36 -39
- data/lib/mailslurp_client/api_error.rb +23 -4
- data/lib/mailslurp_client/configuration.rb +8 -11
- data/lib/mailslurp_client/models/attachment_meta_data.rb +253 -0
- data/lib/mailslurp_client/models/basic_auth_options.rb +39 -15
- data/lib/mailslurp_client/models/bulk_send_email_options.rb +42 -19
- data/lib/mailslurp_client/models/contact_dto.rb +288 -0
- data/lib/mailslurp_client/models/contact_projection.rb +261 -0
- data/lib/mailslurp_client/models/create_contact_options.rb +277 -0
- data/lib/mailslurp_client/models/create_domain_options.rb +208 -0
- data/lib/mailslurp_client/models/create_group_options.rb +220 -0
- data/lib/mailslurp_client/models/create_template_options.rb +225 -0
- data/lib/mailslurp_client/models/create_webhook_options.rb +54 -29
- data/lib/mailslurp_client/models/domain_dto.rb +296 -0
- data/lib/mailslurp_client/models/domain_preview.rb +240 -0
- data/lib/mailslurp_client/models/email.rb +86 -78
- data/lib/mailslurp_client/models/email_analysis.rb +46 -48
- data/lib/mailslurp_client/models/email_preview.rb +77 -41
- data/lib/mailslurp_client/models/email_projection.rb +306 -0
- data/lib/mailslurp_client/models/forward_email_options.rb +40 -17
- data/lib/mailslurp_client/models/group_contacts_dto.rb +227 -0
- data/lib/mailslurp_client/models/{webhook.rb → group_dto.rb} +60 -54
- data/lib/mailslurp_client/models/group_projection.rb +248 -0
- data/lib/mailslurp_client/models/html_validation_result.rb +243 -0
- data/lib/mailslurp_client/models/inbox.rb +104 -26
- data/lib/mailslurp_client/models/inbox_projection.rb +272 -0
- data/lib/mailslurp_client/models/json_node.rb +429 -0
- data/lib/mailslurp_client/models/match_option.rb +48 -24
- data/lib/mailslurp_client/models/match_options.rb +37 -14
- data/lib/mailslurp_client/models/page_contact_projection.rb +298 -0
- data/lib/mailslurp_client/models/page_email_preview.rb +298 -0
- data/lib/mailslurp_client/models/page_email_projection.rb +298 -0
- data/lib/mailslurp_client/models/page_group_projection.rb +298 -0
- data/lib/mailslurp_client/models/page_inbox_projection.rb +298 -0
- data/lib/mailslurp_client/models/page_template_projection.rb +298 -0
- data/lib/mailslurp_client/models/page_webhook_projection.rb +298 -0
- data/lib/mailslurp_client/models/pageable.rb +251 -0
- data/lib/mailslurp_client/models/raw_email_json.rb +211 -0
- data/lib/mailslurp_client/models/send_email_options.rb +141 -46
- data/lib/mailslurp_client/models/set_inbox_favourited_options.rb +208 -0
- data/lib/mailslurp_client/models/sort.rb +224 -0
- data/lib/mailslurp_client/models/template_dto.rb +269 -0
- data/lib/mailslurp_client/models/template_projection.rb +269 -0
- data/lib/mailslurp_client/models/template_variable.rb +259 -0
- data/lib/mailslurp_client/models/unread_count.rb +211 -0
- data/lib/mailslurp_client/models/update_group_contacts.rb +213 -0
- data/lib/mailslurp_client/models/update_inbox_options.rb +250 -0
- data/lib/mailslurp_client/models/upload_attachment_options.rb +43 -20
- data/lib/mailslurp_client/models/validation_dto.rb +225 -0
- data/lib/mailslurp_client/models/validation_message.rb +220 -0
- data/lib/mailslurp_client/models/wait_for_conditions.rb +315 -0
- data/lib/mailslurp_client/models/webhook_dto.rb +326 -0
- data/lib/mailslurp_client/models/webhook_projection.rb +277 -0
- data/lib/mailslurp_client/models/webhook_test_request.rb +284 -0
- data/lib/mailslurp_client/models/webhook_test_response.rb +215 -0
- data/lib/mailslurp_client/models/webhook_test_result.rb +235 -0
- data/lib/mailslurp_client/version.rb +5 -5
- data/mailslurp_client.gemspec +4 -10
- data/spec/api/attachment_controller_api_spec.rb +61 -0
- data/spec/api/bulk_actions_controller_api_spec.rb +68 -0
- data/spec/api/common_actions_controller_api_spec.rb +129 -0
- data/spec/api/contact_controller_api_spec.rb +91 -0
- data/spec/api/domain_controller_api_spec.rb +82 -0
- data/spec/api/email_controller_api_spec.rb +162 -0
- data/spec/api/group_controller_api_spec.rb +126 -0
- data/spec/api/inbox_controller_api_spec.rb +172 -0
- data/spec/api/template_controller_api_spec.rb +91 -0
- data/spec/api/wait_for_controller_api_spec.rb +107 -0
- data/spec/api/webhook_controller_api_spec.rb +107 -0
- data/spec/api_client_spec.rb +5 -5
- data/spec/configuration_spec.rb +4 -4
- data/spec/models/attachment_meta_data_spec.rb +59 -0
- data/spec/models/basic_auth_options_spec.rb +4 -4
- data/spec/models/bulk_send_email_options_spec.rb +4 -4
- data/spec/models/contact_dto_spec.rb +83 -0
- data/spec/models/contact_projection_spec.rb +71 -0
- data/spec/models/create_contact_options_spec.rb +83 -0
- data/spec/models/create_domain_options_spec.rb +41 -0
- data/spec/models/create_group_options_spec.rb +47 -0
- data/spec/models/create_template_options_spec.rb +47 -0
- data/spec/models/create_webhook_options_spec.rb +6 -6
- data/spec/models/domain_dto_spec.rb +77 -0
- data/spec/models/domain_preview_spec.rb +53 -0
- data/spec/models/email_analysis_spec.rb +4 -4
- data/spec/models/email_preview_spec.rb +41 -5
- data/spec/models/email_projection_spec.rb +89 -0
- data/spec/models/email_spec.rb +17 -5
- data/spec/models/forward_email_options_spec.rb +4 -4
- data/spec/models/group_contacts_dto_spec.rb +47 -0
- data/spec/models/group_dto_spec.rb +59 -0
- data/spec/models/group_projection_spec.rb +59 -0
- data/spec/models/html_validation_result_spec.rb +53 -0
- data/spec/models/inbox_projection_spec.rb +77 -0
- data/spec/models/inbox_spec.rb +35 -5
- data/spec/models/json_node_spec.rb +171 -0
- data/spec/models/match_option_spec.rb +4 -4
- data/spec/models/match_options_spec.rb +4 -4
- data/spec/models/page_contact_projection_spec.rb +101 -0
- data/spec/models/page_email_preview_spec.rb +101 -0
- data/spec/models/page_email_projection_spec.rb +101 -0
- data/spec/models/page_group_projection_spec.rb +101 -0
- data/spec/models/page_inbox_projection_spec.rb +101 -0
- data/spec/models/page_template_projection_spec.rb +101 -0
- data/spec/models/page_webhook_projection_spec.rb +101 -0
- data/spec/models/pageable_spec.rb +71 -0
- data/spec/models/raw_email_json_spec.rb +41 -0
- data/spec/models/send_email_options_spec.rb +45 -5
- data/spec/models/set_inbox_favourited_options_spec.rb +41 -0
- data/spec/models/sort_spec.rb +53 -0
- data/spec/models/template_dto_spec.rb +65 -0
- data/spec/models/template_projection_spec.rb +65 -0
- data/spec/models/template_variable_spec.rb +51 -0
- data/spec/models/unread_count_spec.rb +41 -0
- data/spec/models/update_group_contacts_spec.rb +41 -0
- data/spec/models/{webhook_spec.rb → update_inbox_options_spec.rb} +14 -20
- data/spec/models/upload_attachment_options_spec.rb +4 -4
- data/spec/models/validation_dto_spec.rb +47 -0
- data/spec/models/validation_message_spec.rb +47 -0
- data/spec/models/wait_for_conditions_spec.rb +85 -0
- data/spec/models/webhook_dto_spec.rb +93 -0
- data/spec/models/webhook_projection_spec.rb +71 -0
- data/spec/models/webhook_test_request_spec.rb +63 -0
- data/spec/models/webhook_test_response_spec.rb +47 -0
- data/spec/models/webhook_test_result_spec.rb +53 -0
- data/spec/spec_helper.rb +4 -4
- metadata +223 -149
- data/Gemfile.lock +0 -79
- data/docs/CommonOperationsApi.md +0 -499
- data/docs/ExtraOperationsApi.md +0 -1021
- data/docs/Webhook.md +0 -13
- data/lib/mailslurp_client/api/common_operations_api.rb +0 -502
- data/lib/mailslurp_client/api/extra_operations_api.rb +0 -1054
- data/spec/api/common_operations_api_spec.rb +0 -95
- data/spec/api/extra_operations_api_spec.rb +0 -231
@@ -1,52 +1,67 @@
|
|
1
1
|
=begin
|
2
2
|
#MailSlurp API
|
3
3
|
|
4
|
-
#
|
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: 67c9a1eda264be4cfe0bb2c76151f0aadf0862bc
|
5
7
|
|
6
|
-
OpenAPI spec version: 0.0.1-alpha
|
7
|
-
Contact: contact@mailslurp.dev
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 4.2.3
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
require 'date'
|
14
14
|
|
15
15
|
module MailSlurpClient
|
16
|
-
# Representation of an email
|
16
|
+
# Representation of an email received by an inbox. Use the ID to access more properties of an email using the EmailController endpoints.
|
17
17
|
class Email
|
18
18
|
attr_accessor :analysis
|
19
19
|
|
20
|
+
# List of IDs of attachments found in the email. Use these IDs with the Inbox and Email Controllers to download attachments and attachment meta data such as filesize, name, extension.
|
20
21
|
attr_accessor :attachments
|
21
22
|
|
23
|
+
# List of `BCC` recipients email was addressed to
|
22
24
|
attr_accessor :bcc
|
23
25
|
|
26
|
+
# The body of the email message
|
24
27
|
attr_accessor :body
|
25
28
|
|
29
|
+
# List of `CC` recipients email was addressed to
|
26
30
|
attr_accessor :cc
|
27
31
|
|
32
|
+
# Detected character set of the email body such as UTF-8
|
28
33
|
attr_accessor :charset
|
29
34
|
|
35
|
+
# When was the email received by MailSlurp
|
30
36
|
attr_accessor :created_at
|
31
37
|
|
38
|
+
# Who the email was sent from
|
32
39
|
attr_accessor :from
|
33
40
|
|
34
41
|
attr_accessor :headers
|
35
42
|
|
36
|
-
|
37
|
-
|
43
|
+
# ID of the email
|
38
44
|
attr_accessor :id
|
39
45
|
|
46
|
+
# ID of the inbox that received the email
|
40
47
|
attr_accessor :inbox_id
|
41
48
|
|
42
|
-
|
49
|
+
# Was HTML sent in the email body
|
50
|
+
attr_accessor :is_html
|
43
51
|
|
52
|
+
# Has the email been viewed ever
|
53
|
+
attr_accessor :read
|
54
|
+
|
55
|
+
# The subject line of the email message
|
44
56
|
attr_accessor :subject
|
45
57
|
|
58
|
+
# List of `To` recipients email was addressed to
|
46
59
|
attr_accessor :to
|
47
60
|
|
61
|
+
# When was the email last updated
|
48
62
|
attr_accessor :updated_at
|
49
63
|
|
64
|
+
# ID of user that email belongs
|
50
65
|
attr_accessor :user_id
|
51
66
|
|
52
67
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -61,10 +76,10 @@ module MailSlurpClient
|
|
61
76
|
:'created_at' => :'createdAt',
|
62
77
|
:'from' => :'from',
|
63
78
|
:'headers' => :'headers',
|
64
|
-
:'html' => :'html',
|
65
79
|
:'id' => :'id',
|
66
80
|
:'inbox_id' => :'inboxId',
|
67
|
-
:'
|
81
|
+
:'is_html' => :'isHTML',
|
82
|
+
:'read' => :'read',
|
68
83
|
:'subject' => :'subject',
|
69
84
|
:'to' => :'to',
|
70
85
|
:'updated_at' => :'updatedAt',
|
@@ -84,10 +99,10 @@ module MailSlurpClient
|
|
84
99
|
:'created_at' => :'DateTime',
|
85
100
|
:'from' => :'String',
|
86
101
|
:'headers' => :'Hash<String, String>',
|
87
|
-
:'html' => :'BOOLEAN',
|
88
102
|
:'id' => :'String',
|
89
103
|
:'inbox_id' => :'String',
|
90
|
-
:'
|
104
|
+
:'is_html' => :'Boolean',
|
105
|
+
:'read' => :'Boolean',
|
91
106
|
:'subject' => :'String',
|
92
107
|
:'to' => :'Array<String>',
|
93
108
|
:'updated_at' => :'DateTime',
|
@@ -95,90 +110,103 @@ module MailSlurpClient
|
|
95
110
|
}
|
96
111
|
end
|
97
112
|
|
113
|
+
# List of attributes with nullable: true
|
114
|
+
def self.openapi_nullable
|
115
|
+
Set.new([
|
116
|
+
])
|
117
|
+
end
|
118
|
+
|
98
119
|
# Initializes the object
|
99
120
|
# @param [Hash] attributes Model attributes in the form of hash
|
100
121
|
def initialize(attributes = {})
|
101
|
-
|
122
|
+
if (!attributes.is_a?(Hash))
|
123
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::Email` initialize method"
|
124
|
+
end
|
102
125
|
|
103
|
-
# convert string to symbol for hash key
|
104
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
126
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
127
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
128
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
129
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::Email`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
130
|
+
end
|
131
|
+
h[k.to_sym] = v
|
132
|
+
}
|
105
133
|
|
106
|
-
if attributes.
|
134
|
+
if attributes.key?(:'analysis')
|
107
135
|
self.analysis = attributes[:'analysis']
|
108
136
|
end
|
109
137
|
|
110
|
-
if attributes.
|
138
|
+
if attributes.key?(:'attachments')
|
111
139
|
if (value = attributes[:'attachments']).is_a?(Array)
|
112
140
|
self.attachments = value
|
113
141
|
end
|
114
142
|
end
|
115
143
|
|
116
|
-
if attributes.
|
144
|
+
if attributes.key?(:'bcc')
|
117
145
|
if (value = attributes[:'bcc']).is_a?(Array)
|
118
146
|
self.bcc = value
|
119
147
|
end
|
120
148
|
end
|
121
149
|
|
122
|
-
if attributes.
|
150
|
+
if attributes.key?(:'body')
|
123
151
|
self.body = attributes[:'body']
|
124
152
|
end
|
125
153
|
|
126
|
-
if attributes.
|
154
|
+
if attributes.key?(:'cc')
|
127
155
|
if (value = attributes[:'cc']).is_a?(Array)
|
128
156
|
self.cc = value
|
129
157
|
end
|
130
158
|
end
|
131
159
|
|
132
|
-
if attributes.
|
160
|
+
if attributes.key?(:'charset')
|
133
161
|
self.charset = attributes[:'charset']
|
134
162
|
end
|
135
163
|
|
136
|
-
if attributes.
|
137
|
-
self.created_at = attributes[:'
|
164
|
+
if attributes.key?(:'created_at')
|
165
|
+
self.created_at = attributes[:'created_at']
|
138
166
|
end
|
139
167
|
|
140
|
-
if attributes.
|
168
|
+
if attributes.key?(:'from')
|
141
169
|
self.from = attributes[:'from']
|
142
170
|
end
|
143
171
|
|
144
|
-
if attributes.
|
172
|
+
if attributes.key?(:'headers')
|
145
173
|
if (value = attributes[:'headers']).is_a?(Hash)
|
146
174
|
self.headers = value
|
147
175
|
end
|
148
176
|
end
|
149
177
|
|
150
|
-
if attributes.
|
151
|
-
self.
|
178
|
+
if attributes.key?(:'id')
|
179
|
+
self.id = attributes[:'id']
|
152
180
|
end
|
153
181
|
|
154
|
-
if attributes.
|
155
|
-
self.
|
182
|
+
if attributes.key?(:'inbox_id')
|
183
|
+
self.inbox_id = attributes[:'inbox_id']
|
156
184
|
end
|
157
185
|
|
158
|
-
if attributes.
|
159
|
-
self.
|
186
|
+
if attributes.key?(:'is_html')
|
187
|
+
self.is_html = attributes[:'is_html']
|
160
188
|
end
|
161
189
|
|
162
|
-
if attributes.
|
163
|
-
self.
|
190
|
+
if attributes.key?(:'read')
|
191
|
+
self.read = attributes[:'read']
|
164
192
|
end
|
165
193
|
|
166
|
-
if attributes.
|
194
|
+
if attributes.key?(:'subject')
|
167
195
|
self.subject = attributes[:'subject']
|
168
196
|
end
|
169
197
|
|
170
|
-
if attributes.
|
198
|
+
if attributes.key?(:'to')
|
171
199
|
if (value = attributes[:'to']).is_a?(Array)
|
172
200
|
self.to = value
|
173
201
|
end
|
174
202
|
end
|
175
203
|
|
176
|
-
if attributes.
|
177
|
-
self.updated_at = attributes[:'
|
204
|
+
if attributes.key?(:'updated_at')
|
205
|
+
self.updated_at = attributes[:'updated_at']
|
178
206
|
end
|
179
207
|
|
180
|
-
if attributes.
|
181
|
-
self.user_id = attributes[:'
|
208
|
+
if attributes.key?(:'user_id')
|
209
|
+
self.user_id = attributes[:'user_id']
|
182
210
|
end
|
183
211
|
end
|
184
212
|
|
@@ -186,42 +214,12 @@ module MailSlurpClient
|
|
186
214
|
# @return Array for valid properties with the reasons
|
187
215
|
def list_invalid_properties
|
188
216
|
invalid_properties = Array.new
|
189
|
-
if @created_at.nil?
|
190
|
-
invalid_properties.push('invalid value for "created_at", created_at cannot be nil.')
|
191
|
-
end
|
192
|
-
|
193
|
-
if @id.nil?
|
194
|
-
invalid_properties.push('invalid value for "id", id cannot be nil.')
|
195
|
-
end
|
196
|
-
|
197
|
-
if @inbox_id.nil?
|
198
|
-
invalid_properties.push('invalid value for "inbox_id", inbox_id cannot be nil.')
|
199
|
-
end
|
200
|
-
|
201
|
-
if @to.nil?
|
202
|
-
invalid_properties.push('invalid value for "to", to cannot be nil.')
|
203
|
-
end
|
204
|
-
|
205
|
-
if @updated_at.nil?
|
206
|
-
invalid_properties.push('invalid value for "updated_at", updated_at cannot be nil.')
|
207
|
-
end
|
208
|
-
|
209
|
-
if @user_id.nil?
|
210
|
-
invalid_properties.push('invalid value for "user_id", user_id cannot be nil.')
|
211
|
-
end
|
212
|
-
|
213
217
|
invalid_properties
|
214
218
|
end
|
215
219
|
|
216
220
|
# Check to see if the all the properties in the model are valid
|
217
221
|
# @return true if the model is valid
|
218
222
|
def valid?
|
219
|
-
return false if @created_at.nil?
|
220
|
-
return false if @id.nil?
|
221
|
-
return false if @inbox_id.nil?
|
222
|
-
return false if @to.nil?
|
223
|
-
return false if @updated_at.nil?
|
224
|
-
return false if @user_id.nil?
|
225
223
|
true
|
226
224
|
end
|
227
225
|
|
@@ -239,10 +237,10 @@ module MailSlurpClient
|
|
239
237
|
created_at == o.created_at &&
|
240
238
|
from == o.from &&
|
241
239
|
headers == o.headers &&
|
242
|
-
html == o.html &&
|
243
240
|
id == o.id &&
|
244
241
|
inbox_id == o.inbox_id &&
|
245
|
-
|
242
|
+
is_html == o.is_html &&
|
243
|
+
read == o.read &&
|
246
244
|
subject == o.subject &&
|
247
245
|
to == o.to &&
|
248
246
|
updated_at == o.updated_at &&
|
@@ -256,9 +254,16 @@ module MailSlurpClient
|
|
256
254
|
end
|
257
255
|
|
258
256
|
# Calculates hash code according to all attributes.
|
259
|
-
# @return [
|
257
|
+
# @return [Integer] Hash code
|
260
258
|
def hash
|
261
|
-
[analysis, attachments, bcc, body, cc, charset, created_at, from, headers,
|
259
|
+
[analysis, attachments, bcc, body, cc, charset, created_at, from, headers, id, inbox_id, is_html, read, subject, to, updated_at, user_id].hash
|
260
|
+
end
|
261
|
+
|
262
|
+
# Builds the object from hash
|
263
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
264
|
+
# @return [Object] Returns the model itself
|
265
|
+
def self.build_from_hash(attributes)
|
266
|
+
new.build_from_hash(attributes)
|
262
267
|
end
|
263
268
|
|
264
269
|
# Builds the object from hash
|
@@ -268,7 +273,7 @@ module MailSlurpClient
|
|
268
273
|
return nil unless attributes.is_a?(Hash)
|
269
274
|
self.class.openapi_types.each_pair do |key, type|
|
270
275
|
if type =~ /\AArray<(.*)>/i
|
271
|
-
# check to ensure the input is an array given that the
|
276
|
+
# check to ensure the input is an array given that the attribute
|
272
277
|
# is documented as an array but the input is not
|
273
278
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
274
279
|
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
@@ -297,7 +302,7 @@ module MailSlurpClient
|
|
297
302
|
value.to_i
|
298
303
|
when :Float
|
299
304
|
value.to_f
|
300
|
-
when :
|
305
|
+
when :Boolean
|
301
306
|
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
302
307
|
true
|
303
308
|
else
|
@@ -318,8 +323,7 @@ module MailSlurpClient
|
|
318
323
|
end
|
319
324
|
end
|
320
325
|
else # model
|
321
|
-
|
322
|
-
temp_model.build_from_hash(value)
|
326
|
+
MailSlurpClient.const_get(type).build_from_hash(value)
|
323
327
|
end
|
324
328
|
end
|
325
329
|
|
@@ -341,7 +345,11 @@ module MailSlurpClient
|
|
341
345
|
hash = {}
|
342
346
|
self.class.attribute_map.each_pair do |attr, param|
|
343
347
|
value = self.send(attr)
|
344
|
-
|
348
|
+
if value.nil?
|
349
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
350
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
351
|
+
end
|
352
|
+
|
345
353
|
hash[param] = _to_hash(value)
|
346
354
|
end
|
347
355
|
hash
|
@@ -1,12 +1,12 @@
|
|
1
1
|
=begin
|
2
2
|
#MailSlurp API
|
3
3
|
|
4
|
-
#
|
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: 67c9a1eda264be4cfe0bb2c76151f0aadf0862bc
|
5
7
|
|
6
|
-
OpenAPI spec version: 0.0.1-alpha
|
7
|
-
Contact: contact@mailslurp.dev
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version:
|
9
|
+
OpenAPI Generator version: 4.2.3
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -47,32 +47,45 @@ module MailSlurpClient
|
|
47
47
|
}
|
48
48
|
end
|
49
49
|
|
50
|
+
# List of attributes with nullable: true
|
51
|
+
def self.openapi_nullable
|
52
|
+
Set.new([
|
53
|
+
])
|
54
|
+
end
|
55
|
+
|
50
56
|
# Initializes the object
|
51
57
|
# @param [Hash] attributes Model attributes in the form of hash
|
52
58
|
def initialize(attributes = {})
|
53
|
-
|
59
|
+
if (!attributes.is_a?(Hash))
|
60
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MailSlurpClient::EmailAnalysis` initialize method"
|
61
|
+
end
|
54
62
|
|
55
|
-
# convert string to symbol for hash key
|
56
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
63
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
64
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
65
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
66
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MailSlurpClient::EmailAnalysis`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
67
|
+
end
|
68
|
+
h[k.to_sym] = v
|
69
|
+
}
|
57
70
|
|
58
|
-
if attributes.
|
59
|
-
self.dkim_verdict = attributes[:'
|
71
|
+
if attributes.key?(:'dkim_verdict')
|
72
|
+
self.dkim_verdict = attributes[:'dkim_verdict']
|
60
73
|
end
|
61
74
|
|
62
|
-
if attributes.
|
63
|
-
self.dmarc_verdict = attributes[:'
|
75
|
+
if attributes.key?(:'dmarc_verdict')
|
76
|
+
self.dmarc_verdict = attributes[:'dmarc_verdict']
|
64
77
|
end
|
65
78
|
|
66
|
-
if attributes.
|
67
|
-
self.spam_verdict = attributes[:'
|
79
|
+
if attributes.key?(:'spam_verdict')
|
80
|
+
self.spam_verdict = attributes[:'spam_verdict']
|
68
81
|
end
|
69
82
|
|
70
|
-
if attributes.
|
71
|
-
self.spf_verdict = attributes[:'
|
83
|
+
if attributes.key?(:'spf_verdict')
|
84
|
+
self.spf_verdict = attributes[:'spf_verdict']
|
72
85
|
end
|
73
86
|
|
74
|
-
if attributes.
|
75
|
-
self.virus_verdict = attributes[:'
|
87
|
+
if attributes.key?(:'virus_verdict')
|
88
|
+
self.virus_verdict = attributes[:'virus_verdict']
|
76
89
|
end
|
77
90
|
end
|
78
91
|
|
@@ -80,37 +93,12 @@ module MailSlurpClient
|
|
80
93
|
# @return Array for valid properties with the reasons
|
81
94
|
def list_invalid_properties
|
82
95
|
invalid_properties = Array.new
|
83
|
-
if @dkim_verdict.nil?
|
84
|
-
invalid_properties.push('invalid value for "dkim_verdict", dkim_verdict cannot be nil.')
|
85
|
-
end
|
86
|
-
|
87
|
-
if @dmarc_verdict.nil?
|
88
|
-
invalid_properties.push('invalid value for "dmarc_verdict", dmarc_verdict cannot be nil.')
|
89
|
-
end
|
90
|
-
|
91
|
-
if @spam_verdict.nil?
|
92
|
-
invalid_properties.push('invalid value for "spam_verdict", spam_verdict cannot be nil.')
|
93
|
-
end
|
94
|
-
|
95
|
-
if @spf_verdict.nil?
|
96
|
-
invalid_properties.push('invalid value for "spf_verdict", spf_verdict cannot be nil.')
|
97
|
-
end
|
98
|
-
|
99
|
-
if @virus_verdict.nil?
|
100
|
-
invalid_properties.push('invalid value for "virus_verdict", virus_verdict cannot be nil.')
|
101
|
-
end
|
102
|
-
|
103
96
|
invalid_properties
|
104
97
|
end
|
105
98
|
|
106
99
|
# Check to see if the all the properties in the model are valid
|
107
100
|
# @return true if the model is valid
|
108
101
|
def valid?
|
109
|
-
return false if @dkim_verdict.nil?
|
110
|
-
return false if @dmarc_verdict.nil?
|
111
|
-
return false if @spam_verdict.nil?
|
112
|
-
return false if @spf_verdict.nil?
|
113
|
-
return false if @virus_verdict.nil?
|
114
102
|
true
|
115
103
|
end
|
116
104
|
|
@@ -133,11 +121,18 @@ module MailSlurpClient
|
|
133
121
|
end
|
134
122
|
|
135
123
|
# Calculates hash code according to all attributes.
|
136
|
-
# @return [
|
124
|
+
# @return [Integer] Hash code
|
137
125
|
def hash
|
138
126
|
[dkim_verdict, dmarc_verdict, spam_verdict, spf_verdict, virus_verdict].hash
|
139
127
|
end
|
140
128
|
|
129
|
+
# Builds the object from hash
|
130
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
131
|
+
# @return [Object] Returns the model itself
|
132
|
+
def self.build_from_hash(attributes)
|
133
|
+
new.build_from_hash(attributes)
|
134
|
+
end
|
135
|
+
|
141
136
|
# Builds the object from hash
|
142
137
|
# @param [Hash] attributes Model attributes in the form of hash
|
143
138
|
# @return [Object] Returns the model itself
|
@@ -145,7 +140,7 @@ module MailSlurpClient
|
|
145
140
|
return nil unless attributes.is_a?(Hash)
|
146
141
|
self.class.openapi_types.each_pair do |key, type|
|
147
142
|
if type =~ /\AArray<(.*)>/i
|
148
|
-
# check to ensure the input is an array given that the
|
143
|
+
# check to ensure the input is an array given that the attribute
|
149
144
|
# is documented as an array but the input is not
|
150
145
|
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
151
146
|
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
@@ -174,7 +169,7 @@ module MailSlurpClient
|
|
174
169
|
value.to_i
|
175
170
|
when :Float
|
176
171
|
value.to_f
|
177
|
-
when :
|
172
|
+
when :Boolean
|
178
173
|
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
179
174
|
true
|
180
175
|
else
|
@@ -195,8 +190,7 @@ module MailSlurpClient
|
|
195
190
|
end
|
196
191
|
end
|
197
192
|
else # model
|
198
|
-
|
199
|
-
temp_model.build_from_hash(value)
|
193
|
+
MailSlurpClient.const_get(type).build_from_hash(value)
|
200
194
|
end
|
201
195
|
end
|
202
196
|
|
@@ -218,7 +212,11 @@ module MailSlurpClient
|
|
218
212
|
hash = {}
|
219
213
|
self.class.attribute_map.each_pair do |attr, param|
|
220
214
|
value = self.send(attr)
|
221
|
-
|
215
|
+
if value.nil?
|
216
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
217
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
218
|
+
end
|
219
|
+
|
222
220
|
hash[param] = _to_hash(value)
|
223
221
|
end
|
224
222
|
hash
|