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.



332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb', line 332

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:



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

def 
    @properties['account_sid']
end

#assistant_idString

Returns The Assistant ID.

Returns:

  • (String)

    The Assistant ID.



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

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:



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

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:



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

def date_updated
    @properties['date_updated']
end

#idString

Returns The Feedback ID.

Returns:

  • (String)

    The Feedback ID.



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

def id
    @properties['id']
end

#inspectObject

Provide a detailed, user friendly representation



420
421
422
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb', line 420

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

#message_idString

Returns The Message ID.

Returns:

  • (String)

    The Message ID.



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

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)



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

def score
    @properties['score']
end

#session_idString

Returns The Session ID.

Returns:

  • (String)

    The Session ID.



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

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.



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

def text
    @properties['text']
end

#to_sObject

Provide a user friendly representation



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

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.



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

def user_sid
    @properties['user_sid']
end