Module: Aws::Lex::Conversation::Support::Mixins::Responses

Included in:
Aws::Lex::Conversation
Defined in:
lib/aws/lex/conversation/support/mixins/responses.rb

Instance Method Summary collapse

Instance Method Details

#close(opts = {}) ⇒ Object



9
10
11
12
13
14
15
16
17
# File 'lib/aws/lex/conversation/support/mixins/responses.rb', line 9

def close(opts = {})
  params = {
    session_state: lex.session_state,
    request_attributes: lex.request_attributes,
    intent: lex.current_intent
  }.merge(opts)
  lex.session_state.intent = params.fetch(:intent)
  Response::Close.new(params).to_lex
end

#confirm_intent(opts = {}) ⇒ Object



19
20
21
22
23
24
25
26
27
# File 'lib/aws/lex/conversation/support/mixins/responses.rb', line 19

def confirm_intent(opts = {})
  params = {
    session_state: lex.session_state,
    request_attributes: lex.request_attributes,
    intent: lex.current_intent
  }.merge(opts)
  lex.session_state.intent = params.fetch(:intent)
  Response::ConfirmIntent.new(params).to_lex
end

#delegate(opts = {}) ⇒ Object



29
30
31
32
33
34
35
36
37
# File 'lib/aws/lex/conversation/support/mixins/responses.rb', line 29

def delegate(opts = {})
  params = {
    session_state: lex.session_state,
    request_attributes: lex.request_attributes,
    intent: lex.current_intent
  }.merge(opts)
  lex.session_state.intent = params.fetch(:intent)
  Response::Delegate.new(params).to_lex
end

#elicit_intent(opts = {}) ⇒ Object



39
40
41
42
43
44
45
46
47
# File 'lib/aws/lex/conversation/support/mixins/responses.rb', line 39

def elicit_intent(opts = {})
  params = {
    session_state: lex.session_state,
    request_attributes: lex.request_attributes,
    intent: lex.current_intent
  }.merge(opts)
  lex.session_state.intent = params.fetch(:intent)
  Response::ElicitIntent.new(params).to_lex
end

#elicit_slot(opts = {}) ⇒ Object



49
50
51
52
53
54
55
56
57
# File 'lib/aws/lex/conversation/support/mixins/responses.rb', line 49

def elicit_slot(opts = {})
  params = {
    session_state: lex.session_state,
    request_attributes: lex.request_attributes,
    intent: lex.current_intent
  }.merge(opts)
  lex.session_state.intent = params.fetch(:intent)
  Response::ElicitSlot.new(params).to_lex
end