ruby-bandwidth-iris 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.editorconfig +0 -0
- data/.gitignore +0 -0
- data/.rspec +0 -0
- data/.travis.yml +0 -1
- data/Gemfile +0 -0
- data/LICENSE.txt +0 -0
- data/README.md +0 -0
- data/Rakefile +0 -0
- data/examples/account.rb +0 -0
- data/examples/available_npa_nxx.rb +0 -0
- data/examples/available_number.rb +0 -0
- data/examples/available_number_details.rb +15 -0
- data/examples/city.rb +0 -0
- data/examples/config.yml.example +0 -0
- data/examples/covered-rate-center.rb +0 -0
- data/examples/loa.pdf +0 -0
- data/examples/order.rb +0 -0
- data/examples/port-in.rb +0 -0
- data/examples/sip_peer.rb +0 -0
- data/examples/site.rb +0 -0
- data/examples/tn.rb +0 -0
- data/lib/bandwidth-iris/account.rb +0 -0
- data/lib/bandwidth-iris/api_item.rb +0 -0
- data/lib/bandwidth-iris/available_npa_nxx.rb +0 -0
- data/lib/bandwidth-iris/available_number.rb +3 -1
- data/lib/bandwidth-iris/city.rb +0 -0
- data/lib/bandwidth-iris/client.rb +0 -0
- data/lib/bandwidth-iris/client_wrapper.rb +0 -0
- data/lib/bandwidth-iris/covered_rate_center.rb +0 -0
- data/lib/bandwidth-iris/disc_number.rb +0 -0
- data/lib/bandwidth-iris/disconnect.rb +0 -0
- data/lib/bandwidth-iris/dlda.rb +0 -0
- data/lib/bandwidth-iris/errors.rb +0 -0
- data/lib/bandwidth-iris/import_to_account.rb +0 -0
- data/lib/bandwidth-iris/in_service_number.rb +0 -0
- data/lib/bandwidth-iris/lidb.rb +0 -0
- data/lib/bandwidth-iris/lnp_checker.rb +0 -0
- data/lib/bandwidth-iris/lsr_order.rb +0 -0
- data/lib/bandwidth-iris/order.rb +0 -0
- data/lib/bandwidth-iris/port_in.rb +0 -0
- data/lib/bandwidth-iris/port_out.rb +0 -0
- data/lib/bandwidth-iris/rate_center.rb +0 -0
- data/lib/bandwidth-iris/sip_peer.rb +0 -0
- data/lib/bandwidth-iris/site.rb +0 -0
- data/lib/bandwidth-iris/subscription.rb +0 -0
- data/lib/bandwidth-iris/tn.rb +0 -0
- data/lib/bandwidth-iris/tn_reservation.rb +0 -0
- data/lib/bandwidth-iris/user.rb +0 -0
- data/lib/bandwidth-iris/version.rb +1 -1
- data/lib/ruby-bandwidth-iris.rb +0 -0
- data/ruby-bandwidth-iris.gemspec +0 -0
- data/spec/bandwidth-iris/account_spec.rb +0 -0
- data/spec/bandwidth-iris/available_npa_nxx_spec.rb +0 -0
- data/spec/bandwidth-iris/available_number_spec.rb +8 -0
- data/spec/bandwidth-iris/city_spec.rb +0 -0
- data/spec/bandwidth-iris/client_spec.rb +0 -0
- data/spec/bandwidth-iris/covered_rate_center_spec.rb +0 -0
- data/spec/bandwidth-iris/disc_number_spec.rb +0 -0
- data/spec/bandwidth-iris/disconnect_spec.rb +0 -0
- data/spec/bandwidth-iris/dlda_spec.rb +0 -0
- data/spec/bandwidth-iris/import_to_account_spec.rb +0 -0
- data/spec/bandwidth-iris/in_service_number_spec.rb +0 -0
- data/spec/bandwidth-iris/lidb_spec.rb +0 -0
- data/spec/bandwidth-iris/lnp_checker_spec.rb +0 -0
- data/spec/bandwidth-iris/lsr_order_spec.rb +0 -0
- data/spec/bandwidth-iris/order_spec.rb +0 -0
- data/spec/bandwidth-iris/port_in_spec.rb +0 -0
- data/spec/bandwidth-iris/port_out_spec.rb +0 -0
- data/spec/bandwidth-iris/rate_center_spec.rb +0 -0
- data/spec/bandwidth-iris/sip_peer_spec.rb +0 -0
- data/spec/bandwidth-iris/site_spec.rb +0 -0
- data/spec/bandwidth-iris/subscription_spec.rb +0 -0
- data/spec/bandwidth-iris/tn_reservation_spec.rb +0 -0
- data/spec/bandwidth-iris/tn_spec.rb +0 -0
- data/spec/bandwidth-iris/user_spec.rb +0 -0
- data/spec/helper.rb +0 -0
- data/spec/xml.yml +1 -0
- metadata +4 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '048cc1df999897afa6afac04397a85d74cf0cee4'
|
|
4
|
+
data.tar.gz: 4b81f43bbdb9860072ad5fccd7f67dbe4079e4b3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9f6ce08ff0b9bd63efb6f6ccdbf92825e92ca66eb56489ffc1f2bcb2cbf4124d3ef6d6cee044a224a1d4baef762ec981c53719453fccdfdeae3b1b00f80283d2
|
|
7
|
+
data.tar.gz: 485f4b27477730114069bc1cd653f5737e7366a9e16b73ec3f6ddfa7c0fa54627c731a21ec850f47bbe2db6286718ce928ae5d2cc947a707e1db9c9e5ef33951
|
data/.editorconfig
CHANGED
|
File without changes
|
data/.gitignore
CHANGED
|
File without changes
|
data/.rspec
CHANGED
|
File without changes
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
|
File without changes
|
data/LICENSE.txt
CHANGED
|
File without changes
|
data/README.md
CHANGED
|
File without changes
|
data/Rakefile
CHANGED
|
File without changes
|
data/examples/account.rb
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
lib = File.expand_path('../../lib', __FILE__)
|
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
|
+
|
|
4
|
+
require 'yaml'
|
|
5
|
+
require 'ruby-bandwidth-iris'
|
|
6
|
+
config = YAML.load_file('config.yml')
|
|
7
|
+
|
|
8
|
+
BandwidthIris::Client.global_options = {
|
|
9
|
+
:api_endpoint => config['api_endpoint'],
|
|
10
|
+
:user_name => config['user_name'],
|
|
11
|
+
:password => config['password'],
|
|
12
|
+
:account_id => config['account_id']
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
puts BandwidthIris::AvailableNumber.list({:state => "NC", :quantity => 3, :enable_t_n_detail => true})
|
data/examples/city.rb
CHANGED
|
File without changes
|
data/examples/config.yml.example
CHANGED
|
File without changes
|
|
File without changes
|
data/examples/loa.pdf
CHANGED
|
File without changes
|
data/examples/order.rb
CHANGED
|
File without changes
|
data/examples/port-in.rb
CHANGED
|
File without changes
|
data/examples/sip_peer.rb
CHANGED
|
File without changes
|
data/examples/site.rb
CHANGED
|
File without changes
|
data/examples/tn.rb
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -5,7 +5,9 @@ module BandwidthIris
|
|
|
5
5
|
extend ClientWrapper
|
|
6
6
|
|
|
7
7
|
def self.list(client, query)
|
|
8
|
-
|
|
8
|
+
response = client.make_request(:get, client.concat_account_path(AVAILABLE_NUMBER_PATH), query)
|
|
9
|
+
list = response[0] && response[0][:telephone_number_list] && response[0][:telephone_number_list][:telephone_number]
|
|
10
|
+
list ||= response[0] && response[0][:telephone_number_detail_list] && response[0][:telephone_number_detail_list][:telephone_number_detail]
|
|
9
11
|
return [] if !list
|
|
10
12
|
if list.is_a?(Array) then list else [list] end
|
|
11
13
|
end
|
data/lib/bandwidth-iris/city.rb
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/lib/bandwidth-iris/dlda.rb
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/lib/bandwidth-iris/lidb.rb
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/lib/bandwidth-iris/order.rb
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/lib/bandwidth-iris/site.rb
CHANGED
|
File without changes
|
|
File without changes
|
data/lib/bandwidth-iris/tn.rb
CHANGED
|
File without changes
|
|
File without changes
|
data/lib/bandwidth-iris/user.rb
CHANGED
|
File without changes
|
data/lib/ruby-bandwidth-iris.rb
CHANGED
|
File without changes
|
data/ruby-bandwidth-iris.gemspec
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -14,6 +14,14 @@ describe BandwidthIris::AvailableNumber do
|
|
|
14
14
|
client.stubs.get('/v1.0/accounts/accountId/availableNumbers?areaCode=866&quantity=5') {|env| [200, {}, Helper.xml['available_numbers']]}
|
|
15
15
|
expect(AvailableNumber.list(client, {:area_code => 866, :quantity => 5}).length).to eql(2)
|
|
16
16
|
end
|
|
17
|
+
|
|
18
|
+
it 'should return number details' do
|
|
19
|
+
client.stubs.get('/v1.0/accounts/accountId/availableNumbers?areaCode=201&quantity=5&enableTNDetail=true') {|env| [200, {}, Helper.xml['available_number_details']]}
|
|
20
|
+
expect(AvailableNumber.list(client, {:area_code => 201, :quantity => 5, :enable_t_n_detail => true}).length).to eql(5)
|
|
21
|
+
expect(AvailableNumber.list(client, {:area_code => 201, :quantity => 5, :enable_t_n_detail => true})[0]).to be_a(Hash)
|
|
22
|
+
expect(AvailableNumber.list(client, {:area_code => 201, :quantity => 5, 'enableTNDetail' => true}).length).to eql(5)
|
|
23
|
+
expect(AvailableNumber.list(client, {:area_code => 201, :quantity => 5, 'enableTNDetail' => true})[0]).to be_a(Hash)
|
|
24
|
+
end
|
|
17
25
|
end
|
|
18
26
|
|
|
19
27
|
end
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/spec/helper.rb
CHANGED
|
File without changes
|
data/spec/xml.yml
CHANGED
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
lnp_check: "<?xml version=\"1.0\" encoding=\"utf-8\"?><NumberPortabilityResponse><SupportedRateCenters><RateCenterGroup><RateCenter>Center1</RateCenter><City>City1</City><State>State1</State><LATA>11</LATA><Tiers><Tier>111</Tier><Tier>222</Tier><Tier>333</Tier></Tiers><TnList><Tn>1111</Tn><Tn>2222</Tn><Tn>3333</Tn></TnList></RateCenterGroup></SupportedRateCenters><UnsupportedRateCenters/></NumberPortabilityResponse>"
|
|
33
33
|
cities: "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><CityResponse><ResultCount>2</ResultCount><Cities><City><RcAbbreviation>SOUTHEPINS</RcAbbreviation><Name>ABERDEEN</Name></City><City><RcAbbreviation>JULIAN</RcAbbreviation><Name>ADVANCE</Name></City></Cities></CityResponse>"
|
|
34
34
|
available_numbers: "<SearchResult><ResultCount>2</ResultCount><TelephoneNumberList><TelephoneNumber><City>JERSEY CITY</City><LATA>224</LATA><RateCenter>JERSEYCITY</RateCenter><State>NJ</State>></TelephoneNumber><TelephoneNumber><City>JERSEY CITY</City><LATA>224</LATA><RateCenter>JERSEYCITY</RateCenter><State>NJ</State></TelephoneNumber></TelephoneNumberList></SearchResult>"
|
|
35
|
+
available_number_details: "<SearchResult><ResultCount>5</ResultCount><TelephoneNumberDetailList><TelephoneNumberDetail><City>RIDGEWOOD</City><LATA>224</LATA><RateCenter>RIDGEWOOD</RateCenter><State>NJ</State><FullNumber>2013458710</FullNumber><Tier>0</Tier><VendorId>49</VendorId><VendorName>Bandwidth CLEC</VendorName></TelephoneNumberDetail><TelephoneNumberDetail><City>ORADELL</City><LATA>224</LATA><RateCenter>ORADELL</RateCenter><State>NJ</State><FullNumber>2013508574</FullNumber><Tier>0</Tier><VendorId>49</VendorId><VendorName>Bandwidth CLEC</VendorName></TelephoneNumberDetail><TelephoneNumberDetail><City>ORADELL</City><LATA>224</LATA><RateCenter>ORADELL</RateCenter><State>NJ</State><FullNumber>2013508149</FullNumber><Tier>0</Tier><VendorId>49</VendorId><VendorName>Bandwidth CLEC</VendorName></TelephoneNumberDetail><TelephoneNumberDetail><City>ORADELL</City><LATA>224</LATA><RateCenter>ORADELL</RateCenter><State>NJ</State><FullNumber>2013508183</FullNumber><Tier>0</Tier><VendorId>49</VendorId><VendorName>Bandwidth CLEC</VendorName></TelephoneNumberDetail><TelephoneNumberDetail><City>ORADELL</City><LATA>224</LATA><RateCenter>ORADELL</RateCenter><State>NJ</State><FullNumber>2013508213</FullNumber><Tier>0</Tier><VendorId>49</VendorId><VendorName>Bandwidth CLEC</VendorName></TelephoneNumberDetail></TelephoneNumberDetailList></SearchResult>"
|
|
35
36
|
available_npa_nxx: "<?xml version=\"1.0\" encoding=\"utf-8\"?><SearchResultForAvailableNpaNxx><AvailableNpaNxxList><AvailableNpaNxx><City>City1</City><State>State1</State><Npa>Npa1</Npa><Nxx>Nxx1</Nxx><Quantity>10</Quantity></AvailableNpaNxx><AvailableNpaNxx><City>City2</City><State>State2</State><Npa>Npa2</Npa><Nxx>Nxx2</Nxx><Quantity>20</Quantity></AvailableNpaNxx></AvailableNpaNxxList></SearchResultForAvailableNpaNxx>"
|
|
36
37
|
users: "<?xml version=\"1.0\"?><UsersResponse><Users><User><Username>testcustomer</Username><FirstName>Jane</FirstName><LastName>Doe</LastName><EmailAddress>janedoe@bandwidth.com</EmailAddress><TelephoneNumber>9199999999</TelephoneNumber></User><User><Username>johndoe</Username><FirstName>John</FirstName><LastName>Doe</LastName><EmailAddress>johndoe@bandwidth.com</EmailAddress><TelephoneNumber>9199999998</TelephoneNumber></User></Users></UsersResponse>"
|
|
37
38
|
dldas: "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\" ?><ResponseSelectWrapper><ListOrderIdUserIdDate><TotalCount>3</TotalCount><OrderIdUserIdDate><accountId>14</accountId><CountOfTNs>2</CountOfTNs><userId>team_ua</userId><lastModifiedDate>2014-07-07T10:06:43.427Z</lastModifiedDate><OrderType>dlda</OrderType><OrderDate>2014-07-07T10:06:43.427Z</OrderDate><orderId>37a6447c-1a0b-4be9-ba89-3f5cb0aea142</orderId><OrderStatus>FAILED</OrderStatus></OrderIdUserIdDate><OrderIdUserIdDate><accountId>14</accountId><CountOfTNs>2</CountOfTNs><userId>team_ua</userId><lastModifiedDate>2014-07-07T10:05:56.595Z</lastModifiedDate><OrderType>dlda</OrderType><OrderDate>2014-07-07T10:05:56.595Z</OrderDate><orderId>743b0e64-3350-42e4-baa6-406dac7f4a85</orderId><OrderStatus>RECEIVED</OrderStatus></OrderIdUserIdDate><OrderIdUserIdDate><accountId>14</accountId><CountOfTNs>2</CountOfTNs><userId>team_ua</userId><lastModifiedDate>2014-07-07T09:32:17.234Z</lastModifiedDate><OrderType>dlda</OrderType><OrderDate>2014-07-07T09:32:17.234Z</OrderDate><orderId>f71eb4d2-bfef-4384-957f-45cd6321185e</orderId><OrderStatus>RECEIVED</OrderStatus></OrderIdUserIdDate></ListOrderIdUserIdDate></ResponseSelectWrapper>"
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ruby-bandwidth-iris
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andrey Belchikov
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2019-05-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: builder
|
|
@@ -139,6 +139,7 @@ files:
|
|
|
139
139
|
- examples/account.rb
|
|
140
140
|
- examples/available_npa_nxx.rb
|
|
141
141
|
- examples/available_number.rb
|
|
142
|
+
- examples/available_number_details.rb
|
|
142
143
|
- examples/city.rb
|
|
143
144
|
- examples/config.yml.example
|
|
144
145
|
- examples/covered-rate-center.rb
|
|
@@ -224,7 +225,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
224
225
|
version: '0'
|
|
225
226
|
requirements: []
|
|
226
227
|
rubyforge_project:
|
|
227
|
-
rubygems_version: 2.
|
|
228
|
+
rubygems_version: 2.5.2.3
|
|
228
229
|
signing_key:
|
|
229
230
|
specification_version: 4
|
|
230
231
|
summary: Gem for integrating to Bandwidth's Iris API
|