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.



105
106
107
108
109
110
111
112
113
114
115
116
117
# File 'lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb', line 105

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_sidString

Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) associated with this MessageFeedback resource.

Returns:



122
123
124
# File 'lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb', line 122

def 
    @properties['account_sid']
end

#date_createdTime

Returns The date and time in GMT when this MessageFeedback resource was created, specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.

Returns:

  • (Time)

    The date and time in GMT when this MessageFeedback resource was created, specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.



140
141
142
# File 'lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb', line 140

def date_created
    @properties['date_created']
end

#date_updatedTime

Returns The date and time in GMT when this MessageFeedback resource was last updated, specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.

Returns:

  • (Time)

    The date and time in GMT when this MessageFeedback resource was last updated, specified in [RFC 2822](www.ietf.org/rfc/rfc2822.txt) format.



146
147
148
# File 'lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb', line 146

def date_updated
    @properties['date_updated']
end

#inspectObject

Provide a detailed, user friendly representation



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

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

#message_sidString

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.



128
129
130
# File 'lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb', line 128

def message_sid
    @properties['message_sid']
end

#outcomeOutcome

Returns:

  • (Outcome)


134
135
136
# File 'lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb', line 134

def outcome
    @properties['outcome']
end

#to_sObject

Provide a user friendly representation



158
159
160
# File 'lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb', line 158

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

#uriString

Returns The URI of the resource, relative to ‘api.twilio.com`.

Returns:

  • (String)

    The URI of the resource, relative to ‘api.twilio.com`.



152
153
154
# File 'lib/twilio-ruby/rest/api/v2010/account/message/feedback.rb', line 152

def uri
    @properties['uri']
end