Class: Twilio::REST::Insights::V1::CallContext::MetricInstance

Inherits:
Twilio::REST::InstanceResource show all
Defined in:
lib/twilio-ruby/rest/insights/v1/call/metric.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, call_sid: nil) ⇒ MetricInstance

Initialize the MetricInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio

  • call_sid (String) (defaults to: nil)

    The call_sid


165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
# File 'lib/twilio-ruby/rest/insights/v1/call/metric.rb', line 165

def initialize(version, payload, call_sid: nil)
  super(version)

  # Marshaled Properties
  @properties = {
      'timestamp' => payload['timestamp'],
      'call_sid' => payload['call_sid'],
      'account_sid' => payload['account_sid'],
      'edge' => payload['edge'],
      'direction' => payload['direction'],
      'carrier_edge' => payload['carrier_edge'],
      'sip_edge' => payload['sip_edge'],
      'sdk_edge' => payload['sdk_edge'],
      'client_edge' => payload['client_edge'],
  }
end

Instance Method Details

#account_sidString

Returns The account_sid.

Returns:

  • (String)

    The account_sid


196
197
198
# File 'lib/twilio-ruby/rest/insights/v1/call/metric.rb', line 196

def 
  @properties['account_sid']
end

#call_sidString

Returns The call_sid.

Returns:

  • (String)

    The call_sid


190
191
192
# File 'lib/twilio-ruby/rest/insights/v1/call/metric.rb', line 190

def call_sid
  @properties['call_sid']
end

#carrier_edgeHash

Returns The carrier_edge.

Returns:

  • (Hash)

    The carrier_edge


214
215
216
# File 'lib/twilio-ruby/rest/insights/v1/call/metric.rb', line 214

def carrier_edge
  @properties['carrier_edge']
end

#client_edgeHash

Returns The client_edge.

Returns:

  • (Hash)

    The client_edge


232
233
234
# File 'lib/twilio-ruby/rest/insights/v1/call/metric.rb', line 232

def client_edge
  @properties['client_edge']
end

#directionmetric.StreamDirection

Returns The direction.

Returns:

  • (metric.StreamDirection)

    The direction


208
209
210
# File 'lib/twilio-ruby/rest/insights/v1/call/metric.rb', line 208

def direction
  @properties['direction']
end

#edgemetric.TwilioEdge

Returns The edge.

Returns:

  • (metric.TwilioEdge)

    The edge


202
203
204
# File 'lib/twilio-ruby/rest/insights/v1/call/metric.rb', line 202

def edge
  @properties['edge']
end

#inspectObject

Provide a detailed, user friendly representation


244
245
246
# File 'lib/twilio-ruby/rest/insights/v1/call/metric.rb', line 244

def inspect
  "<Twilio.Insights.V1.MetricInstance>"
end

#sdk_edgeHash

Returns The sdk_edge.

Returns:

  • (Hash)

    The sdk_edge


226
227
228
# File 'lib/twilio-ruby/rest/insights/v1/call/metric.rb', line 226

def sdk_edge
  @properties['sdk_edge']
end

#sip_edgeHash

Returns The sip_edge.

Returns:

  • (Hash)

    The sip_edge


220
221
222
# File 'lib/twilio-ruby/rest/insights/v1/call/metric.rb', line 220

def sip_edge
  @properties['sip_edge']
end

#timestampString

Returns The timestamp.

Returns:

  • (String)

    The timestamp


184
185
186
# File 'lib/twilio-ruby/rest/insights/v1/call/metric.rb', line 184

def timestamp
  @properties['timestamp']
end

#to_sObject

Provide a user friendly representation


238
239
240
# File 'lib/twilio-ruby/rest/insights/v1/call/metric.rb', line 238

def to_s
  "<Twilio.Insights.V1.MetricInstance>"
end