Class: Twilio::REST::Api::V2010::AccountContext::AvailablePhoneNumberCountryContext::MobileInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Api::V2010::AccountContext::AvailablePhoneNumberCountryContext::MobileInstance
- Defined in:
- lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/mobile.rb
Instance Method Summary collapse
-
#address_requirements ⇒ String
The type of [Address](www.twilio.com/docs/usage/api/address) resource the phone number requires.
-
#beta ⇒ Boolean
Whether the phone number is new to the Twilio platform.
- #capabilities ⇒ ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocalCapabilities
-
#friendly_name ⇒ String
A formatted version of the phone number.
-
#initialize(version, payload, account_sid: nil, country_code: nil) ⇒ MobileInstance
constructor
Initialize the MobileInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#iso_country ⇒ String
The [ISO country code](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of this phone number.
-
#lata ⇒ String
The [LATA](en.wikipedia.org/wiki/Local_access_and_transport_area) of this phone number.
-
#latitude ⇒ Float
The latitude of this phone number’s location.
-
#locality ⇒ String
The locality or city of this phone number’s location.
-
#longitude ⇒ Float
The longitude of this phone number’s location.
-
#phone_number ⇒ String
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.
-
#postal_code ⇒ String
The postal or ZIP code of this phone number’s location.
-
#rate_center ⇒ String
The [rate center](en.wikipedia.org/wiki/Telephone_exchange) of this phone number.
-
#region ⇒ String
The two-letter state or province abbreviation of this phone number’s location.
-
#to_s ⇒ Object
Provide a user friendly representation.
Constructor Details
#initialize(version, payload, account_sid: nil, country_code: nil) ⇒ MobileInstance
Initialize the MobileInstance
406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 |
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/mobile.rb', line 406 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_requirements ⇒ String
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.
491 492 493 |
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/mobile.rb', line 491 def address_requirements @properties['address_requirements'] end |
#beta ⇒ Boolean
Returns Whether the phone number is new to the Twilio platform. Can be: ‘true` or `false`.
497 498 499 |
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/mobile.rb', line 497 def beta @properties['beta'] end |
#capabilities ⇒ ApiV2010AccountAvailablePhoneNumberCountryAvailablePhoneNumberLocalCapabilities
503 504 505 |
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/mobile.rb', line 503 def capabilities @properties['capabilities'] end |
#friendly_name ⇒ String
Returns A formatted version of the phone number.
431 432 433 |
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/mobile.rb', line 431 def friendly_name @properties['friendly_name'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
515 516 517 |
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/mobile.rb', line 515 def inspect "<Twilio.Api.V2010.MobileInstance>" end |
#iso_country ⇒ String
Returns The [ISO country code](en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of this phone number.
485 486 487 |
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/mobile.rb', line 485 def iso_country @properties['iso_country'] end |
#lata ⇒ String
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.
443 444 445 |
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/mobile.rb', line 443 def lata @properties['lata'] end |
#latitude ⇒ Float
Returns The latitude of this phone number’s location. Available for only phone numbers from the US and Canada.
461 462 463 |
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/mobile.rb', line 461 def latitude @properties['latitude'] end |
#locality ⇒ String
Returns The locality or city of this phone number’s location.
449 450 451 |
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/mobile.rb', line 449 def locality @properties['locality'] end |
#longitude ⇒ Float
Returns The longitude of this phone number’s location. Available for only phone numbers from the US and Canada.
467 468 469 |
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/mobile.rb', line 467 def longitude @properties['longitude'] end |
#phone_number ⇒ String
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.
437 438 439 |
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/mobile.rb', line 437 def phone_number @properties['phone_number'] end |
#postal_code ⇒ String
Returns The postal or ZIP code of this phone number’s location. Available for only phone numbers from the US and Canada.
479 480 481 |
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/mobile.rb', line 479 def postal_code @properties['postal_code'] end |
#rate_center ⇒ String
Returns The [rate center](en.wikipedia.org/wiki/Telephone_exchange) of this phone number. Available for only phone numbers from the US and Canada.
455 456 457 |
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/mobile.rb', line 455 def rate_center @properties['rate_center'] end |
#region ⇒ String
Returns The two-letter state or province abbreviation of this phone number’s location. Available for only phone numbers from the US and Canada.
473 474 475 |
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/mobile.rb', line 473 def region @properties['region'] end |
#to_s ⇒ Object
Provide a user friendly representation
509 510 511 |
# File 'lib/twilio-ruby/rest/api/v2010/account/available_phone_number_country/mobile.rb', line 509 def to_s "<Twilio.Api.V2010.MobileInstance>" end |