Class: TruthID::AuthResponse
- Inherits:
-
Object
- Object
- TruthID::AuthResponse
- Defined in:
- lib/truthid/types.rb
Overview
AuthResponse é o que chega do mobile (chaves camelCase do JSON mapeadas manualmente)
Instance Attribute Summary collapse
-
#approved ⇒ Object
readonly
Returns the value of attribute approved.
-
#device_address ⇒ Object
readonly
Returns the value of attribute device_address.
-
#nonce ⇒ Object
readonly
Returns the value of attribute nonce.
-
#signature ⇒ Object
readonly
Returns the value of attribute signature.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(approved:, nonce:, signature:, device_address:) ⇒ AuthResponse
constructor
A new instance of AuthResponse.
Constructor Details
#initialize(approved:, nonce:, signature:, device_address:) ⇒ AuthResponse
Returns a new instance of AuthResponse.
29 30 31 32 33 34 |
# File 'lib/truthid/types.rb', line 29 def initialize(approved:, nonce:, signature:, device_address:) @approved = approved @nonce = nonce @signature = signature @device_address = device_address end |
Instance Attribute Details
#approved ⇒ Object (readonly)
Returns the value of attribute approved.
27 28 29 |
# File 'lib/truthid/types.rb', line 27 def approved @approved end |
#device_address ⇒ Object (readonly)
Returns the value of attribute device_address.
27 28 29 |
# File 'lib/truthid/types.rb', line 27 def device_address @device_address end |
#nonce ⇒ Object (readonly)
Returns the value of attribute nonce.
27 28 29 |
# File 'lib/truthid/types.rb', line 27 def nonce @nonce end |
#signature ⇒ Object (readonly)
Returns the value of attribute signature.
27 28 29 |
# File 'lib/truthid/types.rb', line 27 def signature @signature end |
Class Method Details
.from_hash(h) ⇒ Object
36 37 38 39 40 41 42 43 |
# File 'lib/truthid/types.rb', line 36 def self.from_hash(h) new( approved: h["approved"], nonce: h["nonce"], signature: h["signature"], device_address: h["deviceAddress"] ) end |