Class: BetterAlexaRubyKit::SessionEndedRequest
- Defined in:
- lib/better_alexa_rubykit/session_ended_request.rb
Instance Attribute Summary collapse
-
#reason ⇒ Object
Returns the value of attribute reason.
Attributes inherited from Request
#json, #locale, #request_id, #session, #type, #version
Instance Method Summary collapse
-
#initialize(json_request) ⇒ SessionEndedRequest
constructor
TODO: Validate the reason.
-
#to_s ⇒ Object
Ouputs the request_id and the reason why.
Methods inherited from Request
Constructor Details
#initialize(json_request) ⇒ SessionEndedRequest
TODO: Validate the reason. We still don’t know if all of the parameters in the request are required. Checking for the presence of intent on an IntentRequest.
9 10 11 12 13 |
# File 'lib/better_alexa_rubykit/session_ended_request.rb', line 9 def initialize(json_request) super @type = 'SESSION_ENDED_REQUEST' @reason = json_request['request']['reason'] end |
Instance Attribute Details
#reason ⇒ Object
Returns the value of attribute reason.
4 5 6 |
# File 'lib/better_alexa_rubykit/session_ended_request.rb', line 4 def reason @reason end |
Instance Method Details
#to_s ⇒ Object
Ouputs the request_id and the reason why.
16 17 18 |
# File 'lib/better_alexa_rubykit/session_ended_request.rb', line 16 def to_s "Session Ended for requestID: #{request_id} with reason #{reason}" end |