New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

fusebill

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fusebill

Fusebill API wrapper

  • 1.0.10
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Fusebill node.js bindings

Installation

npm install fingerfoodstudios/fusebill-node

Documentation

Documentation is NOT available the API documentation is here http://help.fusebill.com/api-resource-urls

API Overview

Every resource is accessed via your fusebill instance:

var fusebill = require('fusebill')(' your fusebill API key ');
// fusebill.{ RESOURCE_NAME }.{ METHOD_NAME }

Every resource method accepts an optional callback as the last argument:

fusebill.customers.create(
  { primaryEmail: 'customer@example.com' },
  function(err, customer) {
    err; // null if no error occurred
    customer; // the created customer object
  }
);

Additionally, every resource method returns a promise, so you don't have to use the regular callback. E.g.

// Create a new customer and then a new charge for that customer:
fusebill.customers.create({
  primaryEmail: 'foo-customer@example.com'
}).then(function(customer) {
  return fusebill.subscription.create({
    customerId: customer.id,
    planFrequencyId: 9999
  });
}).then(function(charge) {
  // New charge created on a new customer
}).catch(function(err) {
  // Deal with an error
});

To use the Fusebill-Account header, simply pass an extra options hash:

// Retrieve the balance for a connected account:
fusebill.balance.retrieve({
  fusebill_account: "acct_foo"
}).then(function(balance) {
  // The balance object for the connected account
}).catch(function(err) {
  // Error
});

Available resources & methods

STILL A WORK IN PROGRESS

Where you see params it is a plain JavaScript object, e.g. { email: 'foo@example.com' }

Configuration

  • fusebill.setApiKey(' your secret api key ');
  • fusebill.setTimeout(20000); // in ms (default is node's default: 120000ms)

More information

http://help.fusebill.com/

Development

  • NOTE Tests are NOT working * Run the tests using npm:
$ npm install
$ npm test

If you wish, you may run tests using your Fusebill Test API key by setting the environment variable STRIPE_TEST_API_KEY before running tests:

$ export FUSEBILL_TEST_API_KEY='sk_test....'
$ npm test

Note: On Windows use SET instead of export for setting the FUSEBILL_TEST_API_KEY environment variable.

Author

Originally by Ask Bjørn Hansen (ask@develooper.com). Development was sponsored by YellowBot. Adapted for Fusebill by Justin Hamade

Keywords

FAQs

Package last updated on 16 Jan 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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