Class: RingCaptcha::RingCaptchaVerification

Inherits:
Object
  • Object
show all
Defined in:
lib/ringcaptcha.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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
  @message = 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_nameObject (readonly)

Returns the value of attribute carrier_name.



10
11
12
# File 'lib/ringcaptcha.rb', line 10

def carrier_name
  @carrier_name
end

#geolocationObject (readonly)

Returns the value of attribute geolocation.



10
11
12
# File 'lib/ringcaptcha.rb', line 10

def geolocation
  @geolocation
end

#messageObject (readonly)

Returns the value of attribute message.



10
11
12
# File 'lib/ringcaptcha.rb', line 10

def message
  @message
end

#phone_numberObject (readonly)

Returns the value of attribute phone_number.



10
11
12
# File 'lib/ringcaptcha.rb', line 10

def phone_number
  @phone_number
end

#phone_typeObject (readonly)

Returns the value of attribute phone_type.



10
11
12
# File 'lib/ringcaptcha.rb', line 10

def phone_type
  @phone_type
end

#roamingObject (readonly)

Returns the value of attribute roaming.



10
11
12
# File 'lib/ringcaptcha.rb', line 10

def roaming
  @roaming
end

#statusObject (readonly)

Returns the value of attribute status.



10
11
12
# File 'lib/ringcaptcha.rb', line 10

def status
  @status
end

#transaction_idObject (readonly)

Returns the value of attribute transaction_id.



10
11
12
# File 'lib/ringcaptcha.rb', line 10

def transaction_id
  @transaction_id
end