Class: Phaxio::Resources::PortNumber

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

Overview

Provides functionality for viewing port numbers.

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Phaxio::Resource

response_collection, response_record

Instance Attribute Details

#idInteger

Returns the ID associated with this number.

Returns:

  • (Integer)

    the ID associated with this number.



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

#port_numberString

Returns the E.164 number.

Returns:

  • (String)

    the E.164 number.



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

#statusString

Returns the status of this number.

Returns:

  • (String)

    the status of this number.



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

has_normal_attributes %w(id port_number status)

Class Method Details

.get(id, params = {}) ⇒ Phaxio::Resource::PortNumber Also known as: retrieve, find

Get port number info.

Parameters:

  • id (Integer)

    The ID of the number to retrieve.

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

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

Returns:

  • (Phaxio::Resource::PortNumber)

Raises:

See Also:



27
28
29
30
# File 'lib/phaxio/resources/port_number.rb', line 27

def get id, params = {}
  response = Client.request :get, port_number_endpoint(id.to_i), params
  response_record response
end