1.4.0 • Published 8 years ago

twilio-price-calculator v1.4.0

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

twilio-price-calculator

Calculate the price of a phone number, or a voice minute or SMS message between any two numbers.

Try it out in your browser here!

All prices are in USD ($).

Quick start

npm install twilio-price-calculator --save

This module provides a promise-based API. You'll first need to initialise the price calculator client by passing in your Twilio API credentials.

var PriceCalculator = require('twilio-price-calculator');
var priceCalculator = new PriceCalculator(YOUR_ACCOUNT_SID, YOUR_AUTH_TOKEN);

priceCalculator.calculateVoicePrice(FROM_PHONE_NUMBER, TO_PHONE_NUMBER)
  .then(function(price) {
    console.log(price);
  })
  .catch(function(error) {
    console.error(error);
  });

API

calculateVoicePrice(fromPhoneNumber, toPhoneNumber)

calculateSmsPrice(fromPhoneNumber, toPhoneNumber)

calculatePhoneNumberPrice(desiredPhoneNumber)

1.4.0

8 years ago

1.3.0

8 years ago

1.2.0

8 years ago

1.1.0

8 years ago

1.0.0

8 years ago