Class: Twilio::REST::Assistants::V1::AssistantContext::FeedbackInstance

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

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, id: nil) ⇒ FeedbackInstance

Initialize the FeedbackInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio

  • account_sid (String)

    The SID of the Account that created this Feedback resource.

  • sid (String)

    The SID of the Call resource to fetch.



205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb', line 205

def initialize(version, payload , id: nil)
    super(version)
    
    # Marshaled Properties
    @properties = { 
        'assistant_id' => payload['assistant_id'],
        'id' => payload['id'],
        'account_sid' => payload['account_sid'],
        'user_sid' => payload['user_sid'],
        'message_id' => payload['message_id'],
        'score' => payload['score'],
        'session_id' => payload['session_id'],
        'text' => payload['text'],
        'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
        'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
    }
end

Instance Method Details

#account_sidString

Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Feedback.

Returns:



238
239
240
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb', line 238

def 
    @properties['account_sid']
end

#assistant_idString

Returns The Assistant ID.

Returns:

  • (String)

    The Assistant ID.



226
227
228
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb', line 226

def assistant_id
    @properties['assistant_id']
end

#date_createdTime

Returns The date and time in GMT when the Feedback was created specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.

Returns:



274
275
276
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb', line 274

def date_created
    @properties['date_created']
end

#date_updatedTime

Returns The date and time in GMT when the Feedback was last updated specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.

Returns:



280
281
282
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb', line 280

def date_updated
    @properties['date_updated']
end

#idString

Returns The Feedback ID.

Returns:

  • (String)

    The Feedback ID.



232
233
234
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb', line 232

def id
    @properties['id']
end

#inspectObject

Provide a detailed, user friendly representation



292
293
294
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb', line 292

def inspect
    "<Twilio.Assistants.V1.FeedbackInstance>"
end

#message_idString

Returns The Message ID.

Returns:

  • (String)

    The Message ID.



250
251
252
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb', line 250

def message_id
    @properties['message_id']
end

#scoreFloat

Returns The Score to provide as Feedback (0-1).

Returns:

  • (Float)

    The Score to provide as Feedback (0-1)



256
257
258
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb', line 256

def score
    @properties['score']
end

#session_idString

Returns The Session ID.

Returns:

  • (String)

    The Session ID.



262
263
264
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb', line 262

def session_id
    @properties['session_id']
end

#textString

Returns The text to be given as feedback.

Returns:

  • (String)

    The text to be given as feedback.



268
269
270
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb', line 268

def text
    @properties['text']
end

#to_sObject

Provide a user friendly representation



286
287
288
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb', line 286

def to_s
    "<Twilio.Assistants.V1.FeedbackInstance>"
end

#user_sidString

Returns The SID of the User created the Feedback.

Returns:

  • (String)

    The SID of the User created the Feedback.



244
245
246
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb', line 244

def user_sid
    @properties['user_sid']
end