Class: Verifalia::EmailValidations::Entry

Inherits:
Object
  • Object
show all
Defined in:
lib/verifalia/email_validation/entry.rb

Overview

Represents a single validated entry within a job.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(input_data, classification, status, email_address, email_address_local_part, email_address_domain_part, has_international_mailbox_name, has_international_domain_name, is_disposable_email_address, is_role_account, is_free_email_address, syntax_failure_index, custom, duplicate_of, completed_on, ascii_email_address_domain_part, suggestions) ⇒ Entry

Returns a new instance of Entry.



100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
# File 'lib/verifalia/email_validation/entry.rb', line 100

def initialize (input_data, classification, status, email_address, email_address_local_part, email_address_domain_part,
                has_international_mailbox_name, has_international_domain_name, is_disposable_email_address, ,
                is_free_email_address, syntax_failure_index, custom, duplicate_of, completed_on, ascii_email_address_domain_part,
                suggestions)
  @input_data = input_data
  @classification = classification
  @status = status
  @email_address = email_address
  @email_address_local_part = email_address_local_part
  @email_address_domain_part = email_address_domain_part
  @has_international_mailbox_name = has_international_mailbox_name
  @has_international_domain_name = has_international_domain_name
  @is_disposable_email_address = is_disposable_email_address
  @is_role_account = 
  @is_free_email_address = is_free_email_address
  @syntax_failure_index = syntax_failure_index
  @custom = custom
  @duplicate_of = duplicate_of
  @completed_on = completed_on
  @ascii_email_address_domain_part = ascii_email_address_domain_part
  @suggestions = suggestions
end

Instance Attribute Details

#ascii_email_address_domain_partObject (readonly)

Gets the domain part of the email address, converted to ASCII if needed using the punycode algorithm and with comments and folding white spaces stripped off.

If the non-punycode version of the domain part is needed, use @email_address_domain_part.



63
64
65
# File 'lib/verifalia/email_validation/entry.rb', line 63

def ascii_email_address_domain_part
  @ascii_email_address_domain_part
end

#classificationObject (readonly)

The classification for the status of this email address. See EntryClassification for a list of the values supported at the time this SDK has been released.



41
42
43
# File 'lib/verifalia/email_validation/entry.rb', line 41

def classification
  @classification
end

#completed_onObject (readonly)

The date this entry has been completed, if available.



95
96
97
# File 'lib/verifalia/email_validation/entry.rb', line 95

def completed_on
  @completed_on
end

#customObject (readonly)

The user-defined, optional string which is passed back upon completing the validation.



87
88
89
# File 'lib/verifalia/email_validation/entry.rb', line 87

def custom
  @custom
end

#duplicate_ofObject (readonly)

The zero-based index of the first occurrence of this email address in the parent Job, in the event the status for this entry is Duplicate; duplicated items do not expose any result detail apart from this and the eventual custom values.



92
93
94
# File 'lib/verifalia/email_validation/entry.rb', line 92

def duplicate_of
  @duplicate_of
end

#email_addressObject (readonly)

Gets the email address, without any eventual comment or folding white space. Returns nil if the input data is not a syntactically invalid e-mail address.



49
50
51
# File 'lib/verifalia/email_validation/entry.rb', line 49

def email_address
  @email_address
end

#email_address_domain_partObject (readonly)

Gets the domain part of the email address, without comments and folding white spaces.

If the ASCII-only (punycode) version of the domain part is needed, use @ascii_email_address_domain_part.



57
58
59
# File 'lib/verifalia/email_validation/entry.rb', line 57

def email_address_domain_part
  @email_address_domain_part
end

#email_address_local_partObject (readonly)

Gets the local part of the email address, without comments and folding white spaces.



52
53
54
# File 'lib/verifalia/email_validation/entry.rb', line 52

def email_address_local_part
  @email_address_local_part
end

#has_international_domain_nameObject (readonly)

If true, the email address has an international domain name.



69
70
71
# File 'lib/verifalia/email_validation/entry.rb', line 69

def has_international_domain_name
  @has_international_domain_name
end

#has_international_mailbox_nameObject (readonly)

If true, the email address has an international mailbox name.



66
67
68
# File 'lib/verifalia/email_validation/entry.rb', line 66

def has_international_mailbox_name
  @has_international_mailbox_name
end

#input_dataObject (readonly)

The input string being validated.



37
38
39
# File 'lib/verifalia/email_validation/entry.rb', line 37

def input_data
  @input_data
end

#is_disposable_email_addressObject (readonly)

If true, the email address comes from a disposable email address (DEA) provider.

See verifalia.com/help/email-validations/what-is-a-disposable-email-address-dea for additional information about disposable email addresses.



75
76
77
# File 'lib/verifalia/email_validation/entry.rb', line 75

def is_disposable_email_address
  @is_disposable_email_address
end

#is_free_email_addressObject (readonly)

If true, the email address comes from a free email address provider (e.g. gmail, yahoo, outlook / hotmail, …).



81
82
83
# File 'lib/verifalia/email_validation/entry.rb', line 81

def is_free_email_address
  @is_free_email_address
end

#is_role_accountObject (readonly)

If true, the local part of the email address is a well-known role account.



78
79
80
# File 'lib/verifalia/email_validation/entry.rb', line 78

def 
  @is_role_account
end

#statusObject (readonly)

The validation status for this entry. See EntryStatus for a list of the values supported at the time this SDK has been released.



45
46
47
# File 'lib/verifalia/email_validation/entry.rb', line 45

def status
  @status
end

#suggestionsObject (readonly)

The potential corrections for the input data, in the event Verifalia identified potential typos during the verification process.



98
99
100
# File 'lib/verifalia/email_validation/entry.rb', line 98

def suggestions
  @suggestions
end

#syntax_failure_indexObject (readonly)

The position of the character in the email address that eventually caused the syntax validation to fail.



84
85
86
# File 'lib/verifalia/email_validation/entry.rb', line 84

def syntax_failure_index
  @syntax_failure_index
end