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](www.twilio.com/docs/iam/api/account) that created the Verification resource.
- #channel ⇒ Channels
-
#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 ⇒ ConversionStatus
-
#date_created ⇒ Time
The date that this Attempt was created, given in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
-
#date_updated ⇒ Time
The date that this Attempt was updated, given in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
-
#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 related to the channel costs and the currency used.
-
#service_sid ⇒ String
The SID of the [Service](www.twilio.com/docs/verify/api/service) used to generate the attempt.
-
#sid ⇒ String
The SID that uniquely identifies the verification attempt resource.
-
#to_s ⇒ Object
Provide a user friendly representation.
- #url ⇒ String
-
#verification_sid ⇒ String
The SID of the [Verification](www.twilio.com/docs/verify/api/verification) that generated the attempt.
Constructor Details
#initialize(version, payload, sid: nil) ⇒ VerificationAttemptInstance
Initialize the VerificationAttemptInstance
447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempt.rb', line 447 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](www.twilio.com/docs/iam/api/account) that created the Verification resource.
490 491 492 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempt.rb', line 490 def account_sid @properties['account_sid'] end |
#channel ⇒ Channels
526 527 528 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempt.rb', line 526 def channel @properties['channel'] end |
#channel_data ⇒ Hash
Returns An object containing the channel specific information for an attempt.
538 539 540 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempt.rb', line 538 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
475 476 477 478 479 480 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempt.rb', line 475 def context unless @instance_context @instance_context = VerificationAttemptContext.new(@version , @params['sid']) end @instance_context end |
#conversion_status ⇒ ConversionStatus
520 521 522 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempt.rb', line 520 def conversion_status @properties['conversion_status'] end |
#date_created ⇒ Time
Returns The date that this Attempt was created, given in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
508 509 510 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempt.rb', line 508 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date that this Attempt was updated, given in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
514 515 516 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempt.rb', line 514 def date_updated @properties['date_updated'] end |
#fetch ⇒ VerificationAttemptInstance
Fetch the VerificationAttemptInstance
551 552 553 554 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempt.rb', line 551 def fetch context.fetch end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
565 566 567 568 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempt.rb', line 565 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 related to the channel costs and the currency used. The costs related to the succeeded verifications are not included. May not be immediately available. More information on pricing is available [here](www.twilio.com/en-us/verify/pricing).
532 533 534 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempt.rb', line 532 def price @properties['price'] end |
#service_sid ⇒ String
Returns The SID of the [Service](www.twilio.com/docs/verify/api/service) used to generate the attempt.
496 497 498 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempt.rb', line 496 def service_sid @properties['service_sid'] end |
#sid ⇒ String
Returns The SID that uniquely identifies the verification attempt resource.
484 485 486 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempt.rb', line 484 def sid @properties['sid'] end |
#to_s ⇒ Object
Provide a user friendly representation
558 559 560 561 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempt.rb', line 558 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Verify.V2.VerificationAttemptInstance #{values}>" end |
#url ⇒ String
544 545 546 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempt.rb', line 544 def url @properties['url'] end |
#verification_sid ⇒ String
Returns The SID of the [Verification](www.twilio.com/docs/verify/api/verification) that generated the attempt.
502 503 504 |
# File 'lib/twilio-ruby/rest/verify/v2/verification_attempt.rb', line 502 def verification_sid @properties['verification_sid'] end |