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

unbill

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

unbill

A node.js client for the Unbill API.

  • 1.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

unbill-node

A node.js client library for the Unbill API.

Table of Contents

Getting started

$ npm install unbill
var Unbill = require('unbill')(unbillKey)

Examples

Authenticate a user's bill credentials

var Unbill = require('unbill')(unbillKey)

Unbill.auth({
  userId: userId,
  companyId: companyId,
  form: {
    username: 'username',
    password: 'password'
  }
})
.then(function (response) {

  if (response.status === 200) {
    var billData = response.data
    return billData
  }
  else if (response.status === 201) {
    return Unbill.authStep({
      token: response.data.token,
      mfa: ['Secret Answer']
    })
    .then(function (response) {
      // Repeat until 200 status is returned
    })
  }

})
.catch(function (e) {
  var errMessage = e.response.data.message
))

API

The module supports all Unbill API endpoints. For complete information about the API, head over to the docs.

Every function requires a payload as specified by the docs and returns a promise that can be used to access the response of the call.

Auth

// Auth
Unbill.auth(payload)
// Auth step
Unbill.authStep(payload)

Bill

// Bill details
Unbill.getBillDetails(payload)
// Bill list
Unbill.getBills(payload)
// Fix bill hold
Unbill.fixBillHold(payload)
// Remove bill
Unbill.removeBill(payload)

Company

// Get company
Unbill.getCompany(payload)
// Search companies
Unbill.searchCompanies(payload)
// Get company categories
Unbill.getCompanyCategories(payload)

Payment

// Add payment method
Unbill.addPaymentMethod(payload)
// Get payment method
Unbill.getPaymentMethod(payload)
// Retry payment method
Unbill.retryPaymentMethod(payload)
// Update autopay
Unbill.updateAutopay(payload)
// Make payment
Unbill.makePayment(payload)

User

// Create user
Unbill.createUser

Support

We’ve tried to make this documentation user-friendly and example-filled, but please drop us a line with any questions.

Keywords

FAQs

Package last updated on 22 Jul 2016

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