ruby-bandwidth-iris 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5c07a2a93d28a4b21c5c1fac4c2d3fb6d70e9a14
4
- data.tar.gz: 53ed1ef78f197603c74524930b4d2a4182f98909
3
+ metadata.gz: 8038f21dfe1331b61d10b6e9269213dd79e46009
4
+ data.tar.gz: 44968f75ec155cab8d5971fb13cabb4e18ab8c58
5
5
  SHA512:
6
- metadata.gz: aaf2f58842efa4971157bf3f2528a267e2c33ea9f83eeabb35608ba4b077bb662d671936ceebdc1b285d76c4c15de4c9277b6410cd0d061c0838ce74df107d02
7
- data.tar.gz: 0b39fcf710b427c0b5e8dc62efcda645f54fe98c2e4707c254a9034848b9f98d55d0f3790633fe107dfa9917590cb8202221f0a65dc57434c9168eb6828a973c
6
+ metadata.gz: dcb866dfd5f1c8ced1f121b995defbf7e394cdfa27a4e087f1da1aa09154123b4aad468e90e7247878117784d68f4c13bbc218956b93479cde9e7e2352f540d2
7
+ data.tar.gz: bff2d1b1b8823d33d53ee0b44a0b14501307a2560627f18935adcfbb7bcaf706ec5e32a393980741ba7b7ad7b142a0d43e1669f85de21c8901067db04ea5894f
data/.travis.yml CHANGED
@@ -4,4 +4,5 @@ rvm:
4
4
  - '2.0.0'
5
5
  - '2.1.0'
6
6
  - '2.2.0'
7
+ - '2.3.0'
7
8
 
data/Gemfile CHANGED
@@ -1,10 +1,9 @@
1
1
  source 'https://rubygems.org'
2
- gem 'rake'
3
2
 
4
3
  group :test do
5
- gem 'coveralls'
6
- gem 'rspec', '>= 2.14'
7
- gem 'simplecov'
4
+ gem 'coveralls', '0.8.13'
5
+ gem 'rspec', '3.4.0'
6
+ gem 'simplecov', '0.11.2'
8
7
  end
9
8
 
10
9
  gemspec
data/README.md CHANGED
@@ -82,18 +82,18 @@ list = BandwidthIris::AvailableNpaNxx.list({:area_code => "818", :quantity =>5})
82
82
 
83
83
  ## Cities
84
84
  ```ruby
85
- list = Bandwidth::City.list(:available => true, :state =>"CA"})
85
+ list = BandwidthIris::City.list({:available => true, :state =>"CA"})
86
86
  ```
87
87
 
88
88
  ## Covered Rate Centers
89
89
  ```ruby
90
- Bandwidth::CoveredRateCenter.list({:zip => "27601"})
90
+ BandwidthIris::CoveredRateCenter.list({:zip => "27601"})
91
91
  ```
92
92
 
93
93
  ## Disconnected Numbers
94
94
  Retrieves a list of disconnected numbers for an account
95
95
  ```ruby
96
- Bandwidth::DiscNumber.list({:area_code => "919"})
96
+ BandwidthIris::DiscNumber.list({:area_code => "919"})
97
97
  ```
98
98
 
99
99
  ## Disconnect Numbers
@@ -101,7 +101,7 @@ The Disconnect object is used to disconnect numbers from an account. Creates a
101
101
 
102
102
  ### Create Disconnect
103
103
  ```ruby
104
- Bandwidth::Disconnect.create("Disconnect Order Name", ["9195551212", "9195551213"])
104
+ BandwidthIris::Disconnect.create("Disconnect Order Name", ["9195551212", "9195551213"])
105
105
  ```
106
106
 
107
107
  ### Add Note to Disconnect
@@ -143,7 +143,7 @@ dlda = {
143
143
  ]
144
144
  }
145
145
 
146
- Bandwidth::Dlda.create(dlda)
146
+ BandwidthIris::Dlda.create(dlda)
147
147
  ```
148
148
 
149
149
  ### Get Dlda
@@ -158,7 +158,7 @@ dlda.get_history()
158
158
 
159
159
  ### List Dldas
160
160
  ```ruby
161
- Bandwidth::Dlda.list({:telephone_number => "9195551212"})
161
+ BandwidthIris::Dlda.list({:telephone_number => "9195551212"})
162
162
  ```
163
163
 
164
164
  ## Import To Account
@@ -168,12 +168,12 @@ This path is generally not available to Bandwidth accounts, and as such is not d
168
168
 
169
169
  ### List InService Numbers
170
170
  ```ruby
171
- Bandwidth::InServiceNumber.list({:area_code => "919"})
171
+ BandwidthIris::InServiceNumber.list({:area_code => "919"})
172
172
  ```
173
173
 
174
174
  ### Get InService Number Detail
175
175
  ```ruby
176
- Bandwidth::InServiceNumber.get("9195551212")
176
+ BandwidthIris::InServiceNumber.get("9195551212")
177
177
  ```
178
178
 
179
179
  ## Lidb
@@ -191,15 +191,15 @@ data = {
191
191
  }
192
192
  }
193
193
  }
194
- Bandwidth::Lidbs.create(data)
194
+ BandwidthIris::Lidbs.create(data)
195
195
  ```
196
196
  ### Get Lidb
197
197
  ```ruby
198
- Bandwidth::Lidbs.get(id)
198
+ BandwidthIris::Lidbs.get(id)
199
199
  ```
200
200
  ### List Lidbs
201
201
  ```ruby
202
- Bandwidth::Lidbs.list({:telephone_number => "9195551212"})
202
+ BandwidthIris::Lidbs.list({:telephone_number => "9195551212"})
203
203
  ```
204
204
 
205
205
  ## LNP Checker
@@ -207,7 +207,7 @@ Bandwidth::Lidbs.list({:telephone_number => "9195551212"})
207
207
  ```ruby
208
208
  numbers = ["9195551212", "9195551213"]
209
209
  full_check = true
210
- Bandwidth::LnpChecker.check(numbers, full_check)
210
+ BandwidthIris::LnpChecker.check(numbers, full_check)
211
211
  ```
212
212
 
213
213
  ## LSR Orders
@@ -239,20 +239,20 @@ data = {
239
239
  }
240
240
  }
241
241
 
242
- Bandwidth::LsrOrder.create(data)
242
+ BandwidthIris::LsrOrder.create(data)
243
243
  ```
244
244
  ### Get LSR Order
245
245
  ```ruby
246
- Bandwidth::LsrOrder.get(id)
246
+ BandwidthIris::LsrOrder.get(id)
247
247
  ```
248
248
  ### List LSR Orders
249
249
  ```ruby
250
- Bandwidth::LsrOrder.list({:pon =>"Some Pon"})
250
+ BandwidthIris::LsrOrder.list({:pon =>"Some Pon"})
251
251
  ```
252
252
  ### Update LSR Order
253
253
  ```ruby
254
254
  order.requestedFocDate = "2015-11-16"
255
- Bandwidth::LsrOrder.update(order)
255
+ BandwidthIris::LsrOrder.update(order)
256
256
  ```
257
257
  ### Get LSR Order History
258
258
  ```ruby
@@ -283,15 +283,15 @@ order = {
283
283
  }
284
284
  }
285
285
 
286
- Bandwidth::Order.create(order)
286
+ BandwidthIris::Order.create(order)
287
287
  ```
288
288
  ### Get Order
289
289
  ```ruby
290
- Bandwidth::Order.get(id)
290
+ BandwidthIris::Order.get(id)
291
291
  ```
292
292
  ### List Orders
293
293
  ```ruby
294
- Bandwidth::Order.list(query)
294
+ BandwidthIris::Order.list(query)
295
295
  ```
296
296
  ### Order Instance Methods
297
297
  ```ruby
@@ -343,11 +343,11 @@ data = {
343
343
  :billing_type => "PORTIN"
344
344
  }
345
345
 
346
- Bandwidth::PortIn.create(data)
346
+ BandwidthIris::PortIn.create(data)
347
347
  ```
348
348
  ## Get PortIn
349
349
  ```ruby
350
- Bandwidth::PortIn.get("id", callback)
350
+ BandwidthIris::PortIn.get("id", callback)
351
351
  ```
352
352
 
353
353
  ### PortIn Instance methods
@@ -378,18 +378,18 @@ portIn.get_files()
378
378
  ### List PortOuts
379
379
  ```ruby
380
380
  query = {:status => "complete"}
381
- Bandwidth::PortOut.list(query)
381
+ BandwidthIris::PortOut.list(query)
382
382
  ```
383
383
  ### Get PortOut
384
384
  ```ruby
385
- Bandwidth::PortOut.get(id)
385
+ BandwidthIris::PortOut.get(id)
386
386
  ```
387
387
 
388
388
  ## Rate Centers
389
389
  ### List Ratecenters
390
390
  ```ruby
391
391
  query = {:available => true, :state => "CA"}
392
- Bandwidth::RateCenter.list(query)
392
+ BandwidthIris::RateCenter.list(query)
393
393
  ```
394
394
 
395
395
  ## SIP Peers
@@ -422,15 +422,15 @@ data = {
422
422
 
423
423
  }
424
424
 
425
- Bandwidth::SipPeer.create(data)
425
+ BandwidthIris::SipPeer.create(data)
426
426
  ```
427
427
  ### Get SIP Peer
428
428
  ```ruby
429
- Bandwidth::SipPeer.get("id")
429
+ BandwidthIris::SipPeer.get("id")
430
430
  ```
431
431
  ### List SIP Peers
432
432
  ```ruby
433
- Bandwidth::SipPeer.list(siteId)
433
+ BandwidthIris::SipPeer.list(siteId)
434
434
  ```
435
435
  ### Delete SIP Peer
436
436
  ```ruby
@@ -470,7 +470,7 @@ site = {
470
470
  :address_type => "Service"
471
471
  }
472
472
  };
473
- Bandwidth::Site.create(site)
473
+ BandwidthIris::Site.create(site)
474
474
  ```
475
475
 
476
476
  ### Updating a Site
@@ -483,7 +483,7 @@ site.delete()
483
483
  ```
484
484
  ### Listing All Sites
485
485
  ```ruby
486
- Bandwidth::Site.list()
486
+ BandwidthIris::Site.list()
487
487
  ```
488
488
  ```
489
489
  ### Site SipPeer Methods
@@ -510,15 +510,15 @@ subscription = {
510
510
  :expiry => 12000
511
511
  }
512
512
  }
513
- Bandwidth::Subscription.create(subscription)
513
+ BandwidthIris::Subscription.create(subscription)
514
514
  ```
515
515
  ### Get Subscription
516
516
  ```ruby
517
- Bandwidth::Subscription.get(id)
517
+ BandwidthIris::Subscription.get(id)
518
518
  ```
519
519
  ### List Subscriptions
520
520
  ```ruby
521
- Bandwidth::Subscription.list(query)
521
+ BandwidthIris::Subscription.list(query)
522
522
  ```
523
523
  ### Subscription Instance Methods
524
524
  ```ruby
@@ -534,11 +534,11 @@ subscription.delete()
534
534
  ## TNs
535
535
  ### Get TN
536
536
  ```ruby
537
- tn = Bandwidth::Tn.get(fullNumber)
537
+ tn = BandwidthIris::Tn.get(fullNumber)
538
538
  ```
539
539
  ### List TNs
540
540
  ```ruby
541
- Bandwidth::Tn.list(query)
541
+ BandwidthIris::Tn.list(query)
542
542
  ```
543
543
  ### TN Instance Methods
544
544
  ```ruby
@@ -560,12 +560,12 @@ tn.get_rate_center()
560
560
 
561
561
  ### Create TN Reservation
562
562
  ```ruby
563
- Bandwidth::TnReservation.create({:reserved_tn => "9195551212"})
563
+ BandwidthIris::TnReservation.create({:reserved_tn => "9195551212"})
564
564
  ```
565
565
 
566
566
  ### Get TN Reservation
567
567
  ```ruby
568
- tn = Bandwidth::TnReservation.get(id)
568
+ tn = BandwidthIris::TnReservation.get(id)
569
569
  ```
570
570
 
571
571
  ### Delete TN Reservation
@@ -202,7 +202,7 @@ module BandwidthIris
202
202
  DateTime.iso8601(v)
203
203
  when /\A\d{9}\d?\Z/.match(v)
204
204
  v
205
- when /\A\d+\Z/.match(v)
205
+ when /\A[1-9]\d*\Z/.match(v)
206
206
  Integer(v)
207
207
  when /\A[-+]?[0-9]*\.?[0-9]+\Z/.match(v)
208
208
  Float(v)
@@ -1,4 +1,4 @@
1
1
  module BandwidthIris
2
2
  # Version of this gem
3
- VERSION = "1.0.2"
3
+ VERSION = "1.0.3"
4
4
  end
@@ -17,10 +17,10 @@ Gem::Specification.new do |spec|
17
17
  spec.add_dependency "builder"
18
18
  spec.add_dependency "faraday"
19
19
  spec.add_dependency "nori"
20
- spec.add_dependency "activesupport"
20
+ spec.add_dependency "activesupport","4.2.7"
21
21
  spec.add_dependency "certified"
22
22
 
23
23
  spec.add_development_dependency "bundler", "~> 1.3"
24
- spec.add_development_dependency "rake"
24
+ spec.add_development_dependency "rake", "11.1.0"
25
25
  spec.add_development_dependency "yard"
26
26
  end
@@ -68,8 +68,8 @@ describe BandwidthIris::Client do
68
68
  end
69
69
 
70
70
  it 'should make POST request and return xml data' do
71
- client.stubs.post('/v1.0/path1', '<?xml version="1.0" encoding="UTF-8"?><Request><TestField1>test</TestField1><TestField2>10</TestField2><TestField3>false</TestField3><TestFieldd4>2015-05-29T01:02:03+00:00</TestFieldd4></Request>') { |env| [200, {}, '<Response><Success>true</Success></Response>'] }
72
- expect(client.make_request(:post, '/path1', {:request => {:test_field1 => "test", :test_field2 => 10, :test_field3 => false, :test_fieldd4 => DateTime.new(2015, 5, 29, 1,2,3)}})[0]).to eql(:success => true)
71
+ client.stubs.post('/v1.0/path1', '<?xml version="1.0" encoding="UTF-8"?><Request><TestField1>test</TestField1><TestField2>019</TestField2><TestField3>false</TestField3><TestFieldd4>2015-05-29T01:02:03+00:00</TestFieldd4></Request>') { |env| [200, {}, '<Response><Success>true</Success></Response>'] }
72
+ expect(client.make_request(:post, '/path1', {:request => {:test_field1 => "test", :test_field2 => "019", :test_field3 => false, :test_fieldd4 => DateTime.new(2015, 5, 29, 1,2,3)}})[0]).to eql(:success => true)
73
73
  end
74
74
 
75
75
  it 'should make PUT request and return xml data' do
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.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrey Belchikov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-05-19 00:00:00.000000000 Z
11
+ date: 2016-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: builder
@@ -56,16 +56,16 @@ dependencies:
56
56
  name: activesupport
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - '='
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: 4.2.7
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - '='
67
67
  - !ruby/object:Gem::Version
68
- version: '0'
68
+ version: 4.2.7
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: certified
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -98,16 +98,16 @@ dependencies:
98
98
  name: rake
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ">="
101
+ - - '='
102
102
  - !ruby/object:Gem::Version
103
- version: '0'
103
+ version: 11.1.0
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ">="
108
+ - - '='
109
109
  - !ruby/object:Gem::Version
110
- version: '0'
110
+ version: 11.1.0
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: yard
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -224,7 +224,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
224
224
  version: '0'
225
225
  requirements: []
226
226
  rubyforge_project:
227
- rubygems_version: 2.6.4
227
+ rubygems_version: 2.6.6
228
228
  signing_key:
229
229
  specification_version: 4
230
230
  summary: Gem for integrating to Bandwidth's Iris API