class Twilio::REST::Api::V2010::AccountContext::MessageContext::FeedbackList
Public Class Methods
new(version, account_sid: nil, message_sid: nil)
click to toggle source
Initialize the FeedbackList
@param [Version] version Version
that contains the resource @param [String] account_sid The SID of the
{Account}[https://www.twilio.com/docs/iam/api/account] that created the MessageFeedback resource.
@param [String] message_sid The SID of the Message resource for which the
feedback was provided.
@return [FeedbackList] FeedbackList
Calls superclass method
Twilio::REST::ListResource::new
# File lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb 25 def initialize(version, account_sid: nil, message_sid: nil) 26 super(version) 27 28 # Path Solution 29 @solution = {account_sid: account_sid, message_sid: message_sid} 30 @uri = "/Accounts/#{@solution[:account_sid]}/Messages/#{@solution[:message_sid]}/Feedback.json" 31 end
Public Instance Methods
create(outcome: :unset)
click to toggle source
Create the FeedbackInstance
@param [feedback.Outcome] outcome Whether the feedback has arrived. Can be:
`unconfirmed` or `confirmed`. If `provide_feedback`=`true` in {the initial HTTP POST}[https://www.twilio.com/docs/sms/api/message-resource#create-a-message-resource], the initial value of this property is `unconfirmed`. After the message arrives, update the value to `confirmed`.
@return [FeedbackInstance] Created FeedbackInstance
# File lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb 41 def create(outcome: :unset) 42 data = Twilio::Values.of({'Outcome' => outcome, }) 43 44 payload = @version.create('POST', @uri, data: data) 45 46 FeedbackInstance.new( 47 @version, 48 payload, 49 account_sid: @solution[:account_sid], 50 message_sid: @solution[:message_sid], 51 ) 52 end
to_s()
click to toggle source
Provide a user friendly representation
# File lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb 56 def to_s 57 '#<Twilio.Api.V2010.FeedbackList>' 58 end