class Twilio::REST::Api::V2010::AccountContext::AvailablePhoneNumberCountryContext::LocalInstance

Public Class Methods

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

Initialize the LocalInstance @param [Version] version Version that contains the resource @param [Hash] payload payload that contains response from Twilio @param [String] account_sid The account_sid @param [String] country_code The

{ISO-3166-1}[https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2] country code of
the country.

@return [LocalInstance] LocalInstance

Calls superclass method Twilio::REST::InstanceResource::new
    # File lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb
384 def initialize(version, payload, account_sid: nil, country_code: nil)
385   super(version)
386 
387   # Marshaled Properties
388   @properties = {
389       'friendly_name' => payload['friendly_name'],
390       'phone_number' => payload['phone_number'],
391       'lata' => payload['lata'],
392       'locality' => payload['locality'],
393       'rate_center' => payload['rate_center'],
394       'latitude' => payload['latitude'].to_f,
395       'longitude' => payload['longitude'].to_f,
396       'region' => payload['region'],
397       'postal_code' => payload['postal_code'],
398       'iso_country' => payload['iso_country'],
399       'address_requirements' => payload['address_requirements'],
400       'beta' => payload['beta'],
401       'capabilities' => payload['capabilities'],
402   }
403 end

Public Instance Methods

address_requirements() click to toggle source

@return [String] The type of Address resource the phone number requires

    # File lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb
467 def address_requirements
468   @properties['address_requirements']
469 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/available_phone_number/local.rb
473 def beta
474   @properties['beta']
475 end
capabilities() click to toggle source

@return [String] Whether a phone number can receive calls or messages

    # File lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb
479 def capabilities
480   @properties['capabilities']
481 end
friendly_name() click to toggle source

@return [String] A formatted version of the phone number

    # File lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb
407 def friendly_name
408   @properties['friendly_name']
409 end
inspect() click to toggle source

Provide a detailed, user friendly representation

    # File lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb
491 def inspect
492   "<Twilio.Api.V2010.LocalInstance>"
493 end
iso_country() click to toggle source

@return [String] The ISO country code of this phone number

    # File lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb
461 def iso_country
462   @properties['iso_country']
463 end
lata() click to toggle source

@return [String] The LATA of this phone number

    # File lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb
419 def lata
420   @properties['lata']
421 end
latitude() click to toggle source

@return [String] The latitude of this phone number's location

    # File lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb
437 def latitude
438   @properties['latitude']
439 end
locality() click to toggle source

@return [String] The locality or city of this phone number's location

    # File lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb
425 def locality
426   @properties['locality']
427 end
longitude() click to toggle source

@return [String] The longitude of this phone number's location

    # File lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb
443 def longitude
444   @properties['longitude']
445 end
phone_number() click to toggle source

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

    # File lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb
413 def phone_number
414   @properties['phone_number']
415 end
postal_code() click to toggle source

@return [String] The postal or ZIP code of this phone number's location

    # File lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb
455 def postal_code
456   @properties['postal_code']
457 end
rate_center() click to toggle source

@return [String] The rate center of this phone number

    # File lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb
431 def rate_center
432   @properties['rate_center']
433 end
region() click to toggle source

@return [String] The two-letter state or province abbreviation of this phone number's location

    # File lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb
449 def region
450   @properties['region']
451 end
to_s() click to toggle source

Provide a user friendly representation

    # File lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb
485 def to_s
486   "<Twilio.Api.V2010.LocalInstance>"
487 end