Class: Twilio::REST::Api::V2010::AccountContext::IncomingPhoneNumberContext::AssignedAddOnInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Api::V2010::AccountContext::IncomingPhoneNumberContext::AssignedAddOnInstance
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb
Overview
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the Account that created the resource.
-
#configuration ⇒ Hash
A JSON string that represents the current configuration.
-
#context ⇒ AssignedAddOnContext
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
Delete the AssignedAddOnInstance.
-
#description ⇒ String
A short description of the Add-on functionality.
-
#extensions ⇒ extensions
Access the extensions.
-
#fetch ⇒ AssignedAddOnInstance
Fetch the AssignedAddOnInstance.
-
#friendly_name ⇒ String
The string that you assigned to describe the resource.
-
#initialize(version, payload, account_sid: nil, resource_sid: nil, sid: nil) ⇒ AssignedAddOnInstance
constructor
Initialize the AssignedAddOnInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#resource_sid ⇒ String
The SID of the Phone Number that installed this Add-on.
-
#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.
-
#unique_name ⇒ String
An application-defined string that uniquely identifies the resource.
-
#uri ⇒ String
The URI of the resource, relative to `api.twilio.com`.
Constructor Details
#initialize(version, payload, account_sid: nil, resource_sid: nil, sid: nil) ⇒ AssignedAddOnInstance
Initialize the AssignedAddOnInstance
282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb', line 282 def initialize(version, payload, account_sid: nil, resource_sid: nil, sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'account_sid' => payload['account_sid'], 'resource_sid' => payload['resource_sid'], 'friendly_name' => payload['friendly_name'], 'description' => payload['description'], 'configuration' => payload['configuration'], 'unique_name' => payload['unique_name'], 'date_created' => Twilio.deserialize_rfc2822(payload['date_created']), 'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']), 'uri' => payload['uri'], 'subresource_uris' => payload['subresource_uris'], } # Context @instance_context = nil @params = { 'account_sid' => account_sid, 'resource_sid' => resource_sid, 'sid' => sid || @properties['sid'], } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the Account that created the resource.
333 334 335 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb', line 333 def account_sid @properties['account_sid'] end |
#configuration ⇒ Hash
Returns A JSON string that represents the current configuration.
357 358 359 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb', line 357 def configuration @properties['configuration'] end |
#context ⇒ AssignedAddOnContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
313 314 315 316 317 318 319 320 321 322 323 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb', line 313 def context unless @instance_context @instance_context = AssignedAddOnContext.new( @version, @params['account_sid'], @params['resource_sid'], @params['sid'], ) end @instance_context end |
#date_created ⇒ Time
Returns The RFC 2822 date and time in GMT that the resource was created.
369 370 371 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb', line 369 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.
375 376 377 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb', line 375 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Delete the AssignedAddOnInstance
401 402 403 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb', line 401 def delete context.delete end |
#description ⇒ String
Returns A short description of the Add-on functionality.
351 352 353 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb', line 351 def description @properties['description'] end |
#extensions ⇒ extensions
Access the extensions
408 409 410 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb', line 408 def extensions context.extensions end |
#fetch ⇒ AssignedAddOnInstance
Fetch the AssignedAddOnInstance
394 395 396 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb', line 394 def fetch context.fetch end |
#friendly_name ⇒ String
Returns The string that you assigned to describe the resource.
345 346 347 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb', line 345 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
421 422 423 424 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb', line 421 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Api.V2010.AssignedAddOnInstance #{values}>" end |
#resource_sid ⇒ String
Returns The SID of the Phone Number that installed this Add-on.
339 340 341 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb', line 339 def resource_sid @properties['resource_sid'] end |
#sid ⇒ String
Returns The unique string that identifies the resource.
327 328 329 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb', line 327 def sid @properties['sid'] end |
#subresource_uris ⇒ String
Returns A list of related resources identified by their relative URIs.
387 388 389 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb', line 387 def subresource_uris @properties['subresource_uris'] end |
#to_s ⇒ Object
Provide a user friendly representation
414 415 416 417 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb', line 414 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Api.V2010.AssignedAddOnInstance #{values}>" end |
#unique_name ⇒ String
Returns An application-defined string that uniquely identifies the resource.
363 364 365 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb', line 363 def unique_name @properties['unique_name'] end |
#uri ⇒ String
Returns The URI of the resource, relative to `api.twilio.com`.
381 382 383 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb', line 381 def uri @properties['uri'] end |