Class: Twilio::REST::Api::V2010::AccountContext::ValidationRequestInstance

Inherits:
InstanceResource
  • Object
show all
Defined in:
lib/twilio-ruby/rest/api/v2010/account/validation_request.rb

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, account_sid: nil) ⇒ ValidationRequestInstance

Initialize the ValidationRequestInstance

Parameters:

  • version (Version) —

    Version that contains the resource

  • payload (Hash) —

    payload that contains response from Twilio

  • account_sid (String) (defaults to: nil) —

    The SID of the Account that created this ValidationRequest resource.

  • sid (String) —

    The SID of the Call resource to fetch.



173
174
175
176
177
178
179
180
181
182
183
184
185
# File 'lib/twilio-ruby/rest/api/v2010/account/validation_request.rb', line 173

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

Instance Method Details

#account_sid ⇒ String

Returns The SID of the Account responsible for the Caller ID.

Returns:

  • (String) —

    The SID of the Account responsible for the Caller ID.



190
191
192
# File 'lib/twilio-ruby/rest/api/v2010/account/validation_request.rb', line 190

def 
    @properties['account_sid']
end

#call_sid ⇒ String

Returns The SID of the Call the Caller ID is associated with.

Returns:

  • (String) —

    The SID of the Call the Caller ID is associated with.



196
197
198
# File 'lib/twilio-ruby/rest/api/v2010/account/validation_request.rb', line 196

def call_sid
    @properties['call_sid']
end

#friendly_name ⇒ String

Returns The string that you assigned to describe the resource.

Returns:

  • (String) —

    The string that you assigned to describe the resource.



202
203
204
# File 'lib/twilio-ruby/rest/api/v2010/account/validation_request.rb', line 202

def friendly_name
    @properties['friendly_name']
end

#inspect ⇒ Object

Provide a detailed, user friendly representation



226
227
228
# File 'lib/twilio-ruby/rest/api/v2010/account/validation_request.rb', line 226

def inspect
    "<Twilio.Api.V2010.ValidationRequestInstance>"
end

#phone_number ⇒ String

Returns The phone number to verify in E.164 format, which consists of a + followed by the country code and subscriber number.

Returns:

  • (String) —

    The phone number to verify in E.164 format, which consists of a + followed by the country code and subscriber number.



208
209
210
# File 'lib/twilio-ruby/rest/api/v2010/account/validation_request.rb', line 208

def phone_number
    @properties['phone_number']
end

#to_s ⇒ Object

Provide a user friendly representation



220
221
222
# File 'lib/twilio-ruby/rest/api/v2010/account/validation_request.rb', line 220

def to_s
    "<Twilio.Api.V2010.ValidationRequestInstance>"
end

#validation_code ⇒ String

Returns The 6 digit validation code that someone must enter to validate the Caller ID when phone_number is called.

Returns:

  • (String) —

    The 6 digit validation code that someone must enter to validate the Caller ID when phone_number is called.



214
215
216
# File 'lib/twilio-ruby/rest/api/v2010/account/validation_request.rb', line 214

def validation_code
    @properties['validation_code']
end