class Twilio::REST::Api::V2010::AccountContext::IncomingPhoneNumberList::TollFreeInstance

Public Class Methods

new(version, payload, account_sid: nil) click to toggle source

Initialize the TollFreeInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] account_sid The SID of the

{Account}[https://www.twilio.com/docs/iam/api/account] that created this
IncomingPhoneNumber resource.

@return [TollFreeInstance] TollFreeInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb
297 def initialize(version, payload, account_sid: nil)
298   super(version)
299 
300   # Marshaled Properties
301   @properties = {
302       'account_sid' => payload['account_sid'],
303       'address_sid' => payload['address_sid'],
304       'address_requirements' => payload['address_requirements'],
305       'api_version' => payload['api_version'],
306       'beta' => payload['beta'],
307       'capabilities' => payload['capabilities'],
308       'date_created' => Twilio.deserialize_rfc2822(payload['date_created']),
309       'date_updated' => Twilio.deserialize_rfc2822(payload['date_updated']),
310       'friendly_name' => payload['friendly_name'],
311       'identity_sid' => payload['identity_sid'],
312       'phone_number' => payload['phone_number'],
313       'origin' => payload['origin'],
314       'sid' => payload['sid'],
315       'sms_application_sid' => payload['sms_application_sid'],
316       'sms_fallback_method' => payload['sms_fallback_method'],
317       'sms_fallback_url' => payload['sms_fallback_url'],
318       'sms_method' => payload['sms_method'],
319       'sms_url' => payload['sms_url'],
320       'status_callback' => payload['status_callback'],
321       'status_callback_method' => payload['status_callback_method'],
322       'trunk_sid' => payload['trunk_sid'],
323       'uri' => payload['uri'],
324       'voice_receive_mode' => payload['voice_receive_mode'],
325       'voice_application_sid' => payload['voice_application_sid'],
326       'voice_caller_id_lookup' => payload['voice_caller_id_lookup'],
327       'voice_fallback_method' => payload['voice_fallback_method'],
328       'voice_fallback_url' => payload['voice_fallback_url'],
329       'voice_method' => payload['voice_method'],
330       'voice_url' => payload['voice_url'],
331       'emergency_status' => payload['emergency_status'],
332       'emergency_address_sid' => payload['emergency_address_sid'],
333       'bundle_sid' => payload['bundle_sid'],
334       'status' => payload['status'],
335   }
336 end

Public Instance Methods

account_sid() click to toggle source

@return [String] The SID of the Account that created the resource

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb
340 def account_sid
341   @properties['account_sid']
342 end
address_requirements() click to toggle source

@return [toll_free.AddressRequirement] Whether the phone number requires an Address registered with Twilio.

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb
352 def address_requirements
353   @properties['address_requirements']
354 end
address_sid() click to toggle source

@return [String] The SID of the Address resource associated with the phone number

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb
346 def address_sid
347   @properties['address_sid']
348 end
api_version() click to toggle source

@return [String] The API version used to start a new TwiML session

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb
358 def api_version
359   @properties['api_version']
360 end
beta() click to toggle source

@return [Boolean] Whether the phone number is new to the Twilio platform

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb
364 def beta
365   @properties['beta']
366 end
bundle_sid() click to toggle source

@return [String] The SID of the Bundle resource associated with number

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb
526 def bundle_sid
527   @properties['bundle_sid']
528 end
capabilities() click to toggle source

@return [String] Indicate if a phone can receive calls or messages

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb
370 def capabilities
371   @properties['capabilities']
372 end
date_created() click to toggle source

@return [Time] The RFC 2822 date and time in GMT that the resource was created

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb
376 def date_created
377   @properties['date_created']
378 end
date_updated() click to toggle source

@return [Time] The RFC 2822 date and time in GMT that the resource was last updated

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb
382 def date_updated
383   @properties['date_updated']
384 end
emergency_address_sid() click to toggle source

@return [String] The emergency address configuration to use for emergency calling

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb
520 def emergency_address_sid
521   @properties['emergency_address_sid']
522 end
emergency_status() click to toggle source

@return [toll_free.EmergencyStatus] Whether the phone number is enabled for emergency calling

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb
514 def emergency_status
515   @properties['emergency_status']
516 end
friendly_name() click to toggle source

@return [String] The string that you assigned to describe the resource

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb
388 def friendly_name
389   @properties['friendly_name']
390 end
identity_sid() click to toggle source

@return [String] The SID of the Identity resource associated with number

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb
394 def identity_sid
395   @properties['identity_sid']
396 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb
544 def inspect
545   "<Twilio.Api.V2010.TollFreeInstance>"
546 end
origin() click to toggle source

@return [String] The phone number's origin. Can be twilio or hosted.

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb
406 def origin
407   @properties['origin']
408 end
phone_number() click to toggle source

@return [String] The phone number in E.164 format

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb
400 def phone_number
401   @properties['phone_number']
402 end
sid() click to toggle source

@return [String] The unique string that identifies the resource

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb
412 def sid
413   @properties['sid']
414 end
sms_application_sid() click to toggle source

@return [String] The SID of the application that handles SMS messages sent to the phone number

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb
418 def sms_application_sid
419   @properties['sms_application_sid']
420 end
sms_fallback_method() click to toggle source

@return [String] The HTTP method used with sms_fallback_url

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb
424 def sms_fallback_method
425   @properties['sms_fallback_method']
426 end
sms_fallback_url() click to toggle source

@return [String] The URL that we call when an error occurs while retrieving or executing the TwiML

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb
430 def sms_fallback_url
431   @properties['sms_fallback_url']
432 end
sms_method() click to toggle source

@return [String] The HTTP method to use with sms_url

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb
436 def sms_method
437   @properties['sms_method']
438 end
sms_url() click to toggle source

@return [String] The URL we call when the phone number receives an incoming SMS message

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb
442 def sms_url
443   @properties['sms_url']
444 end
status() click to toggle source

@return [String] The status

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb
532 def status
533   @properties['status']
534 end
status_callback() click to toggle source

@return [String] The URL to send status information to your application

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb
448 def status_callback
449   @properties['status_callback']
450 end
status_callback_method() click to toggle source

@return [String] The HTTP method we use to call status_callback

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb
454 def status_callback_method
455   @properties['status_callback_method']
456 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb
538 def to_s
539   "<Twilio.Api.V2010.TollFreeInstance>"
540 end
trunk_sid() click to toggle source

@return [String] The SID of the Trunk that handles calls to the phone number

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb
460 def trunk_sid
461   @properties['trunk_sid']
462 end
uri() click to toggle source

@return [String] The URI of the resource, relative to `api.twilio.com`

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb
466 def uri
467   @properties['uri']
468 end
voice_application_sid() click to toggle source

@return [String] The SID of the application that handles calls to the phone number

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb
478 def voice_application_sid
479   @properties['voice_application_sid']
480 end
voice_caller_id_lookup() click to toggle source

@return [Boolean] Whether to lookup the caller's name

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb
484 def voice_caller_id_lookup
485   @properties['voice_caller_id_lookup']
486 end
voice_fallback_method() click to toggle source

@return [String] The HTTP method used with voice_fallback_url

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb
490 def voice_fallback_method
491   @properties['voice_fallback_method']
492 end
voice_fallback_url() click to toggle source

@return [String] The URL we call when an error occurs in TwiML

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb
496 def voice_fallback_url
497   @properties['voice_fallback_url']
498 end
voice_method() click to toggle source

@return [String] The HTTP method used with the voice_url

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb
502 def voice_method
503   @properties['voice_method']
504 end
voice_receive_mode() click to toggle source

@return [toll_free.VoiceReceiveMode] The voice_receive_mode

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb
472 def voice_receive_mode
473   @properties['voice_receive_mode']
474 end
voice_url() click to toggle source

@return [String] The URL we call when the phone number receives a call

    # File lib/twilio-ruby/rest/api/v2010/account/incoming_phone_number/toll_free.rb
508 def voice_url
509   @properties['voice_url']
510 end