Class: RingCaptcha::RingCaptchaVerification
- Inherits:
-
Object
- Object
- RingCaptcha::RingCaptchaVerification
- Defined in:
- lib/ringcaptcha.rb
Instance Attribute Summary collapse
-
#carrier_name ⇒ Object
readonly
Returns the value of attribute carrier_name.
-
#geolocation ⇒ Object
readonly
Returns the value of attribute geolocation.
-
#message ⇒ Object
readonly
Returns the value of attribute message.
-
#phone_number ⇒ Object
readonly
Returns the value of attribute phone_number.
-
#phone_type ⇒ Object
readonly
Returns the value of attribute phone_type.
-
#roaming ⇒ Object
readonly
Returns the value of attribute roaming.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#transaction_id ⇒ Object
readonly
Returns the value of attribute transaction_id.
Instance Method Summary collapse
-
#initialize(json) ⇒ RingCaptchaVerification
constructor
A new instance of RingCaptchaVerification.
Constructor Details
#initialize(json) ⇒ RingCaptchaVerification
Returns a new instance of RingCaptchaVerification.
12 13 14 15 16 17 18 19 20 |
# File 'lib/ringcaptcha.rb', line 12 def initialize(json) @transaction_id = json.has_key?("id") ? json["id"] : false @phone_number = json.has_key?("phone") ? json["phone"] : false @geolocation = json.has_key?("geolocation") ? json["geolocation"] : false = json.has_key?("message") ? json["message"] : false @phone_type = json.has_key?("phone_type") ? json["phone_type"] : false @carrier_name = json.has_key?("carrier") ? json["carrier"] : false @roaming = json.has_key?("roaming") ? json["roaming"] : false end |
Instance Attribute Details
#carrier_name ⇒ Object (readonly)
Returns the value of attribute carrier_name.
10 11 12 |
# File 'lib/ringcaptcha.rb', line 10 def carrier_name @carrier_name end |
#geolocation ⇒ Object (readonly)
Returns the value of attribute geolocation.
10 11 12 |
# File 'lib/ringcaptcha.rb', line 10 def geolocation @geolocation end |
#message ⇒ Object (readonly)
Returns the value of attribute message.
10 11 12 |
# File 'lib/ringcaptcha.rb', line 10 def end |
#phone_number ⇒ Object (readonly)
Returns the value of attribute phone_number.
10 11 12 |
# File 'lib/ringcaptcha.rb', line 10 def phone_number @phone_number end |
#phone_type ⇒ Object (readonly)
Returns the value of attribute phone_type.
10 11 12 |
# File 'lib/ringcaptcha.rb', line 10 def phone_type @phone_type end |
#roaming ⇒ Object (readonly)
Returns the value of attribute roaming.
10 11 12 |
# File 'lib/ringcaptcha.rb', line 10 def roaming @roaming end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
10 11 12 |
# File 'lib/ringcaptcha.rb', line 10 def status @status end |
#transaction_id ⇒ Object (readonly)
Returns the value of attribute transaction_id.
10 11 12 |
# File 'lib/ringcaptcha.rb', line 10 def transaction_id @transaction_id end |