bridge_api 0.1.30 → 0.1.31

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: 29c59a96b45a29a465f4debc256d700115a5c331
4
- data.tar.gz: '0089547940e05da4211f08aceea73887d6ea8a51'
3
+ metadata.gz: 747af705d2184ac6225cfe842f5168ab8597cd76
4
+ data.tar.gz: 84a8b962fbfb3d9c74e5be5f78bdc222c6da2547
5
5
  SHA512:
6
- metadata.gz: 28d9268d96f7035043f9baa34b186f6eb588fa1cd4a6cdbc9c6cecaacebdb06ba99532456c8a8b606b1607917a1ccde2df41da681ebd382162f847e1ccabf99f
7
- data.tar.gz: 40f55ad09a2147b8e0ded0c1f98e0afca1663e5ce7fc69664903fd23c436366ab4fee35bfec50976107168730bbcf8aaedf0d6782dac5d547b60eaf8a0ee8136
6
+ metadata.gz: 2d0fe8a219696e711ffa1c2456c0e40e411e259bf1004cf536e62b91fcfc7233bb1a3c8af41eb0f058a3243bf3796fd0f25340864774d0275a14c61306e8f2e7
7
+ data.tar.gz: 48a6c528e92d505e16fb093d050e790fb96b980cc463f7ec873088fc97898e4e6fbdbe1125aae8a4946103883ecd68e8db526c3b3303f6329fffa44d65b7075f
@@ -1,6 +1,11 @@
1
1
  module BridgeAPI
2
2
  class Client
3
3
  module Account
4
+
5
+ def create_account(params = {})
6
+ post("#{API_PATH}#{ADMIN_PATH}/sub_accounts", params)
7
+ end
8
+
4
9
  def update_account(account_id, params = {})
5
10
  put("#{API_PATH}#{SUPPORT_PATH}#{ACCOUNT_PATH}/#{account_id}", params)
6
11
  end
@@ -1,3 +1,3 @@
1
1
  module BridgeAPI
2
- VERSION = '0.1.30'.freeze unless defined?(BridgeAPI::VERSION)
2
+ VERSION = '0.1.31'.freeze unless defined?(BridgeAPI::VERSION)
3
3
  end
@@ -7,6 +7,19 @@ describe BridgeAPI::Client::CourseTemplate do
7
7
  )
8
8
  end
9
9
 
10
+ it 'should create an account' do
11
+ templates = @client.create_account(
12
+ {
13
+ sub_account: {
14
+ locale: "en",
15
+ subdomain: 'subdomain',
16
+ name: 'subdomain'
17
+ }
18
+ }
19
+ )
20
+ expect(templates.status).to(eq(200))
21
+ end
22
+
10
23
  it 'should update an account' do
11
24
  templates = @client.update_account(1)
12
25
  expect(templates.status).to(eq(200))
@@ -168,6 +168,10 @@ class FakeBridge < Sinatra::Base
168
168
  end
169
169
 
170
170
  # Sub Accounts
171
+ post %r{/api/admin/sub_accounts$} do
172
+ get_json_data 200, 'sub_accounts.json'
173
+ end
174
+
171
175
  get %r{/api/admin/sub_accounts$} do
172
176
  get_json_data 200, 'sub_accounts.json'
173
177
  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.30
4
+ version: 0.1.31
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-11 00:00:00.000000000 Z
11
+ date: 2018-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -319,4 +319,3 @@ test_files:
319
319
  - spec/fixtures/users.json
320
320
  - spec/support/fake_bridge.rb
321
321
  - spec/test_helper.rb
322
- has_rdoc: