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.



178
179
180
181
182
183
184
185
186
187
188
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_conversations.rb', line 178

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_idString

Returns The id of the account.

Returns:

  • (String)

    The id of the account.



193
194
195
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_conversations.rb', line 193

def 
    @properties['account_id']
end

#conversation_idString

Returns The unique id of the conversation.

Returns:

  • (String)

    The unique id of the conversation



199
200
201
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_conversations.rb', line 199

def conversation_id
    @properties['conversation_id']
end

#inspectObject

Provide a detailed, user friendly representation



223
224
225
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_conversations.rb', line 223

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

#segment_countString

Returns The count of segments for a conversation.

Returns:

  • (String)

    The count of segments for a conversation



205
206
207
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_conversations.rb', line 205

def segment_count
    @properties['segment_count']
end

#segmentsArray<Hash>

Returns The Segments of a conversation.

Returns:

  • (Array<Hash>)

    The Segments of a conversation



211
212
213
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_conversations.rb', line 211

def segments
    @properties['segments']
end

#to_sObject

Provide a user friendly representation



217
218
219
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_conversations.rb', line 217

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