Class: Twilio::REST::Preview::TrustedComms

Inherits:
Version
  • Object
show all
Defined in:
lib/twilio-ruby/rest/preview/trusted_comms.rb,
lib/twilio-ruby/rest/preview/trusted_comms/cps.rb,
lib/twilio-ruby/rest/preview/trusted_comms/current_call.rb,
lib/twilio-ruby/rest/preview/trusted_comms/branded_channel.rb,
lib/twilio-ruby/rest/preview/trusted_comms/brands_information.rb,
lib/twilio-ruby/rest/preview/trusted_comms/branded_channel/channel.rb

Defined Under Namespace

Classes: BrandedChannelContext, BrandedChannelInstance, BrandedChannelList, BrandedChannelPage, BrandsInformationContext, BrandsInformationInstance, BrandsInformationList, BrandsInformationPage, CpsContext, CpsInstance, CpsList, CpsPage, CurrentCallContext, CurrentCallInstance, CurrentCallList, CurrentCallPage

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) ⇒ TrustedComms

Initialize the TrustedComms version of Preview


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

def initialize(domain)
  super
  @version = 'TrustedComms'
  @branded_channels = nil
  @brands_information = nil
  @cps = nil
  @current_calls = nil
end

Instance Method Details

#branded_channels(sid = :unset) ⇒ Twilio::REST::Preview::TrustedComms::BrandedChannelContext, Twilio::REST::Preview::TrustedComms::BrandedChannelList

Parameters:

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

    The unique SID identifier of the Branded Channel.

Returns:


28
29
30
31
32
33
34
35
36
37
# File 'lib/twilio-ruby/rest/preview/trusted_comms.rb', line 28

def branded_channels(sid=:unset)
  if sid.nil?
      raise ArgumentError, 'sid cannot be nil'
  end
  if sid == :unset
      @branded_channels ||= BrandedChannelList.new self
  else
      BrandedChannelContext.new(self, sid)
  end
end

#brands_informationTwilio::REST::Preview::TrustedComms::BrandsInformationContext


41
42
43
# File 'lib/twilio-ruby/rest/preview/trusted_comms.rb', line 41

def brands_information
  @brands_information ||= BrandsInformationContext.new self
end

#cpsTwilio::REST::Preview::TrustedComms::CpsContext


47
48
49
# File 'lib/twilio-ruby/rest/preview/trusted_comms.rb', line 47

def cps
  @cps ||= CpsContext.new self
end

#current_callsTwilio::REST::Preview::TrustedComms::CurrentCallContext


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

def current_calls
  @current_calls ||= CurrentCallContext.new self
end

#to_sObject

Provide a user friendly representation


59
60
61
# File 'lib/twilio-ruby/rest/preview/trusted_comms.rb', line 59

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