Class: Apiddress::ValidateEmailResponse

Inherits:
Data
  • Object
show all
Defined in:
lib/apiddress/models.rb

Overview

Result of validating a single email address.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#checksObject (readonly)

Returns the value of attribute checks

Returns:

  • (Object)

    the current value of checks



42
43
44
# File 'lib/apiddress/models.rb', line 42

def checks
  @checks
end

#created_atObject (readonly)

Returns the value of attribute created_at

Returns:

  • (Object)

    the current value of created_at



42
43
44
# File 'lib/apiddress/models.rb', line 42

def created_at
  @created_at
end

#emailObject (readonly)

Returns the value of attribute email

Returns:

  • (Object)

    the current value of email



42
43
44
# File 'lib/apiddress/models.rb', line 42

def email
  @email
end

#normalized_emailObject (readonly)

Returns the value of attribute normalized_email

Returns:

  • (Object)

    the current value of normalized_email



42
43
44
# File 'lib/apiddress/models.rb', line 42

def normalized_email
  @normalized_email
end

#providerObject (readonly)

Returns the value of attribute provider

Returns:

  • (Object)

    the current value of provider



42
43
44
# File 'lib/apiddress/models.rb', line 42

def provider
  @provider
end

#reasonObject (readonly)

Returns the value of attribute reason

Returns:

  • (Object)

    the current value of reason



42
43
44
# File 'lib/apiddress/models.rb', line 42

def reason
  @reason
end

#scoreObject (readonly)

Returns the value of attribute score

Returns:

  • (Object)

    the current value of score



42
43
44
# File 'lib/apiddress/models.rb', line 42

def score
  @score
end

#statusObject (readonly)

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



42
43
44
# File 'lib/apiddress/models.rb', line 42

def status
  @status
end

#suggestionObject (readonly)

Returns the value of attribute suggestion

Returns:

  • (Object)

    the current value of suggestion



42
43
44
# File 'lib/apiddress/models.rb', line 42

def suggestion
  @suggestion
end

#validObject (readonly)

Returns the value of attribute valid

Returns:

  • (Object)

    the current value of valid



42
43
44
# File 'lib/apiddress/models.rb', line 42

def valid
  @valid
end

Class Method Details

.from_hash(data) ⇒ Object



58
59
60
61
62
63
64
65
66
67
68
69
70
71
# File 'lib/apiddress/models.rb', line 58

def self.from_hash(data)
  new(
    email:            data["email"],
    normalized_email: data["normalized_email"],
    status:           data["status"],
    valid:            data["valid"],
    score:            data["score"].to_f,
    reason:           data["reason"],
    suggestion:       data["suggestion"],
    checks:           ValidationChecks.from_hash(data["checks"]),
    provider:         data["provider"],
    created_at:       data["created_at"],
  )
end