Class: Phaxio::Resources::Public::Country

Inherits:
Phaxio::Resource show all
Defined in:
lib/phaxio/resources/public/country.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Phaxio::Resource

response_collection, response_record

Instance Attribute Details

#alpha2String

Returns the alpha2 representation of the country.

Returns:

  • (String)

    the alpha2 representation of the country.



# File 'lib/phaxio/resources/public/country.rb', line 11

#country_codeInteger

Returns the E.164 country code for the country.

Returns:

  • (Integer)

    the E.164 country code for the country.



# File 'lib/phaxio/resources/public/country.rb', line 14

#nameString

Returns the name of the country.

Returns:

  • (String)

    the name of the country.



# File 'lib/phaxio/resources/public/country.rb', line 8

#price_per_pageInteger

Returns the price per page for the country, in cents.

Returns:

  • (Integer)

    the price per page for the country, in cents.



# File 'lib/phaxio/resources/public/country.rb', line 17

#receive_supportString

Returns the level of receive support provided for this country.

Returns:

  • (String)

    the level of receive support provided for this country.



26
27
28
# File 'lib/phaxio/resources/public/country.rb', line 26

has_normal_attributes %w[
  name alpha2 country_code price_per_page send_support receive_support
]

#send_supportString

Returns the level of send support provided for this country.

Returns:

  • (String)

    the level of send support provided for this country.



# File 'lib/phaxio/resources/public/country.rb', line 20

Class Method Details

.list(params = {}) ⇒ Phaxio::Resource::Collection<Phaxio::Resources::Country>

Note:

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.

Get a list of supported countries for sending faxes.

Parameters:

  • params (Hash) (defaults to: {})

    A hash of parameters to send to Phaxio. This action has no unique parameters.

Returns:

Raises:

  • Phaxio::Error::PhaxioError

See Also:



40
41
42
43
# File 'lib/phaxio/resources/public/country.rb', line 40

def list params = {}
  response = Client.request :get, supported_countries_endpoint, params
  Country.response_collection response
end