Class: Twilio::REST::FlexApi::V1::InsightsConversationsInstance

Inherits:
InstanceResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/flex_api/v1/insights_conversations.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload) ⇒ InsightsConversationsInstance

Initialize the InsightsConversationsInstance

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 InsightsConversations resource.

  • sid (String) —

    The SID of the Call resource to fetch.



273
274
275
276
277
278
279
280
281
282
283
284
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_conversations.rb', line 273

def initialize(version, payload )
    super(version)
    
    
    # Marshaled Properties
    @properties = { 
        'account_id' => payload['account_id'],
        'conversation_id' => payload['conversation_id'],
        'segment_count' => payload['segment_count'] == nil ? payload['segment_count'] : payload['segment_count'].to_i,
        'segments' => payload['segments'],
    }
end

Instance Method Details

#account_id ⇒ String

Returns The id of the account.

Returns:

  • (String) —

    The id of the account.



289
290
291
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_conversations.rb', line 289

def 
    @properties['account_id']
end

#conversation_id ⇒ String

Returns The unique id of the conversation.

Returns:

  • (String) —

    The unique id of the conversation



295
296
297
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_conversations.rb', line 295

def conversation_id
    @properties['conversation_id']
end

#inspect ⇒ Object

Provide a detailed, user friendly representation



319
320
321
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_conversations.rb', line 319

def inspect
    "<Twilio.FlexApi.V1.InsightsConversationsInstance>"
end

#segment_count ⇒ String

Returns The count of segments for a conversation.

Returns:

  • (String) —

    The count of segments for a conversation



301
302
303
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_conversations.rb', line 301

def segment_count
    @properties['segment_count']
end

#segments ⇒ Array<Hash>

Returns The Segments of a conversation.

Returns:

  • (Array<Hash>) —

    The Segments of a conversation



307
308
309
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_conversations.rb', line 307

def segments
    @properties['segments']
end

#to_s ⇒ Object

Provide a user friendly representation



313
314
315
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_conversations.rb', line 313

def to_s
    "<Twilio.FlexApi.V1.InsightsConversationsInstance>"
end