Class: Twilio::REST::Trunking::V1::TrunkContext::RecordingInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Trunking::V1::TrunkContext::RecordingInstance
- Defined in:
- lib/twilio-ruby/rest/trunking/v1/trunk/recording.rb
Instance Method Summary collapse
-
#context ⇒ RecordingContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#fetch ⇒ RecordingInstance
Fetch the RecordingInstance.
-
#initialize(version, payload, trunk_sid: nil) ⇒ RecordingInstance
constructor
Initialize the RecordingInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
- #mode ⇒ RecordingMode
-
#to_s ⇒ Object
Provide a user friendly representation.
- #trim ⇒ RecordingTrim
-
#update(mode: :unset, trim: :unset) ⇒ RecordingInstance
Update the RecordingInstance.
Constructor Details
#initialize(version, payload, trunk_sid: nil) ⇒ RecordingInstance
Initialize the RecordingInstance
162 163 164 165 166 167 168 169 170 171 172 173 174 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/recording.rb', line 162 def initialize(version, payload , trunk_sid: nil) super(version) # Marshaled Properties @properties = { 'mode' => payload['mode'], 'trim' => payload['trim'], } # Context @instance_context = nil @params = { 'trunk_sid' => trunk_sid || @properties['trunk_sid'] , } end |
Instance Method Details
#context ⇒ RecordingContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
180 181 182 183 184 185 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/recording.rb', line 180 def context unless @instance_context @instance_context = RecordingContext.new(@version , @params['trunk_sid']) end @instance_context end |
#fetch ⇒ RecordingInstance
Fetch the RecordingInstance
202 203 204 205 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/recording.rb', line 202 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
232 233 234 235 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/recording.rb', line 232 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Trunking.V1.RecordingInstance #{values}>" end |
#mode ⇒ RecordingMode
189 190 191 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/recording.rb', line 189 def mode @properties['mode'] end |
#to_s ⇒ Object
Provide a user friendly representation
225 226 227 228 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/recording.rb', line 225 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Trunking.V1.RecordingInstance #{values}>" end |
#trim ⇒ RecordingTrim
195 196 197 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/recording.rb', line 195 def trim @properties['trim'] end |
#update(mode: :unset, trim: :unset) ⇒ RecordingInstance
Update the RecordingInstance
212 213 214 215 216 217 218 219 220 221 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/recording.rb', line 212 def update( mode: :unset, trim: :unset ) context.update( mode: mode, trim: trim, ) end |