Class: Twilio::REST::Api::V2010::AccountContext::ConferenceContext::RecordingContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Api::V2010::AccountContext::ConferenceContext::RecordingContext
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb
Instance Method Summary collapse
-
#delete ⇒ Boolean
Delete the RecordingInstance.
-
#fetch ⇒ RecordingInstance
Fetch the RecordingInstance.
-
#initialize(version, account_sid, conference_sid, sid) ⇒ RecordingContext
constructor
Initialize the RecordingContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(status: nil, pause_behavior: :unset) ⇒ RecordingInstance
Update the RecordingInstance.
Constructor Details
#initialize(version, account_sid, conference_sid, sid) ⇒ RecordingContext
Initialize the RecordingContext
159 160 161 162 163 164 165 166 167 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb', line 159 def initialize(version, account_sid, conference_sid, sid) super(version) # Path Solution @solution = { account_sid: account_sid, conference_sid: conference_sid, sid: sid, } @uri = "/Accounts/#{@solution[:account_sid]}/Conferences/#{@solution[:conference_sid]}/Recordings/#{@solution[:sid]}.json" end |
Instance Method Details
#delete ⇒ Boolean
Delete the RecordingInstance
171 172 173 174 175 176 177 178 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb', line 171 def delete headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) @version.delete('DELETE', @uri, headers: headers) end |
#fetch ⇒ RecordingInstance
Fetch the RecordingInstance
183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb', line 183 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) RecordingInstance.new( @version, payload, account_sid: @solution[:account_sid], conference_sid: @solution[:conference_sid], sid: @solution[:sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
242 243 244 245 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb', line 242 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Api.V2010.RecordingContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
235 236 237 238 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb', line 235 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Api.V2010.RecordingContext #{context}>" end |
#update(status: nil, pause_behavior: :unset) ⇒ RecordingInstance
Update the RecordingInstance
206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 |
# File 'lib/twilio-ruby/rest/api/v2010/account/conference/recording.rb', line 206 def update( status: nil, pause_behavior: :unset ) data = Twilio::Values.of({ 'Status' => status, 'PauseBehavior' => pause_behavior, }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.update('POST', @uri, data: data, headers: headers) RecordingInstance.new( @version, payload, account_sid: @solution[:account_sid], conference_sid: @solution[:conference_sid], sid: @solution[:sid], ) end |