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

Inherits:
InstanceContext
  • Object
show all
Defined in:
lib/twilio-ruby/rest/preview/trusted_comms/current_call.rb

Overview

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 [email protected].

Instance Method Summary collapse

Constructor Details

#initialize(version) ⇒ CurrentCallContext

Initialize the CurrentCallContext

Parameters:

  • version (Version)

    Version that contains the resource



72
73
74
75
76
77
78
# File 'lib/twilio-ruby/rest/preview/trusted_comms/current_call.rb', line 72

def initialize(version)
  super(version)

  # Path Solution
  @solution = {}
  @uri = "/CurrentCall"
end

Instance Method Details

#fetchCurrentCallInstance

Fetch a CurrentCallInstance

Returns:



83
84
85
86
87
88
89
90
91
92
93
# File 'lib/twilio-ruby/rest/preview/trusted_comms/current_call.rb', line 83

def fetch
  params = Twilio::Values.of({})

  payload = @version.fetch(
      'GET',
      @uri,
      params,
  )

  CurrentCallInstance.new(@version, payload, )
end

#inspectObject

Provide a detailed, user friendly representation



104
105
106
107
# File 'lib/twilio-ruby/rest/preview/trusted_comms/current_call.rb', line 104

def inspect
  context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
  "#<Twilio.Preview.TrustedComms.CurrentCallContext #{context}>"
end

#to_sObject

Provide a user friendly representation



97
98
99
100
# File 'lib/twilio-ruby/rest/preview/trusted_comms/current_call.rb', line 97

def to_s
  context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
  "#<Twilio.Preview.TrustedComms.CurrentCallContext #{context}>"
end