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

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

Instance Method Summary collapse

Constructor Details

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

Initialize the LocalInstance

Parameters:

  • version (Version)

    Version that contains the resource

  • payload (Hash)

    payload that contains response from Twilio

  • account_sid (String) (defaults to: nil)

    The 34 character string that uniquely identifies your account.

  • country_code (String) (defaults to: nil)

    The ISO Country code to lookup phone numbers for.



393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb', line 393

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'].to_f,
      'longitude' => payload['longitude'].to_f,
      '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 This indicates whether the phone number requires you or your customer to have an Address registered with Twilio.

Returns:

  • (String)

    This indicates whether the phone number requires you or your customer to have an Address registered with Twilio.



476
477
478
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb', line 476

def address_requirements
  @properties['address_requirements']
end

#betaBoolean

Returns Phone numbers new to the Twilio platform are marked as beta.

Returns:

  • (Boolean)

    Phone numbers new to the Twilio platform are marked as beta.



482
483
484
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb', line 482

def beta
  @properties['beta']
end

#capabilitiesString

Returns This is a set of boolean properties that indicate whether a phone number can receive calls or messages.

Returns:

  • (String)

    This is a set of boolean properties that indicate whether a phone number can receive calls or messages.



488
489
490
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb', line 488

def capabilities
  @properties['capabilities']
end

#friendly_nameString

Returns A nicely-formatted version of the phone number.

Returns:

  • (String)

    A nicely-formatted version of the phone number.



416
417
418
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb', line 416

def friendly_name
  @properties['friendly_name']
end

#inspectObject

Provide a detailed, user friendly representation



500
501
502
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb', line 500

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

#iso_countryString

Returns The ISO country code of this phone number.

Returns:

  • (String)

    The ISO country code of this phone number.



470
471
472
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb', line 470

def iso_country
  @properties['iso_country']
end

#lataString

Returns The LATA of this phone number.

Returns:

  • (String)

    The LATA of this phone number.



428
429
430
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb', line 428

def lata
  @properties['lata']
end

#latitudeString

Returns The latitude coordinate of this phone number.

Returns:

  • (String)

    The latitude coordinate of this phone number.



446
447
448
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb', line 446

def latitude
  @properties['latitude']
end

#localityString

Returns The locality/city of this phone number.

Returns:

  • (String)

    The locality/city of this phone number.



434
435
436
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb', line 434

def locality
  @properties['locality']
end

#longitudeString

Returns The longitude coordinate of this phone number.

Returns:

  • (String)

    The longitude coordinate of this phone number.



452
453
454
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb', line 452

def longitude
  @properties['longitude']
end

#phone_numberString

Returns The phone number, in E.

Returns:

  • (String)

    The phone number, in E.



422
423
424
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb', line 422

def phone_number
  @properties['phone_number']
end

#postal_codeString

Returns The postal code of this phone number.

Returns:

  • (String)

    The postal code of this phone number.



464
465
466
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb', line 464

def postal_code
  @properties['postal_code']
end

#rate_centerString

Returns The rate center of this phone number.

Returns:

  • (String)

    The rate center of this phone number.



440
441
442
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb', line 440

def rate_center
  @properties['rate_center']
end

#regionString

Returns The two-letter state or province abbreviation of this phone number.

Returns:

  • (String)

    The two-letter state or province abbreviation of this phone number.



458
459
460
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb', line 458

def region
  @properties['region']
end

#to_sObject

Provide a user friendly representation



494
495
496
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number/local.rb', line 494

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