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
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/media.rb', line 139 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
Returns The unique SID identifier of the Account.
169 170 171 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/media.rb', line 169 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
160 161 162 163 164 165 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/media.rb', line 160 def context unless @instance_context @instance_context = MediaContext.new(@version , @params['sid']) end @instance_context end |
#fetch(redacted: :unset) ⇒ MediaInstance
Fetch the MediaInstance
201 202 203 204 205 206 207 208 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/media.rb', line 201 def fetch( redacted: :unset ) context.fetch( redacted: redacted, ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
219 220 221 222 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/media.rb', line 219 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Intelligence.V2.MediaInstance #{values}>" end |
#media_url ⇒ String
Returns Downloadable URL for media, if stored in Twilio AI.
175 176 177 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/media.rb', line 175 def media_url @properties['media_url'] end |
#service_sid ⇒ String
Returns The unique SID identifier of the Service.
181 182 183 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/media.rb', line 181 def service_sid @properties['service_sid'] end |
#sid ⇒ String
Returns The unique SID identifier of the Transcript.
187 188 189 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/media.rb', line 187 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
212 213 214 215 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/media.rb', line 212 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Intelligence.V2.MediaInstance #{values}>" end |
#url ⇒ String
Returns The URL of this resource.
193 194 195 |
# File 'lib/twilio-ruby/rest/intelligence/v2/transcript/media.rb', line 193 def url @properties['url'] end |