ruby-bandwidth-iris 2.4.0.pre → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/README.md +25 -12
- data/examples/create_reservation_and_order.rb +79 -0
- data/examples/order_number.rb +83 -0
- data/lib/bandwidth-iris/client.rb +4 -3
- data/lib/bandwidth-iris/order.rb +8 -0
- data/lib/bandwidth-iris/tn_reservation.rb +4 -2
- data/lib/bandwidth-iris/version.rb +1 -1
- data/spec/bandwidth-iris/order_spec.rb +18 -9
- data/spec/bandwidth-iris/tn_reservation_spec.rb +5 -5
- data/spec/xml.yml +3 -3
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '08d149b50259af28149c7018f600fcbf22d694c15604b85073a38fa4255ebff7'
|
4
|
+
data.tar.gz: 0beef4622c48e6e119475e37644a16a09a4c74fb9cac935cf10ea82b7e55d377
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8e8fc95953e9bb5ed6c00a24c5cccef35cea81a31c710c6560eb7c4b0b96a6c3a533cb365fbad0a2aea3a1ac854fb79318b49412d3e5a9125b5219d379e70f9
|
7
|
+
data.tar.gz: 308bdcbc9d7124297535b1656befc3da6fbe574fc878c90573000ae43867da64f05c7349bb4fd27621927393487d3d6ad09b35b8f97b01c252ef42fb0e0b01eb
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -6,15 +6,17 @@ Ruby Client library for IRIS / BBS API
|
|
6
6
|
|
7
7
|
## Release Notes
|
8
8
|
|
9
|
-
| Release Version | Notes
|
10
|
-
|
11
|
-
| 1.0.5
|
12
|
-
| 2.0.0
|
13
|
-
| 2.0.1
|
14
|
-
| 2.1.0
|
15
|
-
| 2.2.0
|
16
|
-
| 2.3.0
|
17
|
-
| 2.4.0
|
9
|
+
| Release Version | Notes |
|
10
|
+
|:----------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
11
|
+
| 1.0.5 | Fixed incorrect generation of XML for a Disconnect request |
|
12
|
+
| 2.0.0 | Added `importTnOrders`, `removeImportedTnOrders`, `inserviceNumbers`, and `importTnChecker` endpoints. This release also changed the response body of `BandwidthIris::InServiceNumber.list()`. Please make sure to update your code to include this change. |
|
13
|
+
| 2.0.1 | Updated gem dependencies to be less restrictive |
|
14
|
+
| 2.1.0 | Added `csrs` endpoints |
|
15
|
+
| 2.2.0 | Added `loas` endpoints to `importTnOrders` |
|
16
|
+
| 2.3.0 | Added `get_tns_by_order_id` to the Orders class |
|
17
|
+
| 2.4.0.pre | Added application management and sippeer products endpoints |
|
18
|
+
| 2.5.0 | Added `get_order_response` to pull full `<OrderResponse>` object from API, added `id` back to order object on get requests |
|
19
|
+
| 2.6.0 | Fixed TN Reservation and updated tests to match reality |
|
18
20
|
|
19
21
|
## Install
|
20
22
|
|
@@ -78,6 +80,7 @@ When fetching objects from the API, it will always return an object that has the
|
|
78
80
|
instantiated so that you can call dependent methods as well as update, delete.
|
79
81
|
|
80
82
|
Example:
|
83
|
+
|
81
84
|
```ruby
|
82
85
|
site = BandwidthIris::Site.create({siteObject})
|
83
86
|
|
@@ -312,6 +315,16 @@ BandwidthIris::Order.create(order_data)
|
|
312
315
|
```ruby
|
313
316
|
order = BandwidthIris::Order.get("order_id")
|
314
317
|
```
|
318
|
+
|
319
|
+
### Get Order Response
|
320
|
+
|
321
|
+
The order response object contains more details returned in the `GET` `/orders/order-id` API.
|
322
|
+
|
323
|
+
```ruby
|
324
|
+
order = BandwidthIris::Order.get_order_response(client, "101")
|
325
|
+
completed_number = order.completed_numbers[:telephone_number][:full_number]
|
326
|
+
```
|
327
|
+
|
315
328
|
### List Orders
|
316
329
|
```ruby
|
317
330
|
BandwidthIris::Order.list(query)
|
@@ -464,7 +477,7 @@ sipPeer.delete()
|
|
464
477
|
### SipPeer TN Methods
|
465
478
|
```ruby
|
466
479
|
# get TN for this peer
|
467
|
-
sipPeer.get_tns(number)
|
480
|
+
sipPeer.get_tns(number)
|
468
481
|
|
469
482
|
# get all TNs for this peer
|
470
483
|
sipPeer.get_tns()
|
@@ -589,7 +602,7 @@ tn.get_rate_center()
|
|
589
602
|
|
590
603
|
### Create TN Reservation
|
591
604
|
```ruby
|
592
|
-
BandwidthIris::TnReservation.create(
|
605
|
+
BandwidthIris::TnReservation.create("9195551212")
|
593
606
|
```
|
594
607
|
|
595
608
|
### Get TN Reservation
|
@@ -757,7 +770,7 @@ puts response[0][:file_name]
|
|
757
770
|
```ruby
|
758
771
|
metadata = {
|
759
772
|
:document_name => "file_name",
|
760
|
-
:document_type => "LOA"
|
773
|
+
:document_type => "LOA"
|
761
774
|
}
|
762
775
|
BandwidthIris::ImportTnOrders.update_loa_file_metadata("order_id", "file_id", metadata)
|
763
776
|
```
|
@@ -0,0 +1,79 @@
|
|
1
|
+
lib = File.expand_path("../../lib", __FILE__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
|
4
|
+
require 'ruby-bandwidth-iris'
|
5
|
+
|
6
|
+
$bandwidth_account_id = ENV['BANDWIDTH_ACCOUNT_ID']
|
7
|
+
$bandwidth_user_name = ENV['BANDWIDTH_API_USER']
|
8
|
+
$bandwidth_password = ENV['BANDWIDTH_API_PASSWORD']
|
9
|
+
## Fill these in
|
10
|
+
$bandwidth_site_id = ENV['BANDWIDTH_SITE_ID']
|
11
|
+
$bandwidth_to_sippeer_id = ENV['BANDWIDTH_SIPPEER_ID']
|
12
|
+
|
13
|
+
|
14
|
+
def get_order_by_id(client, order_id:, attempts: 0)
|
15
|
+
begin
|
16
|
+
order_result = BandwidthIris::Order.get(client, order_id)
|
17
|
+
return order_result
|
18
|
+
rescue Exception => e
|
19
|
+
if attempts > 3
|
20
|
+
puts("Completely Failed fetching Order")
|
21
|
+
raise StandardError.new e
|
22
|
+
end
|
23
|
+
puts("Error Message: #{e.message}")
|
24
|
+
attempts = attempts+1
|
25
|
+
sleep(1)
|
26
|
+
return get_order_by_id(client, order_id: order_id, attempts: attempts)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
def get_numbers_from_order_id(client, order_id:)
|
31
|
+
order = BandwidthIris::Order.new({:id => order_id}, client)
|
32
|
+
numbers_result = order.get_tns
|
33
|
+
return numbers_result
|
34
|
+
end
|
35
|
+
|
36
|
+
def order_numbers_with_reservation_id(client, reservation_id:, number:)
|
37
|
+
order_data = {
|
38
|
+
:name => "Reservation Test",
|
39
|
+
:site_id => $bandwidth_site_id,
|
40
|
+
:existing_telephone_number_order_type => {
|
41
|
+
:telephone_number_list => [
|
42
|
+
:telephone_number => number
|
43
|
+
],
|
44
|
+
:reservation_id_list => [
|
45
|
+
:reservation_id => reservation_id
|
46
|
+
]
|
47
|
+
}
|
48
|
+
}
|
49
|
+
order_result = BandwidthIris::Order.create(client, order_data)
|
50
|
+
return order_result
|
51
|
+
end
|
52
|
+
|
53
|
+
def reserve_numbers(client, number:)
|
54
|
+
reservation = BandwidthIris::TnReservation.create(client, number)
|
55
|
+
return reservation
|
56
|
+
end
|
57
|
+
|
58
|
+
def search_numbers(client, area_code: 919)
|
59
|
+
list = BandwidthIris::AvailableNumber.list(client, {:area_code => area_code, :quantity => 5})
|
60
|
+
return list
|
61
|
+
end
|
62
|
+
|
63
|
+
def main()
|
64
|
+
client = BandwidthIris::Client.new($bandwidth_account_id, $bandwidth_user_name, $bandwidth_password)
|
65
|
+
available_numbers = search_numbers(client)
|
66
|
+
number = available_numbers[0]
|
67
|
+
reservation = reserve_numbers(client, number: number)
|
68
|
+
reservation_id = reservation.id
|
69
|
+
order = order_numbers_with_reservation_id(client, reservation_id: reservation_id, number: number)
|
70
|
+
order_id = order.id
|
71
|
+
puts(order_id)
|
72
|
+
my_order = get_order_by_id(client, order_id: order_id)
|
73
|
+
my_numbers = get_numbers_from_order_id(client, order_id:order_id)
|
74
|
+
puts(my_numbers)
|
75
|
+
end
|
76
|
+
|
77
|
+
if __FILE__ == $0
|
78
|
+
main
|
79
|
+
end
|
@@ -0,0 +1,83 @@
|
|
1
|
+
lib = File.expand_path("../../lib", __FILE__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
|
4
|
+
require "ruby-bandwidth-iris"
|
5
|
+
|
6
|
+
def order_numbers_in_area_code(client, site_id:, sippeer_id:, area_code: 919, quantity: 1)
|
7
|
+
order_data = {
|
8
|
+
:name => "Test",
|
9
|
+
:site_id => site_id,
|
10
|
+
:area_code_search_and_order_type => {
|
11
|
+
:area_code => area_code,
|
12
|
+
:quantity => quantity
|
13
|
+
}
|
14
|
+
}
|
15
|
+
order_result = BandwidthIris::Order.create(client, order_data)
|
16
|
+
order_id = order_result.to_data[:id]
|
17
|
+
return order_id
|
18
|
+
end
|
19
|
+
|
20
|
+
def get_order_by_id(client, order_id:, attempts: 0)
|
21
|
+
begin
|
22
|
+
order_result = BandwidthIris::Order.get(client, order_id)
|
23
|
+
return order_result
|
24
|
+
rescue Exception => e
|
25
|
+
if attempts > 3
|
26
|
+
puts("Completely Failed fetching Order")
|
27
|
+
raise StandardError.new e
|
28
|
+
end
|
29
|
+
puts("Error Message: #{e.message}\nCode:#{e.code}")
|
30
|
+
attempts = attempts+1
|
31
|
+
sleep(1)
|
32
|
+
return get_order_by_id(client, order_id: order_id, attempts: attempts)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def get_order_response_by_id(client, order_id:, attempts: 0)
|
37
|
+
begin
|
38
|
+
order_response = BandwidthIris::Order.get_order_response(client, order_id)
|
39
|
+
order_data = order_response.to_data
|
40
|
+
numbers = order_response.completed_numbers
|
41
|
+
completed_number = order_data[:completed_numbers][:telephone_number][:full_number]
|
42
|
+
return order_data
|
43
|
+
rescue Exception => e
|
44
|
+
if attempts > 3
|
45
|
+
puts("Completely Failed fetching Order")
|
46
|
+
raise StandardError.new e
|
47
|
+
end
|
48
|
+
puts("Error Message: #{e.message}\nCode:#{e.code}")
|
49
|
+
attempts = attempts+1
|
50
|
+
sleep(1)
|
51
|
+
return get_order_response(client, order_id: order_id, attempts: attempts)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
|
56
|
+
def get_numbers_from_order_id(client, order_id:)
|
57
|
+
order = BandwidthIris::Order.new({:id => order_id}, client)
|
58
|
+
numbers_result = order.get_tns
|
59
|
+
return numbers_result
|
60
|
+
end
|
61
|
+
|
62
|
+
def get_numbers_from_order(order)
|
63
|
+
numbers_result = order.get_tns
|
64
|
+
return numbers_result
|
65
|
+
end
|
66
|
+
|
67
|
+
def main
|
68
|
+
bandwidth_account_id = ENV["BANDWIDTH_ACCOUNT_ID"]
|
69
|
+
bandwidth_user_name = ENV["BANDWIDTH_API_USER"]
|
70
|
+
bandwidth_password = ENV["BANDWIDTH_API_PASSWORD"]
|
71
|
+
bandwidth_site_id = ENV["BANDWIDTH_SITE_ID"]
|
72
|
+
bandwidth_to_sippeer_id = ENV["BANDWIDTH_SIPPEER_ID"]
|
73
|
+
client = BandwidthIris::Client.new(bandwidth_account_id, bandwidth_user_name, bandwidth_password)
|
74
|
+
order_id = order_numbers_in_area_code(client, site_id: bandwidth_site_id, sippeer_id: bandwidth_to_sippeer_id)
|
75
|
+
my_order = get_order_by_id(client, order_id: order_id)
|
76
|
+
my_order_response = get_order_response_by_id(client, order_id: order_id)
|
77
|
+
my_numbers = get_numbers_from_order_id(client, order_id:order_id)
|
78
|
+
my_numbers = get_numbers_from_order(my_order)
|
79
|
+
end
|
80
|
+
|
81
|
+
if __FILE__ == $0
|
82
|
+
main
|
83
|
+
end
|
@@ -77,7 +77,8 @@ module BandwidthIris
|
|
77
77
|
req.params = d unless d == nil || d.empty?
|
78
78
|
end
|
79
79
|
else
|
80
|
-
|
80
|
+
xml_to_send = build_xml(data) # help debug
|
81
|
+
connection.run_request(method, @build_path.call(path), xml_to_send, {'Content-Type' => 'application/xml'})
|
81
82
|
end
|
82
83
|
body = check_response(response)
|
83
84
|
[body || {}, symbolize(response.headers || {})]
|
@@ -86,7 +87,7 @@ module BandwidthIris
|
|
86
87
|
# Makes an HTTP request for file uploads
|
87
88
|
# @param method [Symbol] http method to make
|
88
89
|
# @param path [string] path of url (exclude api verion and endpoint) to make call
|
89
|
-
# @param data [string] the raw binary string representing the file to upload
|
90
|
+
# @param data [string] the raw binary string representing the file to upload
|
90
91
|
# @param content_type [string] the content type of the request
|
91
92
|
# @return [Array] array with 2 elements: parsed data of response and response headers
|
92
93
|
def make_request_file_upload(method, path, data, content_type)
|
@@ -100,7 +101,7 @@ module BandwidthIris
|
|
100
101
|
# @param method [Symbol] http method to make
|
101
102
|
# @param path [string] path of url (exclude api verion and endpoint) to make call
|
102
103
|
# @param data [Hash] data which will be sent with request (for :get and :delete request they will be sent with query in url)
|
103
|
-
# @return [string] raw response from the API
|
104
|
+
# @return [string] raw response from the API
|
104
105
|
def make_request_file_download(method, path, data = {})
|
105
106
|
connection = @create_connection.call()
|
106
107
|
response = if method == :get || method == :delete
|
data/lib/bandwidth-iris/order.rb
CHANGED
@@ -13,6 +13,14 @@ module BandwidthIris
|
|
13
13
|
|
14
14
|
def self.get(client, id)
|
15
15
|
data = client.make_request(:get, "#{client.concat_account_path(ORDER_PATH)}/#{id}")[0][:order]
|
16
|
+
data[:id] = id
|
17
|
+
Order.new(data, client)
|
18
|
+
end
|
19
|
+
wrap_client_arg :get
|
20
|
+
|
21
|
+
def self.get_order_response(client, id)
|
22
|
+
data = client.make_request(:get, "#{client.concat_account_path(ORDER_PATH)}/#{id}")[0]
|
23
|
+
data[:id] = id
|
16
24
|
Order.new(data, client)
|
17
25
|
end
|
18
26
|
wrap_client_arg :get
|
@@ -8,12 +8,14 @@ module BandwidthIris
|
|
8
8
|
|
9
9
|
def self.get(client, id)
|
10
10
|
data = client.make_request(:get, "#{client.concat_account_path(TN_RESERVATION_PATH)}/#{id}")[0][:reservation]
|
11
|
+
data[:id] = id
|
11
12
|
TnReservation.new(data, client)
|
12
13
|
end
|
13
14
|
wrap_client_arg :get
|
14
15
|
|
15
|
-
def self.create(client,
|
16
|
-
|
16
|
+
def self.create(client, number)
|
17
|
+
reservation_request = {:reservation => {:reserved_tn => number } }
|
18
|
+
location = client.make_request(:post, client.concat_account_path(TN_RESERVATION_PATH), reservation_request)[1][:location]
|
17
19
|
id = Client.get_id_from_location_header(location)
|
18
20
|
self.get(client, id)
|
19
21
|
end
|
@@ -12,18 +12,18 @@ describe BandwidthIris::Order do
|
|
12
12
|
describe '#create' do
|
13
13
|
it 'should create an order' do
|
14
14
|
data = {
|
15
|
-
:name => "
|
16
|
-
:siteId => "
|
17
|
-
:customerOrderId => "
|
18
|
-
:
|
19
|
-
:
|
15
|
+
:name => "Local Order",
|
16
|
+
:siteId => "29976",
|
17
|
+
:customerOrderId => "123456789",
|
18
|
+
:area_code_search_and_order_type => {
|
19
|
+
:area_code => 919,
|
20
20
|
:quantity => 1
|
21
21
|
}
|
22
22
|
}
|
23
|
-
client.stubs.post("/v1.0/accounts/accountId/orders", client.build_xml({:order => data})){|env| [200, {}, Helper.xml['
|
23
|
+
client.stubs.post("/v1.0/accounts/accountId/orders", client.build_xml({:order => data})){|env| [200, {}, Helper.xml['create_order_response']]}
|
24
24
|
order = Order.create(client, data)
|
25
|
-
expect(order.id).to eql(
|
26
|
-
expect(order.name).to eql("
|
25
|
+
expect(order.id).to eql("a7af704e-2ec0-4c4d-9dc5-1b77fa62c92a")
|
26
|
+
expect(order.name).to eql("Local Order")
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
@@ -31,11 +31,20 @@ describe BandwidthIris::Order do
|
|
31
31
|
it 'should return an order' do
|
32
32
|
client.stubs.get("/v1.0/accounts/accountId/orders/101"){|env| [200, {}, Helper.xml['order']]}
|
33
33
|
order = Order.get(client, "101")
|
34
|
-
expect(order.id).to eql(101)
|
34
|
+
expect(order.id).to eql("101")
|
35
35
|
expect(order.name).to eql("Test")
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
39
|
+
describe '#get_order_response' do
|
40
|
+
it 'should return an order with details' do
|
41
|
+
client.stubs.get("/v1.0/accounts/accountId/orders/101"){|env| [200, {}, Helper.xml['order']]}
|
42
|
+
order = Order.get_order_response(client, "101")
|
43
|
+
completed_number = order.completed_numbers[:telephone_number][:full_number]
|
44
|
+
expect(completed_number).to eql("9194464166")
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
39
48
|
describe '#list' do
|
40
49
|
it 'should return orders' do
|
41
50
|
client.stubs.get("/v1.0/accounts/accountId/orders"){|env| [200, {}, Helper.xml['orders']]}
|
@@ -20,11 +20,11 @@ describe BandwidthIris::TnReservation do
|
|
20
20
|
|
21
21
|
describe '#create' do
|
22
22
|
it 'should create a reservation' do
|
23
|
-
|
24
|
-
client.stubs.post('/v1.0/accounts/accountId/tnreservation', client.build_xml({:
|
25
|
-
client.stubs.get('/v1.0/accounts/accountId/tnreservation/
|
26
|
-
item = TnReservation.create(client,
|
27
|
-
expect(item[:id]).to eql(
|
23
|
+
number = "9198975719"
|
24
|
+
client.stubs.post('/v1.0/accounts/accountId/tnreservation', client.build_xml({:reservation => {:reserved_tn => number } })) {|env| [200, {'Location' => '/v1.0/accounts/accountId/tnreservations/e34474d6-1d47-486d-af32-be9f2eefdff4'}, '']}
|
25
|
+
client.stubs.get('/v1.0/accounts/accountId/tnreservation/e34474d6-1d47-486d-af32-be9f2eefdff4') {|env| [200, {}, Helper.xml['tn_reservation']]}
|
26
|
+
item = TnReservation.create(client, number)
|
27
|
+
expect(item[:id]).to eql("e34474d6-1d47-486d-af32-be9f2eefdff4")
|
28
28
|
expect(item[:account_id]).to eql(111)
|
29
29
|
end
|
30
30
|
end
|
data/spec/xml.yml
CHANGED
@@ -14,16 +14,16 @@
|
|
14
14
|
tn_sites: "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Site><Id>1435</Id><Name>Sales Training</Name></Site>"
|
15
15
|
tn_sip_peers: "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><SipPeer><Id>4064</Id><Name>Sales</Name></SipPeer>"
|
16
16
|
tn_rate_center: "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><TelephoneNumberResponse><TelephoneNumberDetails><State>CO</State><RateCenter>DENVER</RateCenter></TelephoneNumberDetails></TelephoneNumberResponse>"
|
17
|
-
tn_reservation: "<?xml version=\"1.0\" encoding=\"
|
17
|
+
tn_reservation: "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><ReservationResponse><Reservation><ReservationId>e34474d6-1d47-486d-af32-be9f2eefdff4</ReservationId><AccountId>111</AccountId><ReservationExpires>13157</ReservationExpires><ReservedTn>9198975719</ReservedTn></Reservation></ReservationResponse>"
|
18
18
|
tn_details: "<TelephoneNumberResponse><TelephoneNumberDetails><City>JERSEY CITY</City><Lata>224</Lata><State>NJ</State><FullNumber>2018981023</FullNumber><Tier>0</Tier><VendorId>49</VendorId><VendorName>Bandwidth CLEC</VendorName><RateCenter>JERSEYCITY</RateCenter><Status>Inservice</Status><AccountId>14</AccountId><LastModified>2014-07-30T11:29:37.000Z</LastModified><Features><E911><Status>Success</Status></E911><Lidb><Status>Pending</Status><SubscriberInformation>Fred</SubscriberInformation><UseType>BUSINESS</UseType><Visibility>PUBLIC</Visibility></Lidb><Dlda><Status>Success</Status><SubscriberType>BUSINESS</SubscriberType><ListingType>LISTED</ListingType><ListingName><FirstName>Joe</FirstName><LastName>Smith</LastName></ListingName><ListAddress>true</ListAddress><Address><HouseNumber>12</HouseNumber><StreetName>ELM</StreetName><City>New York</City><StateCode>NY</StateCode><Zip>10007</Zip><Country>United States</Country><AddressType>Dlda</AddressType></Address></Dlda></Features><TnAttributes><TnAttribute>Protected</TnAttribute></TnAttributes></TelephoneNumberDetails></TelephoneNumberResponse>"
|
19
19
|
port_in: "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><LnpOrderResponse><OrderId>d28b36f7-fa96-49eb-9556-a40fca49f7c6</OrderId><Status><Code>201</Code><Description>Order request received. Please use the order id to check the status of your order later.</Description></Status><ProcessingStatus>PENDING_DOCUMENTS</ProcessingStatus><LoaAuthorizingPerson>John Doe</LoaAuthorizingPerson><Subscriber><SubscriberType>BUSINESS</SubscriberType><BusinessName>Acme Corporation</BusinessName><ServiceAddress><HouseNumber>1623</HouseNumber><StreetName>Brockton Ave #1</StreetName><City>Los Angeles</City><StateCode>CA</StateCode><Zip>90025</Zip><Country>USA</Country></ServiceAddress></Subscriber><BillingTelephoneNumber>6882015002</BillingTelephoneNumber><ListOfPhoneNumbers><PhoneNumber>6882015025</PhoneNumber><PhoneNumber>6882015026</PhoneNumber></ListOfPhoneNumbers><Triggered>false</Triggered><BillingType>PORTIN</BillingType></LnpOrderResponse>"
|
20
20
|
notes: "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><Notes><Note><Id>11299</Id><UserId>customer</UserId><Description>Test</Description><LastDateModifier>2014-11-20T07:08:47.000Z</LastDateModifier></Note><Note><Id>11301</Id><UserId>customer</UserId><Description>Test1</Description><LastDateModifier>2014-11-20T07:11:36.000Z</LastDateModifier></Note></Notes>"
|
21
21
|
files: "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><fileListResponse><fileCount>6</fileCount><fileData><FileName>d28b36f7-fa96-49eb-9556-a40fca49f7c6-1416231534986.txt</FileName><FileMetaData><DocumentType>LOA</DocumentType></FileMetaData></fileData><fileData><FileName>d28b36f7-fa96-49eb-9556-a40fca49f7c6-1416231558768.txt</FileName><FileMetaData><DocumentType>LOA</DocumentType></FileMetaData></fileData><fileData><FileName>d28b36f7-fa96-49eb-9556-a40fca49f7c6-1416231581134.txt</FileName><FileMetaData><DocumentType>LOA</DocumentType></FileMetaData></fileData><fileData><FileName>d28b36f7-fa96-49eb-9556-a40fca49f7c6-1416231629005.txt</FileName><FileMetaData><DocumentType>LOA</DocumentType></FileMetaData></fileData><fileData><FileName>d28b36f7-fa96-49eb-9556-a40fca49f7c6-1416231699462.txt</FileName><FileMetaData><DocumentType>LOA</DocumentType></FileMetaData></fileData><fileData><FileName>d28b36f7-fa96-49eb-9556-a40fca49f7c6-1416232756923.txt</FileName><FileMetaData><DocumentType>LOA</DocumentType></FileMetaData></fileData><resultCode>0</resultCode><resultMessage>LOA file list successfully returned</resultMessage></fileListResponse>"
|
22
22
|
file_metadata: "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><FileMetaData><DocumentType>LOA</DocumentType></FileMetaData>"
|
23
23
|
file_created: "<?xml version=\"1.0\" encoding=\"utf-8\"?><FileResult><filename>test.txt</filename></FileResult>"
|
24
|
-
order: "<?xml version=\"1.0\" encoding=\"utf-8\"?><OrderResponse><Order><id>101</id><Name>Test</Name><SiteId>10</SiteId><OrderCreateDate>2014-12-03T15:50:05.575549+03:00</OrderCreateDate><CustomerOrderId>11</CustomerOrderId></Order><CreatedByUser>test</CreatedByUser><CompletedQuantity>1</CompletedQuantity><FailedQuantity>0</FailedQuantity><PendingQuantity>0</PendingQuantity><OrderCompleteDate>0001-01-01T00:00:00</OrderCompleteDate></OrderResponse>"
|
25
24
|
orders: "<?xml version=\"1.0\" encoding=\"utf-8\"?><OrderResponse><Orders><Order><id>101</id><Name>Test</Name><SiteId>10</SiteId><OrderCreateDate>2014-12-03T15:50:05.575549+03:00</OrderCreateDate><CustomerOrderId>11</CustomerOrderId></Order><CreatedByUser>test</CreatedByUser><CompletedQuantity>1</CompletedQuantity><FailedQuantity>0</FailedQuantity><PendingQuantity>0</PendingQuantity><OrderCompleteDate>0001-01-01T00:00:00</OrderCompleteDate></Orders></OrderResponse>"
|
26
|
-
|
25
|
+
create_order_response: "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><OrderResponse><Order><CustomerOrderId>123456789</CustomerOrderId><Name>Local Order</Name><OrderCreateDate>2020-05-19T00:40:38.093Z</OrderCreateDate><BackOrderRequested>false</BackOrderRequested><id>a7af704e-2ec0-4c4d-9dc5-1b77fa62c92a</id><CombinedSearchAndOrderType><AreaCode>919</AreaCode><EnableLCA>false</EnableLCA><Quantity>1</Quantity></CombinedSearchAndOrderType><PartialAllowed>true</PartialAllowed><SiteId>29976</SiteId></Order><OrderStatus>RECEIVED</OrderStatus></OrderResponse>"
|
26
|
+
order: "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><OrderResponse><CompletedQuantity>1</CompletedQuantity><CreatedByUser>test</CreatedByUser><LastModifiedDate>2020-05-18T15:31:07.069Z</LastModifiedDate><OrderCompleteDate>2020-05-18T15:31:07.069Z</OrderCompleteDate><Order><Name>Test</Name><OrderCreateDate>2020-05-18T15:31:05.435Z</OrderCreateDate><PeerId>577561</PeerId><BackOrderRequested>false</BackOrderRequested><AreaCodeSearchAndOrderType><AreaCode>919</AreaCode><Quantity>1</Quantity></AreaCodeSearchAndOrderType><PartialAllowed>true</PartialAllowed><SiteId>1234</SiteId></Order><OrderStatus>COMPLETE</OrderStatus><CompletedNumbers><TelephoneNumber><FullNumber>9194464166</FullNumber></TelephoneNumber></CompletedNumbers><Summary>1 number ordered in (919)</Summary><FailedQuantity>0</FailedQuantity></OrderResponse>"
|
27
27
|
order_area_codes: "<TelephoneDetailsReports><TelephoneDetailsReport><AreaCode>888</AreaCode><Count>1</Count></TelephoneDetailsReport></TelephoneDetailsReports>"
|
28
28
|
order_npa_nxx: "<?xml version=\"1.0\" encoding=\"utf-8\"?><TelephoneDetailsReports><TelephoneDetailsReport><NPA-NXX>888424</NPA-NXX><Count>1</Count></TelephoneDetailsReport></TelephoneDetailsReports>"
|
29
29
|
order_totals: "<?xml version=\"1.0\" encoding=\"utf-8\"?><TelephoneDetailsReports><TelephoneDetailsReport><NPA-NXX>888424</NPA-NXX><Count>1</Count></TelephoneDetailsReport></TelephoneDetailsReports>"
|
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: 2.
|
4
|
+
version: 2.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrey Belchikov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05-
|
11
|
+
date: 2020-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: builder
|
@@ -157,8 +157,10 @@ files:
|
|
157
157
|
- examples/city.rb
|
158
158
|
- examples/config.yml.example
|
159
159
|
- examples/covered-rate-center.rb
|
160
|
+
- examples/create_reservation_and_order.rb
|
160
161
|
- examples/loa.pdf
|
161
162
|
- examples/order.rb
|
163
|
+
- examples/order_number.rb
|
162
164
|
- examples/port-in.rb
|
163
165
|
- examples/sip_peer.rb
|
164
166
|
- examples/site.rb
|
@@ -246,9 +248,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
246
248
|
version: '0'
|
247
249
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
248
250
|
requirements:
|
249
|
-
- - "
|
251
|
+
- - ">="
|
250
252
|
- !ruby/object:Gem::Version
|
251
|
-
version:
|
253
|
+
version: '0'
|
252
254
|
requirements: []
|
253
255
|
rubygems_version: 3.0.6
|
254
256
|
signing_key:
|