class Twilio::REST::Insights::V1::CallContext::MetricInstance

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 help@twilio.com.

Public Class Methods

new(version, payload, call_sid: nil) click to toggle source

Initialize the MetricInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] call_sid The call_sid @return [MetricInstance] MetricInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/insights/v1/call/metric.rb
165 def initialize(version, payload, call_sid: nil)
166   super(version)
167 
168   # Marshaled Properties
169   @properties = {
170       'timestamp' => payload['timestamp'],
171       'call_sid' => payload['call_sid'],
172       'account_sid' => payload['account_sid'],
173       'edge' => payload['edge'],
174       'direction' => payload['direction'],
175       'carrier_edge' => payload['carrier_edge'],
176       'sip_edge' => payload['sip_edge'],
177       'sdk_edge' => payload['sdk_edge'],
178       'client_edge' => payload['client_edge'],
179   }
180 end

Public Instance Methods

account_sid() click to toggle source

@return [String] The account_sid

    # File lib/twilio-ruby/rest/insights/v1/call/metric.rb
196 def account_sid
197   @properties['account_sid']
198 end
call_sid() click to toggle source

@return [String] The call_sid

    # File lib/twilio-ruby/rest/insights/v1/call/metric.rb
190 def call_sid
191   @properties['call_sid']
192 end
carrier_edge() click to toggle source

@return [Hash] The carrier_edge

    # File lib/twilio-ruby/rest/insights/v1/call/metric.rb
214 def carrier_edge
215   @properties['carrier_edge']
216 end
client_edge() click to toggle source

@return [Hash] The client_edge

    # File lib/twilio-ruby/rest/insights/v1/call/metric.rb
232 def client_edge
233   @properties['client_edge']
234 end
direction() click to toggle source

@return [metric.StreamDirection] The direction

    # File lib/twilio-ruby/rest/insights/v1/call/metric.rb
208 def direction
209   @properties['direction']
210 end
edge() click to toggle source

@return [metric.TwilioEdge] The edge

    # File lib/twilio-ruby/rest/insights/v1/call/metric.rb
202 def edge
203   @properties['edge']
204 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/insights/v1/call/metric.rb
244 def inspect
245   "<Twilio.Insights.V1.MetricInstance>"
246 end
sdk_edge() click to toggle source

@return [Hash] The sdk_edge

    # File lib/twilio-ruby/rest/insights/v1/call/metric.rb
226 def sdk_edge
227   @properties['sdk_edge']
228 end
sip_edge() click to toggle source

@return [Hash] The sip_edge

    # File lib/twilio-ruby/rest/insights/v1/call/metric.rb
220 def sip_edge
221   @properties['sip_edge']
222 end
timestamp() click to toggle source

@return [String] The timestamp

    # File lib/twilio-ruby/rest/insights/v1/call/metric.rb
184 def timestamp
185   @properties['timestamp']
186 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/insights/v1/call/metric.rb
238 def to_s
239   "<Twilio.Insights.V1.MetricInstance>"
240 end