Class: VerificationToken
- Inherits:
-
Object
- Object
- VerificationToken
- Defined in:
- lib/trustcaptcha/model/verification_token.rb
Instance Attribute Summary collapse
-
#api_endpoint ⇒ Object
readonly
Returns the value of attribute api_endpoint.
-
#encrypted_access_token ⇒ Object
readonly
Returns the value of attribute encrypted_access_token.
-
#verification_id ⇒ Object
readonly
Returns the value of attribute verification_id.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(api_endpoint, verification_id, encrypted_access_token) ⇒ VerificationToken
constructor
A new instance of VerificationToken.
Constructor Details
#initialize(api_endpoint, verification_id, encrypted_access_token) ⇒ VerificationToken
Returns a new instance of VerificationToken.
7 8 9 10 11 |
# File 'lib/trustcaptcha/model/verification_token.rb', line 7 def initialize(api_endpoint, verification_id, encrypted_access_token) @api_endpoint = api_endpoint @verification_id = verification_id @encrypted_access_token = encrypted_access_token end |
Instance Attribute Details
#api_endpoint ⇒ Object (readonly)
Returns the value of attribute api_endpoint.
5 6 7 |
# File 'lib/trustcaptcha/model/verification_token.rb', line 5 def api_endpoint @api_endpoint end |
#encrypted_access_token ⇒ Object (readonly)
Returns the value of attribute encrypted_access_token.
5 6 7 |
# File 'lib/trustcaptcha/model/verification_token.rb', line 5 def encrypted_access_token @encrypted_access_token end |
#verification_id ⇒ Object (readonly)
Returns the value of attribute verification_id.
5 6 7 |
# File 'lib/trustcaptcha/model/verification_token.rb', line 5 def verification_id @verification_id end |
Class Method Details
.from_base64(base64_string) ⇒ Object
13 14 15 16 17 |
# File 'lib/trustcaptcha/model/verification_token.rb', line 13 def self.from_base64(base64_string) json_string = Base64.decode64(base64_string) data = JSON.parse(json_string) new(data['apiEndpoint'], data['verificationId'], data['encryptedAccessToken']) end |