class Twilio::REST::Preview::TrustedComms::CurrentCallContext
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 CurrentCallContext
@param [Version] version Version
that contains the resource @return [CurrentCallContext] CurrentCallContext
Calls superclass method
Twilio::REST::InstanceContext::new
# File lib/twilio-ruby/rest/preview/trusted_comms/current_call.rb 72 def initialize(version) 73 super(version) 74 75 # Path Solution 76 @solution = {} 77 @uri = "/CurrentCall" 78 end
Public Instance Methods
fetch(x_xcnam_sensitive_phone_number_from: :unset, x_xcnam_sensitive_phone_number_to: :unset)
click to toggle source
Fetch the CurrentCallInstance
@param [String] x_xcnam_sensitive_phone_number_from The originating Phone
Number, given in {E.164 format}[https://www.twilio.com/docs/glossary/what-e164]. This phone number should be a Twilio number, otherwise it will return an error with HTTP Status Code 400.
@param [String] x_xcnam_sensitive_phone_number_to The terminating Phone Number,
given in {E.164 format}[https://www.twilio.com/docs/glossary/what-e164].
@return [CurrentCallInstance] Fetched CurrentCallInstance
# File lib/twilio-ruby/rest/preview/trusted_comms/current_call.rb 89 def fetch(x_xcnam_sensitive_phone_number_from: :unset, x_xcnam_sensitive_phone_number_to: :unset) 90 headers = Twilio::Values.of({ 91 'X-Xcnam-Sensitive-Phone-Number-From' => x_xcnam_sensitive_phone_number_from, 92 'X-Xcnam-Sensitive-Phone-Number-To' => x_xcnam_sensitive_phone_number_to, 93 }) 94 95 payload = @version.fetch('GET', @uri, headers: headers) 96 97 CurrentCallInstance.new(@version, payload, ) 98 end
inspect()
click to toggle source
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/preview/trusted_comms/current_call.rb 109 def inspect 110 context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') 111 "#<Twilio.Preview.TrustedComms.CurrentCallContext #{context}>" 112 end
to_s()
click to toggle source
Provide a user friendly representation
# File lib/twilio-ruby/rest/preview/trusted_comms/current_call.rb 102 def to_s 103 context = @solution.map {|k, v| "#{k}: #{v}"}.join(',') 104 "#<Twilio.Preview.TrustedComms.CurrentCallContext #{context}>" 105 end