Class: Twilio::REST::Voice::V2::RecordingAccountDefaultConfigurationContext
- Inherits:
-
InstanceContext
- Object
- InstanceContext
- Twilio::REST::Voice::V2::RecordingAccountDefaultConfigurationContext
- Defined in:
- lib/twilio-ruby/rest/voice/v2/recording_account_default_configuration.rb
Instance Method Summary collapse
-
#create(voice_v2_account_default_configuration_recording_request: :unset) ⇒ RecordingAccountDefaultConfigurationInstance
Create the RecordingAccountDefaultConfigurationInstance.
-
#create_with_metadata(voice_v2_account_default_configuration_recording_request: :unset) ⇒ RecordingAccountDefaultConfigurationInstance
Create the RecordingAccountDefaultConfigurationInstanceMetadata.
-
#delete ⇒ Boolean
Delete the RecordingAccountDefaultConfigurationInstance.
-
#delete_with_metadata ⇒ Boolean
Delete the RecordingAccountDefaultConfigurationInstanceMetadata.
-
#fetch ⇒ RecordingAccountDefaultConfigurationInstance
Fetch the RecordingAccountDefaultConfigurationInstance.
-
#fetch_with_metadata ⇒ RecordingAccountDefaultConfigurationInstance
Fetch the RecordingAccountDefaultConfigurationInstanceMetadata.
-
#initialize(version) ⇒ RecordingAccountDefaultConfigurationContext
constructor
Initialize the RecordingAccountDefaultConfigurationContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(voice_v2_account_default_configuration_recording_request: :unset) ⇒ RecordingAccountDefaultConfigurationInstance
Update the RecordingAccountDefaultConfigurationInstance.
-
#update_with_metadata(voice_v2_account_default_configuration_recording_request: :unset) ⇒ RecordingAccountDefaultConfigurationInstance
Update the RecordingAccountDefaultConfigurationInstanceMetadata.
Constructor Details
#initialize(version) ⇒ RecordingAccountDefaultConfigurationContext
Initialize the RecordingAccountDefaultConfigurationContext
123 124 125 126 127 128 129 130 131 132 |
# File 'lib/twilio-ruby/rest/voice/v2/recording_account_default_configuration.rb', line 123 def initialize(version) super(version) # Path Solution @solution = { } @uri = "/AccountDefaultConfiguration/Recording" end |
Instance Method Details
#create(voice_v2_account_default_configuration_recording_request: :unset) ⇒ RecordingAccountDefaultConfigurationInstance
Create the RecordingAccountDefaultConfigurationInstance
137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
# File 'lib/twilio-ruby/rest/voice/v2/recording_account_default_configuration.rb', line 137 def create(voice_v2_account_default_configuration_recording_request: :unset ) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) headers['Content-Type'] = 'application/json' payload = @version.create('POST', @uri, headers: headers, data: voice_v2_account_default_configuration_recording_request.to_json) RecordingAccountDefaultConfigurationInstance.new( @version, payload, ) end |
#create_with_metadata(voice_v2_account_default_configuration_recording_request: :unset) ⇒ RecordingAccountDefaultConfigurationInstance
Create the RecordingAccountDefaultConfigurationInstanceMetadata
157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 |
# File 'lib/twilio-ruby/rest/voice/v2/recording_account_default_configuration.rb', line 157 def (voice_v2_account_default_configuration_recording_request: :unset ) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) headers['Content-Type'] = 'application/json' response = @version.('POST', @uri, headers: headers, data: voice_v2_account_default_configuration_recording_request.to_json) recording_account_default_configuration_instance = RecordingAccountDefaultConfigurationInstance.new( @version, response.body, ) RecordingAccountDefaultConfigurationInstanceMetadata.new( @version, recording_account_default_configuration_instance, response.headers, response.status_code ) end |
#delete ⇒ Boolean
Delete the RecordingAccountDefaultConfigurationInstance
182 183 184 185 186 187 188 189 190 |
# File 'lib/twilio-ruby/rest/voice/v2/recording_account_default_configuration.rb', line 182 def delete headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) @version.delete('DELETE', @uri, headers: headers) end |
#delete_with_metadata ⇒ Boolean
Delete the RecordingAccountDefaultConfigurationInstanceMetadata
195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 |
# File 'lib/twilio-ruby/rest/voice/v2/recording_account_default_configuration.rb', line 195 def headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) response = @version.('DELETE', @uri, headers: headers) recordingAccountDefaultConfiguration_instance = RecordingAccountDefaultConfigurationInstance.new( @version, response.body, account_sid: @solution[:account_sid], sid: @solution[:sid], ) RecordingAccountDefaultConfigurationInstanceMetadata.new(@version, recordingAccountDefaultConfiguration_instance, response.headers, response.status_code) end |
#fetch ⇒ RecordingAccountDefaultConfigurationInstance
Fetch the RecordingAccountDefaultConfigurationInstance
214 215 216 217 218 219 220 221 222 223 224 225 226 227 |
# File 'lib/twilio-ruby/rest/voice/v2/recording_account_default_configuration.rb', line 214 def fetch headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, headers: headers) RecordingAccountDefaultConfigurationInstance.new( @version, payload, ) end |
#fetch_with_metadata ⇒ RecordingAccountDefaultConfigurationInstance
Fetch the RecordingAccountDefaultConfigurationInstanceMetadata
232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 |
# File 'lib/twilio-ruby/rest/voice/v2/recording_account_default_configuration.rb', line 232 def headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) response = @version.('GET', @uri, headers: headers) recording_account_default_configuration_instance = RecordingAccountDefaultConfigurationInstance.new( @version, response.body, ) RecordingAccountDefaultConfigurationInstanceMetadata.new( @version, recording_account_default_configuration_instance, response.headers, response.status_code ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
309 310 311 312 |
# File 'lib/twilio-ruby/rest/voice/v2/recording_account_default_configuration.rb', line 309 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Voice.V2.RecordingAccountDefaultConfigurationContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
302 303 304 305 |
# File 'lib/twilio-ruby/rest/voice/v2/recording_account_default_configuration.rb', line 302 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Voice.V2.RecordingAccountDefaultConfigurationContext #{context}>" end |
#update(voice_v2_account_default_configuration_recording_request: :unset) ⇒ RecordingAccountDefaultConfigurationInstance
Update the RecordingAccountDefaultConfigurationInstance
257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 |
# File 'lib/twilio-ruby/rest/voice/v2/recording_account_default_configuration.rb', line 257 def update(voice_v2_account_default_configuration_recording_request: :unset ) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) headers['Content-Type'] = 'application/json' payload = @version.update('PUT', @uri, headers: headers, data: voice_v2_account_default_configuration_recording_request.to_json) RecordingAccountDefaultConfigurationInstance.new( @version, payload, ) end |
#update_with_metadata(voice_v2_account_default_configuration_recording_request: :unset) ⇒ RecordingAccountDefaultConfigurationInstance
Update the RecordingAccountDefaultConfigurationInstanceMetadata
277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 |
# File 'lib/twilio-ruby/rest/voice/v2/recording_account_default_configuration.rb', line 277 def (voice_v2_account_default_configuration_recording_request: :unset ) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) headers['Content-Type'] = 'application/json' response = @version.('PUT', @uri, headers: headers, data: voice_v2_account_default_configuration_recording_request.to_json) recording_account_default_configuration_instance = RecordingAccountDefaultConfigurationInstance.new( @version, response.body, ) RecordingAccountDefaultConfigurationInstanceMetadata.new( @version, recording_account_default_configuration_instance, response.headers, response.status_code ) end |