lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb in twilio-ruby-5.38.0 vs lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb in twilio-ruby-5.39.0

- old
+ new

@@ -86,52 +86,41 @@ @solution = {account_sid: account_sid, call_sid: call_sid, } @uri = "/Accounts/#{@solution[:account_sid]}/Calls/#{@solution[:call_sid]}/Feedback.json" end ## - # Retrieve a single page of FeedbackInstance records from the API. - # Request is executed immediately. + # 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 [feedback.Issues] 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] Newly created FeedbackInstance + # @return [FeedbackInstance] Created FeedbackInstance def create(quality_score: nil, issue: :unset) data = Twilio::Values.of({ 'QualityScore' => quality_score, 'Issue' => Twilio.serialize_list(issue) { |e| e }, }) - payload = @version.create( - 'POST', - @uri, - data: data - ) + payload = @version.create('POST', @uri, data: data) FeedbackInstance.new( @version, payload, account_sid: @solution[:account_sid], call_sid: @solution[:call_sid], ) end ## - # Fetch a FeedbackInstance + # Fetch the FeedbackInstance # @return [FeedbackInstance] Fetched FeedbackInstance def fetch - params = Twilio::Values.of({}) + payload = @version.fetch('GET', @uri) - payload = @version.fetch( - 'GET', - @uri, - params, - ) - FeedbackInstance.new( @version, payload, account_sid: @solution[:account_sid], call_sid: @solution[:call_sid], @@ -152,15 +141,11 @@ data = Twilio::Values.of({ 'QualityScore' => quality_score, 'Issue' => Twilio.serialize_list(issue) { |e| e }, }) - payload = @version.update( - 'POST', - @uri, - data: data, - ) + payload = @version.update('POST', @uri, data: data) FeedbackInstance.new( @version, payload, account_sid: @solution[:account_sid], @@ -258,25 +243,24 @@ def sid @properties['sid'] end ## - # Retrieve a single page of FeedbackInstance records from the API. - # Request is executed immediately. + # 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 [feedback.Issues] 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] Newly created FeedbackInstance + # @return [FeedbackInstance] Created FeedbackInstance def create(quality_score: nil, issue: :unset) context.create(quality_score: quality_score, issue: issue, ) end ## - # Fetch a FeedbackInstance + # Fetch the FeedbackInstance # @return [FeedbackInstance] Fetched FeedbackInstance def fetch context.fetch end \ No newline at end of file