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
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the resource.
-
#configuration ⇒ Hash
A JSON string that represents the current configuration of this Add-on installation.
-
#context ⇒ AssignedAddOnContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
The date and time in GMT that the resource was created specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
-
#date_updated ⇒ Time
The date and time in GMT that the resource was last updated specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
-
#delete ⇒ Boolean
Delete the AssignedAddOnInstance.
-
#description ⇒ String
A short description of the functionality that the Add-on provides.
-
#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 to which the Add-on is assigned.
-
#sid ⇒ String
The unique string that that we created to identify the resource.
-
#subresource_uris ⇒ Hash
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
271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb', line 271 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 || @properties['resource_sid'] ,'sid' => sid || @properties['sid'] , } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the resource.
313 314 315 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb', line 313 def account_sid @properties['account_sid'] end |
#configuration ⇒ Hash
Returns A JSON string that represents the current configuration of this Add-on installation.
337 338 339 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb', line 337 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
298 299 300 301 302 303 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb', line 298 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 date and time in GMT that the resource was created specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
349 350 351 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb', line 349 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date and time in GMT that the resource was last updated specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.
355 356 357 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb', line 355 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Delete the AssignedAddOnInstance
374 375 376 377 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb', line 374 def delete context.delete end |
#description ⇒ String
Returns A short description of the functionality that the Add-on provides.
331 332 333 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb', line 331 def description @properties['description'] end |
#extensions ⇒ extensions
Access the extensions
390 391 392 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb', line 390 def extensions context.extensions end |
#fetch ⇒ AssignedAddOnInstance
Fetch the AssignedAddOnInstance
382 383 384 385 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb', line 382 def fetch context.fetch end |
#friendly_name ⇒ String
Returns The string that you assigned to describe the resource.
325 326 327 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb', line 325 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
403 404 405 406 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb', line 403 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 to which the Add-on is assigned.
319 320 321 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb', line 319 def resource_sid @properties['resource_sid'] end |
#sid ⇒ String
Returns The unique string that that we created to identify the resource.
307 308 309 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb', line 307 def sid @properties['sid'] end |
#subresource_uris ⇒ Hash
Returns A list of related resources identified by their relative URIs.
367 368 369 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb', line 367 def subresource_uris @properties['subresource_uris'] end |
#to_s ⇒ Object
Provide a user friendly representation
396 397 398 399 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb', line 396 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. It can be used in place of the resource’s ‘sid` in the URL to address the resource.
343 344 345 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb', line 343 def unique_name @properties['unique_name'] end |
#uri ⇒ String
Returns The URI of the resource, relative to ‘api.twilio.com`.
361 362 363 |
# File 'lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb', line 361 def uri @properties['uri'] end |