class Twilio::REST::Preview::Marketplace::InstalledAddOnInstance

PLEASE NOTE that this class contains preview products that are subject to change. Use them with caution. If you currently do not have developer preview access, please contact help@twilio.com.

Public Class Methods

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

Initialize the InstalledAddOnInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] sid The SID of the InstalledAddOn resource to fetch. @return [InstalledAddOnInstance] InstalledAddOnInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb
265 def initialize(version, payload, sid: nil)
266   super(version)
267 
268   # Marshaled Properties
269   @properties = {
270       'sid' => payload['sid'],
271       'account_sid' => payload['account_sid'],
272       'friendly_name' => payload['friendly_name'],
273       'description' => payload['description'],
274       'configuration' => payload['configuration'],
275       'unique_name' => payload['unique_name'],
276       'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']),
277       'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']),
278       'url' => payload['url'],
279       'links' => payload['links'],
280   }
281 
282   # Context
283   @instance_context = nil
284   @params = {'sid' => sid || @properties['sid'], }
285 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/preview/marketplace/installed_add_on.rb
306 def account_sid
307   @properties['account_sid']
308 end
configuration() click to toggle source

@return [Hash] The JSON object that represents the current configuration of installed Add-on

    # File lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb
324 def configuration
325   @properties['configuration']
326 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 [InstalledAddOnContext] InstalledAddOnContext for this InstalledAddOnInstance

    # File lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb
291 def context
292   unless @instance_context
293     @instance_context = InstalledAddOnContext.new(@version, @params['sid'], )
294   end
295   @instance_context
296 end
date_created() click to toggle source

@return [Time] The ISO 8601 date and time in GMT when the resource was created

    # File lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb
336 def date_created
337   @properties['date_created']
338 end
date_updated() click to toggle source

@return [Time] The ISO 8601 date and time in GMT when the resource was last updated

    # File lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb
342 def date_updated
343   @properties['date_updated']
344 end
delete() click to toggle source

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

    # File lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb
361 def delete
362   context.delete
363 end
description() click to toggle source

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

    # File lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb
318 def description
319   @properties['description']
320 end
extensions() click to toggle source

Access the extensions @return [extensions] extensions

    # File lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb
387 def extensions
388   context.extensions
389 end
fetch() click to toggle source

Fetch the InstalledAddOnInstance @return [InstalledAddOnInstance] Fetched InstalledAddOnInstance

    # File lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb
368 def fetch
369   context.fetch
370 end
friendly_name() click to toggle source

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

    # File lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb
312 def friendly_name
313   @properties['friendly_name']
314 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb
400 def inspect
401   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
402   "<Twilio.Preview.Marketplace.InstalledAddOnInstance #{values}>"
403 end
sid() click to toggle source

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

    # File lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb
300 def sid
301   @properties['sid']
302 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb
393 def to_s
394   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
395   "<Twilio.Preview.Marketplace.InstalledAddOnInstance #{values}>"
396 end
unique_name() click to toggle source

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

    # File lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb
330 def unique_name
331   @properties['unique_name']
332 end
update(configuration: :unset, unique_name: :unset) click to toggle source

Update the InstalledAddOnInstance @param [Hash] configuration Valid JSON object that conform to the configuration

schema exposed by the associated AvailableAddOn resource. This is only required
by Add-ons that need to be configured

@param [String] unique_name An application-defined string that uniquely

identifies the resource. This value must be unique within the Account.

@return [InstalledAddOnInstance] Updated InstalledAddOnInstance

    # File lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb
380 def update(configuration: :unset, unique_name: :unset)
381   context.update(configuration: configuration, unique_name: unique_name, )
382 end
url() click to toggle source

@return [String] The absolute URL of the resource

    # File lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb
348 def url
349   @properties['url']
350 end