npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

nuora

v1.0.41

Published

Node with Zuora. Provides an API for working with and querying Zuora's SOAP API

Downloads

10

Readme

Nuora

Node based Zuora API

Install Nuora (Node + Zuora)

npm install nuora

You may want to install Nuora globally for accessing the CLI

sudo npm install -g nuora

Run Nuora using the CLI

$ ./node_modules/nuora -h

  Usage: nuora OPTION...

  --------------
  -- EXAMPLES --
  --------------

  Start the Zuora query prompt:

    $ nuora -q

  Options:

    -h, --help                 output usage information
    -V, --version              output the version number
    -p, --production           Launch instance in production environment
    -q, --query [value]  Start a Zuora query prompt (ZOQL REPL)
    -v, --verbose              Display logging in the terminal
    -i, --interactive          Start an interactive Zuora query prompt (ZOQL REPL) to use with node-inspector

Configuring

Download a copy of your Zuora WSDL and set it's path in your Nuora configuration

var Nuora = require('nuora');
var config = Nuora.config;

//set your credentials and wsdl file location
config.zuora.username = 'john';
config.zuora.password = 'secret';
config.zuora.wsdl = '/path-to-downloaded-zuora.wsdl'

var nuora = Nuora.build();
var zuora = nuora.zuora;
var sql = "select id, name from account limit 1";
zuora.once('loggedin', function () {
    console.log('Nuora is ready!');
    zuora.query(sql, function (err, data) {
        console.log(err, data);
    });
});

Examples

###Create an account in Zuora

//following from above
var nuora = Nuora.build();
var zuora = nuora.zuora;
var soap = zuora.soap;
zuora.once('loggedin', function () {
    var accountParams = zuora.createObject('Account', {
            currency: 'USD',
            paymentTerm: 'Due Upon Receipt',
            status: 'Draft',
            batch: 'Batch1',
            //start the bill cycle today
            billCycleDay: new Date().getDate(),
            name: 'Nuora'
        });
    var body = soap.action('create', [accountParams]);
    soap.addBody(body);
    zuora.send(soap, function (err, data) {
        console.log(err, data);
    });
});

Adding Nuora to your package

In your dependencies

"nuora": "1.0.x"

Nuora is under active development, because of the nature that this service provides, all minor patch updates will be graceful improvements on existing features to maintain backwards compatibility.

Developing with custom configurations

This is to make life easy when developing directly on and extending Nuora functionality To load custom configurations, you can copy and rename files in nuora/config/ to <filename>.local.js. Then in your nuora/config/nuora.local.js you can specify the *.local.js file you want to load:

cp config/nuora.js config/nuora.local.js

You now have a local configuration you can edit without affecting the repo, but you will still be loading the remote configs unless you edit config/nuora.local.js. Let's say for example we wanted to load the config/orm.local.js file, we would make the following changes:

/** @file config/nuora.local.js */
module.exports = {
-    zuora: require('./zuora'),
+    zuora: require('./zuora.local'),
    ...

Building Docs/Wiki

cd nuora && ./build

Debugging with Node-Inspector

node-debug nuora

Interactive Query Mode

#Start the query prompt
node nuora query
#If you want to interact with the data (requires node-inspector)
node-debug nuora iquery

Building your own Nuora Lib Modules

Nuora loads modules found in the config/nuora.js file. It looks for the autoload array property and uses modules defined in there to extend the Nuora Handler instance.

/** @module config/nuora */
module.exports = {
    autoload: [
        //my lib module
        'fooLib'
    ]  
};

License

This software is free to use under the MIT license. See the LICENSE file for license text and copyright information.