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.



184
185
186
187
188
189
190
191
192
193
194
195
196
# File 'lib/twilio-ruby/rest/numbers/v1/voice_verification.rb', line 184

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_sidString

Returns The Account SID that owns this verification.

Returns:

  • (String)

    The Account SID that owns this verification.



201
202
203
# File 'lib/twilio-ruby/rest/numbers/v1/voice_verification.rb', line 201

def 
    @properties['account_sid']
end

#call_sidString

Returns The Call SID for the verification call.

Returns:

  • (String)

    The Call SID for the verification call.



225
226
227
# File 'lib/twilio-ruby/rest/numbers/v1/voice_verification.rb', line 225

def call_sid
    @properties['call_sid']
end

#friendly_nameString

Returns A human-readable name for this caller ID.

Returns:

  • (String)

    A human-readable name for this caller ID.



213
214
215
# File 'lib/twilio-ruby/rest/numbers/v1/voice_verification.rb', line 213

def friendly_name
    @properties['friendly_name']
end

#inspectObject

Provide a detailed, user friendly representation



237
238
239
# File 'lib/twilio-ruby/rest/numbers/v1/voice_verification.rb', line 237

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

#phone_numberString

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

Returns:

  • (String)

    The phone number being verified in E.164 format.



207
208
209
# File 'lib/twilio-ruby/rest/numbers/v1/voice_verification.rb', line 207

def phone_number
    @properties['phone_number']
end

#to_sObject

Provide a user friendly representation



231
232
233
# File 'lib/twilio-ruby/rest/numbers/v1/voice_verification.rb', line 231

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

#validation_codeString

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.



219
220
221
# File 'lib/twilio-ruby/rest/numbers/v1/voice_verification.rb', line 219

def validation_code
    @properties['validation_code']
end