Class: Twilio::REST::Api::V2010::AccountContext::RecordingContext::AddOnResultContext::PayloadInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Api::V2010::AccountContext::RecordingContext::AddOnResultContext::PayloadInstance
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the Account that created the resource.
-
#add_on_configuration_sid ⇒ String
The SID of the Add-on configuration.
-
#add_on_result_sid ⇒ String
The SID of the AddOnResult to which the payload belongs.
-
#add_on_sid ⇒ String
The SID of the Add-on to which the result belongs.
-
#content_type ⇒ String
The MIME type of the payload.
-
#context ⇒ PayloadContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
The RFC 2822 date and time in GMT that the resource was created.
-
#date_updated ⇒ Time
The RFC 2822 date and time in GMT that the resource was last updated.
-
#delete ⇒ Boolean
Deletes the PayloadInstance.
-
#fetch ⇒ PayloadInstance
Fetch a PayloadInstance.
-
#initialize(version, payload, account_sid: nil, reference_sid: nil, add_on_result_sid: nil, sid: nil) ⇒ PayloadInstance
constructor
Initialize the PayloadInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#label ⇒ String
The string that describes the payload.
-
#reference_sid ⇒ String
The SID of the recording to which the AddOnResult resource that contains the payload belongs.
-
#sid ⇒ String
The unique string that identifies the resource.
-
#subresource_uris ⇒ String
A list of related resources identified by their relative URIs.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, payload, account_sid: nil, reference_sid: nil, add_on_result_sid: nil, sid: nil) ⇒ PayloadInstance
Initialize the PayloadInstance
250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb', line 250 def initialize(version, payload, account_sid: nil, reference_sid: nil, add_on_result_sid: nil, sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'add_on_result_sid' => payload['add_on_result_sid'], 'account_sid' => payload['account_sid'], 'label' => payload['label'], 'add_on_sid' => payload['add_on_sid'], 'add_on_configuration_sid' => payload['add_on_configuration_sid'], 'content_type' => payload['content_type'], 'date_created' => Twilio.deserialize_rfc2822(payload['date_created']), 'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']), 'reference_sid' => payload['reference_sid'], 'subresource_uris' => payload['subresource_uris'], } # Context @instance_context = nil @params = { 'account_sid' => account_sid, 'reference_sid' => reference_sid, 'add_on_result_sid' => add_on_result_sid, 'sid' => sid || @properties['sid'], } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the Account that created the resource.
309 310 311 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb', line 309 def account_sid @properties['account_sid'] end |
#add_on_configuration_sid ⇒ String
Returns The SID of the Add-on configuration.
327 328 329 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb', line 327 def add_on_configuration_sid @properties['add_on_configuration_sid'] end |
#add_on_result_sid ⇒ String
Returns The SID of the AddOnResult to which the payload belongs.
303 304 305 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb', line 303 def add_on_result_sid @properties['add_on_result_sid'] end |
#add_on_sid ⇒ String
Returns The SID of the Add-on to which the result belongs.
321 322 323 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb', line 321 def add_on_sid @properties['add_on_sid'] end |
#content_type ⇒ String
Returns The MIME type of the payload.
333 334 335 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb', line 333 def content_type @properties['content_type'] end |
#context ⇒ PayloadContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
282 283 284 285 286 287 288 289 290 291 292 293 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb', line 282 def context unless @instance_context @instance_context = PayloadContext.new( @version, @params['account_sid'], @params['reference_sid'], @params['add_on_result_sid'], @params['sid'], ) end @instance_context end |
#date_created ⇒ Time
Returns The RFC 2822 date and time in GMT that the resource was created.
339 340 341 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb', line 339 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The RFC 2822 date and time in GMT that the resource was last updated.
345 346 347 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb', line 345 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Deletes the PayloadInstance
371 372 373 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb', line 371 def delete context.delete end |
#fetch ⇒ PayloadInstance
Fetch a PayloadInstance
364 365 366 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb', line 364 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
384 385 386 387 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb', line 384 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Api.V2010.PayloadInstance #{values}>" end |
#label ⇒ String
Returns The string that describes the payload.
315 316 317 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb', line 315 def label @properties['label'] end |
#reference_sid ⇒ String
Returns The SID of the recording to which the AddOnResult resource that contains the payload belongs.
351 352 353 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb', line 351 def reference_sid @properties['reference_sid'] end |
#sid ⇒ String
Returns The unique string that identifies the resource.
297 298 299 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb', line 297 def sid @properties['sid'] end |
#subresource_uris ⇒ String
Returns A list of related resources identified by their relative URIs.
357 358 359 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb', line 357 def subresource_uris @properties['subresource_uris'] end |
#to_s ⇒ Object
Provide a user friendly representation
377 378 379 380 |
# File 'lib/twilio-ruby/rest/api/v2010/account/recording/add_on_result/payload.rb', line 377 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Api.V2010.PayloadInstance #{values}>" end |