class Twilio::REST::Preview::Marketplace::AvailableAddOnInstance

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 AvailableAddOnInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] sid The SID of the AvailableAddOn resource to fetch. @return [AvailableAddOnInstance] AvailableAddOnInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb
216 def initialize(version, payload, sid: nil)
217   super(version)
218 
219   # Marshaled Properties
220   @properties = {
221       'sid' => payload['sid'],
222       'friendly_name' => payload['friendly_name'],
223       'description' => payload['description'],
224       'pricing_type' => payload['pricing_type'],
225       'configuration_schema' => payload['configuration_schema'],
226       'url' => payload['url'],
227       'links' => payload['links'],
228   }
229 
230   # Context
231   @instance_context = nil
232   @params = {'sid' => sid || @properties['sid'], }
233 end

Public Instance Methods

configuration_schema() click to toggle source

@return [Hash] The JSON object with the configuration that must be provided when installing a given Add-on

    # File lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb
272 def configuration_schema
273   @properties['configuration_schema']
274 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 [AvailableAddOnContext] AvailableAddOnContext for this AvailableAddOnInstance

    # File lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb
239 def context
240   unless @instance_context
241     @instance_context = AvailableAddOnContext.new(@version, @params['sid'], )
242   end
243   @instance_context
244 end
description() click to toggle source

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

    # File lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb
260 def description
261   @properties['description']
262 end
extensions() click to toggle source

Access the extensions @return [extensions] extensions

    # File lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb
298 def extensions
299   context.extensions
300 end
fetch() click to toggle source

Fetch the AvailableAddOnInstance @return [AvailableAddOnInstance] Fetched AvailableAddOnInstance

    # File lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb
291 def fetch
292   context.fetch
293 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/available_add_on.rb
254 def friendly_name
255   @properties['friendly_name']
256 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb
311 def inspect
312   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
313   "<Twilio.Preview.Marketplace.AvailableAddOnInstance #{values}>"
314 end
pricing_type() click to toggle source

@return [String] How customers are charged for using this Add-on

    # File lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb
266 def pricing_type
267   @properties['pricing_type']
268 end
sid() click to toggle source

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

    # File lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb
248 def sid
249   @properties['sid']
250 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb
304 def to_s
305   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
306   "<Twilio.Preview.Marketplace.AvailableAddOnInstance #{values}>"
307 end
url() click to toggle source

@return [String] The absolute URL of the resource

    # File lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb
278 def url
279   @properties['url']
280 end