Class: Twilio::REST::Preview::Marketplace

Inherits:
Version
  • Object
show all
Defined in:
lib/twilio-ruby/rest/preview/marketplace.rb,
lib/twilio-ruby/rest/preview/marketplace/available_add_on.rb,
lib/twilio-ruby/rest/preview/marketplace/installed_add_on.rb,
lib/twilio-ruby/rest/preview/marketplace/available_add_on/available_add_on_extension.rb,
lib/twilio-ruby/rest/preview/marketplace/installed_add_on/installed_add_on_extension.rb

Defined Under Namespace

Classes: AvailableAddOnContext, AvailableAddOnInstance, AvailableAddOnList, AvailableAddOnPage, InstalledAddOnContext, InstalledAddOnInstance, InstalledAddOnList, InstalledAddOnPage

Instance Attribute Summary

Attributes inherited from Version

#domain

Instance Method Summary collapse

Methods inherited from Version

#absolute_url, #create, #delete, #exception, #fetch, #page, #read_limits, #relative_uri, #request, #stream, #update

Constructor Details

#initialize(domain) ⇒ Marketplace

Initialize the Marketplace version of Preview


15
16
17
18
19
20
# File 'lib/twilio-ruby/rest/preview/marketplace.rb', line 15

def initialize(domain)
  super
  @version = 'marketplace'
  @available_add_ons = nil
  @installed_add_ons = nil
end

Instance Method Details

#available_add_ons(sid = :unset) ⇒ Twilio::REST::Preview::Marketplace::AvailableAddOnContext, Twilio::REST::Preview::Marketplace::AvailableAddOnList

Parameters:

  • sid (String) (defaults to: :unset)

    The SID of the AvailableAddOn resource to fetch.

Returns:


26
27
28
29
30
31
32
33
34
35
# File 'lib/twilio-ruby/rest/preview/marketplace.rb', line 26

def available_add_ons(sid=:unset)
  if sid.nil?
      raise ArgumentError, 'sid cannot be nil'
  end
  if sid == :unset
      @available_add_ons ||= AvailableAddOnList.new self
  else
      AvailableAddOnContext.new(self, sid)
  end
end

#installed_add_ons(sid = :unset) ⇒ Twilio::REST::Preview::Marketplace::InstalledAddOnContext, Twilio::REST::Preview::Marketplace::InstalledAddOnList

Parameters:

  • sid (String) (defaults to: :unset)

    The SID of the InstalledAddOn resource to fetch.

Returns:


41
42
43
44
45
46
47
48
49
50
# File 'lib/twilio-ruby/rest/preview/marketplace.rb', line 41

def installed_add_ons(sid=:unset)
  if sid.nil?
      raise ArgumentError, 'sid cannot be nil'
  end
  if sid == :unset
      @installed_add_ons ||= InstalledAddOnList.new self
  else
      InstalledAddOnContext.new(self, sid)
  end
end

#to_sObject

Provide a user friendly representation


54
55
56
# File 'lib/twilio-ruby/rest/preview/marketplace.rb', line 54

def to_s
  '<Twilio::REST::Preview::Marketplace>'
end