Class: AlexaRubykit::SessionEndedRequest
- Defined in:
- lib/alexa_rubykit/session_ended_request.rb
Instance Attribute Summary collapse
-
#reason ⇒ Object
Returns the value of attribute reason.
-
#request_id ⇒ Object
Returns the value of attribute request_id.
-
#type ⇒ Object
Returns the value of attribute type.
Attributes inherited from Request
#response, #session, #shouldEndSession, #version
Instance Method Summary collapse
-
#initialize(request_id, reason) ⇒ SessionEndedRequest
constructor
TODO: Validate the reason.
- #to_s ⇒ Object
Methods inherited from Request
Constructor Details
#initialize(request_id, reason) ⇒ 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 14 |
# File 'lib/alexa_rubykit/session_ended_request.rb', line 9 def initialize(request_id, reason) raise ArgumentError, 'Request ID should exist on a Session Ended Request.' if request_id.nil? @type = 'SESSION_ENDED_REQUEST' @request_id = request_id @reason = reason end |
Instance Attribute Details
#reason ⇒ Object
Returns the value of attribute reason.
4 5 6 |
# File 'lib/alexa_rubykit/session_ended_request.rb', line 4 def reason @reason end |
#request_id ⇒ Object
Returns the value of attribute request_id.
4 5 6 |
# File 'lib/alexa_rubykit/session_ended_request.rb', line 4 def request_id @request_id end |
#type ⇒ Object
Returns the value of attribute type.
4 5 6 |
# File 'lib/alexa_rubykit/session_ended_request.rb', line 4 def type @type end |
Instance Method Details
#to_s ⇒ Object
15 16 17 |
# File 'lib/alexa_rubykit/session_ended_request.rb', line 15 def to_s "Session Ended for requestID: #{@request_id} with reason #{@reason}" end |