class Twilio::REST::Api::V2010::AccountContext::AvailablePhoneNumberCountryContext::TollFreeInstance
Public Class Methods
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 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 [TollFreeInstance] TollFreeInstance
Twilio::REST::InstanceResource::new
# File lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.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
@return [String] The type of Address resource the phone number requires
# File lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb 467 def address_requirements 468 @properties['address_requirements'] 469 end
@return [Boolean] Whether the phone number is new to the Twilio
platform
# File lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb 473 def beta 474 @properties['beta'] 475 end
@return [String] Whether a phone number can receive calls or messages
# File lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb 479 def capabilities 480 @properties['capabilities'] 481 end
@return [String] A formatted version of the phone number
# File lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb 407 def friendly_name 408 @properties['friendly_name'] 409 end
Provide a detailed, user friendly representation
# File lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb 491 def inspect 492 "<Twilio.Api.V2010.TollFreeInstance>" 493 end
@return [String] The ISO country code of this phone number
# File lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb 461 def iso_country 462 @properties['iso_country'] 463 end
@return [String] The LATA of this phone number
# File lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb 419 def lata 420 @properties['lata'] 421 end
@return [String] The latitude of this phone number's location
# File lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb 437 def latitude 438 @properties['latitude'] 439 end
@return [String] The locality or city of this phone number's location
# File lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb 425 def locality 426 @properties['locality'] 427 end
@return [String] The longitude of this phone number's location
# File lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb 443 def longitude 444 @properties['longitude'] 445 end
@return [String] The phone number in E.164 format
# File lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb 413 def phone_number 414 @properties['phone_number'] 415 end
@return [String] The postal or ZIP code of this phone number's location
# File lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb 455 def postal_code 456 @properties['postal_code'] 457 end
@return [String] The rate center of this phone number
# File lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb 431 def rate_center 432 @properties['rate_center'] 433 end
@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/toll_free.rb 449 def region 450 @properties['region'] 451 end
Provide a user friendly representation
# File lib/twilio-ruby/rest/api/v2010/account/available_phone_number/toll_free.rb 485 def to_s 486 "<Twilio.Api.V2010.TollFreeInstance>" 487 end