Class: Loqate::Email::BatchEmailValidation
- Inherits:
-
Dry::Struct
- Object
- Dry::Struct
- Loqate::Email::BatchEmailValidation
- Defined in:
- lib/loqate/email/batch_email_validation.rb
Overview
Result of a batch email address validation.
Constant Summary collapse
- Status =
Types::Strict::String.enum('Valid', 'Invalid', 'Unknown', 'Accept_All')
Instance Method Summary collapse
-
#account ⇒ String
The account portion of the email address provided.
-
#domain ⇒ String
The domain portion of the email address provided.
-
#email_address ⇒ String
The email address that verification was attempted on.
-
#invalid? ⇒ Boolean
Whether the email is invalid and shouldn’t be accepted.
-
#is_disposible ⇒ Boolean
Whether the email address provided is a disposable mailbox (some companies create temporary mailboxes which shouldn’t be used for marketing communications).
-
#is_system_mailbox ⇒ Boolean
Whether the email address provided is a system mailbox (e.g. sales@, support@, accounts@ etc).
-
#status ⇒ 'Valid', ...
Valid - The email address is valid Invalid - The email address is invalid and shouldn’t be accepted Unknown - Unable to complete the verification process (normally due to SMTP timeout) Accept_All - The mail server is set to accept all verification requests so full verification isn’t possible.
-
#unknown? ⇒ Boolean
Whether the email wasn’t verified (normally due to SMTP timeout).
-
#unverified? ⇒ Boolean
Whether the email could be verified.
-
#valid? ⇒ Boolean
Whether the email was fully validated (including the account portion).
Instance Method Details
#account ⇒ String
The account portion of the email address provided.
26 |
# File 'lib/loqate/email/batch_email_validation.rb', line 26 attribute :account, Types::Strict::String |
#domain ⇒ String
The domain portion of the email address provided.
32 |
# File 'lib/loqate/email/batch_email_validation.rb', line 32 attribute :domain, Types::Strict::String |
#email_address ⇒ String
The email address that verification was attempted on.
20 |
# File 'lib/loqate/email/batch_email_validation.rb', line 20 attribute :email_address, Types::Strict::String |
#invalid? ⇒ Boolean
Whether the email is invalid and shouldn’t be accepted.
53 54 55 |
# File 'lib/loqate/email/batch_email_validation.rb', line 53 def invalid? status == 'Invalid' end |
#is_disposible ⇒ Boolean
Whether the email address provided is a disposable mailbox (some companies create temporary mailboxes which shouldn’t be used for marketing communications).
39 |
# File 'lib/loqate/email/batch_email_validation.rb', line 39 attribute :is_disposible, Types::Strict::Bool |
#is_system_mailbox ⇒ Boolean
Whether the email address provided is a system mailbox (e.g. sales@, support@, accounts@ etc).
45 |
# File 'lib/loqate/email/batch_email_validation.rb', line 45 attribute :is_system_mailbox, Types::Strict::Bool |
#status ⇒ 'Valid', ...
Valid - The email address is valid Invalid - The email address is invalid and shouldn’t be accepted Unknown - Unable to complete the verification process (normally due to SMTP timeout) Accept_All - The mail server is set to accept all verification requests so full verification isn’t possible
14 |
# File 'lib/loqate/email/batch_email_validation.rb', line 14 attribute :status, Status |
#unknown? ⇒ Boolean
Whether the email wasn’t verified (normally due to SMTP timeout)
58 59 60 |
# File 'lib/loqate/email/batch_email_validation.rb', line 58 def unknown? status == 'Unknown' end |
#unverified? ⇒ Boolean
Whether the email could be verified
63 64 65 |
# File 'lib/loqate/email/batch_email_validation.rb', line 63 def unverified? status == 'Accept_All' end |
#valid? ⇒ Boolean
Whether the email was fully validated (including the account portion).
48 49 50 |
# File 'lib/loqate/email/batch_email_validation.rb', line 48 def valid? status == 'Valid' end |