Class: VerificationResult
- Inherits:
-
Object
- Object
- VerificationResult
- Defined in:
- lib/trustcaptcha/model/verification_result.rb
Instance Attribute Summary collapse
-
#browser ⇒ Object
readonly
Returns the value of attribute browser.
-
#captcha_id ⇒ Object
readonly
Returns the value of attribute captcha_id.
-
#creation_timestamp ⇒ Object
readonly
Returns the value of attribute creation_timestamp.
-
#device_family ⇒ Object
readonly
Returns the value of attribute device_family.
-
#ip_address ⇒ Object
readonly
Returns the value of attribute ip_address.
-
#mode ⇒ Object
readonly
Returns the value of attribute mode.
-
#operating_system ⇒ Object
readonly
Returns the value of attribute operating_system.
-
#origin ⇒ Object
readonly
Returns the value of attribute origin.
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
-
#release_timestamp ⇒ Object
readonly
Returns the value of attribute release_timestamp.
-
#retrieval_timestamp ⇒ Object
readonly
Returns the value of attribute retrieval_timestamp.
-
#score ⇒ Object
readonly
Returns the value of attribute score.
-
#verification_id ⇒ Object
readonly
Returns the value of attribute verification_id.
-
#verification_passed ⇒ Object
readonly
Returns the value of attribute verification_passed.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data) ⇒ VerificationResult
constructor
A new instance of VerificationResult.
- #to_json(*_args) ⇒ Object
Constructor Details
#initialize(data) ⇒ VerificationResult
Returns a new instance of VerificationResult.
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/trustcaptcha/model/verification_result.rb', line 8 def initialize(data) @captcha_id = data['captchaId'] @verification_id = data['verificationId'] @score = data['score'] @reason = data['reason'] @mode = data['mode'] @origin = data['origin'] @ip_address = data['ipAddress'] @device_family = data['deviceFamily'] @operating_system = data['operatingSystem'] @browser = data['browser'] @creation_timestamp = data['creationTimestamp'] @release_timestamp = data['releaseTimestamp'] @retrieval_timestamp = data['retrievalTimestamp'] @verification_passed = data['verificationPassed'] end |
Instance Attribute Details
#browser ⇒ Object (readonly)
Returns the value of attribute browser.
4 5 6 |
# File 'lib/trustcaptcha/model/verification_result.rb', line 4 def browser @browser end |
#captcha_id ⇒ Object (readonly)
Returns the value of attribute captcha_id.
4 5 6 |
# File 'lib/trustcaptcha/model/verification_result.rb', line 4 def captcha_id @captcha_id end |
#creation_timestamp ⇒ Object (readonly)
Returns the value of attribute creation_timestamp.
4 5 6 |
# File 'lib/trustcaptcha/model/verification_result.rb', line 4 def @creation_timestamp end |
#device_family ⇒ Object (readonly)
Returns the value of attribute device_family.
4 5 6 |
# File 'lib/trustcaptcha/model/verification_result.rb', line 4 def device_family @device_family end |
#ip_address ⇒ Object (readonly)
Returns the value of attribute ip_address.
4 5 6 |
# File 'lib/trustcaptcha/model/verification_result.rb', line 4 def ip_address @ip_address end |
#mode ⇒ Object (readonly)
Returns the value of attribute mode.
4 5 6 |
# File 'lib/trustcaptcha/model/verification_result.rb', line 4 def mode @mode end |
#operating_system ⇒ Object (readonly)
Returns the value of attribute operating_system.
4 5 6 |
# File 'lib/trustcaptcha/model/verification_result.rb', line 4 def @operating_system end |
#origin ⇒ Object (readonly)
Returns the value of attribute origin.
4 5 6 |
# File 'lib/trustcaptcha/model/verification_result.rb', line 4 def origin @origin end |
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
4 5 6 |
# File 'lib/trustcaptcha/model/verification_result.rb', line 4 def reason @reason end |
#release_timestamp ⇒ Object (readonly)
Returns the value of attribute release_timestamp.
4 5 6 |
# File 'lib/trustcaptcha/model/verification_result.rb', line 4 def @release_timestamp end |
#retrieval_timestamp ⇒ Object (readonly)
Returns the value of attribute retrieval_timestamp.
4 5 6 |
# File 'lib/trustcaptcha/model/verification_result.rb', line 4 def @retrieval_timestamp end |
#score ⇒ Object (readonly)
Returns the value of attribute score.
4 5 6 |
# File 'lib/trustcaptcha/model/verification_result.rb', line 4 def score @score end |
#verification_id ⇒ Object (readonly)
Returns the value of attribute verification_id.
4 5 6 |
# File 'lib/trustcaptcha/model/verification_result.rb', line 4 def verification_id @verification_id end |
#verification_passed ⇒ Object (readonly)
Returns the value of attribute verification_passed.
4 5 6 |
# File 'lib/trustcaptcha/model/verification_result.rb', line 4 def verification_passed @verification_passed end |
Class Method Details
.from_json(json_data) ⇒ Object
25 26 27 28 |
# File 'lib/trustcaptcha/model/verification_result.rb', line 25 def self.from_json(json_data) data = JSON.parse(json_data) new(data) end |
Instance Method Details
#to_json(*_args) ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/trustcaptcha/model/verification_result.rb', line 30 def to_json(*_args) { captchaId: @captcha_id, verificationId: @verification_id, score: @score, reason: @reason, mode: @mode, origin: @origin, ipAddress: @ip_address, deviceFamily: @device_family, operatingSystem: @operating_system, browser: @browser, creationTimestamp: @creation_timestamp, releaseTimestamp: @release_timestamp, retrievalTimestamp: @retrieval_timestamp, verificationPassed: @verification_passed }.to_json end |