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 ⇒ recording.RecordingMode
The recording mode for the trunk.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#trim ⇒ recording.RecordingTrim
The recording trim setting for the trunk.
-
#update(mode: :unset, trim: :unset) ⇒ RecordingInstance
Update the RecordingInstance.
Constructor Details
#initialize(version, payload, trunk_sid: nil) ⇒ RecordingInstance
Initialize the RecordingInstance
127 128 129 130 131 132 133 134 135 136 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/recording.rb', line 127 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, } 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
142 143 144 145 146 147 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/recording.rb', line 142 def context unless @instance_context @instance_context = RecordingContext.new(@version, @params['trunk_sid'], ) end @instance_context end |
#fetch ⇒ RecordingInstance
Fetch the RecordingInstance
164 165 166 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/recording.rb', line 164 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
189 190 191 192 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/recording.rb', line 189 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Trunking.V1.RecordingInstance #{values}>" end |
#mode ⇒ recording.RecordingMode
Returns The recording mode for the trunk.
151 152 153 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/recording.rb', line 151 def mode @properties['mode'] end |
#to_s ⇒ Object
Provide a user friendly representation
182 183 184 185 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/recording.rb', line 182 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Trunking.V1.RecordingInstance #{values}>" end |
#trim ⇒ recording.RecordingTrim
Returns The recording trim setting for the trunk.
157 158 159 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/recording.rb', line 157 def trim @properties['trim'] end |
#update(mode: :unset, trim: :unset) ⇒ RecordingInstance
Update the RecordingInstance
176 177 178 |
# File 'lib/twilio-ruby/rest/trunking/v1/trunk/recording.rb', line 176 def update(mode: :unset, trim: :unset) context.update(mode: mode, trim: trim, ) end |