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.



213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb', line 213

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:



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

def 
    @properties['account_sid']
end

#assistant_idString

Returns The Assistant ID.

Returns:

  • (String)

    The Assistant ID.



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

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:



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

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:



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

def date_updated
    @properties['date_updated']
end

#idString

Returns The Feedback ID.

Returns:

  • (String)

    The Feedback ID.



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

def id
    @properties['id']
end

#inspectObject

Provide a detailed, user friendly representation



300
301
302
# File 'lib/twilio-ruby/rest/assistants/v1/assistant/feedback.rb', line 300

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

#message_idString

Returns The Message ID.

Returns:

  • (String)

    The Message ID.



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

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)



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

def score
    @properties['score']
end

#session_idString

Returns The Session ID.

Returns:

  • (String)

    The Session ID.



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

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.



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

def text
    @properties['text']
end

#to_sObject

Provide a user friendly representation



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

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.



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

def user_sid
    @properties['user_sid']
end