Class: SelfSDK::Messages::DocumentSignResponse
- Defined in:
- lib/messages/document_sign_resp.rb
Constant Summary collapse
- MSG_TYPE =
"document.sign.resp"
- DEFAULT_EXP_TIMEOUT =
900
Instance Attribute Summary collapse
-
#objects ⇒ Object
Returns the value of attribute objects.
-
#signed_objects ⇒ Object
Returns the value of attribute signed_objects.
Attributes inherited from Base
#description, #exp_timeout, #expires, #fields, #from, #from_device, #id, #input, #intermediary, #payload, #status, #sub, #to, #to_device, #typ
Instance Method Summary collapse
-
#initialize(messaging) ⇒ DocumentSignResponse
constructor
A new instance of DocumentSignResponse.
- #parse(input, envelope) ⇒ Object
Methods inherited from Base
#accepted?, #encrypt_message, #errored?, #rejected?, #request, #send_message, #unauthorized?, #validate!
Constructor Details
#initialize(messaging) ⇒ DocumentSignResponse
Returns a new instance of DocumentSignResponse.
17 18 19 20 |
# File 'lib/messages/document_sign_resp.rb', line 17 def initialize(messaging) @typ = MSG_TYPE super end |
Instance Attribute Details
#objects ⇒ Object
Returns the value of attribute objects.
15 16 17 |
# File 'lib/messages/document_sign_resp.rb', line 15 def objects @objects end |
#signed_objects ⇒ Object
Returns the value of attribute signed_objects.
15 16 17 |
# File 'lib/messages/document_sign_resp.rb', line 15 def signed_objects @signed_objects end |
Instance Method Details
#parse(input, envelope) ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/messages/document_sign_resp.rb', line 22 def parse(input, envelope) @input = input @typ = SelfSDK::Messages::DocumentSignResponse::MSG_TYPE @payload = get_payload(input) @id = payload[:cid] @from = payload[:iss] @to = payload[:sub] @expires = ::Time.parse(payload[:exp]) @issued = ::Time.parse(payload[:iat]) @audience = payload[:aud] @status = payload[:status] @objects = payload[:objects] @signed_objects = payload[:signed_objects] end |