-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feature/requests_with_filters' into develop
- Loading branch information
Showing
17 changed files
with
2,084 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
Sphinx==2.2.1 | ||
Sphinx==1.8.5 | ||
sphinx-js==2.8 | ||
sphinx_rtd_theme==0.4.3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/** | ||
* This file is part of the Ingram Micro Cloud Blue Connect SDK. | ||
* | ||
* @copyright (c) 2019. Ingram Micro. All Rights Reserved. | ||
*/ | ||
|
||
const BaseService = require('./base'); | ||
|
||
/** | ||
* The AccountService class provides methods to access the accounts | ||
* endpoint of the Cloud Blue Connect API. | ||
*/ | ||
class HubService extends BaseService { | ||
/** | ||
* Get a list of tier accounts. | ||
* | ||
* @return {Array} Returns an Array of the TierAccount object. | ||
*/ | ||
async list() { | ||
const response = await this.fetch('/hubs'); | ||
await this.checkResponse(response); | ||
return response.json(); | ||
} | ||
} | ||
|
||
module.exports = HubService; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/** | ||
* This file is part of the Ingram Micro Cloud Blue Connect SDK. | ||
* | ||
* @copyright (c) 2019. Ingram Micro. All Rights Reserved. | ||
*/ | ||
|
||
const BaseService = require('./base'); | ||
|
||
/** | ||
* The AccountService class provides methods to access the accounts | ||
* endpoint of the Cloud Blue Connect API. | ||
*/ | ||
class TierAccountService extends BaseService { | ||
/** | ||
* Get a list of tier accounts. | ||
* | ||
* @return {Array} Returns an Array of the TierAccount object. | ||
*/ | ||
async list() { | ||
const response = await this.fetch('/tier/accounts'); | ||
await this.checkResponse(response); | ||
return response.json(); | ||
} | ||
} | ||
|
||
module.exports = TierAccountService; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/** | ||
* This file is part of the Ingram Micro Cloud Blue Connect SDK. | ||
* | ||
* @copyright (c) 2019. Ingram Micro. All Rights Reserved. | ||
*/ | ||
|
||
const should = require('should'); | ||
const nock = require('nock'); | ||
const responses = require('./responses'); | ||
const connect = require('../../../index'); | ||
const ConnectClient = connect.ConnectClient; | ||
const HttpError = connect.HttpError; | ||
|
||
|
||
describe('Connect Javascript SDK - Hubs', () => { | ||
afterEach(done => { nock.cleanAll(); done(); }); | ||
it('returns a list of hubs', async () => { | ||
nock('https://localhost') | ||
.get('/hubs') | ||
.reply(200, responses.hubs.hubs_list); | ||
const client = new ConnectClient('https://localhost', '1234567890'); | ||
const response = await client.hubs.list(); | ||
response.should.be.an.Array(); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.