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/insights.rb,
lib/twilio-ruby/rest/preview/trusted_comms/business/insights/impressions_rate.rb

Defined Under Namespace

Classes: BrandedCallInstance, BrandedCallList, BrandedCallPage, 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
# File 'lib/twilio-ruby/rest/preview/trusted_comms.rb', line 15

def initialize(domain)
  super
  @version = 'TrustedComms'
  @branded_calls = 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)


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

def branded_calls
  @branded_calls ||= BrandedCallList.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:



36
37
38
39
40
41
42
43
44
# File 'lib/twilio-ruby/rest/preview/trusted_comms.rb', line 36

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



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

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

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



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

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

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

Returns:

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


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

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

#to_sObject

Provide a user friendly representation



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

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