lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb in twilio-ruby-5.0.0.rc9 vs lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb in twilio-ruby-5.0.0.rc10
- old
+ new
@@ -15,11 +15,10 @@
# Initialize the FeedbackList
# @param [Version] version Version that contains the resource
# @param [String] account_sid The account_sid
# @param [String] call_sid A 34 character string that uniquely identifies this
# resource.
-
# @return [FeedbackList] FeedbackList
def initialize(version, account_sid: nil, call_sid: nil)
super(version)
# Path Solution
@@ -43,11 +42,10 @@
# @param [Response] response Response from the API
# @param [Hash] solution Path solution for the resource
# @param [String] account_sid The account_sid
# @param [String] call_sid A 34 character string that uniquely identifies this
# resource.
-
# @return [FeedbackPage] FeedbackPage
def initialize(version, response, solution)
super(version, response)
# Path Solution
@@ -55,18 +53,17 @@
end
##
# Build an instance of FeedbackInstance
# @param [Hash] payload Payload response from the API
-
# @return [FeedbackInstance] FeedbackInstance
def get_instance(payload)
return FeedbackInstance.new(
@version,
payload,
- account_sid: @solution['account_sid'],
- call_sid: @solution['call_sid'],
+ account_sid: @solution[:account_sid],
+ call_sid: @solution[:call_sid],
)
end
##
# Provide a user friendly representation
@@ -79,11 +76,10 @@
##
# Initialize the FeedbackContext
# @param [Version] version Version that contains the resource
# @param [String] account_sid The account_sid
# @param [String] call_sid The call sid that uniquely identifies the call
-
# @return [FeedbackContext] FeedbackContext
def initialize(version, account_sid, call_sid)
super(version)
# Path Solution
@@ -97,11 +93,10 @@
##
# 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 = {
'QualityScore' => quality_score,
'Issue' => issue,
@@ -114,12 +109,12 @@
)
return FeedbackInstance.new(
@version,
payload,
- account_sid: @solution['account_sid'],
- call_sid: @solution['call_sid'],
+ account_sid: @solution[:account_sid],
+ call_sid: @solution[:call_sid],
)
end
##
# Fetch a FeedbackInstance
@@ -134,21 +129,20 @@
)
return FeedbackInstance.new(
@version,
payload,
- account_sid: @solution['account_sid'],
- call_sid: @solution['call_sid'],
+ account_sid: @solution[:account_sid],
+ call_sid: @solution[:call_sid],
)
end
##
# 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 = {
'QualityScore' => quality_score,
'Issue' => issue,
@@ -161,12 +155,12 @@
)
return FeedbackInstance.new(
@version,
payload,
- account_sid: @solution['account_sid'],
- call_sid: @solution['call_sid'],
+ account_sid: @solution[:account_sid],
+ call_sid: @solution[:call_sid],
)
end
##
# Provide a user friendly representation
@@ -182,11 +176,10 @@
# @param [Version] version Version that contains the resource
# @param [Hash] payload payload that contains response from Twilio
# @param [String] account_sid The account_sid
# @param [String] call_sid A 34 character string that uniquely identifies this
# resource.
-
# @return [FeedbackInstance] FeedbackInstance
def initialize(version, payload, account_sid: nil, call_sid: nil)
super(version)
# Marshaled Properties
@@ -209,11 +202,10 @@
##
# Generate an instance context for the instance, the context is capable of
# performing various actions. All instance actions are proxied to the context
# @param [Version] version Version that contains the resource
-
# @return [FeedbackContext] FeedbackContext for this FeedbackInstance
def context
unless @instance_context
@instance_context = FeedbackContext.new(
@version,
@@ -251,42 +243,42 @@
##
# 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)
- @context.create(
+ context.create(
+ quality_score: quality_score,
issue: issue,
)
end
##
# Fetch a FeedbackInstance
# @return [FeedbackInstance] Fetched FeedbackInstance
def fetch
- @context.fetch()
+ context.fetch
end
##
# 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)
- @context.update(
+ context.update(
+ quality_score: quality_score,
issue: issue,
)
end
##
# Provide a user friendly representation
def to_s
- context = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
- "<Twilio.Api.V2010.FeedbackInstance #{context}>"
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
+ "<Twilio.Api.V2010.FeedbackInstance #{values}>"
end
end
end
end
end
\ No newline at end of file