class Twilio::REST::Api::V2010::AccountContext::CallContext::FeedbackInstance

Public Class Methods

new(version, payload, account_sid: nil, call_sid: nil) click to toggle source

Initialize the FeedbackInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] account_sid The unique id of the

{Account}[https://www.twilio.com/docs/iam/api/account] responsible for this
resource.

@param [String] call_sid The unique string that we created to identify this Call

resource.

@return [FeedbackInstance] FeedbackInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb
182 def initialize(version, payload, account_sid: nil, call_sid: nil)
183   super(version)
184 
185   # Marshaled Properties
186   @properties = {
187       'account_sid' => payload['account_sid'],
188       'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
189       'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
190       'issues' => payload['issues'],
191       'quality_score' => payload['quality_score'].to_i,
192       'sid' => payload['sid'],
193   }
194 
195   # Context
196   @instance_context = nil
197   @params = {'account_sid' => account_sid, 'call_sid' => call_sid, }
198 end

Public Instance Methods

account_sid() click to toggle source

@return [String] The unique sid that identifies this account

    # File lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb
213 def account_sid
214   @properties['account_sid']
215 end
context() click to toggle source

Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context @return [FeedbackContext] FeedbackContext for this FeedbackInstance

    # File lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb
204 def context
205   unless @instance_context
206     @instance_context = FeedbackContext.new(@version, @params['account_sid'], @params['call_sid'], )
207   end
208   @instance_context
209 end
create(quality_score: nil, issue: :unset) click to toggle source

Create the FeedbackInstance @param [String] quality_score The call quality expressed as an integer from `1`

to `5` where `1` represents very poor call quality and `5` represents a perfect
call.

@param [Array] issue A list of one or more issues experienced

during the call. Issues can be: `imperfect-audio`, `dropped-call`,
`incorrect-caller-id`, `post-dial-delay`, `digits-not-captured`,
`audio-latency`, `unsolicited-call`, or `one-way-audio`.

@return [FeedbackInstance] Created FeedbackInstance

    # File lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb
264 def create(quality_score: nil, issue: :unset)
265   context.create(quality_score: quality_score, issue: issue, )
266 end
date_created() click to toggle source

@return [Time] The date this resource was created

    # File lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb
219 def date_created
220   @properties['date_created']
221 end
date_updated() click to toggle source

@return [Time] The date this resource was last updated

    # File lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb
225 def date_updated
226   @properties['date_updated']
227 end
fetch() click to toggle source

Fetch the FeedbackInstance @return [FeedbackInstance] Fetched FeedbackInstance

    # File lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb
250 def fetch
251   context.fetch
252 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb
291 def inspect
292   values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
293   "<Twilio.Api.V2010.FeedbackInstance #{values}>"
294 end
issues() click to toggle source

@return [Array] Issues experienced during the call

    # File lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb
231 def issues
232   @properties['issues']
233 end
quality_score() click to toggle source

@return [String] 1 to 5 quality score

    # File lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb
237 def quality_score
238   @properties['quality_score']
239 end
sid() click to toggle source

@return [String] A string that uniquely identifies this feedback resource

    # File lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb
243 def sid
244   @properties['sid']
245 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb
284 def to_s
285   values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
286   "<Twilio.Api.V2010.FeedbackInstance #{values}>"
287 end
update(quality_score: :unset, issue: :unset) click to toggle source

Update the FeedbackInstance @param [String] quality_score The call quality expressed as an integer from `1`

to `5` where `1` represents very poor call quality and `5` represents a perfect
call.

@param [Array] issue One or more issues experienced during the

call. The issues can be: `imperfect-audio`, `dropped-call`,
`incorrect-caller-id`, `post-dial-delay`, `digits-not-captured`,
`audio-latency`, `unsolicited-call`, or `one-way-audio`.

@return [FeedbackInstance] Updated FeedbackInstance

    # File lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb
278 def update(quality_score: :unset, issue: :unset)
279   context.update(quality_score: quality_score, issue: issue, )
280 end