Socket
Socket
Sign inDemoInstall

@bandwidth/numbers

Package Overview
Dependencies
Maintainers
9
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bandwidth/numbers - npm Package Compare versions

Comparing version 1.6.0 to 1.7.0

15

lib/account.js

@@ -15,3 +15,16 @@ var Client = require("./client");

});
},
getProducts: function(client, callback) {
if(arguments.length === 1){
callback = client;
client = new Client();
}
client.makeRequest("get", client.concatAccountPath("products"), function(err,res) {
if(err){
return callback(err);
}
callback(null, res.products);
});
}
}
}

2

package.json
{
"name": "@bandwidth/numbers",
"version": "1.6.0",
"version": "1.7.0",
"description": "NodeJs Client library for Bandwidth Numbers API",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -27,2 +27,3 @@ # node-numbers

| 1.6.0 | Added create origination settings for sip peers |
| 1.7.0 | Added get products to account |

@@ -1389,1 +1390,7 @@

```
## Get Account Products
```js
console.log(await numbers.Account.getProductsAsync());
```

@@ -27,2 +27,15 @@ var lib = require("../");

});
describe("#getProducts", function(){
it("should get account product info", function(done){
helper.nock().get("/accounts/FakeAccountId/products").reply(200, helper.xml.accountProducts, {"Content-Type": "application/xml"});
Account.getProducts(helper.createClient(), function(err, accountProducts){
if(err) {
return done(err);
}
accountProducts.product[0].name.should.eql("Termination");
accountProducts.product[1].name.should.eql("VirtualInventory");
done();
});
});
});
});

@@ -69,3 +69,3 @@ {

"csrResponse": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><CsrResponse><OrderId>218a295f-4f8a-4d1a-ba55-3e0aac6207cb</OrderId><Status>RECEIVED</Status></CsrResponse>",
"originationSettings": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><SipPeerOriginationSettingsResponse> <SipPeerOriginationSettings> <VoiceProtocol>HTTP</VoiceProtocol> <HttpSettings> <HttpVoiceV2AppId>{{voice-applicationId}}</HttpVoiceV2AppId> </HttpSettings> </SipPeerOriginationSettings></SipPeerOriginationSettingsResponse>"
}
"originationSettings": "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><SipPeerOriginationSettingsResponse> <SipPeerOriginationSettings> <VoiceProtocol>HTTP</VoiceProtocol> <HttpSettings> <HttpVoiceV2AppId>{{voice-applicationId}}</HttpVoiceV2AppId> </HttpSettings> </SipPeerOriginationSettings></SipPeerOriginationSettingsResponse>",
"accountProducts": "<?xml version=\"1.0\"?><AccountProductsResponse> <Products> <Product><Name>Termination</Name><Features> <Feature>TermHttpVoice</Feature></Features> </Product> <Product><Name>VirtualInventory</Name> </Product></Products></AccountProductsResponse>"}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc