Class: Twilio::REST::Api::V2010::AccountContext::CallContext::FeedbackInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Api::V2010::AccountContext::CallContext::FeedbackInstance
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The unique id of the [Account](www.twilio.com/docs/iam/api/account) responsible for this resource.
-
#context ⇒ FeedbackContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
The date that this resource was created, given in [RFC 2822](www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format.
-
#date_updated ⇒ Time
The date that this resource was last updated, given in [RFC 2822](www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format.
-
#fetch ⇒ FeedbackInstance
Fetch the FeedbackInstance.
-
#initialize(version, payload, account_sid: nil, call_sid: nil) ⇒ FeedbackInstance
constructor
Initialize the FeedbackInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#issues ⇒ Array<Issues>
A list of issues experienced during the call.
-
#quality_score ⇒ String
‘1` to `5` quality score where `1` represents imperfect experience and `5` represents a perfect call.
-
#sid ⇒ String
A 34 character string that uniquely identifies this resource.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#update(quality_score: :unset, issue: :unset) ⇒ FeedbackInstance
Update the FeedbackInstance.
Constructor Details
#initialize(version, payload, account_sid: nil, call_sid: nil) ⇒ FeedbackInstance
Initialize the FeedbackInstance
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb', line 153 def initialize(version, payload , account_sid: nil, call_sid: nil) super(version) # Marshaled Properties @properties = { 'account_sid' => payload['account_sid'], 'date_created' => Twilio.deserialize_rfc2822(payload['date_created']), 'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']), 'issues' => payload['issues'], 'quality_score' => payload['quality_score'] == nil ? payload['quality_score'] : payload['quality_score'].to_i, 'sid' => payload['sid'], } # Context @instance_context = nil @params = { 'account_sid' => account_sid ,'call_sid' => call_sid || @properties['call_sid'] , } end |
Instance Method Details
#account_sid ⇒ String
Returns The unique id of the [Account](www.twilio.com/docs/iam/api/account) responsible for this resource.
184 185 186 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb', line 184 def account_sid @properties['account_sid'] end |
#context ⇒ FeedbackContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
175 176 177 178 179 180 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb', line 175 def context unless @instance_context @instance_context = FeedbackContext.new(@version , @params['account_sid'], @params['call_sid']) end @instance_context end |
#date_created ⇒ Time
Returns The date that this resource was created, given in [RFC 2822](www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format.
190 191 192 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb', line 190 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date that this resource was last updated, given in [RFC 2822](www.php.net/manual/en/class.datetime.php#datetime.constants.rfc2822) format.
196 197 198 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb', line 196 def date_updated @properties['date_updated'] end |
#fetch ⇒ FeedbackInstance
Fetch the FeedbackInstance
221 222 223 224 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb', line 221 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
251 252 253 254 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb', line 251 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Api.V2010.FeedbackInstance #{values}>" end |
#issues ⇒ Array<Issues>
Returns A list of issues experienced during the call. The issues can be: ‘imperfect-audio`, `dropped-call`, `incorrect-caller-id`, `post-dial-delay`, `digits-not-captured`, `audio-latency`, `unsolicited-call`, or `one-way-audio`.
202 203 204 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb', line 202 def issues @properties['issues'] end |
#quality_score ⇒ String
Returns ‘1` to `5` quality score where `1` represents imperfect experience and `5` represents a perfect call.
208 209 210 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb', line 208 def quality_score @properties['quality_score'] end |
#sid ⇒ String
Returns A 34 character string that uniquely identifies this resource.
214 215 216 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb', line 214 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
244 245 246 247 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb', line 244 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Api.V2010.FeedbackInstance #{values}>" end |
#update(quality_score: :unset, issue: :unset) ⇒ FeedbackInstance
Update the FeedbackInstance
231 232 233 234 235 236 237 238 239 240 |
# File 'lib/twilio-ruby/rest/api/v2010/account/call/feedback.rb', line 231 def update( quality_score: :unset, issue: :unset ) context.update( quality_score: quality_score, issue: issue, ) end |