bridge_api 0.1.31 → 0.1.32

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: 747af705d2184ac6225cfe842f5168ab8597cd76
4
- data.tar.gz: 84a8b962fbfb3d9c74e5be5f78bdc222c6da2547
3
+ metadata.gz: bea467340f25ab7120ecb5ba6c31abf5078480f8
4
+ data.tar.gz: e5e7f4bee48c20494fcd68f0539325f2020f7802
5
5
  SHA512:
6
- metadata.gz: 2d0fe8a219696e711ffa1c2456c0e40e411e259bf1004cf536e62b91fcfc7233bb1a3c8af41eb0f058a3243bf3796fd0f25340864774d0275a14c61306e8f2e7
7
- data.tar.gz: 48a6c528e92d505e16fb093d050e790fb96b980cc463f7ec873088fc97898e4e6fbdbe1125aae8a4946103883ecd68e8db526c3b3303f6329fffa44d65b7075f
6
+ metadata.gz: 60639d0a1c6a246a7dbc6aed0a4b0fc0225d000df06ba44793c251caf034268ebd937077b6850c32afb1454372c6a632cd4c7e8e5fa779a533d8f56792aa23f2
7
+ data.tar.gz: 972b45130747243cbf4e3e5e1053812df8e62c058f0757ae1fc9ada595fa23a2b45dea39d78f6e2febc404be7f2b31cee630ffeb738d4a38edffee90aef3fe93
@@ -5,6 +5,10 @@ module BridgeAPI
5
5
  get("#{API_PATH}#{ADMIN_PATH}#{SUB_ACCOUNT_PATH}", params)
6
6
  end
7
7
 
8
+ def get_sub_account(subaccount_id, params = {})
9
+ get("#{API_PATH}#{ADMIN_PATH}#{SUB_ACCOUNT_PATH}/#{subaccount_id}", params)
10
+ end
11
+
8
12
  def deactivate_sub_account(subaccount_id, params = {})
9
13
  put("#{API_PATH}#{ADMIN_PATH}#{SUB_ACCOUNT_PATH}/#{subaccount_id}/disable", params)
10
14
  end
@@ -1,3 +1,3 @@
1
1
  module BridgeAPI
2
- VERSION = '0.1.31'.freeze unless defined?(BridgeAPI::VERSION)
2
+ VERSION = '0.1.32'.freeze unless defined?(BridgeAPI::VERSION)
3
3
  end
@@ -13,6 +13,12 @@ describe BridgeAPI::Client::SubAccount do
13
13
  expect(response.first['id']).to(eq('141'))
14
14
  end
15
15
 
16
+ it 'should get a single subaccount' do
17
+ subaccounts = @client.get_sub_account(1)
18
+ expect(subaccounts.count).to(eq(1))
19
+ expect(subaccounts.first['name']).to(eq('Customers'))
20
+ end
21
+
16
22
  it 'should activate a subaccount' do
17
23
  response = @client.activate_sub_account(1)
18
24
  expect(response.first['id']).to(eq('141'))
@@ -176,6 +176,10 @@ class FakeBridge < Sinatra::Base
176
176
  get_json_data 200, 'sub_accounts.json'
177
177
  end
178
178
 
179
+ get %r{/api/admin/sub_accounts/\d+$} do
180
+ get_json_data 200, 'sub_accounts.json'
181
+ end
182
+
179
183
  put %r{/api/admin/sub_accounts$} do
180
184
  get_json_data 200, 'sub_accounts.json'
181
185
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bridge_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.31
4
+ version: 0.1.32
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jay Shaffer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-17 00:00:00.000000000 Z
11
+ date: 2018-07-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -272,7 +272,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
272
272
  version: '0'
273
273
  requirements: []
274
274
  rubyforge_project:
275
- rubygems_version: 2.6.14
275
+ rubygems_version: 2.2.2
276
276
  signing_key:
277
277
  specification_version: 4
278
278
  summary: Bridge API
@@ -319,3 +319,4 @@ test_files:
319
319
  - spec/fixtures/users.json
320
320
  - spec/support/fake_bridge.rb
321
321
  - spec/test_helper.rb
322
+ has_rdoc: