Class: Twilio::REST::Numbers::V1::VoiceVerificationInstance

Inherits:
InstanceResource show all
Defined in:
lib/twilio-ruby/rest/numbers/v1/voice_verification.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload) ⇒ VoiceVerificationInstance

Initialize the VoiceVerificationInstance

Parameters:

  • version (Version) —

    Version that contains the resource

  • payload (Hash) —

    payload that contains response from Twilio

  • account_sid (String) —

    The SID of the Account that created this VoiceVerification resource.

  • sid (String) —

    The SID of the Call resource to fetch.



125
126
127
128
129
130
131
132
133
134
135
136
137
# File 'lib/twilio-ruby/rest/numbers/v1/voice_verification.rb', line 125

def initialize(version, payload )
    super(version)
    
    
    # Marshaled Properties
    @properties = { 
        'account_sid' => payload['account_sid'],
        'phone_number' => payload['phone_number'],
        'friendly_name' => payload['friendly_name'],
        'validation_code' => payload['validation_code'],
        'call_sid' => payload['call_sid'],
    }
end

Instance Method Details

#account_sid ⇒ String

Returns The Account SID that owns this verification.

Returns:

  • (String) —

    The Account SID that owns this verification.



142
143
144
# File 'lib/twilio-ruby/rest/numbers/v1/voice_verification.rb', line 142

def 
    @properties['account_sid']
end

#call_sid ⇒ String

Returns The Call SID for the verification call.

Returns:

  • (String) —

    The Call SID for the verification call.



166
167
168
# File 'lib/twilio-ruby/rest/numbers/v1/voice_verification.rb', line 166

def call_sid
    @properties['call_sid']
end

#friendly_name ⇒ String

Returns A human-readable name for this caller ID.

Returns:

  • (String) —

    A human-readable name for this caller ID.



154
155
156
# File 'lib/twilio-ruby/rest/numbers/v1/voice_verification.rb', line 154

def friendly_name
    @properties['friendly_name']
end

#inspect ⇒ Object

Provide a detailed, user friendly representation



178
179
180
# File 'lib/twilio-ruby/rest/numbers/v1/voice_verification.rb', line 178

def inspect
    "<Twilio.Numbers.V1.VoiceVerificationInstance>"
end

#phone_number ⇒ String

Returns The phone number being verified in E.164 format.

Returns:

  • (String) —

    The phone number being verified in E.164 format.



148
149
150
# File 'lib/twilio-ruby/rest/numbers/v1/voice_verification.rb', line 148

def phone_number
    @properties['phone_number']
end

#to_s ⇒ Object

Provide a user friendly representation



172
173
174
# File 'lib/twilio-ruby/rest/numbers/v1/voice_verification.rb', line 172

def to_s
    "<Twilio.Numbers.V1.VoiceVerificationInstance>"
end

#validation_code ⇒ String

Returns The 6-digit validation code to be entered during the call.

Returns:

  • (String) —

    The 6-digit validation code to be entered during the call.



160
161
162
# File 'lib/twilio-ruby/rest/numbers/v1/voice_verification.rb', line 160

def validation_code
    @properties['validation_code']
end