class Twilio::REST::Api::V2010::AccountContext::IncomingPhoneNumberContext::AssignedAddOnInstance

PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.

Public Class Methods

new(version, payload, account_sid: nil, resource_sid: nil, sid: nil) click to toggle source

Initialize the AssignedAddOnInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] account_sid The SID of the

{Account}[https://www.twilio.com/docs/iam/api/account] that created the
resource.

@param [String] resource_sid The SID of the Phone Number to which the Add-on is

assigned.

@param [String] sid The Twilio-provided string that uniquely identifies the

resource to fetch.

@return [AssignedAddOnInstance] AssignedAddOnInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb
282 def initialize(version, payload, account_sid: nil, resource_sid: nil, sid: nil)
283   super(version)
284 
285   # Marshaled Properties
286   @properties = {
287       'sid' => payload['sid'],
288       'account_sid' => payload['account_sid'],
289       'resource_sid' => payload['resource_sid'],
290       'friendly_name' => payload['friendly_name'],
291       'description' => payload['description'],
292       'configuration' => payload['configuration'],
293       'unique_name' => payload['unique_name'],
294       'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
295       'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
296       'uri' => payload['uri'],
297       'subresource_uris' => payload['subresource_uris'],
298   }
299 
300   # Context
301   @instance_context = nil
302   @params = {
303       'account_sid' => account_sid,
304       'resource_sid' => resource_sid,
305       'sid' => sid || @properties['sid'],
306   }
307 end

Public Instance Methods

account_sid() click to toggle source

@return [String] The SID of the Account that created the resource

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb
333 def account_sid
334   @properties['account_sid']
335 end
configuration() click to toggle source

@return [Hash] A JSON string that represents the current configuration

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb
357 def configuration
358   @properties['configuration']
359 end
context() click to toggle source

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [AssignedAddOnContext] AssignedAddOnContext for this AssignedAddOnInstance

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb
313 def context
314   unless @instance_context
315     @instance_context = AssignedAddOnContext.new(
316         @version,
317         @params['account_sid'],
318         @params['resource_sid'],
319         @params['sid'],
320     )
321   end
322   @instance_context
323 end
date_created() click to toggle source

@return [Time] The RFC 2822 date and time in GMT that the resource was created

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb
369 def date_created
370   @properties['date_created']
371 end
date_updated() click to toggle source

@return [Time] The RFC 2822 date and time in GMT that the resource was last updated

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb
375 def date_updated
376   @properties['date_updated']
377 end
delete() click to toggle source

Delete the AssignedAddOnInstance @return [Boolean] true if delete succeeds, false otherwise

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb
401 def delete
402   context.delete
403 end
description() click to toggle source

@return [String] A short description of the Add-on functionality

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb
351 def description
352   @properties['description']
353 end
extensions() click to toggle source

Access the extensions @return [extensions] extensions

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb
408 def extensions
409   context.extensions
410 end
fetch() click to toggle source

Fetch the AssignedAddOnInstance @return [AssignedAddOnInstance] Fetched AssignedAddOnInstance

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb
394 def fetch
395   context.fetch
396 end
friendly_name() click to toggle source

@return [String] The string that you assigned to describe the resource

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb
345 def friendly_name
346   @properties['friendly_name']
347 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb
421 def inspect
422   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
423   "<Twilio.Api.V2010.AssignedAddOnInstance #{values}>"
424 end
resource_sid() click to toggle source

@return [String] The SID of the Phone Number that installed this Add-on

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb
339 def resource_sid
340   @properties['resource_sid']
341 end
sid() click to toggle source

@return [String] The unique string that identifies the resource

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb
327 def sid
328   @properties['sid']
329 end
subresource_uris() click to toggle source

@return [String] A list of related resources identified by their relative URIs

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb
387 def subresource_uris
388   @properties['subresource_uris']
389 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb
414 def to_s
415   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
416   "<Twilio.Api.V2010.AssignedAddOnInstance #{values}>"
417 end
unique_name() click to toggle source

@return [String] An application-defined string that uniquely identifies the resource

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb
363 def unique_name
364   @properties['unique_name']
365 end
uri() click to toggle source

@return [String] The URI of the resource, relative to `api.twilio.com`

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/assigned_add_on.rb
381 def uri
382   @properties['uri']
383 end