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/business.rb,
lib/twilio-ruby/rest/preview/trusted_comms/phone_call.rb,
lib/twilio-ruby/rest/preview/trusted_comms/branded_call.rb,
lib/twilio-ruby/rest/preview/trusted_comms/current_call.rb,
lib/twilio-ruby/rest/preview/trusted_comms/business/brand.rb,
lib/twilio-ruby/rest/preview/trusted_comms/business/insights.rb,
lib/twilio-ruby/rest/preview/trusted_comms/brands_information.rb,
lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel.rb,
lib/twilio-ruby/rest/preview/trusted_comms/business/insights/impressions_rate.rb,
lib/twilio-ruby/rest/preview/trusted_comms/business/brand/branded_channel/channel.rb

Defined Under Namespace

Classes: BrandedCallInstance, BrandedCallList, BrandedCallPage, BrandsInformationContext, BrandsInformationInstance, BrandsInformationList, BrandsInformationPage, BusinessContext, BusinessInstance, BusinessList, BusinessPage, CpsContext, CpsInstance, CpsList, CpsPage, CurrentCallContext, CurrentCallInstance, CurrentCallList, CurrentCallPage, PhoneCallInstance, PhoneCallList, PhoneCallPage

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
23
24
# File 'lib/twilio-ruby/rest/preview/trusted_comms.rb', line 15

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

Instance Method Details

#branded_callsTwilio::REST::Preview::TrustedComms::BrandedCallContext

Returns:

  • (Twilio::REST::Preview::TrustedComms::BrandedCallContext)


28
29
30
# File 'lib/twilio-ruby/rest/preview/trusted_comms.rb', line 28

def branded_calls
  @branded_calls ||= BrandedCallList.new self
end

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



34
35
36
# File 'lib/twilio-ruby/rest/preview/trusted_comms.rb', line 34

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

#businesses(sid = :unset) ⇒ Twilio::REST::Preview::TrustedComms::BusinessContext, Twilio::REST::Preview::TrustedComms::BusinessList

Parameters:

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

    A 34 character string that uniquely identifies this Business.

Returns:



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

def businesses(sid=:unset)
  if sid.nil?
    raise ArgumentError, 'sid cannot be nil'
  elsif sid == :unset
    @businesses ||= BusinessList.new self
  else
    BusinessContext.new(self, sid)
  end
end

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



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

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

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



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

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

#phone_callsTwilio::REST::Preview::TrustedComms::PhoneCallContext

Returns:

  • (Twilio::REST::Preview::TrustedComms::PhoneCallContext)


67
68
69
# File 'lib/twilio-ruby/rest/preview/trusted_comms.rb', line 67

def phone_calls
  @phone_calls ||= PhoneCallList.new self
end

#to_sObject

Provide a user friendly representation



73
74
75
# File 'lib/twilio-ruby/rest/preview/trusted_comms.rb', line 73

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