Class: Phaxio::Resources::Public::AreaCode
- Inherits:
-
Phaxio::Resource
- Object
- Phaxio::Resource
- Phaxio::Resources::Public::AreaCode
- Defined in:
- lib/phaxio/resources/public/area_code.rb
Overview
Information about area codes for provisioning numbers.
Instance Attribute Summary collapse
-
#area_code ⇒ Integer
The actual area code.
-
#city ⇒ String
The city associated with this area code.
-
#country ⇒ String
The country associated with this area code.
-
#country_code ⇒ Integer
The country code associated with this area code.
-
#state ⇒ String
The state associated with this area code.
-
#toll_free ⇒ true | false
Indicates whether this area code is toll free.
Class Method Summary collapse
-
.list(params = {}) ⇒ Phaxio::Resource::Collection<Phaxio::Resources::AreaCode>
Displays a list of area codes available for purchasing Phaxio numbers.
Methods inherited from Phaxio::Resource
response_collection, response_record
Instance Attribute Details
#area_code ⇒ Integer
Returns The actual area code.
|
# File 'lib/phaxio/resources/public/area_code.rb', line 14
|
#city ⇒ String
Returns The city associated with this area code.
|
# File 'lib/phaxio/resources/public/area_code.rb', line 17
|
#country ⇒ String
Returns The country associated with this area code.
|
# File 'lib/phaxio/resources/public/area_code.rb', line 23
|
#country_code ⇒ Integer
Returns The country code associated with this area code.
|
# File 'lib/phaxio/resources/public/area_code.rb', line 11
|
#state ⇒ String
Returns The state associated with this area code.
|
# File 'lib/phaxio/resources/public/area_code.rb', line 20
|
#toll_free ⇒ true | false
Returns Indicates whether this area code is toll free.
29 |
# File 'lib/phaxio/resources/public/area_code.rb', line 29 has_normal_attributes %w[country_code area_code city state country toll_free] |
Class Method Details
.list(params = {}) ⇒ Phaxio::Resource::Collection<Phaxio::Resources::AreaCode>
This action accepts paging parameters:
-
per_page [Integer] - The maximum number of results to return per call (i.e. “page”). Max 1000.
-
page [Integer] - The page number to return for the request. 1-based.
Displays a list of area codes available for purchasing Phaxio numbers. This operation requires no authentication and can be used without passing an API key.
50 51 52 53 |
# File 'lib/phaxio/resources/public/area_code.rb', line 50 def list params = {} response = Client.request :get, available_area_codes_endpoint, params AreaCode.response_collection response end |