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

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

Overview

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact [email protected].

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



165
166
167
168
169
170
171
172
173
174
175
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_conversations.rb', line 165

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 account id.

Returns:

  • (String)

    The account id



179
180
181
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_conversations.rb', line 179

def 
  @properties['account_id']
end

#conversation_idString

Returns Unique conversation Id.

Returns:

  • (String)

    Unique conversation Id



185
186
187
# File 'lib/twilio-ruby/rest/flex_api/v1/insights_conversations.rb', line 185

def conversation_id
  @properties['conversation_id']
end

#inspectObject

Provide a detailed, user friendly representation



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

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

#segment_countString

Returns The segment count.

Returns:

  • (String)

    The segment count



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

def segment_count
  @properties['segment_count']
end

#segmentsArray[Hash]

Returns The conversation segments.

Returns:

  • (Array[Hash])

    The conversation segments



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

def segments
  @properties['segments']
end

#to_sObject

Provide a user friendly representation



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

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