Class: Twilio::REST::Insights::V1::CallContext::CallSummaryContext

Inherits:
Twilio::REST::InstanceContext show all
Defined in:
lib/twilio-ruby/rest/insights/v1/call/summary.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, call_sid) ⇒ CallSummaryContext

Initialize the CallSummaryContext

Parameters:

  • version (Version)

    Version that contains the resource

  • call_sid (String)

    The call_sid


69
70
71
72
73
74
75
# File 'lib/twilio-ruby/rest/insights/v1/call/summary.rb', line 69

def initialize(version, call_sid)
  super(version)

  # Path Solution
  @solution = {call_sid: call_sid, }
  @uri = "/Voice/#{@solution[:call_sid]}/Summary"
end

Instance Method Details

#fetch(processing_state: :unset) ⇒ CallSummaryInstance

Fetch the CallSummaryInstance

Parameters:

  • processing_state (call_summary.ProcessingState) (defaults to: :unset)

    The processing_state

Returns:


81
82
83
84
85
86
87
# File 'lib/twilio-ruby/rest/insights/v1/call/summary.rb', line 81

def fetch(processing_state: :unset)
  params = Twilio::Values.of({'ProcessingState' => processing_state, })

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

  CallSummaryInstance.new(@version, payload, call_sid: @solution[:call_sid], )
end

#inspectObject

Provide a detailed, user friendly representation


98
99
100
101
# File 'lib/twilio-ruby/rest/insights/v1/call/summary.rb', line 98

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

#to_sObject

Provide a user friendly representation


91
92
93
94
# File 'lib/twilio-ruby/rest/insights/v1/call/summary.rb', line 91

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