class Twilio::REST::Preview::TrustedComms::CpsContext

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) click to toggle source

Initialize the CpsContext @param [Version] version Version that contains the resource @return [CpsContext] CpsContext

Calls superclass method Twilio::REST::InstanceContext::new
   # File lib/twilio-ruby/rest/preview/trusted_comms/cps.rb
72 def initialize(version)
73   super(version)
74 
75   # Path Solution
76   @solution = {}
77   @uri = "/CPS"
78 end

Public Instance Methods

fetch(x_xcnam_sensitive_phone_number: :unset) click to toggle source

Fetch the CpsInstance @param [String] x_xcnam_sensitive_phone_number Phone number used to retrieve its

corresponding CPS.

@return [CpsInstance] Fetched CpsInstance

   # File lib/twilio-ruby/rest/preview/trusted_comms/cps.rb
85 def fetch(x_xcnam_sensitive_phone_number: :unset)
86   headers = Twilio::Values.of({'X-Xcnam-Sensitive-Phone-Number' => x_xcnam_sensitive_phone_number, })
87 
88   payload = @version.fetch('GET', @uri, headers: headers)
89 
90   CpsInstance.new(@version, payload, )
91 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/preview/trusted_comms/cps.rb
102 def inspect
103   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
104   "#<Twilio.Preview.TrustedComms.CpsContext #{context}>"
105 end
to_s() click to toggle source

Provide a user friendly representation

   # File lib/twilio-ruby/rest/preview/trusted_comms/cps.rb
95 def to_s
96   context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
97   "#<Twilio.Preview.TrustedComms.CpsContext #{context}>"
98 end