Class: Twilio::REST::Assistants::V1::AssistantContext::FeedbackList::AssistantsV1ServiceCreateFeedbackRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ AssistantsV1ServiceCreateFeedbackRequest

Returns a new instance of AssistantsV1ServiceCreateFeedbackRequest.



30
31
32
33
34
35
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb', line 30

def initialize(payload)
        @message_id = payload["message_id"]
        @score = payload["score"]
        @session_id = payload["session_id"]
        @text = payload["text"]
end

Instance Attribute Details

#message_idObject

Parameters:

  • : (message_id)
    String

    The message ID.

  • : (score)
    Float

    The score to be given(0-1).

  • : (session_id)
    String

    The Session ID.

  • : (text)
    String

    The text to be given as feedback.



29
30
31
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb', line 29

def message_id
  @message_id
end

#scoreObject

Parameters:

  • : (message_id)
    String

    The message ID.

  • : (score)
    Float

    The score to be given(0-1).

  • : (session_id)
    String

    The Session ID.

  • : (text)
    String

    The text to be given as feedback.



29
30
31
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb', line 29

def score
  @score
end

#session_idObject

Parameters:

  • : (message_id)
    String

    The message ID.

  • : (score)
    Float

    The score to be given(0-1).

  • : (session_id)
    String

    The Session ID.

  • : (text)
    String

    The text to be given as feedback.



29
30
31
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb', line 29

def session_id
  @session_id
end

#textObject

Parameters:

  • : (message_id)
    String

    The message ID.

  • : (score)
    Float

    The score to be given(0-1).

  • : (session_id)
    String

    The Session ID.

  • : (text)
    String

    The text to be given as feedback.



29
30
31
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb', line 29

def text
  @text
end

Instance Method Details

#to_json(options = {}) ⇒ Object



36
37
38
39
40
41
42
43
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb', line 36

def to_json(options = {})
{
        "message_id": @message_id,
        "score": @score,
        "session_id": @session_id,
        "text": @text,
}.to_json(options)
end