Class: Twilio::REST::Insights::V1::CallContext::MetricInstance
- Inherits:
-
Twilio::REST::InstanceResource
- Object
- Twilio::REST::InstanceResource
- Twilio::REST::Insights::V1::CallContext::MetricInstance
- Defined in:
- lib/twilio-ruby/rest/insights/v1/call/metric.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The unique SID identifier of the Account.
-
#call_sid ⇒ String
The unique SID identifier of the Call.
-
#carrier_edge ⇒ Hash
Contains metrics and properties for the Twilio media gateway of a PSTN call.
-
#client_edge ⇒ Hash
Contains metrics and properties for the Twilio media gateway of a Client call.
- #direction ⇒ StreamDirection
- #edge ⇒ TwilioEdge
-
#initialize(version, payload, call_sid: nil) ⇒ MetricInstance
constructor
Initialize the MetricInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#sdk_edge ⇒ Hash
Contains metrics and properties for the SDK sensor library for Client calls.
-
#sip_edge ⇒ Hash
Contains metrics and properties for the Twilio media gateway of a SIP Interface or Trunking call.
-
#timestamp ⇒ String
Timestamp of metric sample.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, payload, call_sid: nil) ⇒ MetricInstance
Initialize the MetricInstance
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 |
# File 'lib/twilio-ruby/rest/insights/v1/call/metric.rb', line 181 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_sid ⇒ String
Returns The unique SID identifier of the Account.
213 214 215 |
# File 'lib/twilio-ruby/rest/insights/v1/call/metric.rb', line 213 def account_sid @properties['account_sid'] end |
#call_sid ⇒ String
Returns The unique SID identifier of the Call.
207 208 209 |
# File 'lib/twilio-ruby/rest/insights/v1/call/metric.rb', line 207 def call_sid @properties['call_sid'] end |
#carrier_edge ⇒ Hash
Returns Contains metrics and properties for the Twilio media gateway of a PSTN call.
231 232 233 |
# File 'lib/twilio-ruby/rest/insights/v1/call/metric.rb', line 231 def carrier_edge @properties['carrier_edge'] end |
#client_edge ⇒ Hash
Returns Contains metrics and properties for the Twilio media gateway of a Client call.
249 250 251 |
# File 'lib/twilio-ruby/rest/insights/v1/call/metric.rb', line 249 def client_edge @properties['client_edge'] end |
#direction ⇒ StreamDirection
225 226 227 |
# File 'lib/twilio-ruby/rest/insights/v1/call/metric.rb', line 225 def direction @properties['direction'] end |
#edge ⇒ TwilioEdge
219 220 221 |
# File 'lib/twilio-ruby/rest/insights/v1/call/metric.rb', line 219 def edge @properties['edge'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
261 262 263 |
# File 'lib/twilio-ruby/rest/insights/v1/call/metric.rb', line 261 def inspect "<Twilio.Insights.V1.MetricInstance>" end |
#sdk_edge ⇒ Hash
Returns Contains metrics and properties for the SDK sensor library for Client calls.
243 244 245 |
# File 'lib/twilio-ruby/rest/insights/v1/call/metric.rb', line 243 def sdk_edge @properties['sdk_edge'] end |
#sip_edge ⇒ Hash
Returns Contains metrics and properties for the Twilio media gateway of a SIP Interface or Trunking call.
237 238 239 |
# File 'lib/twilio-ruby/rest/insights/v1/call/metric.rb', line 237 def sip_edge @properties['sip_edge'] end |
#timestamp ⇒ String
Returns Timestamp of metric sample. Samples are taken every 10 seconds and contain the metrics for the previous 10 seconds.
201 202 203 |
# File 'lib/twilio-ruby/rest/insights/v1/call/metric.rb', line 201 def @properties['timestamp'] end |
#to_s ⇒ Object
Provide a user friendly representation
255 256 257 |
# File 'lib/twilio-ruby/rest/insights/v1/call/metric.rb', line 255 def to_s "<Twilio.Insights.V1.MetricInstance>" end |