lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb in twilio-ruby-5.4.2 vs lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb in twilio-ruby-5.4.3
- old
+ new
@@ -20,14 +20,11 @@
# @return [FeedbackList] FeedbackList
def initialize(version, account_sid: nil, call_sid: nil)
super(version)
# Path Solution
- @solution = {
- account_sid: account_sid,
- call_sid: call_sid
- }
+ @solution = {account_sid: account_sid, call_sid: call_sid}
end
##
# Provide a user friendly representation
def to_s
@@ -78,28 +75,22 @@
# @return [FeedbackContext] FeedbackContext
def initialize(version, account_sid, call_sid)
super(version)
# Path Solution
- @solution = {
- account_sid: account_sid,
- call_sid: call_sid,
- }
+ @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.
# @param [String] quality_score The quality_score
# @param [feedback.Issues] issue The issue
# @return [FeedbackInstance] Newly created FeedbackInstance
def create(quality_score: nil, issue: :unset)
- data = Twilio::Values.of({
- 'QualityScore' => quality_score,
- 'Issue' => issue,
- })
+ data = Twilio::Values.of({'QualityScore' => quality_score, 'Issue' => issue,})
payload = @version.create(
'POST',
@uri,
data: data
@@ -138,14 +129,11 @@
# @param [String] quality_score An integer from 1 to 5 quality score
# @param [feedback.Issues] issue One or more of the issues experienced during the
# call
# @return [FeedbackInstance] Updated FeedbackInstance
def update(quality_score: nil, issue: :unset)
- data = Twilio::Values.of({
- 'QualityScore' => quality_score,
- 'Issue' => issue,
- })
+ data = Twilio::Values.of({'QualityScore' => quality_score, 'Issue' => issue,})
payload = @version.update(
'POST',
@uri,
data: data,
@@ -189,27 +177,20 @@
'sid' => payload['sid'],
}
# Context
@instance_context = nil
- @params = {
- 'account_sid' => account_sid,
- 'call_sid' => call_sid,
- }
+ @params = {'account_sid' => account_sid, 'call_sid' => call_sid,}
end
##
# 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
def context
unless @instance_context
- @instance_context = FeedbackContext.new(
- @version,
- @params['account_sid'],
- @params['call_sid'],
- )
+ @instance_context = FeedbackContext.new(@version, @params['account_sid'], @params['call_sid'],)
end
@instance_context
end
##
@@ -253,14 +234,11 @@
# Request is executed immediately.
# @param [String] quality_score The quality_score
# @param [feedback.Issues] issue The issue
# @return [FeedbackInstance] Newly created FeedbackInstance
def create(quality_score: nil, issue: :unset)
- context.create(
- quality_score: quality_score,
- issue: issue,
- )
+ context.create(quality_score: quality_score, issue: issue,)
end
##
# Fetch a FeedbackInstance
# @return [FeedbackInstance] Fetched FeedbackInstance
@@ -273,13 +251,10 @@
# @param [String] quality_score An integer from 1 to 5 quality score
# @param [feedback.Issues] issue One or more of the issues experienced during the
# call
# @return [FeedbackInstance] Updated FeedbackInstance
def update(quality_score: nil, issue: :unset)
- context.update(
- quality_score: quality_score,
- issue: issue,
- )
+ context.update(quality_score: quality_score, issue: issue,)
end
##
# Provide a user friendly representation
def to_s
\ No newline at end of file