Class: Twilio::REST::Verify::V2::VerificationAttemptInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Verify::V2::VerificationAttemptInstance
- Defined in:
- lib/twilio-ruby/rest/verify/v2/verification_attempt.rb
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the Account that created the verification.
-
#channel ⇒ verification_attempt.Channels
Communication channel used for the attempt.
-
#channel_data ⇒ Hash
An object containing the channel specific information for an attempt.
-
#context ⇒ VerificationAttemptContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#conversion_status ⇒ verification_attempt.ConversionStatus
Status of the conversion for the verification.
-
#date_created ⇒ Time
The date this Attempt was created.
-
#date_updated ⇒ Time
The date this Attempt was updated.
-
#fetch ⇒ VerificationAttemptInstance
Fetch the VerificationAttemptInstance.
-
#initialize(version, payload, sid: nil) ⇒ VerificationAttemptInstance
constructor
Initialize the VerificationAttemptInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#price ⇒ Hash
An object containing the charge for this verification attempt.
-
#service_sid ⇒ String
The SID of the verify service that generated this attempt.
-
#sid ⇒ String
The SID that uniquely identifies the verification attempt.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The url.
-
#verification_sid ⇒ String
The SID of the verification that generated this attempt.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ VerificationAttemptInstance
Initialize the VerificationAttemptInstance
273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempt.rb', line 273 def initialize(version, payload, sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'account_sid' => payload['account_sid'], 'service_sid' => payload['service_sid'], 'verification_sid' => payload['verification_sid'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 'conversion_status' => payload['conversion_status'], 'channel' => payload['channel'], 'price' => payload['price'], 'channel_data' => payload['channel_data'], 'url' => payload['url'], } # Context @instance_context = nil @params = {'sid' => sid || @properties['sid'], } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the Account that created the verification.
315 316 317 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempt.rb', line 315 def account_sid @properties['account_sid'] end |
#channel ⇒ verification_attempt.Channels
Returns Communication channel used for the attempt.
351 352 353 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempt.rb', line 351 def channel @properties['channel'] end |
#channel_data ⇒ Hash
Returns An object containing the channel specific information for an attempt.
363 364 365 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempt.rb', line 363 def channel_data @properties['channel_data'] end |
#context ⇒ VerificationAttemptContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
300 301 302 303 304 305 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempt.rb', line 300 def context unless @instance_context @instance_context = VerificationAttemptContext.new(@version, @params['sid'], ) end @instance_context end |
#conversion_status ⇒ verification_attempt.ConversionStatus
Returns Status of the conversion for the verification.
345 346 347 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempt.rb', line 345 def conversion_status @properties['conversion_status'] end |
#date_created ⇒ Time
Returns The date this Attempt was created.
333 334 335 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempt.rb', line 333 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date this Attempt was updated.
339 340 341 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempt.rb', line 339 def date_updated @properties['date_updated'] end |
#fetch ⇒ VerificationAttemptInstance
Fetch the VerificationAttemptInstance
376 377 378 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempt.rb', line 376 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
389 390 391 392 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempt.rb', line 389 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Verify.V2.VerificationAttemptInstance #{values}>" end |
#price ⇒ Hash
Returns An object containing the charge for this verification attempt.
357 358 359 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempt.rb', line 357 def price @properties['price'] end |
#service_sid ⇒ String
Returns The SID of the verify service that generated this attempt.
321 322 323 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempt.rb', line 321 def service_sid @properties['service_sid'] end |
#sid ⇒ String
Returns The SID that uniquely identifies the verification attempt.
309 310 311 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempt.rb', line 309 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
382 383 384 385 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempt.rb', line 382 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Verify.V2.VerificationAttemptInstance #{values}>" end |
#url ⇒ String
Returns The url.
369 370 371 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempt.rb', line 369 def url @properties['url'] end |
#verification_sid ⇒ String
Returns The SID of the verification that generated this attempt.
327 328 329 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempt.rb', line 327 def verification_sid @properties['verification_sid'] end |