Class: Twilio::REST::Api::V2010::AccountContext::MessageContext::FeedbackInstance

Inherits:
InstanceResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, account_sid: nil, message_sid: nil) ⇒ FeedbackInstance

Initialize the FeedbackInstance

Parameters:

  • version (Version) —

    Version that contains the resource

  • payload (Hash) —

    payload that contains response from Twilio

  • account_sid (String) (defaults to: nil) —

    The SID of the Account that created this Feedback resource.

  • sid (String) —

    The SID of the Call resource to fetch.



146
147
148
149
150
151
152
153
154
155
156
157
158
159
# File 'lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb', line 146

def initialize(version, payload , account_sid: nil, message_sid: nil)
    super(version)
    
    
    # Marshaled Properties
    @properties = { 
        'account_sid' => payload['account_sid'],
        'message_sid' => payload['message_sid'],
        'outcome' => payload['outcome'],
        'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
        'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
        'uri' => payload['uri'],
    }
end

Instance Method Details

#account_sid ⇒ String

Returns The SID of the Account associated with this MessageFeedback resource.

Returns:

  • (String) —

    The SID of the Account associated with this MessageFeedback resource.



164
165
166
# File 'lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb', line 164

def 
    @properties['account_sid']
end

#date_created ⇒ Time

Returns The date and time in GMT when this MessageFeedback resource was created, specified in RFC 2822 format.

Returns:

  • (Time) —

    The date and time in GMT when this MessageFeedback resource was created, specified in RFC 2822 format.



182
183
184
# File 'lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb', line 182

def date_created
    @properties['date_created']
end

#date_updated ⇒ Time

Returns The date and time in GMT when this MessageFeedback resource was last updated, specified in RFC 2822 format.

Returns:

  • (Time) —

    The date and time in GMT when this MessageFeedback resource was last updated, specified in RFC 2822 format.



188
189
190
# File 'lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb', line 188

def date_updated
    @properties['date_updated']
end

#inspect ⇒ Object

Provide a detailed, user friendly representation



206
207
208
# File 'lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb', line 206

def inspect
    "<Twilio.Api.V2010.FeedbackInstance>"
end

#message_sid ⇒ String

Returns The SID of the Message resource associated with this MessageFeedback resource.

Returns:

  • (String) —

    The SID of the Message resource associated with this MessageFeedback resource.



170
171
172
# File 'lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb', line 170

def message_sid
    @properties['message_sid']
end

#outcome ⇒ Outcome

Returns:

  • (Outcome)


176
177
178
# File 'lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb', line 176

def outcome
    @properties['outcome']
end

#to_s ⇒ Object

Provide a user friendly representation



200
201
202
# File 'lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb', line 200

def to_s
    "<Twilio.Api.V2010.FeedbackInstance>"
end

#uri ⇒ String

Returns The URI of the resource, relative to https://api.twilio.com.

Returns:

  • (String) —

    The URI of the resource, relative to https://api.twilio.com.



194
195
196
# File 'lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb', line 194

def uri
    @properties['uri']
end