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.



324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb', line 324

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:



358
359
360
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb', line 358

def 
    @properties['account_sid']
end

#assistant_idString

Returns The Assistant ID.

Returns:

  • (String)

    The Assistant ID.



346
347
348
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb', line 346

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:



394
395
396
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb', line 394

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:



400
401
402
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb', line 400

def date_updated
    @properties['date_updated']
end

#idString

Returns The Feedback ID.

Returns:

  • (String)

    The Feedback ID.



352
353
354
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb', line 352

def id
    @properties['id']
end

#inspectObject

Provide a detailed, user friendly representation



412
413
414
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb', line 412

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

#message_idString

Returns The Message ID.

Returns:

  • (String)

    The Message ID.



370
371
372
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb', line 370

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)



376
377
378
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb', line 376

def score
    @properties['score']
end

#session_idString

Returns The Session ID.

Returns:

  • (String)

    The Session ID.



382
383
384
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb', line 382

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.



388
389
390
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb', line 388

def text
    @properties['text']
end

#to_sObject

Provide a user friendly representation



406
407
408
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb', line 406

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.



364
365
366
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb', line 364

def user_sid
    @properties['user_sid']
end