Class: Phaxio::Resources::PortOrder

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

Overview

Provides functionality for viewing and managing port orders.

Instance Attribute Summary collapse

Class Method Summary collapse

Methods inherited from Phaxio::Resource

response_collection, response_record

Instance Attribute Details

#account_identifierString



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

#bill_received_atTime



# File 'lib/phaxio/resources/port_order.rb', line 80

#billing_address1String



# File 'lib/phaxio/resources/port_order.rb', line 41

#billing_address2String



# File 'lib/phaxio/resources/port_order.rb', line 44

#billing_cityString



# File 'lib/phaxio/resources/port_order.rb', line 47

#billing_numberString



# File 'lib/phaxio/resources/port_order.rb', line 38

#billing_stateString



# File 'lib/phaxio/resources/port_order.rb', line 50

#billing_zipString



# File 'lib/phaxio/resources/port_order.rb', line 53

#completed_atTime



89
90
91
# File 'lib/phaxio/resources/port_order.rb', line 89

has_time_attributes %w[
  created_at updated_at bill_received_at requested_for completed_at
]

#contact_emailString



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

#contact_numberString



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

#created_atTime



# File 'lib/phaxio/resources/port_order.rb', line 74

#esigString



# File 'lib/phaxio/resources/port_order.rb', line 56

#has_billtrue | false



# File 'lib/phaxio/resources/port_order.rb', line 59

#idInteger



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



67
68
69
70
71
72
# File 'lib/phaxio/resources/port_order.rb', line 67

has_normal_attributes %w[
  id contact_number contact_email name_on_account name_of_business provider_name
  billing_number billing_address1 billing_address2 account_identifier
  billing_city billing_state billing_zip esig legal_agreement port_type port_out_pin
  status
]

#name_of_businessString



# File 'lib/phaxio/resources/port_order.rb', line 32

#name_on_accountString



# File 'lib/phaxio/resources/port_order.rb', line 29

#port_numbersPhaxio::Resource::Collection<Phaxio::Resources::PortNumber>



97
# File 'lib/phaxio/resources/port_order.rb', line 97

has_collection_attributes({port_numbers: PortNumber})

#port_out_pinString



# File 'lib/phaxio/resources/port_order.rb', line 26

#port_typeString



# File 'lib/phaxio/resources/port_order.rb', line 23

#provider_nameString



# File 'lib/phaxio/resources/port_order.rb', line 35

#requested_forTime



# File 'lib/phaxio/resources/port_order.rb', line 83

#statusString



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

#updated_atTime



# File 'lib/phaxio/resources/port_order.rb', line 77

Class Method Details

.create(params = {}) ⇒ Phaxio::Resources::PortOrder

Create a port order.



140
141
142
143
# File 'lib/phaxio/resources/port_order.rb', line 140

def create params = {}
  response = Client.request :post, port_orders_endpoint, params
  response_record response
end

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

Get port order info.



153
154
155
156
# File 'lib/phaxio/resources/port_order.rb', line 153

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

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

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.

List port orders in date range.



110
111
112
113
# File 'lib/phaxio/resources/port_order.rb', line 110

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