Class: SmartId::Api::Response
- Inherits:
-
Object
- Object
- SmartId::Api::Response
- Defined in:
- lib/smart_id/api/response.rb
Instance Attribute Summary collapse
-
#session_id ⇒ Object
readonly
Returns the value of attribute session_id.
Instance Method Summary collapse
-
#initialize(response_body, authentication_hash) ⇒ Response
constructor
A new instance of Response.
- #verification_code ⇒ Object
Constructor Details
#initialize(response_body, authentication_hash) ⇒ Response
Returns a new instance of Response.
5 6 7 8 9 |
# File 'lib/smart_id/api/response.rb', line 5 def initialize(response_body, authentication_hash) @body = response_body @session_id = response_body["sessionID"] @authentication_hash = authentication_hash end |
Instance Attribute Details
#session_id ⇒ Object (readonly)
Returns the value of attribute session_id.
3 4 5 |
# File 'lib/smart_id/api/response.rb', line 3 def session_id @session_id end |
Instance Method Details
#verification_code ⇒ Object
11 12 13 |
# File 'lib/smart_id/api/response.rb', line 11 def verification_code @verification_code ||= SmartId::VerificationCodeCalculator.calculate(@authentication_hash.calculate_digest) end |