verifalia 1.2.0 → 2.1.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 +5 -5
- data/Gemfile +5 -5
- data/LICENSE +3 -4
- data/README.md +415 -82
- data/Rakefile +4 -0
- data/lib/verifalia/client.rb +89 -0
- data/lib/verifalia/credits/balance.rb +59 -0
- data/lib/verifalia/credits/client.rb +54 -0
- data/lib/verifalia/email_validation/client.rb +237 -0
- data/lib/verifalia/email_validation/completion_callback.rb +44 -0
- data/lib/verifalia/email_validation/entry.rb +124 -0
- data/lib/verifalia/email_validation/entry_classification.rb +49 -0
- data/lib/verifalia/email_validation/entry_status.rb +181 -0
- data/lib/verifalia/email_validation/exported_entries_format.rb +46 -0
- data/lib/verifalia/email_validation/job.rb +107 -0
- data/lib/verifalia/email_validation/job_status.rb +49 -0
- data/lib/verifalia/email_validation/overview.rb +108 -0
- data/lib/verifalia/email_validation/progress.rb +48 -0
- data/lib/verifalia/email_validation/request.rb +48 -0
- data/lib/verifalia/email_validation/request_entry.rb +43 -0
- data/lib/verifalia/email_validation/wait_options.rb +82 -0
- data/lib/verifalia/rest/client.rb +111 -0
- data/lib/verifalia/security/certificate_authenticator.rb +50 -0
- data/lib/verifalia/security/username_password_authenticator.rb +51 -0
- data/lib/verifalia.rb +49 -21
- data/sig/completion_callback.rbs +5 -0
- data/sig/verifalia/client.rbs +11 -0
- data/sig/verifalia/credits/balance.rbs +11 -0
- data/sig/verifalia/credits/client.rbs +7 -0
- data/sig/verifalia/email_validations/client.rbs +24 -0
- data/sig/verifalia/email_validations/entry.rbs +24 -0
- data/sig/verifalia/email_validations/entry_classification.rbs +10 -0
- data/sig/verifalia/email_validations/entry_status.rbs +50 -0
- data/sig/verifalia/email_validations/exported_entries_format.rbs +9 -0
- data/sig/verifalia/email_validations/job.rbs +13 -0
- data/sig/verifalia/email_validations/job_status.rbs +10 -0
- data/sig/verifalia/email_validations/overview.rbs +20 -0
- data/sig/verifalia/email_validations/progress.rbs +8 -0
- data/sig/verifalia/email_validations/request.rbs +13 -0
- data/sig/verifalia/email_validations/request_entry.rbs +8 -0
- data/sig/verifalia/email_validations/wait_options.rbs +20 -0
- data/sig/verifalia/rest/client.rbs +12 -0
- data/sig/verifalia/rest.rbs +6 -0
- data/sig/verifalia/security/certificate_authenticator.rbs +8 -0
- data/sig/verifalia/security/username_password_authenticator.rbs +10 -0
- data/verifalia.gemspec +27 -18
- metadata +72 -64
- data/.gitignore +0 -24
- data/lib/rest/account_balance.rb +0 -93
- data/lib/rest/client.rb +0 -83
- data/lib/rest/email_validations.rb +0 -195
- data/lib/verifalia/util/configuration.rb +0 -7
- data/lib/verifalia/version.rb +0 -3
- data/spec/rest/account_balance_spec.rb +0 -93
- data/spec/rest/client_spec.rb +0 -105
- data/spec/rest/email_validations_spec.rb +0 -322
- data/spec/spec_helper.rb +0 -21
- data/spec/util/configuration_spec.rb +0 -15
- data/spec/verifalia_spec.rb +0 -17
@@ -0,0 +1,181 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Verifalia - Email list cleaning and real-time email verification service
|
4
|
+
# https://verifalia.com/
|
5
|
+
# support@verifalia.com
|
6
|
+
#
|
7
|
+
# Copyright (c) 2005-2024 Cobisi Research
|
8
|
+
#
|
9
|
+
# Cobisi Research
|
10
|
+
# Via Della Costituzione, 31
|
11
|
+
# 35010 Vigonza
|
12
|
+
# Italy - European Union
|
13
|
+
#
|
14
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
15
|
+
# of this software and associated documentation files (the "Software"), to deal
|
16
|
+
# in the Software without restriction, including without limitation the rights
|
17
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
18
|
+
# copies of the Software, and to permit persons to whom the Software is
|
19
|
+
# furnished to do so, subject to the following conditions:
|
20
|
+
#
|
21
|
+
# The above copyright notice and this permission notice shall be included in
|
22
|
+
# all copies or substantial portions of the Software.
|
23
|
+
#
|
24
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
25
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
26
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
27
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
28
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
29
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
30
|
+
# THE SOFTWARE.
|
31
|
+
|
32
|
+
module Verifalia
|
33
|
+
module EmailValidations
|
34
|
+
# Provides values for the supported validation statuses for a job +entry+.
|
35
|
+
module EntryStatus
|
36
|
+
# The at sign symbol (@), used to separate the local part from the domain part of the address, has not been found.
|
37
|
+
AT_SIGN_NOT_FOUND = 'AtSignNotFound'
|
38
|
+
|
39
|
+
# A connection error occurred while verifying the external mail exchanger rejects nonexistent email addresses.
|
40
|
+
CATCH_ALL_CONNECTION_FAILURE = 'CatchAllConnectionFailure'
|
41
|
+
|
42
|
+
# A timeout occurred while verifying fake e-mail address rejection for the mail server.
|
43
|
+
CATCH_ALL_VALIDATION_TIMEOUT = 'CatchAllValidationTimeout'
|
44
|
+
|
45
|
+
# Verification failed because of a socket connection error occurred while querying the DNS server.
|
46
|
+
DNS_CONNECTION_FAILURE = 'DnsConnectionFailure'
|
47
|
+
|
48
|
+
# A timeout has occurred while querying the DNS server(s) for records about the email address domain.
|
49
|
+
DNS_QUERY_TIMEOUT = 'DnsQueryTimeout'
|
50
|
+
|
51
|
+
# The domain of the email address does not exist.
|
52
|
+
DOMAIN_DOES_NOT_EXIST = 'DomainDoesNotExist'
|
53
|
+
|
54
|
+
# The domain has a NULL MX (RFC 7505) resource record and can't thus accept email messages.
|
55
|
+
DOMAIN_HAS_NULL_MX = 'DomainHasNullMx'
|
56
|
+
|
57
|
+
# The domain of the email address does not have any valid DNS record and couldn't accept messages from another
|
58
|
+
# host on the Internet.
|
59
|
+
DOMAIN_IS_MISCONFIGURED = 'DomainIsMisconfigured'
|
60
|
+
|
61
|
+
# The email address is provided by a well-known disposable email address provider (DEA).
|
62
|
+
DOMAIN_IS_WELL_KNOWN_DEA = 'DomainIsWellKnownDea'
|
63
|
+
|
64
|
+
# The domain part of the email address is not compliant with the IETF standards.
|
65
|
+
DOMAIN_PART_COMPLIANCY_FAILURE = 'DomainPartCompliancyFailure'
|
66
|
+
|
67
|
+
# An invalid sequence of two adjacent dots has been found.
|
68
|
+
DOUBLE_DOT_SEQUENCE = 'DoubleDotSequence'
|
69
|
+
|
70
|
+
# The item is a duplicate of another email address in the list.
|
71
|
+
# To find out the entry this item is a duplicate of, check the +duplicate_of+ property for the +entry+ instance which exposes this status code.
|
72
|
+
DUPLICATE = 'Duplicate'
|
73
|
+
|
74
|
+
# The email address has an invalid total length.
|
75
|
+
INVALID_ADDRESS_LENGTH = 'InvalidAddressLength'
|
76
|
+
|
77
|
+
# An invalid character has been detected in the provided sequence.
|
78
|
+
INVALID_CHARACTER_IN_SEQUENCE = 'InvalidCharacterInSequence'
|
79
|
+
|
80
|
+
# An invalid quoted word with no content has been found.
|
81
|
+
INVALID_EMPTY_QUOTED_WORD = 'InvalidEmptyQuotedWord'
|
82
|
+
|
83
|
+
# An invalid folding white space (FWS) sequence has been found.
|
84
|
+
INVALID_FOLDING_WHITE_SPACE_SEQUENCE = 'InvalidFoldingWhiteSpaceSequence'
|
85
|
+
|
86
|
+
# The local part of the e-mail address has an invalid length.
|
87
|
+
INVALID_LOCAL_PART_LENGTH = 'InvalidLocalPartLength'
|
88
|
+
|
89
|
+
# A new word boundary start has been detected at an invalid position.
|
90
|
+
INVALID_WORD_BOUNDARY_START = 'InvalidWordBoundaryStart'
|
91
|
+
|
92
|
+
# The email address is not compliant with the additional syntax rules of the email service provider
|
93
|
+
# which should eventually manage it.
|
94
|
+
ISP_SPECIFIC_SYNTAX_FAILURE = 'IspSpecificSyntaxFailure'
|
95
|
+
|
96
|
+
# The external mail exchanger responsible for the email address under test rejected the local endpoint, probably
|
97
|
+
# because of its own policy rules.
|
98
|
+
LOCAL_END_POINT_REJECTED = 'LocalEndPointRejected'
|
99
|
+
|
100
|
+
# The local part of the email address is a well-known role account.
|
101
|
+
LOCAL_PART_IS_WELL_KNOWN_ROLE_ACCOUNT = 'LocalPartIsWellKnownRoleAccount'
|
102
|
+
|
103
|
+
# The external mail exchanger rejected the validation request.
|
104
|
+
LOCAL_SENDER_ADDRESS_REJECTED = 'LocalSenderAddressRejected'
|
105
|
+
|
106
|
+
# A connection error occurred while validating the mailbox for the e-mail address.
|
107
|
+
MAILBOX_CONNECTION_FAILURE = 'MailboxConnectionFailure'
|
108
|
+
|
109
|
+
# The mailbox for the e-mail address does not exist.
|
110
|
+
MAILBOX_DOES_NOT_EXIST = 'MailboxDoesNotExist'
|
111
|
+
|
112
|
+
# The requested mailbox is currently over quota.
|
113
|
+
MAILBOX_HAS_INSUFFICIENT_STORAGE = 'MailboxHasInsufficientStorage'
|
114
|
+
|
115
|
+
# While both the domain and the mail exchanger for the email address being tested are not from a well-known
|
116
|
+
# disposable email address provider (DEA), the mailbox is actually disposable.
|
117
|
+
MAILBOX_IS_DEA = 'MailboxIsDea'
|
118
|
+
|
119
|
+
# The requested mailbox is temporarily unavailable; it could be experiencing technical issues or some other
|
120
|
+
# transient problem.
|
121
|
+
MAILBOX_TEMPORARILY_UNAVAILABLE = 'MailboxTemporarilyUnavailable'
|
122
|
+
|
123
|
+
# A timeout occurred while verifying the existence of the mailbox.
|
124
|
+
MAILBOX_VALIDATION_TIMEOUT = 'MailboxValidationTimeout'
|
125
|
+
|
126
|
+
# The mail exchanger responsible for the email address under test hides a honeypot / spam trap.
|
127
|
+
MAIL_EXCHANGER_IS_HONEYPOT = 'MailExchangerIsHoneypot'
|
128
|
+
|
129
|
+
# The mail exchanger responsible for the email address is parked / inactive.
|
130
|
+
MAIL_EXCHANGER_IS_PARKED = 'MailExchangerIsParked'
|
131
|
+
|
132
|
+
# The mail exchanger being tested is a well-known disposable email address provider (DEA).
|
133
|
+
MAIL_EXCHANGER_IS_WELL_KNOWN_DEA = 'MailExchangerIsWellKnownDea'
|
134
|
+
|
135
|
+
# The system assigned a user-defined classification because the input data met the criteria specified in a
|
136
|
+
# custom classification override rule.
|
137
|
+
OVERRIDE_MATCH = 'OverrideMatch'
|
138
|
+
|
139
|
+
# The external mail exchanger does not support international mailbox names. To support this feature, mail
|
140
|
+
# exchangers must comply with RFC 5336 and support and announce both the 8BITMIME and the UTF8SMTP protocol
|
141
|
+
# extensions.
|
142
|
+
SERVER_DOES_NOT_SUPPORT_INTERNATIONAL_MAILBOXES = 'ServerDoesNotSupportInternationalMailboxes'
|
143
|
+
|
144
|
+
# The external mail exchanger accepts fake, non existent, email addresses; therefore the provided email address
|
145
|
+
# MAY be nonexistent too.
|
146
|
+
SERVER_IS_CATCH_ALL = 'ServerIsCatchAll'
|
147
|
+
|
148
|
+
# The mail exchanger responsible for the email address under test is temporarily unavailable.
|
149
|
+
SERVER_TEMPORARILY_UNAVAILABLE = 'ServerTemporaryUnavailable'
|
150
|
+
|
151
|
+
# A socket connection error occurred while connecting to the mail exchanger which serves the email address domain.
|
152
|
+
SMTP_CONNECTION_FAILURE = 'SmtpConnectionFailure'
|
153
|
+
|
154
|
+
# A timeout has occurred while connecting to the mail exchanger which serves the email address domain.
|
155
|
+
SMTP_CONNECTION_TIMEOUT = 'SmtpConnectionTimeout'
|
156
|
+
|
157
|
+
# The mail exchanger responsible for the email address under test replied one or more non-standard SMTP replies
|
158
|
+
# which caused the SMTP session to be aborted.
|
159
|
+
SMTP_DIALOG_ERROR = 'SmtpDialogError'
|
160
|
+
|
161
|
+
# The email address has been successfully validated.
|
162
|
+
SUCCESS = 'Success'
|
163
|
+
|
164
|
+
# The domain literal of the email address couldn't accept messages from the Internet.
|
165
|
+
UNACCEPTABLE_DOMAIN_LITERAL = 'UnacceptableDomainLiteral'
|
166
|
+
|
167
|
+
# The number of parenthesis used to open comments is not equal to the one used to close them.
|
168
|
+
UNBALANCED_COMMENT_PARENTHESIS = 'UnbalancedCommentParenthesis'
|
169
|
+
|
170
|
+
# An unexpected quoted pair sequence has been found within a quoted word.
|
171
|
+
UNEXPECTED_QUOTED_PAIR_SEQUENCE = 'UnexpectedQuotedPairSequence'
|
172
|
+
|
173
|
+
# One or more unhandled exceptions have been thrown during the verification process and something went wrong
|
174
|
+
# on the Verifalia side.
|
175
|
+
UNHANDLED_EXCEPTION = 'UnhandledException'
|
176
|
+
|
177
|
+
# A quoted pair within a quoted word is not closed properly.
|
178
|
+
UNMATCHED_QUOTED_PAIR = 'UnmatchedQuotedPair'
|
179
|
+
end
|
180
|
+
end
|
181
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Verifalia - Email list cleaning and real-time email verification service
|
4
|
+
# https://verifalia.com/
|
5
|
+
# support@verifalia.com
|
6
|
+
#
|
7
|
+
# Copyright (c) 2005-2024 Cobisi Research
|
8
|
+
#
|
9
|
+
# Cobisi Research
|
10
|
+
# Via Della Costituzione, 31
|
11
|
+
# 35010 Vigonza
|
12
|
+
# Italy - European Union
|
13
|
+
#
|
14
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
15
|
+
# of this software and associated documentation files (the "Software"), to deal
|
16
|
+
# in the Software without restriction, including without limitation the rights
|
17
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
18
|
+
# copies of the Software, and to permit persons to whom the Software is
|
19
|
+
# furnished to do so, subject to the following conditions:
|
20
|
+
#
|
21
|
+
# The above copyright notice and this permission notice shall be included in
|
22
|
+
# all copies or substantial portions of the Software.
|
23
|
+
#
|
24
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
25
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
26
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
27
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
28
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
29
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
30
|
+
# THE SOFTWARE.
|
31
|
+
|
32
|
+
module Verifalia
|
33
|
+
module EmailValidations
|
34
|
+
# Represents the output formats which Verifalia can accept while exporting email validation entries.
|
35
|
+
module ExportedEntriesFormat
|
36
|
+
# Comma-separated values (.csv).
|
37
|
+
CSV = 'text/csv'
|
38
|
+
|
39
|
+
# Microsoft Excel 97-2003 Worksheet (.xls).
|
40
|
+
EXCEL_XLS = 'application/vnd.ms-excel'
|
41
|
+
|
42
|
+
# Microsoft Excel workbook (.xslx).
|
43
|
+
EXCEL_XLSX = 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,107 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Verifalia - Email list cleaning and real-time email verification service
|
4
|
+
# https://verifalia.com/
|
5
|
+
# support@verifalia.com
|
6
|
+
#
|
7
|
+
# Copyright (c) 2005-2024 Cobisi Research
|
8
|
+
#
|
9
|
+
# Cobisi Research
|
10
|
+
# Via Della Costituzione, 31
|
11
|
+
# 35010 Vigonza
|
12
|
+
# Italy - European Union
|
13
|
+
#
|
14
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
15
|
+
# of this software and associated documentation files (the "Software"), to deal
|
16
|
+
# in the Software without restriction, including without limitation the rights
|
17
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
18
|
+
# copies of the Software, and to permit persons to whom the Software is
|
19
|
+
# furnished to do so, subject to the following conditions:
|
20
|
+
#
|
21
|
+
# The above copyright notice and this permission notice shall be included in
|
22
|
+
# all copies or substantial portions of the Software.
|
23
|
+
#
|
24
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
25
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
26
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
27
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
28
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
29
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
30
|
+
# THE SOFTWARE.
|
31
|
+
|
32
|
+
require 'ipaddr'
|
33
|
+
|
34
|
+
module Verifalia
|
35
|
+
module EmailValidations
|
36
|
+
# Represents a snapshot of an email validation job, along with its overview and eventually validated entries.
|
37
|
+
class Job
|
38
|
+
# Overview information for this email validation job.
|
39
|
+
attr_reader :overview
|
40
|
+
|
41
|
+
# The eventually validated items for this email validation job.
|
42
|
+
attr_reader :entries
|
43
|
+
|
44
|
+
def initialize(overview, entries)
|
45
|
+
@overview = overview
|
46
|
+
@entries = entries
|
47
|
+
end
|
48
|
+
|
49
|
+
# Parse a Job from a JSON string.
|
50
|
+
def self.from_json(data)
|
51
|
+
progress = nil
|
52
|
+
|
53
|
+
# Parse the eventual progress information
|
54
|
+
|
55
|
+
if data['overview'].respond_to?('progress')
|
56
|
+
progress = Progress.new data['overview']['progress']['percentage'].to_f,
|
57
|
+
data['overview']['estimatedTimeRemaining']
|
58
|
+
end
|
59
|
+
|
60
|
+
# Parse the job overview
|
61
|
+
|
62
|
+
overview = Overview.new data['overview']['id'],
|
63
|
+
DateTime.iso8601(data['overview']['submittedOn']),
|
64
|
+
(if data['overview'].key?('completedOn')
|
65
|
+
DateTime.iso8601(data['overview']['completedOn'])
|
66
|
+
end),
|
67
|
+
data['overview']['priority'],
|
68
|
+
data['overview']['name'],
|
69
|
+
data['overview']['owner'],
|
70
|
+
IPAddr.new(data['overview']['clientIP']),
|
71
|
+
DateTime.iso8601(data['overview']['createdOn']),
|
72
|
+
data['overview']['quality'],
|
73
|
+
data['overview']['retention'],
|
74
|
+
data['overview']['deduplication'],
|
75
|
+
data['overview']['status'],
|
76
|
+
data['overview']['noOfEntries'],
|
77
|
+
progress
|
78
|
+
|
79
|
+
# Parse the eventual entries
|
80
|
+
|
81
|
+
if data.key?('entries')
|
82
|
+
entries = data['entries']['data'].map do |entry|
|
83
|
+
Entry.new entry['inputData'],
|
84
|
+
entry['classification'],
|
85
|
+
entry['status'],
|
86
|
+
entry['emailAddress'],
|
87
|
+
entry['emailAddressLocalPart'],
|
88
|
+
entry['emailAddressDomainPart'],
|
89
|
+
(entry['hasInternationalMailboxName'] if entry.key?('hasInternationalMailboxName')),
|
90
|
+
(entry['hasInternationalDomainName'] if entry.key?('hasInternationalDomainName')),
|
91
|
+
(entry['isDisposableEmailAddress'] if entry.key?('isDisposableEmailAddress')),
|
92
|
+
(entry['isRoleAccount'] if entry.key?('isRoleAccount')),
|
93
|
+
(entry['isFreeEmailAddress'] if entry.key?('isFreeEmailAddress')),
|
94
|
+
(entry['syntaxFailureIndex'] if entry.key?('syntaxFailureIndex')),
|
95
|
+
entry['custom'],
|
96
|
+
(entry['duplicateOf'] if entry.key?('duplicateOf')),
|
97
|
+
DateTime.iso8601(entry['completedOn']),
|
98
|
+
entry['asciiEmailAddressDomainPart'],
|
99
|
+
(entry['suggestions'] if entry.key?('suggestions')) || []
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
Job.new overview, entries
|
104
|
+
end
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Verifalia - Email list cleaning and real-time email verification service
|
4
|
+
# https://verifalia.com/
|
5
|
+
# support@verifalia.com
|
6
|
+
#
|
7
|
+
# Copyright (c) 2005-2024 Cobisi Research
|
8
|
+
#
|
9
|
+
# Cobisi Research
|
10
|
+
# Via Della Costituzione, 31
|
11
|
+
# 35010 Vigonza
|
12
|
+
# Italy - European Union
|
13
|
+
#
|
14
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
15
|
+
# of this software and associated documentation files (the "Software"), to deal
|
16
|
+
# in the Software without restriction, including without limitation the rights
|
17
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
18
|
+
# copies of the Software, and to permit persons to whom the Software is
|
19
|
+
# furnished to do so, subject to the following conditions:
|
20
|
+
#
|
21
|
+
# The above copyright notice and this permission notice shall be included in
|
22
|
+
# all copies or substantial portions of the Software.
|
23
|
+
#
|
24
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
25
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
26
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
27
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
28
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
29
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
30
|
+
# THE SOFTWARE.
|
31
|
+
|
32
|
+
module Verifalia
|
33
|
+
module EmailValidations
|
34
|
+
# Provides values for the supported statuses for a +job+.
|
35
|
+
module JobStatus
|
36
|
+
# The email validation job has been completed and its results are available.
|
37
|
+
COMPLETED = 'Completed'
|
38
|
+
|
39
|
+
# The email validation job has either been deleted.
|
40
|
+
DELETED = 'Deleted'
|
41
|
+
|
42
|
+
# The email validation job is expired.
|
43
|
+
EXPIRED = 'Expired'
|
44
|
+
|
45
|
+
# The email validation job is being processed by Verifalia.
|
46
|
+
IN_PROGRESS = 'InProgress'
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,108 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Verifalia - Email list cleaning and real-time email verification service
|
4
|
+
# https://verifalia.com/
|
5
|
+
# support@verifalia.com
|
6
|
+
#
|
7
|
+
# Copyright (c) 2005-2024 Cobisi Research
|
8
|
+
#
|
9
|
+
# Cobisi Research
|
10
|
+
# Via Della Costituzione, 31
|
11
|
+
# 35010 Vigonza
|
12
|
+
# Italy - European Union
|
13
|
+
#
|
14
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
15
|
+
# of this software and associated documentation files (the "Software"), to deal
|
16
|
+
# in the Software without restriction, including without limitation the rights
|
17
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
18
|
+
# copies of the Software, and to permit persons to whom the Software is
|
19
|
+
# furnished to do so, subject to the following conditions:
|
20
|
+
#
|
21
|
+
# The above copyright notice and this permission notice shall be included in
|
22
|
+
# all copies or substantial portions of the Software.
|
23
|
+
#
|
24
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
25
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
26
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
27
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
28
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
29
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
30
|
+
# THE SOFTWARE.
|
31
|
+
|
32
|
+
module Verifalia
|
33
|
+
module EmailValidations
|
34
|
+
# Overview information for an email validation job.
|
35
|
+
class Overview
|
36
|
+
# The unique identifier for the validation job.
|
37
|
+
attr_reader :id
|
38
|
+
|
39
|
+
# The processing status for the validation job. See +JobStatus+ for a list of the values supported at the time
|
40
|
+
# this SDK has been released.
|
41
|
+
attr_reader :status
|
42
|
+
|
43
|
+
# The date and time this validation job has been submitted to Verifalia.
|
44
|
+
attr_reader :submitted_on
|
45
|
+
|
46
|
+
# The date and time this validation job has been eventually completed.
|
47
|
+
attr_reader :completed_on
|
48
|
+
|
49
|
+
# The eventual priority (speed) of the validation job, relative to the parent Verifalia account. In the event of
|
50
|
+
# an account with many concurrent validation jobs, this value allows to increase the processing speed of a job
|
51
|
+
# with respect to the others.
|
52
|
+
#
|
53
|
+
# The allowed range of values spans from +0+ - lowest priority, to +255+ - highest priority, where the midway
|
54
|
+
# value +127+ means normal priority; if not specified, Verifalia processes all the concurrent validation jobs for
|
55
|
+
# an account using the same priority.
|
56
|
+
attr_reader :priority
|
57
|
+
|
58
|
+
# An optional user-defined name for the validation job, for your own reference.
|
59
|
+
attr_reader :name
|
60
|
+
|
61
|
+
# The unique ID of the Verifalia user who submitted the validation job.
|
62
|
+
attr_reader :owner
|
63
|
+
|
64
|
+
# The IP address of the client which submitted the validation job.
|
65
|
+
attr_reader :client_ip
|
66
|
+
|
67
|
+
# The date and time the validation job was created.
|
68
|
+
attr_reader :created_on
|
69
|
+
|
70
|
+
# A reference to the results quality level this job was validated against.
|
71
|
+
attr_reader :quality
|
72
|
+
|
73
|
+
# The maximum data retention period Verifalia observes for this verification job, after which the job will be
|
74
|
+
# automatically deleted.
|
75
|
+
#
|
76
|
+
# A verification job can be deleted anytime prior to its retention period through the +delete()+ method.
|
77
|
+
attr_reader :retention
|
78
|
+
|
79
|
+
# A deduplication mode option which affected the way Verifalia eventually marked entries as duplicates upon
|
80
|
+
# processing.
|
81
|
+
attr_reader :deduplication
|
82
|
+
|
83
|
+
# The number of entries the validation job contains.
|
84
|
+
attr_reader :no_of_entries
|
85
|
+
|
86
|
+
# The eventual completion progress for the validation job.
|
87
|
+
attr_reader :progress
|
88
|
+
|
89
|
+
def initialize(id, submitted_on, completed_on, priority, name, owner, client_ip, created_on, quality, retention,
|
90
|
+
deduplication, status, no_of_entries, progress)
|
91
|
+
@id = id
|
92
|
+
@status = status
|
93
|
+
@submitted_on = submitted_on
|
94
|
+
@completed_on = completed_on
|
95
|
+
@priority = priority
|
96
|
+
@name = name
|
97
|
+
@owner = owner
|
98
|
+
@client_ip = client_ip
|
99
|
+
@created_on = created_on
|
100
|
+
@quality = quality
|
101
|
+
@retention = retention
|
102
|
+
@deduplication = deduplication
|
103
|
+
@no_of_entries = no_of_entries
|
104
|
+
@progress = progress
|
105
|
+
end
|
106
|
+
end
|
107
|
+
end
|
108
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Verifalia - Email list cleaning and real-time email verification service
|
4
|
+
# https://verifalia.com/
|
5
|
+
# support@verifalia.com
|
6
|
+
#
|
7
|
+
# Copyright (c) 2005-2024 Cobisi Research
|
8
|
+
#
|
9
|
+
# Cobisi Research
|
10
|
+
# Via Della Costituzione, 31
|
11
|
+
# 35010 Vigonza
|
12
|
+
# Italy - European Union
|
13
|
+
#
|
14
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
15
|
+
# of this software and associated documentation files (the "Software"), to deal
|
16
|
+
# in the Software without restriction, including without limitation the rights
|
17
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
18
|
+
# copies of the Software, and to permit persons to whom the Software is
|
19
|
+
# furnished to do so, subject to the following conditions:
|
20
|
+
#
|
21
|
+
# The above copyright notice and this permission notice shall be included in
|
22
|
+
# all copies or substantial portions of the Software.
|
23
|
+
#
|
24
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
25
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
26
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
27
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
28
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
29
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
30
|
+
# THE SOFTWARE.
|
31
|
+
|
32
|
+
module Verifalia
|
33
|
+
module EmailValidations
|
34
|
+
class Progress
|
35
|
+
# The overall progress percentage for the job, with a value between 0 and 1.
|
36
|
+
attr_reader :percentage
|
37
|
+
# A string representing the estimated remaining time for completing the email validation job, expressed in the
|
38
|
+
# format +dd.hh:mm:ss+ (where dd: days, hh: hours, mm: minutes, ss: seconds); the initial dd. part is added only
|
39
|
+
# for huge lists requiring more than 24 hours to complete.
|
40
|
+
attr_reader :estimated_time_remaining
|
41
|
+
|
42
|
+
def initialize(percentage, estimated_time_remaining)
|
43
|
+
@percentage = percentage
|
44
|
+
@estimated_time_remaining = estimated_time_remaining
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Verifalia - Email list cleaning and real-time email verification service
|
4
|
+
# https://verifalia.com/
|
5
|
+
# support@verifalia.com
|
6
|
+
#
|
7
|
+
# Copyright (c) 2005-2024 Cobisi Research
|
8
|
+
#
|
9
|
+
# Cobisi Research
|
10
|
+
# Via Della Costituzione, 31
|
11
|
+
# 35010 Vigonza
|
12
|
+
# Italy - European Union
|
13
|
+
#
|
14
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
15
|
+
# of this software and associated documentation files (the "Software"), to deal
|
16
|
+
# in the Software without restriction, including without limitation the rights
|
17
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
18
|
+
# copies of the Software, and to permit persons to whom the Software is
|
19
|
+
# furnished to do so, subject to the following conditions:
|
20
|
+
#
|
21
|
+
# The above copyright notice and this permission notice shall be included in
|
22
|
+
# all copies or substantial portions of the Software.
|
23
|
+
#
|
24
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
25
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
26
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
27
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
28
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
29
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
30
|
+
# THE SOFTWARE.
|
31
|
+
|
32
|
+
module Verifalia
|
33
|
+
module EmailValidations
|
34
|
+
class Request
|
35
|
+
attr_accessor :entries, :quality, :priority, :deduplication, :name, :retention, :callback
|
36
|
+
|
37
|
+
def initialize(entries, quality: nil, priority: nil, deduplication: nil, name: nil, retention: nil, callback: nil)
|
38
|
+
@entries = entries
|
39
|
+
@quality = quality
|
40
|
+
@priority = priority
|
41
|
+
@deduplication = deduplication
|
42
|
+
@name = name
|
43
|
+
@retention = retention
|
44
|
+
@callback = callback
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Verifalia - Email list cleaning and real-time email verification service
|
4
|
+
# https://verifalia.com/
|
5
|
+
# support@verifalia.com
|
6
|
+
#
|
7
|
+
# Copyright (c) 2005-2024 Cobisi Research
|
8
|
+
#
|
9
|
+
# Cobisi Research
|
10
|
+
# Via Della Costituzione, 31
|
11
|
+
# 35010 Vigonza
|
12
|
+
# Italy - European Union
|
13
|
+
#
|
14
|
+
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
15
|
+
# of this software and associated documentation files (the "Software"), to deal
|
16
|
+
# in the Software without restriction, including without limitation the rights
|
17
|
+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
18
|
+
# copies of the Software, and to permit persons to whom the Software is
|
19
|
+
# furnished to do so, subject to the following conditions:
|
20
|
+
#
|
21
|
+
# The above copyright notice and this permission notice shall be included in
|
22
|
+
# all copies or substantial portions of the Software.
|
23
|
+
#
|
24
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
25
|
+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
26
|
+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
27
|
+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
28
|
+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
29
|
+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
30
|
+
# THE SOFTWARE.
|
31
|
+
|
32
|
+
module Verifalia
|
33
|
+
module EmailValidations
|
34
|
+
class RequestEntry
|
35
|
+
attr_accessor :input_data, :custom
|
36
|
+
|
37
|
+
def initialize(input_data, custom = nil)
|
38
|
+
@input_data = input_data
|
39
|
+
@custom = custom
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|