Class: Twilio::REST::Intelligence::V2::TranscriptContext::MediaInstance
- Inherits:
-
Twilio::REST::InstanceResource
- Object
- Twilio::REST::InstanceResource
- Twilio::REST::Intelligence::V2::TranscriptContext::MediaInstance
- Defined in:
- lib/twilio-ruby/rest/intelligence/v2/transcript/media.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The unique SID identifier of the Account.
-
#context ⇒ MediaContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#fetch(redacted: :unset) ⇒ MediaInstance
Fetch the MediaInstance.
-
#initialize(version, payload, sid: nil) ⇒ MediaInstance
constructor
Initialize the MediaInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#media_url ⇒ String
Downloadable URL for media, if stored in Twilio AI.
-
#service_sid ⇒ String
The unique SID identifier of the Service.
-
#sid ⇒ String
The unique SID identifier of the Transcript.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The URL of this resource.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ MediaInstance
Initialize the MediaInstance
280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/media.rb', line 280 def initialize(version, payload , sid: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'media_url' => payload['media_url'], 'service_sid' => payload['service_sid'], 'sid' => payload['sid'], 'url' => payload['url'], } # Context @instance_context = nil @params = { 'sid' => sid || @properties['sid'] , } end |
Instance Method Details
#account_sid ⇒ String
311 312 313 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/media.rb', line 311 def account_sid @properties['account_sid'] end |
#context ⇒ MediaContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
302 303 304 305 306 307 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/media.rb', line 302 def context unless @instance_context @instance_context = MediaContext.new(@version , @params['sid']) end @instance_context end |
#fetch(redacted: :unset) ⇒ MediaInstance
Fetch the MediaInstance
343 344 345 346 347 348 349 350 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/media.rb', line 343 def fetch( redacted: :unset ) context.fetch( redacted: redacted, ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
361 362 363 364 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/media.rb', line 361 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Intelligence.V2.MediaInstance #{values}>" end |
#media_url ⇒ String
317 318 319 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/media.rb', line 317 def media_url @properties['media_url'] end |
#service_sid ⇒ String
323 324 325 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/media.rb', line 323 def service_sid @properties['service_sid'] end |
#sid ⇒ String
329 330 331 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/media.rb', line 329 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
354 355 356 357 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/media.rb', line 354 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Intelligence.V2.MediaInstance #{values}>" end |
#url ⇒ String
335 336 337 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/media.rb', line 335 def url @properties['url'] end |