verifalia 2.0.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE +1 -1
  3. data/README.md +134 -47
  4. data/lib/verifalia/client.rb +31 -2
  5. data/lib/verifalia/credits/balance.rb +29 -0
  6. data/lib/verifalia/credits/client.rb +29 -0
  7. data/lib/verifalia/email_validation/client.rb +33 -3
  8. data/lib/verifalia/email_validation/completion_callback.rb +29 -0
  9. data/lib/verifalia/email_validation/entry.rb +40 -5
  10. data/lib/verifalia/email_validation/entry_classification.rb +49 -0
  11. data/lib/verifalia/email_validation/entry_status.rb +181 -0
  12. data/lib/verifalia/email_validation/exported_entries_format.rb +46 -0
  13. data/lib/verifalia/email_validation/job.rb +37 -5
  14. data/lib/verifalia/email_validation/job_status.rb +49 -0
  15. data/lib/verifalia/email_validation/overview.rb +39 -7
  16. data/lib/verifalia/email_validation/progress.rb +29 -0
  17. data/lib/verifalia/email_validation/request.rb +29 -0
  18. data/lib/verifalia/email_validation/request_entry.rb +29 -0
  19. data/lib/verifalia/email_validation/wait_options.rb +29 -0
  20. data/lib/verifalia/rest/client.rb +31 -2
  21. data/lib/verifalia/security/certificate_authenticator.rb +29 -0
  22. data/lib/verifalia/security/username_password_authenticator.rb +29 -0
  23. data/lib/verifalia.rb +46 -3
  24. data/sig/verifalia/email_validations/entry.rbs +2 -0
  25. data/sig/verifalia/email_validations/entry_classification.rbs +10 -0
  26. data/sig/verifalia/email_validations/entry_status.rbs +50 -0
  27. data/sig/verifalia/email_validations/exported_entries_format.rbs +9 -0
  28. data/sig/verifalia/email_validations/job_status.rbs +10 -0
  29. data/sig/verifalia/security/certificate_authenticator.rbs +8 -0
  30. data/verifalia.gemspec +1 -1
  31. metadata +19 -10
@@ -1,5 +1,34 @@
1
1
  # frozen_string_literal: true
2
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
+
3
32
  module Verifalia
4
33
  module EmailValidations
5
34
  class WaitOptions
@@ -1,12 +1,41 @@
1
1
  # frozen_string_literal: true
2
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
+
3
32
  require 'faraday'
4
33
  require 'json'
5
34
 
6
35
  module Verifalia
7
36
  module Rest
8
- BASE_URLS = %w[https://api-1.verifalia.com/v2.4 https://api-2.verifalia.com/v2.4 https://api-3.verifalia.com/v2.4].freeze
9
- BASE_CCA_URLS = %w[https://api-cca-1.verifalia.com/v2.4 https://api-cca-2.verifalia.com/v2.4 https://api-cca-3.verifalia.com/v2.4].freeze
37
+ BASE_URLS = %w[https://api-1.verifalia.com/v2.5 https://api-2.verifalia.com/v2.5 https://api-3.verifalia.com/v2.5].freeze
38
+ BASE_CCA_URLS = %w[https://api-cca-1.verifalia.com/v2.5 https://api-cca-2.verifalia.com/v2.5 https://api-cca-3.verifalia.com/v2.5].freeze
10
39
 
11
40
  class Client
12
41
  # Optional debug logger
@@ -1,5 +1,34 @@
1
1
  # frozen_string_literal: true
2
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
+
3
32
  module Verifalia
4
33
  module Security
5
34
  # Allows to authenticate to Verifalia with a client certificate.
@@ -1,5 +1,34 @@
1
1
  # frozen_string_literal: true
2
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
+
3
32
  module Verifalia
4
33
  module Security
5
34
  # Allows to authenticate to Verifalia with a username and password pair.
data/lib/verifalia.rb CHANGED
@@ -1,12 +1,55 @@
1
1
  # frozen_string_literal: true
2
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
+
3
32
  require_relative 'verifalia/client'
4
33
 
5
- require_relative 'verifalia/security/username_password_authenticator'
6
- require_relative 'verifalia/security/certificate_authenticator'
34
+ require_relative 'verifalia/credits/balance'
35
+ require_relative 'verifalia/credits/client'
7
36
 
8
37
  require_relative 'verifalia/email_validation/client'
9
- require_relative 'verifalia/credits/client'
38
+ require_relative 'verifalia/email_validation/completion_callback'
39
+ require_relative 'verifalia/email_validation/entry'
40
+ require_relative 'verifalia/email_validation/entry_classification'
41
+ require_relative 'verifalia/email_validation/entry_status'
42
+ require_relative 'verifalia/email_validation/exported_entries_format'
43
+ require_relative 'verifalia/email_validation/job'
44
+ require_relative 'verifalia/email_validation/job_status'
45
+ require_relative 'verifalia/email_validation/overview'
46
+ require_relative 'verifalia/email_validation/progress'
47
+ require_relative 'verifalia/email_validation/request'
48
+ require_relative 'verifalia/email_validation/request_entry'
49
+ require_relative 'verifalia/email_validation/wait_options'
50
+
51
+ require_relative 'verifalia/security/username_password_authenticator'
52
+ require_relative 'verifalia/security/certificate_authenticator'
10
53
 
11
54
  module Verifalia
12
55
  end
@@ -1,6 +1,7 @@
1
1
  module Verifalia
2
2
  module EmailValidations
3
3
  class Entry
4
+ attr_reader ascii_email_address_domain_part: String | nil
4
5
  attr_reader completed_on: DateTime
5
6
  attr_reader custom: String | nil
6
7
  attr_reader duplicate_of: Integer | nil
@@ -16,6 +17,7 @@ module Verifalia
16
17
  attr_reader is_free_email_address: bool | nil
17
18
  attr_reader is_role_account: bool | nil
18
19
  attr_reader status: String
20
+ attr_reader suggestions: [String]
19
21
  attr_reader syntax_failure_index: Integer | nil
20
22
  end
21
23
  end
@@ -0,0 +1,10 @@
1
+ module Verifalia
2
+ module EmailValidations
3
+ module EntryClassification
4
+ DELIVERABLE: String
5
+ RISKY: String
6
+ UNDELIVERABLE: String
7
+ UNKNOWN: String
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,50 @@
1
+ module Verifalia
2
+ module EmailValidations
3
+ module EntryStatus
4
+ AT_SIGN_NOT_FOUND: String
5
+ CATCH_ALL_CONNECTION_FAILURE: String
6
+ CATCH_ALL_VALIDATION_TIMEOUT: String
7
+ DNS_CONNECTION_FAILURE: String
8
+ DNS_QUERY_TIMEOUT: String
9
+ DOMAIN_DOES_NOT_EXIST: String
10
+ DOMAIN_HAS_NULL_MX: String
11
+ DOMAIN_IS_MISCONFIGURED: String
12
+ DOMAIN_IS_WELL_KNOWN_DEA: String
13
+ DOMAIN_PART_COMPLIANCY_FAILURE: String
14
+ DOUBLE_DOT_SEQUENCE: String
15
+ DUPLICATE: String
16
+ INVALID_ADDRESS_LENGTH: String
17
+ INVALID_CHARACTER_IN_SEQUENCE: String
18
+ INVALID_EMPTY_QUOTED_WORD: String
19
+ INVALID_FOLDING_WHITE_SPACE_SEQUENCE: String
20
+ INVALID_LOCAL_PART_LENGTH: String
21
+ INVALID_WORD_BOUNDARY_START: String
22
+ ISP_SPECIFIC_SYNTAX_FAILURE: String
23
+ LOCAL_END_POINT_REJECTED: String
24
+ LOCAL_PART_IS_WELL_KNOWN_ROLE_ACCOUNT: String
25
+ LOCAL_SENDER_ADDRESS_REJECTED: String
26
+ MAILBOX_CONNECTION_FAILURE: String
27
+ MAILBOX_DOES_NOT_EXIST: String
28
+ MAILBOX_HAS_INSUFFICIENT_STORAGE: String
29
+ MAILBOX_IS_DEA: String
30
+ MAILBOX_TEMPORARILY_UNAVAILABLE: String
31
+ MAILBOX_VALIDATION_TIMEOUT: String
32
+ MAIL_EXCHANGER_IS_HONEYPOT: String
33
+ MAIL_EXCHANGER_IS_PARKED: String
34
+ MAIL_EXCHANGER_IS_WELL_KNOWN_DEA: String
35
+ OVERRIDE_MATCH: String
36
+ SERVER_DOES_NOT_SUPPORT_INTERNATIONAL_MAILBOXES: String
37
+ SERVER_IS_CATCH_ALL: String
38
+ SERVER_TEMPORARILY_UNAVAILABLE: String
39
+ SMTP_CONNECTION_FAILURE: String
40
+ SMTP_CONNECTION_TIMEOUT: String
41
+ SMTP_DIALOG_ERROR: String
42
+ SUCCESS: String
43
+ UNACCEPTABLE_DOMAIN_LITERAL: String
44
+ UNBALANCED_COMMENT_PARENTHESIS: String
45
+ UNEXPECTED_QUOTED_PAIR_SEQUENCE: String
46
+ UNHANDLED_EXCEPTION: String
47
+ UNMATCHED_QUOTED_PAIR: String
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,9 @@
1
+ module Verifalia
2
+ module EmailValidations
3
+ module ExportedEntriesFormat
4
+ CSV: String
5
+ EXCEL_XLS: String
6
+ EXCEL_XLSX: String
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,10 @@
1
+ module Verifalia
2
+ module EmailValidations
3
+ module JobStatus
4
+ COMPLETED: String
5
+ DELETED: String
6
+ EXPIRED: String
7
+ IN_PROGRESS: String
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,8 @@
1
+ module Verifalia
2
+ module Security
3
+ class CertificateAuthenticator
4
+ @ssl_client_cert: String | OpenSSL::X509::Certificate
5
+ @ssl_client_key: String | OpenSSL::PKey::RSA
6
+ end
7
+ end
8
+ end
data/verifalia.gemspec CHANGED
@@ -34,5 +34,5 @@ Gem::Specification.new do |spec|
34
34
  spec.add_dependency('faraday', '~> 2.7')
35
35
 
36
36
  spec.add_development_dependency 'bundler', '~> 2.4.8'
37
- spec.add_development_dependency 'rake'
37
+ spec.add_development_dependency 'rake', '~> 13.0'
38
38
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: verifalia
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Verifalia
@@ -9,10 +9,10 @@ authors:
9
9
  - Guido Tersilli
10
10
  - Rudy Chiappetta
11
11
  - Germano Mosconi
12
- autorequire:
12
+ autorequire:
13
13
  bindir: exe
14
14
  cert_chain: []
15
- date: 2023-03-12 00:00:00.000000000 Z
15
+ date: 2024-01-18 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: faraday
@@ -46,16 +46,16 @@ dependencies:
46
46
  name: rake
47
47
  requirement: !ruby/object:Gem::Requirement
48
48
  requirements:
49
- - - ">="
49
+ - - "~>"
50
50
  - !ruby/object:Gem::Version
51
- version: '0'
51
+ version: '13.0'
52
52
  type: :development
53
53
  prerelease: false
54
54
  version_requirements: !ruby/object:Gem::Requirement
55
55
  requirements:
56
- - - ">="
56
+ - - "~>"
57
57
  - !ruby/object:Gem::Version
58
- version: '0'
58
+ version: '13.0'
59
59
  description: Verifalia provides a simple API for validating email addresses and checking
60
60
  whether they are deliverable or not. This library allows to easily integrate with
61
61
  Verifalia and verify email addresses in real-time.
@@ -77,7 +77,11 @@ files:
77
77
  - lib/verifalia/email_validation/client.rb
78
78
  - lib/verifalia/email_validation/completion_callback.rb
79
79
  - lib/verifalia/email_validation/entry.rb
80
+ - lib/verifalia/email_validation/entry_classification.rb
81
+ - lib/verifalia/email_validation/entry_status.rb
82
+ - lib/verifalia/email_validation/exported_entries_format.rb
80
83
  - lib/verifalia/email_validation/job.rb
84
+ - lib/verifalia/email_validation/job_status.rb
81
85
  - lib/verifalia/email_validation/overview.rb
82
86
  - lib/verifalia/email_validation/progress.rb
83
87
  - lib/verifalia/email_validation/request.rb
@@ -92,7 +96,11 @@ files:
92
96
  - sig/verifalia/credits/client.rbs
93
97
  - sig/verifalia/email_validations/client.rbs
94
98
  - sig/verifalia/email_validations/entry.rbs
99
+ - sig/verifalia/email_validations/entry_classification.rbs
100
+ - sig/verifalia/email_validations/entry_status.rbs
101
+ - sig/verifalia/email_validations/exported_entries_format.rbs
95
102
  - sig/verifalia/email_validations/job.rbs
103
+ - sig/verifalia/email_validations/job_status.rbs
96
104
  - sig/verifalia/email_validations/overview.rbs
97
105
  - sig/verifalia/email_validations/progress.rbs
98
106
  - sig/verifalia/email_validations/request.rbs
@@ -100,6 +108,7 @@ files:
100
108
  - sig/verifalia/email_validations/wait_options.rbs
101
109
  - sig/verifalia/rest.rbs
102
110
  - sig/verifalia/rest/client.rbs
111
+ - sig/verifalia/security/certificate_authenticator.rbs
103
112
  - sig/verifalia/security/username_password_authenticator.rbs
104
113
  - verifalia.gemspec
105
114
  homepage: https://verifalia.com/
@@ -108,7 +117,7 @@ licenses:
108
117
  metadata:
109
118
  homepage_uri: https://verifalia.com/
110
119
  source_code_uri: https://github.com/verifalia/verifalia-ruby-sdk.git
111
- post_install_message:
120
+ post_install_message:
112
121
  rdoc_options: []
113
122
  require_paths:
114
123
  - lib
@@ -123,8 +132,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
123
132
  - !ruby/object:Gem::Version
124
133
  version: '0'
125
134
  requirements: []
126
- rubygems_version: 3.3.5
127
- signing_key:
135
+ rubygems_version: 3.3.15
136
+ signing_key:
128
137
  specification_version: 4
129
138
  summary: Verifalia - Ruby SDK and helper library
130
139
  test_files: []