diff --git a/README.md b/README.md index 56d9a58..c0dafea 100644 --- a/README.md +++ b/README.md @@ -64,6 +64,34 @@ zuora.once('loggedin', function () { ``` +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 diff --git a/package.json b/package.json index 1222af6..7db1156 100644 --- a/package.json +++ b/package.json @@ -1,47 +1,47 @@ { - "name": "nuora", - "version": "1.0.341", - "preferGlobal": false, - "description": "Node with Zuora. Provides an API for working with and querying Zuora's SOAP API", - "main": "./index.js", - "directories": { - "lib": "./lib" - }, - "scripts": { - "test": "./node_modules/.bin/mocha --reporter spec -r test/support/chai" - }, - "repository": { - "type": "git", - "url": "https://github.com/node-zuora/nuora" - }, - "keywords": [ - "zuora", + "name": "nuora", + "version": "1.0.341", + "preferGlobal": false, + "description": "Node with Zuora. Provides an API for working with and querying Zuora's SOAP API", + "main": "./index.js", + "directories": { + "lib": "./lib" + }, + "scripts": { + "test": "./node_modules/.bin/mocha --reporter spec -r test/support/chai" + }, + "repository": { + "type": "git", + "url": "https://github.com/node-zuora/nuora" + }, + "keywords": [ + "zuora", "node", "zuora soap api", "query zuora", "node with zuora", "zuora api" - ], - "devDependencies": { - "node-inspector": "*", - "jsdoc": "*", - "jsdom": "3.1.x", - "chai": "2.3.x", - "mocha": "2.2.x" - }, - "dependencies": { - "colors": "*", - "libxml-to-js": "0.3.x", - "data2xml": "1.2.x", - "winston": "0.9.x", - "commander": "2.8.x" - }, - "engine": { - "node": ">=0.10.x" - }, - "author": { - "name": "Nick Riley", - "email": "nick@sparkida.com", - "url": "http://sparkida.com" - } + ], + "devDependencies": { + "node-inspector": "*", + "jsdoc": "*", + "jsdom": "3.1.x", + "chai": "2.3.x", + "mocha": "2.2.x" + }, + "dependencies": { + "colors": "*", + "libxml-to-js": "0.3.x", + "data2xml": "1.2.x", + "winston": "0.9.x", + "commander": "2.8.x" + }, + "engine": { + "node": ">=0.10.x" + }, + "author": { + "name": "Nick Riley", + "email": "nick@sparkida.com", + "url": "http://sparkida.com" + } }