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.



123
124
125
126
127
128
129
130
131
132
133
134
# File 'lib/twilio-ruby/rest/api/v2010/account/validation_request.rb', line 123

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_sidString

Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) responsible for the Caller ID.

Returns:



139
140
141
# File 'lib/twilio-ruby/rest/api/v2010/account/validation_request.rb', line 139

def 
    @properties['account_sid']
end

#call_sidString

Returns The SID of the [Call](www.twilio.com/docs/voice/api/call-resource) the Caller ID is associated with.

Returns:



145
146
147
# File 'lib/twilio-ruby/rest/api/v2010/account/validation_request.rb', line 145

def call_sid
    @properties['call_sid']
end

#friendly_nameString

Returns The string that you assigned to describe the resource.

Returns:

  • (String)

    The string that you assigned to describe the resource.



151
152
153
# File 'lib/twilio-ruby/rest/api/v2010/account/validation_request.rb', line 151

def friendly_name
    @properties['friendly_name']
end

#inspectObject

Provide a detailed, user friendly representation



175
176
177
# File 'lib/twilio-ruby/rest/api/v2010/account/validation_request.rb', line 175

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

#phone_numberString

Returns The phone number to verify in [E.164](www.twilio.com/docs/glossary/what-e164) format, which consists of a + followed by the country code and subscriber number.

Returns:



157
158
159
# File 'lib/twilio-ruby/rest/api/v2010/account/validation_request.rb', line 157

def phone_number
    @properties['phone_number']
end

#to_sObject

Provide a user friendly representation



169
170
171
# File 'lib/twilio-ruby/rest/api/v2010/account/validation_request.rb', line 169

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

#validation_codeString

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.



163
164
165
# File 'lib/twilio-ruby/rest/api/v2010/account/validation_request.rb', line 163

def validation_code
    @properties['validation_code']
end