lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb in twilio-ruby-5.0.0.rc21 vs lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb in twilio-ruby-5.0.0.rc22
- old
+ new
@@ -55,11 +55,11 @@
##
# Build an instance of FeedbackInstance
# @param [Hash] payload Payload response from the API
# @return [FeedbackInstance] FeedbackInstance
def get_instance(payload)
- return FeedbackInstance.new(
+ FeedbackInstance.new(
@version,
payload,
account_sid: @solution[:account_sid],
call_sid: @solution[:call_sid],
)
@@ -94,23 +94,23 @@
# 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: nil)
- data = {
+ def create(quality_score: nil, issue: :unset)
+ data = Twilio::Values.of({
'QualityScore' => quality_score,
'Issue' => issue,
- }
+ })
payload = @version.create(
'POST',
@uri,
data: data
)
- return FeedbackInstance.new(
+ FeedbackInstance.new(
@version,
payload,
account_sid: @solution[:account_sid],
call_sid: @solution[:call_sid],
)
@@ -118,19 +118,19 @@
##
# Fetch a FeedbackInstance
# @return [FeedbackInstance] Fetched FeedbackInstance
def fetch
- params = {}
+ params = Twilio::Values.of({})
payload = @version.fetch(
'GET',
@uri,
params,
)
- return FeedbackInstance.new(
+ FeedbackInstance.new(
@version,
payload,
account_sid: @solution[:account_sid],
call_sid: @solution[:call_sid],
)
@@ -140,23 +140,23 @@
# Update the FeedbackInstance
# @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: nil)
- data = {
+ def update(quality_score: nil, issue: :unset)
+ data = Twilio::Values.of({
'QualityScore' => quality_score,
'Issue' => issue,
- }
+ })
payload = @version.update(
'POST',
@uri,
data: data,
)
- return FeedbackInstance.new(
+ FeedbackInstance.new(
@version,
payload,
account_sid: @solution[:account_sid],
call_sid: @solution[:call_sid],
)
@@ -244,11 +244,11 @@
# 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: nil)
+ def create(quality_score: nil, issue: :unset)
context.create(
quality_score: quality_score,
issue: issue,
)
end
@@ -264,10 +264,10 @@
# Update the FeedbackInstance
# @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: nil)
+ def update(quality_score: nil, issue: :unset)
context.update(
quality_score: quality_score,
issue: issue,
)
end
\ No newline at end of file