Class: Postio::Models::PhoneResult
- Inherits:
-
Data
- Object
- Data
- Postio::Models::PhoneResult
- Defined in:
- lib/postio/models.rb
Overview
PhoneResult — validation verdict for one phone number.
Instance Attribute Summary collapse
-
#country_code ⇒ Object
readonly
Returns the value of attribute country_code.
-
#country_name ⇒ Object
readonly
Returns the value of attribute country_name.
-
#current_carrier ⇒ Object
readonly
Returns the value of attribute current_carrier.
-
#e164_format ⇒ Object
readonly
Returns the value of attribute e164_format.
-
#international_format ⇒ Object
readonly
Returns the value of attribute international_format.
-
#is_ported ⇒ Object
readonly
Returns the value of attribute is_ported.
-
#is_possible ⇒ Object
readonly
Returns the value of attribute is_possible.
-
#is_reachable ⇒ Object
readonly
Returns the value of attribute is_reachable.
-
#is_valid ⇒ Object
readonly
Returns the value of attribute is_valid.
-
#level ⇒ Object
readonly
Returns the value of attribute level.
-
#lookup_error ⇒ Object
readonly
Returns the value of attribute lookup_error.
-
#mcc ⇒ Object
readonly
Returns the value of attribute mcc.
-
#mnc ⇒ Object
readonly
Returns the value of attribute mnc.
-
#national_format ⇒ Object
readonly
Returns the value of attribute national_format.
-
#number ⇒ Object
readonly
Returns the value of attribute number.
-
#original_carrier ⇒ Object
readonly
Returns the value of attribute original_carrier.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Class Method Summary collapse
Instance Attribute Details
#country_code ⇒ Object (readonly)
Returns the value of attribute country_code
112 113 114 |
# File 'lib/postio/models.rb', line 112 def country_code @country_code end |
#country_name ⇒ Object (readonly)
Returns the value of attribute country_name
112 113 114 |
# File 'lib/postio/models.rb', line 112 def country_name @country_name end |
#current_carrier ⇒ Object (readonly)
Returns the value of attribute current_carrier
112 113 114 |
# File 'lib/postio/models.rb', line 112 def current_carrier @current_carrier end |
#e164_format ⇒ Object (readonly)
Returns the value of attribute e164_format
112 113 114 |
# File 'lib/postio/models.rb', line 112 def e164_format @e164_format end |
#international_format ⇒ Object (readonly)
Returns the value of attribute international_format
112 113 114 |
# File 'lib/postio/models.rb', line 112 def international_format @international_format end |
#is_ported ⇒ Object (readonly)
Returns the value of attribute is_ported
112 113 114 |
# File 'lib/postio/models.rb', line 112 def is_ported @is_ported end |
#is_possible ⇒ Object (readonly)
Returns the value of attribute is_possible
112 113 114 |
# File 'lib/postio/models.rb', line 112 def is_possible @is_possible end |
#is_reachable ⇒ Object (readonly)
Returns the value of attribute is_reachable
112 113 114 |
# File 'lib/postio/models.rb', line 112 def is_reachable @is_reachable end |
#is_valid ⇒ Object (readonly)
Returns the value of attribute is_valid
112 113 114 |
# File 'lib/postio/models.rb', line 112 def is_valid @is_valid end |
#level ⇒ Object (readonly)
Returns the value of attribute level
112 113 114 |
# File 'lib/postio/models.rb', line 112 def level @level end |
#lookup_error ⇒ Object (readonly)
Returns the value of attribute lookup_error
112 113 114 |
# File 'lib/postio/models.rb', line 112 def lookup_error @lookup_error end |
#mcc ⇒ Object (readonly)
Returns the value of attribute mcc
112 113 114 |
# File 'lib/postio/models.rb', line 112 def mcc @mcc end |
#mnc ⇒ Object (readonly)
Returns the value of attribute mnc
112 113 114 |
# File 'lib/postio/models.rb', line 112 def mnc @mnc end |
#national_format ⇒ Object (readonly)
Returns the value of attribute national_format
112 113 114 |
# File 'lib/postio/models.rb', line 112 def national_format @national_format end |
#number ⇒ Object (readonly)
Returns the value of attribute number
112 113 114 |
# File 'lib/postio/models.rb', line 112 def number @number end |
#original_carrier ⇒ Object (readonly)
Returns the value of attribute original_carrier
112 113 114 |
# File 'lib/postio/models.rb', line 112 def original_carrier @original_carrier end |
#type ⇒ Object (readonly)
Returns the value of attribute type
112 113 114 |
# File 'lib/postio/models.rb', line 112 def type @type end |
Class Method Details
.from_hash(h) ⇒ Object
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
# File 'lib/postio/models.rb', line 117 def self.from_hash(h) new( number: h["number"].to_s, is_valid: h["isValid"] == true, is_possible: h["isPossible"] == true, type: h["type"], country_code: h["countryCode"], country_name: h["countryName"], national_format: h["nationalFormat"], international_format: h["internationalFormat"], e164_format: h["e164Format"], original_carrier: h["originalCarrier"], current_carrier: h["currentCarrier"], is_ported: h["isPorted"], is_reachable: h["isReachable"], mcc: h["mcc"], mnc: h["mnc"], level: h["level"], lookup_error: h["lookupError"] ) end |