Class: Apiddress::ValidationChecks

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

Overview

Individual checks performed on an email address.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#catch_allObject (readonly)

Returns the value of attribute catch_all

Returns:

  • (Object)

    the current value of catch_all



8
9
10
# File 'lib/apiddress/models.rb', line 8

def catch_all
  @catch_all
end

#disposableObject (readonly)

Returns the value of attribute disposable

Returns:

  • (Object)

    the current value of disposable



8
9
10
# File 'lib/apiddress/models.rb', line 8

def disposable
  @disposable
end

#domain_existsObject (readonly)

Returns the value of attribute domain_exists

Returns:

  • (Object)

    the current value of domain_exists



8
9
10
# File 'lib/apiddress/models.rb', line 8

def domain_exists
  @domain_exists
end

#free_providerObject (readonly)

Returns the value of attribute free_provider

Returns:

  • (Object)

    the current value of free_provider



8
9
10
# File 'lib/apiddress/models.rb', line 8

def free_provider
  @free_provider
end

#mxObject (readonly)

Returns the value of attribute mx

Returns:

  • (Object)

    the current value of mx



8
9
10
# File 'lib/apiddress/models.rb', line 8

def mx
  @mx
end

#role_basedObject (readonly)

Returns the value of attribute role_based

Returns:

  • (Object)

    the current value of role_based



8
9
10
# File 'lib/apiddress/models.rb', line 8

def role_based
  @role_based
end

#smtpObject (readonly)

Returns the value of attribute smtp

Returns:

  • (Object)

    the current value of smtp



8
9
10
# File 'lib/apiddress/models.rb', line 8

def smtp
  @smtp
end

#spam_trap_riskObject (readonly)

Returns the value of attribute spam_trap_risk

Returns:

  • (Object)

    the current value of spam_trap_risk



8
9
10
# File 'lib/apiddress/models.rb', line 8

def spam_trap_risk
  @spam_trap_risk
end

#syntaxObject (readonly)

Returns the value of attribute syntax

Returns:

  • (Object)

    the current value of syntax



8
9
10
# File 'lib/apiddress/models.rb', line 8

def syntax
  @syntax
end

#typoObject (readonly)

Returns the value of attribute typo

Returns:

  • (Object)

    the current value of typo



8
9
10
# File 'lib/apiddress/models.rb', line 8

def typo
  @typo
end

Class Method Details

.from_hash(data) ⇒ ValidationChecks

Parameters:

  • data (Hash)

Returns:



25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/apiddress/models.rb', line 25

def self.from_hash(data)
  new(
    syntax:        data["syntax"],
    domain_exists: data["domain_exists"],
    mx:            data["mx"],
    smtp:          data["smtp"],
    disposable:    data["disposable"],
    role_based:    data["role_based"],
    free_provider: data["free_provider"],
    catch_all:     data["catch_all"],
    typo:          data["typo"],
    spam_trap_risk: data["spam_trap_risk"],
  )
end