Class: Postio::Models::EmailResult
- Inherits:
-
Data
- Object
- Data
- Postio::Models::EmailResult
- Defined in:
- lib/postio/models.rb
Overview
EmailResult — validation verdict for one email address.
Constant Summary collapse
- DELIVERABILITY_DELIVERABLE =
"deliverable"- DELIVERABILITY_UNDELIVERABLE =
"undeliverable"- DELIVERABILITY_RISKY =
"risky"- DELIVERABILITY_UNKNOWN =
"unknown"- DELIVERABILITY_INVALID =
"invalid"
Instance Attribute Summary collapse
-
#deliverability ⇒ Object
readonly
Returns the value of attribute deliverability.
-
#did_you_mean ⇒ Object
readonly
Returns the value of attribute did_you_mean.
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#is_catch_all ⇒ Object
readonly
Returns the value of attribute is_catch_all.
-
#is_disposable ⇒ Object
readonly
Returns the value of attribute is_disposable.
-
#is_free_provider ⇒ Object
readonly
Returns the value of attribute is_free_provider.
-
#is_role_account ⇒ Object
readonly
Returns the value of attribute is_role_account.
-
#is_valid_syntax ⇒ Object
readonly
Returns the value of attribute is_valid_syntax.
-
#mx_found ⇒ Object
readonly
Returns the value of attribute mx_found.
-
#smtp_check ⇒ Object
readonly
Returns the value of attribute smtp_check.
Class Method Summary collapse
Instance Attribute Details
#deliverability ⇒ Object (readonly)
Returns the value of attribute deliverability
85 86 87 |
# File 'lib/postio/models.rb', line 85 def deliverability @deliverability end |
#did_you_mean ⇒ Object (readonly)
Returns the value of attribute did_you_mean
85 86 87 |
# File 'lib/postio/models.rb', line 85 def did_you_mean @did_you_mean end |
#email ⇒ Object (readonly)
Returns the value of attribute email
85 86 87 |
# File 'lib/postio/models.rb', line 85 def email @email end |
#is_catch_all ⇒ Object (readonly)
Returns the value of attribute is_catch_all
85 86 87 |
# File 'lib/postio/models.rb', line 85 def is_catch_all @is_catch_all end |
#is_disposable ⇒ Object (readonly)
Returns the value of attribute is_disposable
85 86 87 |
# File 'lib/postio/models.rb', line 85 def is_disposable @is_disposable end |
#is_free_provider ⇒ Object (readonly)
Returns the value of attribute is_free_provider
85 86 87 |
# File 'lib/postio/models.rb', line 85 def is_free_provider @is_free_provider end |
#is_role_account ⇒ Object (readonly)
Returns the value of attribute is_role_account
85 86 87 |
# File 'lib/postio/models.rb', line 85 def is_role_account @is_role_account end |
#is_valid_syntax ⇒ Object (readonly)
Returns the value of attribute is_valid_syntax
85 86 87 |
# File 'lib/postio/models.rb', line 85 def is_valid_syntax @is_valid_syntax end |
#mx_found ⇒ Object (readonly)
Returns the value of attribute mx_found
85 86 87 |
# File 'lib/postio/models.rb', line 85 def mx_found @mx_found end |
#smtp_check ⇒ Object (readonly)
Returns the value of attribute smtp_check
85 86 87 |
# File 'lib/postio/models.rb', line 85 def smtp_check @smtp_check end |
Class Method Details
.from_hash(h) ⇒ Object
95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/postio/models.rb', line 95 def self.from_hash(h) new( email: h["email"].to_s, is_valid_syntax: h["isValidSyntax"] == true, did_you_mean: h["didYouMean"], is_disposable: h["isDisposable"] == true, is_free_provider: h["isFreeProvider"] == true, is_role_account: h["isRoleAccount"] == true, mx_found: h["mxFound"] == true, smtp_check: h["smtpCheck"], is_catch_all: h["isCatchAll"], deliverability: h["deliverability"].to_s ) end |