Class: Twilio::REST::Api::V2010::AccountContext::AvailablePhoneNumberCountryContext::TollFreeInstance

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

Instance Method Summary collapse

Constructor Details

#initialize(version, payload, account_sid: nil, country_code: nil) ⇒ TollFreeInstance

Initialize the TollFreeInstance

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 TollFree resource.

  • sid (String)

    The SID of the Call resource to fetch.



293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/toll_free.rb', line 293

def initialize(version, payload , account_sid: nil, country_code: nil)
    super(version)
    
    # Marshaled Properties
    @properties = { 
        'friendly_name' => payload['friendly_name'],
        'phone_number' => payload['phone_number'],
        'lata' => payload['lata'],
        'locality' => payload['locality'],
        'rate_center' => payload['rate_center'],
        'latitude' => payload['latitude'],
        'longitude' => payload['longitude'],
        'region' => payload['region'],
        'postal_code' => payload['postal_code'],
        'iso_country' => payload['iso_country'],
        'address_requirements' => payload['address_requirements'],
        'beta' => payload['beta'],
        'capabilities' => payload['capabilities'],
    }
end

Instance Method Details

#address_requirementsString

Returns The type of [Address](www.twilio.com/docs/usage/api/address) resource the phone number requires. Can be: ‘none`, `any`, `local`, or `foreign`. `none` means no address is required. `any` means an address is required, but it can be anywhere in the world. `local` means an address in the phone number’s country is required. ‘foreign` means an address outside of the phone number’s country is required.

Returns:

  • (String)

    The type of [Address](www.twilio.com/docs/usage/api/address) resource the phone number requires. Can be: ‘none`, `any`, `local`, or `foreign`. `none` means no address is required. `any` means an address is required, but it can be anywhere in the world. `local` means an address in the phone number’s country is required. ‘foreign` means an address outside of the phone number’s country is required.



377
378
379
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/toll_free.rb', line 377

def address_requirements
    @properties['address_requirements']
end

#betaBoolean

Returns Whether the phone number is new to the Twilio platform. Can be: ‘true` or `false`.

Returns:

  • (Boolean)

    Whether the phone number is new to the Twilio platform. Can be: ‘true` or `false`.



383
384
385
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/toll_free.rb', line 383

def beta
    @properties['beta']
end

#capabilitiesApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocalCapabilities

Returns:

  • (ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocalCapabilities)


389
390
391
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/toll_free.rb', line 389

def capabilities
    @properties['capabilities']
end

#friendly_nameString

Returns A formatted version of the phone number.

Returns:

  • (String)

    A formatted version of the phone number.



317
318
319
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/toll_free.rb', line 317

def friendly_name
    @properties['friendly_name']
end

#inspectObject

Provide a detailed, user friendly representation



401
402
403
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/toll_free.rb', line 401

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

#iso_countryString

Returns The [ISO country code](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of this phone number.

Returns:



371
372
373
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/toll_free.rb', line 371

def iso_country
    @properties['iso_country']
end

#lataString

Returns The [LATA](en.wikipedia.org/wiki/Local_access_and_transport_area) of this phone number. Available for only phone numbers from the US and Canada.

Returns:



329
330
331
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/toll_free.rb', line 329

def lata
    @properties['lata']
end

#latitudeFloat

Returns The latitude of this phone number’s location. Available for only phone numbers from the US and Canada.

Returns:

  • (Float)

    The latitude of this phone number’s location. Available for only phone numbers from the US and Canada.



347
348
349
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/toll_free.rb', line 347

def latitude
    @properties['latitude']
end

#localityString

Returns The locality or city of this phone number’s location.

Returns:

  • (String)

    The locality or city of this phone number’s location.



335
336
337
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/toll_free.rb', line 335

def locality
    @properties['locality']
end

#longitudeFloat

Returns The longitude of this phone number’s location. Available for only phone numbers from the US and Canada.

Returns:

  • (Float)

    The longitude of this phone number’s location. Available for only phone numbers from the US and Canada.



353
354
355
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/toll_free.rb', line 353

def longitude
    @properties['longitude']
end

#phone_numberString

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

Returns:



323
324
325
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/toll_free.rb', line 323

def phone_number
    @properties['phone_number']
end

#postal_codeString

Returns The postal or ZIP code of this phone number’s location. Available for only phone numbers from the US and Canada.

Returns:

  • (String)

    The postal or ZIP code of this phone number’s location. Available for only phone numbers from the US and Canada.



365
366
367
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/toll_free.rb', line 365

def postal_code
    @properties['postal_code']
end

#rate_centerString

Returns The [rate center](en.wikipedia.org/wiki/Telephone_exchange) of this phone number. Available for only phone numbers from the US and Canada.

Returns:



341
342
343
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/toll_free.rb', line 341

def rate_center
    @properties['rate_center']
end

#regionString

Returns The two-letter state or province abbreviation of this phone number’s location. Available for only phone numbers from the US and Canada.

Returns:

  • (String)

    The two-letter state or province abbreviation of this phone number’s location. Available for only phone numbers from the US and Canada.



359
360
361
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/toll_free.rb', line 359

def region
    @properties['region']
end

#to_sObject

Provide a user friendly representation



395
396
397
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/toll_free.rb', line 395

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