Skip to content

DanielAudino/voxbone-provisioning-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

Voxbone Provisioning Node Api

The Voxbone Provisioning Node module will allow you to interface with Voxbone proviioning api

Instalation

To install the Voxbone Provisioning node module and its dependencies run the following command:

'npm install git+https://github.com/DanielAudino/voxbone-provisioning-node.git'

Usage

Create the voxbone instance:

var Voxbone = require('voxbone-provisioning-node')({user: '<Your Voxbone Username>', password: '<Your Voxbone Password>'})

listCountries

Voxbone API docs for parameter list and descriptions: https://developers.voxbone.com/docs/v3/inventory/

Example:

Voxbone.listCountries({pageNumber:"0", pageSize:"1"})
  .then(function(countries) {
	  console.log(countries);
	})
	.catch(function(err) {
    console.log(err);
	});

listDid

Voxbone API docs for parameter list and descriptions: https://developers.voxbone.com/docs/v3/inventory/

Example:

Voxbone.listDid({pageNumber:"0", pageSize:"1"})
  .then(function(dids) {
	  console.log(dids);
	})
	.catch(function(err) {
    console.log(err);
	});

listDidGroup

Voxbone API docs for parameter list and descriptions: https://developers.voxbone.com/docs/v3/inventory/

Example:

Voxbone.listDidGroup({pageNumber:"0", pageSize:"20", countryCodeA3: country, stateId: state, cityNamePattern: city, didType: "GEOGRAPHIC"}).then(function(groups) {
		console.log(groups);
	})
	.catch(function(err) {
	    console.log(err);
	});

listStates

Voxbone API docs for parameter list and descriptions: https://developers.voxbone.com/docs/v3/inventory/

Example:

Voxbone.listStates(Country)
  .then(function(states) {
	  console.log(states);
	})
	.catch(function(err) {
    console.log(err);
	});

listVoiceURI

Voxbone API docs for parameter list and descriptions: https://developers.voxbone.com/docs/v3/configuration/

Example:

Voxbone.listVoiceURI(({pageNumber:"0", pageSize:"20"})
  .then(function(uris) {
	  console.log(uris);
	})
	.catch(function(err) {
    console.log(err);
	});

createOrUpdateVoiceURI

Voxbone API docs for parameter list and descriptions: https://developers.voxbone.com/docs/v3/configuration/

Example:

Voxbone.createOrUpdateVoiceURI({voiceUriProtocol:"SIP", uri: uri, description: description})
  .then(function(response) {
	  console.log(response);
	})
	.catch(function(err) {
    console.log(err);
	});

deleteVoiceURI

Voxbone API docs for parameter list and descriptions: https://developers.voxbone.com/docs/v3/configuration/

Example:

Voxbone.deleteVoiceURI(uriId)
  .then(function(response) {
	  console.log(response);
	})
	.catch(function(err) {
    console.log(err);
	});

applyConfiguration

Voxbone API docs for parameter list and descriptions: https://developers.voxbone.com/docs/v3/configuration/

Example:

Voxbone.applyConfiguration({didIds:["123", "124"], voiceUriId: uriId })
  .then(function(response) {
	  console.log(response);
	})
	.catch(function(err) {
    console.log(err);
	});

accountBalance

Voxbone API docs for parameter list and descriptions: https://developers.voxbone.com/docs/v3/ordering/

Example:

Voxbone.accountBalance()
  .then(function(balance) {
	  console.log(balance);
	})
	.catch(function(err) {
    console.log(err);
	});

createCart

Voxbone API docs for parameter list and descriptions: https://developers.voxbone.com/docs/v3/ordering/

Example:

Voxbone.createCart({customerReference: reference, description: description}).then(function(cart) {
  .then(function(cart) {
	  console.log(cart);
	})
	.catch(function(err) {
    console.log(err);
	});

addToCart

Voxbone API docs for parameter list and descriptions: https://developers.voxbone.com/docs/v3/ordering/

Example:

Voxbone.addToCart({cartIdentifier: cartID, didCartItem: {"didGroupId" : groupId, "quantity" : "1"}}).then(function(cart) {
  .then(function(cart) {
	  console.log(cart);
	})
	.catch(function(err) {
    console.log(err);
	});

listCart

Voxbone API docs for parameter list and descriptions: https://developers.voxbone.com/docs/v3/ordering/

Example:

Voxbone.listCart({pageNumber:"0", pageSize:"1"})
  .then(function(cart) {
	  console.log(cart);
	})
	.catch(function(err) {
    console.log(err);
	});

removeFromCart

Voxbone API docs for parameter list and descriptions: https://developers.voxbone.com/docs/v3/ordering/

Example:

Voxbone.removeFromCart({cartIdentifier:cartIdentifier, orderProductId:orderProductId, quantity:quantity})
  .then(function(response) {
	  console.log(response);
	})
	.catch(function(err) {
    console.log(err);
	});

deleteCart

Voxbone API docs for parameter list and descriptions: https://developers.voxbone.com/docs/v3/ordering/

Example:

Voxbone.deleteCart(cartId)
  .then(function(response) {
	  console.log(response);
	})
	.catch(function(err) {
    console.log(err);
	});

checkoutCart

Voxbone API docs for parameter list and descriptions: https://developers.voxbone.com/docs/v3/ordering/

Example:

Voxbone.checkoutCart(cartIdentifier)
  .then(function(cart) {
	  console.log(cart);
	})
	.catch(function(err) {
    console.log(err);
	});

listOrder

Voxbone API docs for parameter list and descriptions: https://developers.voxbone.com/docs/v3/ordering/

Example:

Voxbone.listOrder({pageNumber:"0", pageSize:"1"})
  .then(function(orders) {
	  console.log(orders);
	})
	.catch(function(err) {
    console.log(err);
	});

About

The Voxbone Provisioning Node module will allow you to interface with Voxbone proviioning api

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published