Class: Twilio::REST::Insights::V1::CallContext::CallSummaryContext
- Inherits:
-
Twilio::REST::InstanceContext
- Object
- Twilio::REST::InstanceContext
- Twilio::REST::Insights::V1::CallContext::CallSummaryContext
- Defined in:
- lib/twilio-ruby/rest/insights/v1/call/call_summary.rb
Instance Method Summary collapse
-
#fetch(processing_state: :unset) ⇒ CallSummaryInstance
Fetch the CallSummaryInstance.
-
#initialize(version, call_sid) ⇒ CallSummaryContext
constructor
Initialize the CallSummaryContext.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, call_sid) ⇒ CallSummaryContext
Initialize the CallSummaryContext
51 52 53 54 55 56 57 58 59 |
# File 'lib/twilio-ruby/rest/insights/v1/call/call_summary.rb', line 51 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
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/twilio-ruby/rest/insights/v1/call/call_summary.rb', line 64 def fetch( processing_state: :unset ) params = Twilio::Values.of({ 'ProcessingState' => processing_state, }) headers = Twilio::Values.of({'Content-Type' => 'application/x-www-form-urlencoded', }) payload = @version.fetch('GET', @uri, params: params, headers: headers) CallSummaryInstance.new( @version, payload, call_sid: @solution[:call_sid], ) end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
95 96 97 98 |
# File 'lib/twilio-ruby/rest/insights/v1/call/call_summary.rb', line 95 def inspect context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Insights.V1.CallSummaryContext #{context}>" end |
#to_s ⇒ Object
Provide a user friendly representation
88 89 90 91 |
# File 'lib/twilio-ruby/rest/insights/v1/call/call_summary.rb', line 88 def to_s context = @solution.map{|k, v| "#{k}: #{v}"}.join(',') "#<Twilio.Insights.V1.CallSummaryContext #{context}>" end |