Class: Aws::Lex::Conversation::Response::Close

Inherits:
Base
  • Object
show all
Defined in:
lib/aws/lex/conversation/response/close.rb

Instance Attribute Summary

Attributes inherited from Base

#fulfillment_state, #messages, #request_attributes, #session_state

Instance Method Summary collapse

Methods inherited from Base

#to_lex

Constructor Details

#initialize(opts = {}) ⇒ Close

Returns a new instance of Close.



8
9
10
11
12
# File 'lib/aws/lex/conversation/response/close.rb', line 8

def initialize(opts = {})
  super
  session_state.dialog_action = dialog_action
  session_state.intent.state = opts.fetch(:fulfillment_state)
end

Instance Method Details

#dialog_actionObject



14
15
16
17
18
# File 'lib/aws/lex/conversation/response/close.rb', line 14

def dialog_action
  Aws::Lex::Conversation::Type::DialogAction.shrink_wrap(
    type: 'Close'
  )
end