mailsafepro 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/LICENSE +21 -0
- data/README.md +256 -0
- data/Rakefile +10 -0
- data/docs/APIKeyCreateRequest.md +20 -0
- data/docs/APIKeyListResponse.md +22 -0
- data/docs/APIKeyMeta.md +34 -0
- data/docs/APIKeysApi.md +1241 -0
- data/docs/AuthenticationApi.md +1171 -0
- data/docs/BatchEmailResponse.md +28 -0
- data/docs/BatchValidationRequest.md +26 -0
- data/docs/BillingApi.md +689 -0
- data/docs/BodyChangePlanBillingBillingChangePlanPost.md +18 -0
- data/docs/CheckoutRequest.md +18 -0
- data/docs/CheckoutSessionResponse.md +18 -0
- data/docs/DNSInfo.md +26 -0
- data/docs/DNSRecordDKIM.md +26 -0
- data/docs/DNSRecordDMARC.md +24 -0
- data/docs/DNSRecordSPF.md +24 -0
- data/docs/DefaultApi.md +141 -0
- data/docs/DeveloperToolsApi.md +154 -0
- data/docs/EmailResponse.md +46 -0
- data/docs/EmailValidationApi.md +479 -0
- data/docs/EmailValidationRequest.md +26 -0
- data/docs/HTTPValidationError.md +18 -0
- data/docs/HealthApi.md +937 -0
- data/docs/JobCreateRequest.md +32 -0
- data/docs/JobCreateResponse.md +22 -0
- data/docs/JobResultEntry.md +34 -0
- data/docs/JobResultsPage.md +26 -0
- data/docs/JobStatusResponse.md +28 -0
- data/docs/JobsApi.md +433 -0
- data/docs/KeyRotationRequest.md +22 -0
- data/docs/LogsApi.md +154 -0
- data/docs/PlanEnum.md +15 -0
- data/docs/PriorityEnum.md +15 -0
- data/docs/RegisterEndpoint.md +18 -0
- data/docs/ResponseTestNotificationBillingBillingTestNotificationPostValue.md +15 -0
- data/docs/RiskLevelEnum.md +15 -0
- data/docs/RotateSecret.md +18 -0
- data/docs/SMTPInfo.md +26 -0
- data/docs/SubscriptionResponse.md +24 -0
- data/docs/UserLogin.md +20 -0
- data/docs/UserRegister.md +22 -0
- data/docs/ValidationApi.md +479 -0
- data/docs/ValidationError.md +22 -0
- data/docs/ValidationErrorLocInner.md +15 -0
- data/docs/WebhookCreate.md +24 -0
- data/docs/WebhookResponse.md +22 -0
- data/docs/WebhookUpdate.md +24 -0
- data/docs/WebhooksApi.md +776 -0
- data/docs/WebhooksManagementApi.md +500 -0
- data/git_push.sh +57 -0
- data/lib/mailsafepro/api/api_keys_api.rb +1148 -0
- data/lib/mailsafepro/api/authentication_api.rb +1114 -0
- data/lib/mailsafepro/api/billing_api.rb +670 -0
- data/lib/mailsafepro/api/default_api.rb +149 -0
- data/lib/mailsafepro/api/developer_tools_api.rb +155 -0
- data/lib/mailsafepro/api/email_validation_api.rb +486 -0
- data/lib/mailsafepro/api/health_api.rb +877 -0
- data/lib/mailsafepro/api/jobs_api.rb +452 -0
- data/lib/mailsafepro/api/logs_api.rb +155 -0
- data/lib/mailsafepro/api/validation_api.rb +486 -0
- data/lib/mailsafepro/api/webhooks_api.rb +768 -0
- data/lib/mailsafepro/api/webhooks_management_api.rb +480 -0
- data/lib/mailsafepro/api_client.rb +397 -0
- data/lib/mailsafepro/api_error.rb +58 -0
- data/lib/mailsafepro/api_model_base.rb +88 -0
- data/lib/mailsafepro/configuration.rb +316 -0
- data/lib/mailsafepro/models/api_key_create_request.rb +185 -0
- data/lib/mailsafepro/models/api_key_list_response.rb +240 -0
- data/lib/mailsafepro/models/api_key_meta.rb +338 -0
- data/lib/mailsafepro/models/batch_email_response.rb +348 -0
- data/lib/mailsafepro/models/batch_validation_request.rb +290 -0
- data/lib/mailsafepro/models/body_change_plan_billing_billing_change_plan_post.rb +164 -0
- data/lib/mailsafepro/models/checkout_request.rb +166 -0
- data/lib/mailsafepro/models/checkout_session_response.rb +165 -0
- data/lib/mailsafepro/models/dns_info.rb +193 -0
- data/lib/mailsafepro/models/dns_record_dkim.rb +189 -0
- data/lib/mailsafepro/models/dns_record_dmarc.rb +179 -0
- data/lib/mailsafepro/models/dns_record_spf.rb +179 -0
- data/lib/mailsafepro/models/email_response.rb +454 -0
- data/lib/mailsafepro/models/email_validation_request.rb +252 -0
- data/lib/mailsafepro/models/http_validation_error.rb +149 -0
- data/lib/mailsafepro/models/job_create_request.rb +251 -0
- data/lib/mailsafepro/models/job_create_response.rb +216 -0
- data/lib/mailsafepro/models/job_result_entry.rb +257 -0
- data/lib/mailsafepro/models/job_results_page.rb +270 -0
- data/lib/mailsafepro/models/job_status_response.rb +231 -0
- data/lib/mailsafepro/models/key_rotation_request.rb +269 -0
- data/lib/mailsafepro/models/plan_enum.rb +41 -0
- data/lib/mailsafepro/models/priority_enum.rb +41 -0
- data/lib/mailsafepro/models/register_endpoint.rb +173 -0
- data/lib/mailsafepro/models/response_test_notification_billing_billing_test_notification_post_value.rb +103 -0
- data/lib/mailsafepro/models/risk_level_enum.rb +42 -0
- data/lib/mailsafepro/models/rotate_secret.rb +164 -0
- data/lib/mailsafepro/models/smtp_info.rb +206 -0
- data/lib/mailsafepro/models/subscription_response.rb +196 -0
- data/lib/mailsafepro/models/user_login.rb +211 -0
- data/lib/mailsafepro/models/user_register.rb +243 -0
- data/lib/mailsafepro/models/validation_error.rb +218 -0
- data/lib/mailsafepro/models/validation_error_loc_inner.rb +103 -0
- data/lib/mailsafepro/models/webhook_create.rb +213 -0
- data/lib/mailsafepro/models/webhook_response.rb +185 -0
- data/lib/mailsafepro/models/webhook_update.rb +204 -0
- data/lib/mailsafepro/version.rb +15 -0
- data/lib/mailsafepro.rb +88 -0
- data/mailsafepro.gemspec +39 -0
- data/spec/api/api_keys_api_spec.rb +245 -0
- data/spec/api/authentication_api_spec.rb +239 -0
- data/spec/api/billing_api_spec.rb +155 -0
- data/spec/api/default_api_spec.rb +60 -0
- data/spec/api/developer_tools_api_spec.rb +62 -0
- data/spec/api/email_validation_api_spec.rb +125 -0
- data/spec/api/health_api_spec.rb +200 -0
- data/spec/api/jobs_api_spec.rb +119 -0
- data/spec/api/logs_api_spec.rb +62 -0
- data/spec/api/validation_api_spec.rb +125 -0
- data/spec/api/webhooks_api_spec.rb +172 -0
- data/spec/api/webhooks_management_api_spec.rb +120 -0
- data/spec/models/api_key_create_request_spec.rb +42 -0
- data/spec/models/api_key_list_response_spec.rb +48 -0
- data/spec/models/api_key_meta_spec.rb +84 -0
- data/spec/models/batch_email_response_spec.rb +66 -0
- data/spec/models/batch_validation_request_spec.rb +60 -0
- data/spec/models/body_change_plan_billing_billing_change_plan_post_spec.rb +36 -0
- data/spec/models/checkout_request_spec.rb +36 -0
- data/spec/models/checkout_session_response_spec.rb +36 -0
- data/spec/models/dns_info_spec.rb +60 -0
- data/spec/models/dns_record_dkim_spec.rb +60 -0
- data/spec/models/dns_record_dmarc_spec.rb +54 -0
- data/spec/models/dns_record_spf_spec.rb +54 -0
- data/spec/models/email_response_spec.rb +120 -0
- data/spec/models/email_validation_request_spec.rb +60 -0
- data/spec/models/http_validation_error_spec.rb +36 -0
- data/spec/models/job_create_request_spec.rb +78 -0
- data/spec/models/job_create_response_spec.rb +48 -0
- data/spec/models/job_result_entry_spec.rb +84 -0
- data/spec/models/job_results_page_spec.rb +60 -0
- data/spec/models/job_status_response_spec.rb +66 -0
- data/spec/models/key_rotation_request_spec.rb +48 -0
- data/spec/models/plan_enum_spec.rb +30 -0
- data/spec/models/priority_enum_spec.rb +30 -0
- data/spec/models/register_endpoint_spec.rb +36 -0
- data/spec/models/response_test_notification_billing_billing_test_notification_post_value_spec.rb +21 -0
- data/spec/models/risk_level_enum_spec.rb +30 -0
- data/spec/models/rotate_secret_spec.rb +36 -0
- data/spec/models/smtp_info_spec.rb +60 -0
- data/spec/models/subscription_response_spec.rb +54 -0
- data/spec/models/user_login_spec.rb +42 -0
- data/spec/models/user_register_spec.rb +48 -0
- data/spec/models/validation_error_loc_inner_spec.rb +21 -0
- data/spec/models/validation_error_spec.rb +48 -0
- data/spec/models/webhook_create_spec.rb +54 -0
- data/spec/models/webhook_response_spec.rb +48 -0
- data/spec/models/webhook_update_spec.rb +54 -0
- data/spec/spec_helper.rb +111 -0
- metadata +291 -0
|
@@ -0,0 +1,454 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Email Validation API — Enterprise-grade Email Verification
|
|
3
|
+
|
|
4
|
+
#API robusta y segura para validación y verificación de correos electrónicos. Soporta verificación individual y en lote, detección de brechas, y autenticación JWT. Cumple con GDPR y dispone de planes de pago flexibles. **🔗 Enlaces importantes:** - [Estado del sistema](https://mailsafepro.betteruptime.com) - [Documentación completa](https://email-validation-api-jlra.onrender.com/redoc) **📧 Contacto:** mailsafepro1@gmail.com
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 2.5.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.18.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module MailSafePro
|
|
17
|
+
# Comprehensive email validation response
|
|
18
|
+
class EmailResponse < ApiModelBase
|
|
19
|
+
# Validated email address
|
|
20
|
+
attr_accessor :email
|
|
21
|
+
|
|
22
|
+
# Overall validation result
|
|
23
|
+
attr_accessor :valid
|
|
24
|
+
|
|
25
|
+
# Validation details summary
|
|
26
|
+
attr_accessor :detail
|
|
27
|
+
|
|
28
|
+
attr_accessor :processing_time
|
|
29
|
+
|
|
30
|
+
attr_accessor :provider
|
|
31
|
+
|
|
32
|
+
attr_accessor :reputation
|
|
33
|
+
|
|
34
|
+
attr_accessor :fingerprint
|
|
35
|
+
|
|
36
|
+
attr_accessor :quality_score
|
|
37
|
+
|
|
38
|
+
attr_accessor :risk_level
|
|
39
|
+
|
|
40
|
+
# Improvement suggestions
|
|
41
|
+
attr_accessor :suggestions
|
|
42
|
+
|
|
43
|
+
attr_accessor :smtp
|
|
44
|
+
|
|
45
|
+
attr_accessor :dns
|
|
46
|
+
|
|
47
|
+
attr_accessor :risk_score
|
|
48
|
+
|
|
49
|
+
attr_accessor :validation_tier
|
|
50
|
+
|
|
51
|
+
attr_accessor :suggested_action
|
|
52
|
+
|
|
53
|
+
class EnumAttributeValidator
|
|
54
|
+
attr_reader :datatype
|
|
55
|
+
attr_reader :allowable_values
|
|
56
|
+
|
|
57
|
+
def initialize(datatype, allowable_values)
|
|
58
|
+
@allowable_values = allowable_values.map do |value|
|
|
59
|
+
case datatype.to_s
|
|
60
|
+
when /Integer/i
|
|
61
|
+
value.to_i
|
|
62
|
+
when /Float/i
|
|
63
|
+
value.to_f
|
|
64
|
+
else
|
|
65
|
+
value
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
def valid?(value)
|
|
71
|
+
!value || allowable_values.include?(value)
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
76
|
+
def self.attribute_map
|
|
77
|
+
{
|
|
78
|
+
:'email' => :'email',
|
|
79
|
+
:'valid' => :'valid',
|
|
80
|
+
:'detail' => :'detail',
|
|
81
|
+
:'processing_time' => :'processing_time',
|
|
82
|
+
:'provider' => :'provider',
|
|
83
|
+
:'reputation' => :'reputation',
|
|
84
|
+
:'fingerprint' => :'fingerprint',
|
|
85
|
+
:'quality_score' => :'quality_score',
|
|
86
|
+
:'risk_level' => :'risk_level',
|
|
87
|
+
:'suggestions' => :'suggestions',
|
|
88
|
+
:'smtp' => :'smtp',
|
|
89
|
+
:'dns' => :'dns',
|
|
90
|
+
:'risk_score' => :'risk_score',
|
|
91
|
+
:'validation_tier' => :'validation_tier',
|
|
92
|
+
:'suggested_action' => :'suggested_action'
|
|
93
|
+
}
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
# Returns attribute mapping this model knows about
|
|
97
|
+
def self.acceptable_attribute_map
|
|
98
|
+
attribute_map
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# Returns all the JSON keys this model knows about
|
|
102
|
+
def self.acceptable_attributes
|
|
103
|
+
acceptable_attribute_map.values
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Attribute type mapping.
|
|
107
|
+
def self.openapi_types
|
|
108
|
+
{
|
|
109
|
+
:'email' => :'String',
|
|
110
|
+
:'valid' => :'Boolean',
|
|
111
|
+
:'detail' => :'String',
|
|
112
|
+
:'processing_time' => :'Float',
|
|
113
|
+
:'provider' => :'String',
|
|
114
|
+
:'reputation' => :'Float',
|
|
115
|
+
:'fingerprint' => :'String',
|
|
116
|
+
:'quality_score' => :'Float',
|
|
117
|
+
:'risk_level' => :'RiskLevelEnum',
|
|
118
|
+
:'suggestions' => :'Array<String>',
|
|
119
|
+
:'smtp' => :'SMTPInfo',
|
|
120
|
+
:'dns' => :'DNSInfo',
|
|
121
|
+
:'risk_score' => :'Float',
|
|
122
|
+
:'validation_tier' => :'String',
|
|
123
|
+
:'suggested_action' => :'String'
|
|
124
|
+
}
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# List of attributes with nullable: true
|
|
128
|
+
def self.openapi_nullable
|
|
129
|
+
Set.new([
|
|
130
|
+
:'processing_time',
|
|
131
|
+
:'provider',
|
|
132
|
+
:'reputation',
|
|
133
|
+
:'fingerprint',
|
|
134
|
+
:'quality_score',
|
|
135
|
+
:'risk_level',
|
|
136
|
+
:'smtp',
|
|
137
|
+
:'dns',
|
|
138
|
+
:'risk_score',
|
|
139
|
+
:'validation_tier',
|
|
140
|
+
:'suggested_action'
|
|
141
|
+
])
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
# Initializes the object
|
|
145
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
146
|
+
def initialize(attributes = {})
|
|
147
|
+
if (!attributes.is_a?(Hash))
|
|
148
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MailSafePro::EmailResponse` initialize method"
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
152
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
153
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
154
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
155
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MailSafePro::EmailResponse`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
156
|
+
end
|
|
157
|
+
h[k.to_sym] = v
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
if attributes.key?(:'email')
|
|
161
|
+
self.email = attributes[:'email']
|
|
162
|
+
else
|
|
163
|
+
self.email = nil
|
|
164
|
+
end
|
|
165
|
+
|
|
166
|
+
if attributes.key?(:'valid')
|
|
167
|
+
self.valid = attributes[:'valid']
|
|
168
|
+
else
|
|
169
|
+
self.valid = nil
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
if attributes.key?(:'detail')
|
|
173
|
+
self.detail = attributes[:'detail']
|
|
174
|
+
else
|
|
175
|
+
self.detail = ''
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
if attributes.key?(:'processing_time')
|
|
179
|
+
self.processing_time = attributes[:'processing_time']
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
if attributes.key?(:'provider')
|
|
183
|
+
self.provider = attributes[:'provider']
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
if attributes.key?(:'reputation')
|
|
187
|
+
self.reputation = attributes[:'reputation']
|
|
188
|
+
end
|
|
189
|
+
|
|
190
|
+
if attributes.key?(:'fingerprint')
|
|
191
|
+
self.fingerprint = attributes[:'fingerprint']
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
if attributes.key?(:'quality_score')
|
|
195
|
+
self.quality_score = attributes[:'quality_score']
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
if attributes.key?(:'risk_level')
|
|
199
|
+
self.risk_level = attributes[:'risk_level']
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
if attributes.key?(:'suggestions')
|
|
203
|
+
if (value = attributes[:'suggestions']).is_a?(Array)
|
|
204
|
+
self.suggestions = value
|
|
205
|
+
end
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
if attributes.key?(:'smtp')
|
|
209
|
+
self.smtp = attributes[:'smtp']
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
if attributes.key?(:'dns')
|
|
213
|
+
self.dns = attributes[:'dns']
|
|
214
|
+
end
|
|
215
|
+
|
|
216
|
+
if attributes.key?(:'risk_score')
|
|
217
|
+
self.risk_score = attributes[:'risk_score']
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
if attributes.key?(:'validation_tier')
|
|
221
|
+
self.validation_tier = attributes[:'validation_tier']
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
if attributes.key?(:'suggested_action')
|
|
225
|
+
self.suggested_action = attributes[:'suggested_action']
|
|
226
|
+
end
|
|
227
|
+
end
|
|
228
|
+
|
|
229
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
230
|
+
# @return Array for valid properties with the reasons
|
|
231
|
+
def list_invalid_properties
|
|
232
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
233
|
+
invalid_properties = Array.new
|
|
234
|
+
if @email.nil?
|
|
235
|
+
invalid_properties.push('invalid value for "email", email cannot be nil.')
|
|
236
|
+
end
|
|
237
|
+
|
|
238
|
+
if @email.to_s.length > 254
|
|
239
|
+
invalid_properties.push('invalid value for "email", the character length must be smaller than or equal to 254.')
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
if @email.to_s.length < 5
|
|
243
|
+
invalid_properties.push('invalid value for "email", the character length must be greater than or equal to 5.')
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
if @valid.nil?
|
|
247
|
+
invalid_properties.push('invalid value for "valid", valid cannot be nil.')
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
if !@processing_time.nil? && @processing_time < 0.0
|
|
251
|
+
invalid_properties.push('invalid value for "processing_time", must be greater than or equal to 0.0.')
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
if !@reputation.nil? && @reputation > 1.0
|
|
255
|
+
invalid_properties.push('invalid value for "reputation", must be smaller than or equal to 1.0.')
|
|
256
|
+
end
|
|
257
|
+
|
|
258
|
+
if !@reputation.nil? && @reputation < 0.0
|
|
259
|
+
invalid_properties.push('invalid value for "reputation", must be greater than or equal to 0.0.')
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
if !@quality_score.nil? && @quality_score > 1.0
|
|
263
|
+
invalid_properties.push('invalid value for "quality_score", must be smaller than or equal to 1.0.')
|
|
264
|
+
end
|
|
265
|
+
|
|
266
|
+
if !@quality_score.nil? && @quality_score < 0.0
|
|
267
|
+
invalid_properties.push('invalid value for "quality_score", must be greater than or equal to 0.0.')
|
|
268
|
+
end
|
|
269
|
+
|
|
270
|
+
if !@risk_score.nil? && @risk_score > 1.0
|
|
271
|
+
invalid_properties.push('invalid value for "risk_score", must be smaller than or equal to 1.0.')
|
|
272
|
+
end
|
|
273
|
+
|
|
274
|
+
if !@risk_score.nil? && @risk_score < 0.0
|
|
275
|
+
invalid_properties.push('invalid value for "risk_score", must be greater than or equal to 0.0.')
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
invalid_properties
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
# Check to see if the all the properties in the model are valid
|
|
282
|
+
# @return true if the model is valid
|
|
283
|
+
def valid?
|
|
284
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
285
|
+
return false if @email.nil?
|
|
286
|
+
return false if @email.to_s.length > 254
|
|
287
|
+
return false if @email.to_s.length < 5
|
|
288
|
+
return false if @valid.nil?
|
|
289
|
+
return false if !@processing_time.nil? && @processing_time < 0.0
|
|
290
|
+
return false if !@reputation.nil? && @reputation > 1.0
|
|
291
|
+
return false if !@reputation.nil? && @reputation < 0.0
|
|
292
|
+
return false if !@quality_score.nil? && @quality_score > 1.0
|
|
293
|
+
return false if !@quality_score.nil? && @quality_score < 0.0
|
|
294
|
+
return false if !@risk_score.nil? && @risk_score > 1.0
|
|
295
|
+
return false if !@risk_score.nil? && @risk_score < 0.0
|
|
296
|
+
true
|
|
297
|
+
end
|
|
298
|
+
|
|
299
|
+
# Custom attribute writer method with validation
|
|
300
|
+
# @param [Object] email Value to be assigned
|
|
301
|
+
def email=(email)
|
|
302
|
+
if email.nil?
|
|
303
|
+
fail ArgumentError, 'email cannot be nil'
|
|
304
|
+
end
|
|
305
|
+
|
|
306
|
+
if email.to_s.length > 254
|
|
307
|
+
fail ArgumentError, 'invalid value for "email", the character length must be smaller than or equal to 254.'
|
|
308
|
+
end
|
|
309
|
+
|
|
310
|
+
if email.to_s.length < 5
|
|
311
|
+
fail ArgumentError, 'invalid value for "email", the character length must be greater than or equal to 5.'
|
|
312
|
+
end
|
|
313
|
+
|
|
314
|
+
@email = email
|
|
315
|
+
end
|
|
316
|
+
|
|
317
|
+
# Custom attribute writer method with validation
|
|
318
|
+
# @param [Object] valid Value to be assigned
|
|
319
|
+
def valid=(valid)
|
|
320
|
+
if valid.nil?
|
|
321
|
+
fail ArgumentError, 'valid cannot be nil'
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
@valid = valid
|
|
325
|
+
end
|
|
326
|
+
|
|
327
|
+
# Custom attribute writer method with validation
|
|
328
|
+
# @param [Object] processing_time Value to be assigned
|
|
329
|
+
def processing_time=(processing_time)
|
|
330
|
+
if !processing_time.nil? && processing_time < 0.0
|
|
331
|
+
fail ArgumentError, 'invalid value for "processing_time", must be greater than or equal to 0.0.'
|
|
332
|
+
end
|
|
333
|
+
|
|
334
|
+
@processing_time = processing_time
|
|
335
|
+
end
|
|
336
|
+
|
|
337
|
+
# Custom attribute writer method with validation
|
|
338
|
+
# @param [Object] reputation Value to be assigned
|
|
339
|
+
def reputation=(reputation)
|
|
340
|
+
if !reputation.nil? && reputation > 1.0
|
|
341
|
+
fail ArgumentError, 'invalid value for "reputation", must be smaller than or equal to 1.0.'
|
|
342
|
+
end
|
|
343
|
+
|
|
344
|
+
if !reputation.nil? && reputation < 0.0
|
|
345
|
+
fail ArgumentError, 'invalid value for "reputation", must be greater than or equal to 0.0.'
|
|
346
|
+
end
|
|
347
|
+
|
|
348
|
+
@reputation = reputation
|
|
349
|
+
end
|
|
350
|
+
|
|
351
|
+
# Custom attribute writer method with validation
|
|
352
|
+
# @param [Object] quality_score Value to be assigned
|
|
353
|
+
def quality_score=(quality_score)
|
|
354
|
+
if !quality_score.nil? && quality_score > 1.0
|
|
355
|
+
fail ArgumentError, 'invalid value for "quality_score", must be smaller than or equal to 1.0.'
|
|
356
|
+
end
|
|
357
|
+
|
|
358
|
+
if !quality_score.nil? && quality_score < 0.0
|
|
359
|
+
fail ArgumentError, 'invalid value for "quality_score", must be greater than or equal to 0.0.'
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
@quality_score = quality_score
|
|
363
|
+
end
|
|
364
|
+
|
|
365
|
+
# Custom attribute writer method with validation
|
|
366
|
+
# @param [Object] risk_score Value to be assigned
|
|
367
|
+
def risk_score=(risk_score)
|
|
368
|
+
if !risk_score.nil? && risk_score > 1.0
|
|
369
|
+
fail ArgumentError, 'invalid value for "risk_score", must be smaller than or equal to 1.0.'
|
|
370
|
+
end
|
|
371
|
+
|
|
372
|
+
if !risk_score.nil? && risk_score < 0.0
|
|
373
|
+
fail ArgumentError, 'invalid value for "risk_score", must be greater than or equal to 0.0.'
|
|
374
|
+
end
|
|
375
|
+
|
|
376
|
+
@risk_score = risk_score
|
|
377
|
+
end
|
|
378
|
+
|
|
379
|
+
# Checks equality by comparing each attribute.
|
|
380
|
+
# @param [Object] Object to be compared
|
|
381
|
+
def ==(o)
|
|
382
|
+
return true if self.equal?(o)
|
|
383
|
+
self.class == o.class &&
|
|
384
|
+
email == o.email &&
|
|
385
|
+
valid == o.valid &&
|
|
386
|
+
detail == o.detail &&
|
|
387
|
+
processing_time == o.processing_time &&
|
|
388
|
+
provider == o.provider &&
|
|
389
|
+
reputation == o.reputation &&
|
|
390
|
+
fingerprint == o.fingerprint &&
|
|
391
|
+
quality_score == o.quality_score &&
|
|
392
|
+
risk_level == o.risk_level &&
|
|
393
|
+
suggestions == o.suggestions &&
|
|
394
|
+
smtp == o.smtp &&
|
|
395
|
+
dns == o.dns &&
|
|
396
|
+
risk_score == o.risk_score &&
|
|
397
|
+
validation_tier == o.validation_tier &&
|
|
398
|
+
suggested_action == o.suggested_action
|
|
399
|
+
end
|
|
400
|
+
|
|
401
|
+
# @see the `==` method
|
|
402
|
+
# @param [Object] Object to be compared
|
|
403
|
+
def eql?(o)
|
|
404
|
+
self == o
|
|
405
|
+
end
|
|
406
|
+
|
|
407
|
+
# Calculates hash code according to all attributes.
|
|
408
|
+
# @return [Integer] Hash code
|
|
409
|
+
def hash
|
|
410
|
+
[email, valid, detail, processing_time, provider, reputation, fingerprint, quality_score, risk_level, suggestions, smtp, dns, risk_score, validation_tier, suggested_action].hash
|
|
411
|
+
end
|
|
412
|
+
|
|
413
|
+
# Builds the object from hash
|
|
414
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
415
|
+
# @return [Object] Returns the model itself
|
|
416
|
+
def self.build_from_hash(attributes)
|
|
417
|
+
return nil unless attributes.is_a?(Hash)
|
|
418
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
419
|
+
transformed_hash = {}
|
|
420
|
+
openapi_types.each_pair do |key, type|
|
|
421
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
422
|
+
transformed_hash["#{key}"] = nil
|
|
423
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
424
|
+
# check to ensure the input is an array given that the attribute
|
|
425
|
+
# is documented as an array but the input is not
|
|
426
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
427
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
428
|
+
end
|
|
429
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
430
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
431
|
+
end
|
|
432
|
+
end
|
|
433
|
+
new(transformed_hash)
|
|
434
|
+
end
|
|
435
|
+
|
|
436
|
+
# Returns the object in the form of hash
|
|
437
|
+
# @return [Hash] Returns the object in the form of hash
|
|
438
|
+
def to_hash
|
|
439
|
+
hash = {}
|
|
440
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
441
|
+
value = self.send(attr)
|
|
442
|
+
if value.nil?
|
|
443
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
444
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
445
|
+
end
|
|
446
|
+
|
|
447
|
+
hash[param] = _to_hash(value)
|
|
448
|
+
end
|
|
449
|
+
hash
|
|
450
|
+
end
|
|
451
|
+
|
|
452
|
+
end
|
|
453
|
+
|
|
454
|
+
end
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Email Validation API — Enterprise-grade Email Verification
|
|
3
|
+
|
|
4
|
+
#API robusta y segura para validación y verificación de correos electrónicos. Soporta verificación individual y en lote, detección de brechas, y autenticación JWT. Cumple con GDPR y dispone de planes de pago flexibles. **🔗 Enlaces importantes:** - [Estado del sistema](https://mailsafepro.betteruptime.com) - [Documentación completa](https://email-validation-api-jlra.onrender.com/redoc) **📧 Contacto:** mailsafepro1@gmail.com
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 2.5.0
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.18.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'date'
|
|
14
|
+
require 'time'
|
|
15
|
+
|
|
16
|
+
module MailSafePro
|
|
17
|
+
# Request model for single email validation
|
|
18
|
+
class EmailValidationRequest < ApiModelBase
|
|
19
|
+
# Email address to validate (RFC 5321 compliant)
|
|
20
|
+
attr_accessor :email
|
|
21
|
+
|
|
22
|
+
# Enable SMTP mailbox verification
|
|
23
|
+
attr_accessor :check_smtp
|
|
24
|
+
|
|
25
|
+
# Include raw DNS records
|
|
26
|
+
attr_accessor :include_raw_dns
|
|
27
|
+
|
|
28
|
+
# Enable testing mode (allows special TLDs like .test, .example, etc.)
|
|
29
|
+
attr_accessor :testing_mode
|
|
30
|
+
|
|
31
|
+
# Validation priority level
|
|
32
|
+
attr_accessor :priority
|
|
33
|
+
|
|
34
|
+
class EnumAttributeValidator
|
|
35
|
+
attr_reader :datatype
|
|
36
|
+
attr_reader :allowable_values
|
|
37
|
+
|
|
38
|
+
def initialize(datatype, allowable_values)
|
|
39
|
+
@allowable_values = allowable_values.map do |value|
|
|
40
|
+
case datatype.to_s
|
|
41
|
+
when /Integer/i
|
|
42
|
+
value.to_i
|
|
43
|
+
when /Float/i
|
|
44
|
+
value.to_f
|
|
45
|
+
else
|
|
46
|
+
value
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def valid?(value)
|
|
52
|
+
!value || allowable_values.include?(value)
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
57
|
+
def self.attribute_map
|
|
58
|
+
{
|
|
59
|
+
:'email' => :'email',
|
|
60
|
+
:'check_smtp' => :'check_smtp',
|
|
61
|
+
:'include_raw_dns' => :'include_raw_dns',
|
|
62
|
+
:'testing_mode' => :'testing_mode',
|
|
63
|
+
:'priority' => :'priority'
|
|
64
|
+
}
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# Returns attribute mapping this model knows about
|
|
68
|
+
def self.acceptable_attribute_map
|
|
69
|
+
attribute_map
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
# Returns all the JSON keys this model knows about
|
|
73
|
+
def self.acceptable_attributes
|
|
74
|
+
acceptable_attribute_map.values
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# Attribute type mapping.
|
|
78
|
+
def self.openapi_types
|
|
79
|
+
{
|
|
80
|
+
:'email' => :'String',
|
|
81
|
+
:'check_smtp' => :'Boolean',
|
|
82
|
+
:'include_raw_dns' => :'Boolean',
|
|
83
|
+
:'testing_mode' => :'Boolean',
|
|
84
|
+
:'priority' => :'PriorityEnum'
|
|
85
|
+
}
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# List of attributes with nullable: true
|
|
89
|
+
def self.openapi_nullable
|
|
90
|
+
Set.new([
|
|
91
|
+
])
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
# Initializes the object
|
|
95
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
96
|
+
def initialize(attributes = {})
|
|
97
|
+
if (!attributes.is_a?(Hash))
|
|
98
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `MailSafePro::EmailValidationRequest` initialize method"
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
102
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
103
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
104
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
105
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `MailSafePro::EmailValidationRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
106
|
+
end
|
|
107
|
+
h[k.to_sym] = v
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
if attributes.key?(:'email')
|
|
111
|
+
self.email = attributes[:'email']
|
|
112
|
+
else
|
|
113
|
+
self.email = nil
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
if attributes.key?(:'check_smtp')
|
|
117
|
+
self.check_smtp = attributes[:'check_smtp']
|
|
118
|
+
else
|
|
119
|
+
self.check_smtp = false
|
|
120
|
+
end
|
|
121
|
+
|
|
122
|
+
if attributes.key?(:'include_raw_dns')
|
|
123
|
+
self.include_raw_dns = attributes[:'include_raw_dns']
|
|
124
|
+
else
|
|
125
|
+
self.include_raw_dns = false
|
|
126
|
+
end
|
|
127
|
+
|
|
128
|
+
if attributes.key?(:'testing_mode')
|
|
129
|
+
self.testing_mode = attributes[:'testing_mode']
|
|
130
|
+
else
|
|
131
|
+
self.testing_mode = false
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
if attributes.key?(:'priority')
|
|
135
|
+
self.priority = attributes[:'priority']
|
|
136
|
+
end
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
140
|
+
# @return Array for valid properties with the reasons
|
|
141
|
+
def list_invalid_properties
|
|
142
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
143
|
+
invalid_properties = Array.new
|
|
144
|
+
if @email.nil?
|
|
145
|
+
invalid_properties.push('invalid value for "email", email cannot be nil.')
|
|
146
|
+
end
|
|
147
|
+
|
|
148
|
+
if @email.to_s.length > 320
|
|
149
|
+
invalid_properties.push('invalid value for "email", the character length must be smaller than or equal to 320.')
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
if @email.to_s.length < 3
|
|
153
|
+
invalid_properties.push('invalid value for "email", the character length must be greater than or equal to 3.')
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
invalid_properties
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# Check to see if the all the properties in the model are valid
|
|
160
|
+
# @return true if the model is valid
|
|
161
|
+
def valid?
|
|
162
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
163
|
+
return false if @email.nil?
|
|
164
|
+
return false if @email.to_s.length > 320
|
|
165
|
+
return false if @email.to_s.length < 3
|
|
166
|
+
true
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
# Custom attribute writer method with validation
|
|
170
|
+
# @param [Object] email Value to be assigned
|
|
171
|
+
def email=(email)
|
|
172
|
+
if email.nil?
|
|
173
|
+
fail ArgumentError, 'email cannot be nil'
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
if email.to_s.length > 320
|
|
177
|
+
fail ArgumentError, 'invalid value for "email", the character length must be smaller than or equal to 320.'
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
if email.to_s.length < 3
|
|
181
|
+
fail ArgumentError, 'invalid value for "email", the character length must be greater than or equal to 3.'
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
@email = email
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# Checks equality by comparing each attribute.
|
|
188
|
+
# @param [Object] Object to be compared
|
|
189
|
+
def ==(o)
|
|
190
|
+
return true if self.equal?(o)
|
|
191
|
+
self.class == o.class &&
|
|
192
|
+
email == o.email &&
|
|
193
|
+
check_smtp == o.check_smtp &&
|
|
194
|
+
include_raw_dns == o.include_raw_dns &&
|
|
195
|
+
testing_mode == o.testing_mode &&
|
|
196
|
+
priority == o.priority
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
# @see the `==` method
|
|
200
|
+
# @param [Object] Object to be compared
|
|
201
|
+
def eql?(o)
|
|
202
|
+
self == o
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
# Calculates hash code according to all attributes.
|
|
206
|
+
# @return [Integer] Hash code
|
|
207
|
+
def hash
|
|
208
|
+
[email, check_smtp, include_raw_dns, testing_mode, priority].hash
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
# Builds the object from hash
|
|
212
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
213
|
+
# @return [Object] Returns the model itself
|
|
214
|
+
def self.build_from_hash(attributes)
|
|
215
|
+
return nil unless attributes.is_a?(Hash)
|
|
216
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
217
|
+
transformed_hash = {}
|
|
218
|
+
openapi_types.each_pair do |key, type|
|
|
219
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
220
|
+
transformed_hash["#{key}"] = nil
|
|
221
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
222
|
+
# check to ensure the input is an array given that the attribute
|
|
223
|
+
# is documented as an array but the input is not
|
|
224
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
225
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
226
|
+
end
|
|
227
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
228
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
229
|
+
end
|
|
230
|
+
end
|
|
231
|
+
new(transformed_hash)
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
# Returns the object in the form of hash
|
|
235
|
+
# @return [Hash] Returns the object in the form of hash
|
|
236
|
+
def to_hash
|
|
237
|
+
hash = {}
|
|
238
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
239
|
+
value = self.send(attr)
|
|
240
|
+
if value.nil?
|
|
241
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
242
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
hash[param] = _to_hash(value)
|
|
246
|
+
end
|
|
247
|
+
hash
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
end
|
|
251
|
+
|
|
252
|
+
end
|