{"_id":"chargify","_rev":"13-58b5f51bbdec86838dc6f033245d8645","name":"chargify","description":"Easy integration with Chargify for adding recurring payments to your application.","dist-tags":{"latest":"0.4.0-rc1"},"versions":{"0.1.0":{"name":"chargify","version":"0.1.0","homepage":"https://github.com/andyet/node-chargify","repository":{"type":"git","url":"git://github.com/andyet/node-chargify.git"},"author":{"name":"&yet, LLC","url":"http://andyet.net"},"contributors":[{"name":"Nathan Vander Wilt","email":"nate@andyet.net","url":"http://cloudcartography.com"}],"description":"A fairly generic REST interface wrapper for building and accessing Chargify API URLs.","licenses":[{"type":"MIT","url":"https://github.com/andyet/node-chargify/raw/master/README.md"}],"main":"chargify","_id":"chargify@0.1.0","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"0.3.18","_nodeVersion":"v0.4.0","directories":{},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"c47b38040835108c056424f1a91bbb2b86aedda0","tarball":"https://registry.npmjs.org/chargify/-/chargify-0.1.0.tgz","integrity":"sha512-3wEMGhdc4Qujc209VFJ3tetxGU/2phy/dhQ6FBi0ku3uso+a7WvlmveIisUhUfN5t8dscIYdLRKZQdhM/mrnSA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCXC7y7f3P03CX2vsFxtJPBbw9SRfXW388V4NKrJzSNyAIgaUVBANXGsR5LBzoOcc+ts1vPT5Bp60MulDzt0AknzTg="}]}},"0.1.1":{"name":"chargify","version":"0.1.1","homepage":"https://github.com/andyet/node-chargify","repository":{"type":"git","url":"git://github.com/andyet/node-chargify.git"},"author":{"name":"&yet, LLC","url":"http://andyet.net"},"contributors":[{"name":"Nathan Vander Wilt","email":"nate@andyet.net","url":"http://cloudcartography.com"}],"description":"A fairly generic REST interface wrapper for building and accessing Chargify API URLs.","licenses":[{"type":"MIT","url":"https://github.com/andyet/node-chargify/raw/master/README.md"}],"main":"chargify","_id":"chargify@0.1.1","engines":{"node":"*"},"_engineSupported":true,"_npmVersion":"0.3.18","_nodeVersion":"v0.4.0","directories":{},"files":[""],"_defaultsLoaded":true,"dist":{"shasum":"8683f67240373f11ea01a1c477b6abc99d62377c","tarball":"https://registry.npmjs.org/chargify/-/chargify-0.1.1.tgz","integrity":"sha512-Li/4u8J5Ksl5M0wOSLtUb33whxfY5TupAVNQ5TeoaK6dD5xF6z9Pm8AxIfgKgV+OMi69e+ssKkGdeh7B5C8C1g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDeHdI9mh57owoom/qX9eb+YinTWKGsBHPYEhn7yy8/mwIhAPGYRSvlb0PRmM7Lu4Kv0USYcDsLv/HqMesW4JEUxjqL"}]}},"0.2.0":{"name":"chargify","description":"Easy integration with Chargify for adding recurring payments to your application.","version":"0.2.0","homepage":"https://github.com/andyet/node-chargify","repository":{"type":"git","url":"git://github.com/andyet/node-chargify.git"},"author":{"name":"&yet, LLC","url":"http://andyet.net"},"contributors":[{"name":"Nathan Vander Wilt","email":"nate@andyet.net","url":"http://cloudcartography.com"},{"name":"Will White","email":"will@mapbox.com","url":"http://mapbox.com"}],"licenses":[{"type":"MIT"}],"main":"chargify","dependencies":{"request":"2.2.x","underscore":"1.1.x"},"engines":{"node":">= 0.6.x"},"devDependencies":{"mocha":"1.0.x"},"scripts":{"test":"mocha"},"_npmUser":{"name":"natevw","email":"natevw@yahoo.com"},"_id":"chargify@0.2.0","_engineSupported":true,"_npmVersion":"1.0.106","_nodeVersion":"v0.6.15","_defaultsLoaded":true,"dist":{"shasum":"b71f7d331bd6960f636f3b1bd14c737b0f4931b7","tarball":"https://registry.npmjs.org/chargify/-/chargify-0.2.0.tgz","integrity":"sha512-dl8ndqVrzJqEaCRBhrLcqStS2bdWDeTpnOxF58r24U/tkSnr4bQbFl9T5YKc48gzdp2z8XVDBOgjvXKxNzk0MA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGNjHf9oSu84fR++YwRM9pjMpK8W6I5ZFlmwT/bL2u7iAiBfbJhpR6z8Bg2z8wIl8DY9pMyAqywxv2Pg9KK1PoVq/Q=="}]},"maintainers":[{"name":"natevw","email":"natevw@yahoo.com"}],"directories":{}},"0.3.0":{"name":"chargify","description":"Easy integration with Chargify for adding recurring payments to your application.","version":"0.3.0","homepage":"https://github.com/andyet/node-chargify","repository":{"type":"git","url":"https://github.com/andyet/node-chargify.git"},"author":{"name":"&yet, LLC","url":"http://andyet.net"},"contributors":[{"name":"Nathan Vander Wilt","email":"nate@andyet.net","url":"http://cloudcartography.com"},{"name":"Will White","email":"will@mapbox.com","url":"http://mapbox.com"}],"licenses":[{"type":"MIT"}],"main":"chargify","dependencies":{"request":"2.2.x","underscore":"1.1.x"},"engines":{"node":">= 0.6.x"},"devDependencies":{"mocha":"1.0.x"},"scripts":{"test":"mocha"},"readme":"Easy integration with [Chargify][0] for adding recurring payments to your\napplication.\n\n# Important note #\n    \nThis library inspired, and **has been superceded by [Fermata](https://github.com/natevw/fermata)**.\nWhile Fermata's API is a little different, the codebase descends more or less directly from this library,\nso the overall idea is very similar.\n\nThe main differences are improved callback arguments (an error is now provided for bad status codes)\nand the removal of the `.add`, `.remove` and `.req` methods in favor of a generic HTTP method call syntax.\n\nOh, and also! Under node.js (and some browsers, not that that's relevant for this plugin),\nFermata behaves as catch-all [Proxy](http://wiki.ecmascript.org/doku.php?id=harmony:proxies) object.\nSo in many cases you can actually drop the parentheses and treat the REST URLs native objects:\n`site.subscriptions[42].components[5].get(callback)`\n\nOther than that, you should find the new library quite familiar once you load the Chargify plugin (included):\n\n    var f = require('fermata'),\n        c = require('fermata/plugins/chargify');\n    f.registerPlugin('chargify', c);\n    \n    var wrapped_site = f.chargify('example-site', \"API_KEY\"),\n        some_subscription = wrapped_site('subscriptions')(42);  // or even `wrapped_site.subscriptions[42]`!\n    some_subscription.get(function(err, data) { if (!err) console.log(data.subscription.state); });\n    \nBy using [Fermata](https://github.com/natevw/fermata) you get the benefits of a more refined version of this API,\nin a library useable with Chargify *and* any other RESTful services your app needs to connect to.\n\n\n**(end of Important Note)**, this here library's API documentation below…\n\nAs of [version 0.2](https://github.com/natevw/node-chargify/pull/1), this module is essentially a wrapper around [Request][1], but adds a little\nconvenience for connecting to the [Chargify API][2].\n\n[0]:http://chargify.com/\n[1]:https://github.com/mikeal/request\n[2]:http://docs.chargify.com/api-resources\n[3]:https://github.com/mikeal/request/blob/master/README.md\n\n## Example\n\nYou can normally require and instantiate at the same time using your Chargify\nsubdomain and API key.\n\n    var chargify = require('chargify');\n    var chargify_site = chargify('YOUR-CHARGIFY-SUBDOMAIN', 'YOUR-API-KEY');\n\nList subscriptions:\n\n    chargify_site.get('subscriptions.json', function(err, res, body) {\n        if (err) throw err;\n        console.log(res.statusCode);\n        console.log(body);\n    });\n\nLoad subscription #40:\n\n    chargify_site.get('subscriptions/40.json', function(err, res, body) {\n        if (err) throw err;\n        console.log(res.statusCode);\n        console.log(body);\n    });\n\nCreate a new customer:\n\n    chargify_site.post({\n        pathname: 'customers.json',\n        json: {\n            customer: {\n                first_name: 'Joe',\n                last_name: 'Blow',\n                email: 'joe@example.com'\n            }\n        }\n    }, function(err, res, body) {\n        if (err) throw err;\n        console.log(res.statusCode);\n        console.log(body);\n    });\n\n## Documentation\n\n### chargify(subdomain, api_key)\n\nReturns a chargify_site. The available methods are listed below.\n\n- chargify_site.get(options, callback)\n- chargify_site.post(options, callback)\n- chargify_site.put(options, callback)\n- chargify_site.del(options, callback)\n\nThe first argument can be either a url or an options object. he only required\nkey is `uri`. The only required option is uri, all others are optional. The key\nattributes are listed below. See the [Request module's README][3] for a full list.\n\n- `uri` - Required. The URI of the resource. `host`, `protocol`, and `auth`\n   information are optional.\n- `json` - sets the body of the request using a JavaScript object.\n\n## See also\n\n- [Request documentation](https://github.com/mikeal/request/blob/master/README.md)\n- [Chargify API documentation][2]\n\n## Testing\n\nBefore running the tests, you need to create a Chargify test site and specify\nthe site's subdomain and your API key in a JSON file called config.json.\n\nExample config.json file:\n\n    {\n        \"chargifySubdomain\": \"chargify-test\",\n        \"chargifyAPIKey\": \"xxxxxxxxxxxxxx-9x_\"\n    }\n\nThen simply run:\n\n    npm test\n\n## License\n\nCopyright © 2012 by &yet, LLC and Will White. Released under the terms of the MIT License:\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","readmeFilename":"README.md","_id":"chargify@0.3.0","dist":{"shasum":"ab2a6decc92b0e834e04d0719766ef4d53b897fc","tarball":"https://registry.npmjs.org/chargify/-/chargify-0.3.0.tgz","integrity":"sha512-201l+4/71x05s5nzWXlECTZ8GjyO44d6UBKM4P3jTutGsKKJniJ4sWXy2obpceF0rIThYZjbC98W4SomX/ZU2A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA4uyhfvJYAfZa/kFiVETSgDWXdHXr2g8R/W5EcZqNtfAiEA1cA/0qxMjEXVN5cvS65mfEvV6BMN5m9/DJ78Ae/4DJs="}]},"_npmVersion":"1.1.65","_npmUser":{"name":"natevw","email":"natevw@yahoo.com"},"maintainers":[{"name":"natevw","email":"natevw@yahoo.com"}],"directories":{}},"0.4.0-rc1":{"name":"chargify","description":"Easy integration with Chargify for adding recurring payments to your application.","version":"0.4.0-rc1","homepage":"https://github.com/andyet/node-chargify","repository":{"type":"git","url":"git+https://github.com/andyet/node-chargify.git"},"author":{"name":"&yet, LLC","url":"http://andyet.net"},"contributors":[{"name":"Nathan Vander Wilt","email":"nate@andyet.net","url":"http://cloudcartography.com"},{"name":"Will White","email":"will@mapbox.com","url":"http://mapbox.com"},{"name":"Jenny Lian"},{"name":"Reiah Paul Sam"}],"licenses":[{"type":"MIT"}],"main":"chargify","dependencies":{"request":"^2.88.2","xok":"^2.0.0"},"engines":{"node":">= 0.6.x"},"devDependencies":{"mocha":"^9.0.0"},"scripts":{"test":"mocha"},"gitHead":"447b2af951aa388faca3a85418baa18928209b1f","bugs":{"url":"https://github.com/andyet/node-chargify/issues"},"_id":"chargify@0.4.0-rc1","_nodeVersion":"15.5.1","_npmVersion":"7.3.0","dist":{"integrity":"sha512-tVSs9Q227OKs+QT05fNpHTvP+vwwJAEQIwsZIsMtca7ILXFejgMC3M2G66aaDJmfyIQ9oNuzAgdjwuj71gdJlg==","shasum":"a44d404fc780e189504aa7884f140f1753422f37","tarball":"https://registry.npmjs.org/chargify/-/chargify-0.4.0-rc1.tgz","fileCount":5,"unpackedSize":14858,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJgv7jFCRA9TVsSAnZWagAA7RsP/0MFsHXwmY1x9TCKaaqt\nv1l+AYDus8fblWvlEE5LKN7lvT6z8jwkfNICo0mBnj3BSQ1iVKtemw2GZ5X8\nUUN5te4wdRr3FBsaBQbZEtA7cXvFmX6iq8/sZj0VGG/3Uf+zVrBBHp1HHdCX\nIfW4eC+zVMH+FW2LztXBSHalj97gsXvfW9U7dJHp9pfOyD3zq+LiEmDDJnkj\nKxmPECD36lyyAogvz3rgTdgkmE6ZjlyLkYZXm/cIZaDuIVA0k6LnMmtE/UQU\nV6YqHMWYpivT9HUrnUlC0Jhkv4lxtVUMme4l4Slp61OB3gCZ6ClUE2VWtg19\np6NDsBh9hYreAn66iTRgoaMLSJK8oKCnMo/Q02UCefyGdozSWBplcXHMbaA7\ngQXnYOJGeIv99Gsk2iH6nSSn4sZaggIIYdLjg5B1T20UCsYRGvywXiXq4EP/\nHcgDm9o1U5SeCgSdHG4lI3iIUsSQGYP2HLeU7YxJec1xlgkD393o2m5HTZK1\nragfRbSdkLpEOalYc+Hgtf6vQmQWKCsj8sD4X6T6KYnb+OczMo06qC4b0ncJ\nKvGBW/38THMmv1xPG7VH0TKukXiKmVjW+kQosbSFNTBgyz5II2PTqfw5i+Jo\nySacd3ugtoSjvTSjFqGtf6hBhxfaDCJZCTy27pY/jHanhanBLrNL9QQt80gL\nhltC\r\n=+IYS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCM1KcIIKDURaKN1qY/gd2JYY1Ptb0lKDmvT422C3UGZgIhAIHuyiKAjOSb3axeJ/JqTNzT/qM04ZZvGnFt97a/Yrko"}]},"_npmUser":{"name":"natevw","email":"natevw@yahoo.com"},"directories":{},"maintainers":[{"name":"natevw","email":"natevw@yahoo.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/chargify_0.4.0-rc1_1623177413215_0.4957282092084676"},"_hasShrinkwrap":false}},"maintainers":[{"name":"natevw","email":"natevw@yahoo.com"}],"time":{"modified":"2022-06-13T05:53:41.921Z","created":"2011-03-30T15:32:02.361Z","0.1.0":"2011-03-30T15:32:03.062Z","0.1.1":"2011-03-31T16:49:55.691Z","0.2.0":"2012-05-05T19:42:47.939Z","0.3.0":"2012-12-05T00:40:16.499Z","0.4.0-rc1":"2021-06-08T18:36:53.347Z"},"author":{"name":"&yet, LLC","url":"http://andyet.net"},"repository":{"type":"git","url":"git+https://github.com/andyet/node-chargify.git"},"homepage":"https://github.com/andyet/node-chargify","contributors":[{"name":"Nathan Vander Wilt","email":"nate@andyet.net","url":"http://cloudcartography.com"},{"name":"Will White","email":"will@mapbox.com","url":"http://mapbox.com"},{"name":"Jenny Lian"},{"name":"Reiah Paul Sam"}],"bugs":{"url":"https://github.com/andyet/node-chargify/issues"},"readme":"Easy integration with [Chargify][0] for adding recurring payments to your\napplication.\n\n# Important note #\n    \nThis library inspired, and **has been superceded by [Fermata](https://github.com/natevw/fermata)**.\nWhile Fermata's API is a little different, the codebase descends more or less directly from this library,\nso the overall idea is very similar.\n\nThe main differences are improved callback arguments (an error is now provided for bad status codes)\nand the removal of the `.add`, `.remove` and `.req` methods in favor of a generic HTTP method call syntax.\n\nOh, and also! Under node.js (and some browsers, not that that's relevant for this plugin),\nFermata behaves as catch-all [Proxy](http://wiki.ecmascript.org/doku.php?id=harmony:proxies) object.\nSo in many cases you can actually drop the parentheses and treat the REST URLs native objects:\n`site.subscriptions[42].components[5].get(callback)`\n\nOther than that, you should find the new library quite familiar once you load the Chargify plugin (included):\n\n    var f = require('fermata'),\n        c = require('fermata/plugins/chargify');\n    f.registerPlugin('chargify', c);\n    \n    var wrapped_site = f.chargify('example-site', \"API_KEY\"),\n        some_subscription = wrapped_site('subscriptions')(42);  // or even `wrapped_site.subscriptions[42]`!\n    some_subscription.get(function(err, data) { if (!err) console.log(data.subscription.state); });\n    \nBy using [Fermata](https://github.com/natevw/fermata) you get the benefits of a more refined version of this API,\nin a library useable with Chargify *and* any other RESTful services your app needs to connect to.\n\n\n**(end of Important Note)**, this here library's API documentation below…\n\nAs of [version 0.2](https://github.com/natevw/node-chargify/pull/1), this module is essentially a wrapper around [Request][1], but adds a little\nconvenience for connecting to the [Chargify API][2].\n\n[0]:http://chargify.com/\n[1]:https://github.com/mikeal/request\n[2]:http://docs.chargify.com/api-resources\n[3]:https://github.com/mikeal/request/blob/master/README.md\n\n## Example\n\nYou can normally require and instantiate at the same time using your Chargify\nsubdomain and API key.\n\n    var chargify = require('chargify');\n    var chargify_site = chargify('YOUR-CHARGIFY-SUBDOMAIN', 'YOUR-API-KEY');\n\nList subscriptions:\n\n    chargify_site.get('subscriptions.json', function(err, res, body) {\n        if (err) throw err;\n        console.log(res.statusCode);\n        console.log(body);\n    });\n\nLoad subscription #40:\n\n    chargify_site.get('subscriptions/40.json', function(err, res, body) {\n        if (err) throw err;\n        console.log(res.statusCode);\n        console.log(body);\n    });\n\nCreate a new customer:\n\n    chargify_site.post({\n        uri: 'customers.json',\n        json: {\n            customer: {\n                first_name: 'Joe',\n                last_name: 'Blow',\n                email: 'joe@example.com'\n            }\n        }\n    }, function(err, res, body) {\n        if (err) throw err;\n        console.log(res.statusCode);\n        console.log(body);\n    });\n\n## Documentation\n\n### chargify(subdomain, api_key)\n\nReturns a chargify_site. The available methods are listed below.\n\n- chargify_site.get(options, callback)\n- chargify_site.post(options, callback)\n- chargify_site.put(options, callback)\n- chargify_site.del(options, callback)\n\nThe first argument can be either a url or an options object. he only required\nkey is `uri`. The only required option is uri, all others are optional. The key\nattributes are listed below. See the [Request module's README][3] for a full list.\n\n- `uri` - Required. The URI of the resource. `host`, `protocol`, and `auth`\n   information are optional.\n- `json` - sets the body of the request using a JavaScript object.\n\n## See also\n\n- [Request documentation](https://github.com/mikeal/request/blob/master/README.md)\n- [Chargify API documentation][2]\n\n## Testing\n\nBefore running the tests, you need to create a Chargify test site and specify\nthe site's subdomain and your API key in a JSON file called config.json.\n\nExample config.json file:\n\n    {\n        \"chargifySubdomain\": \"chargify-test\",\n        \"chargifyAPIKey\": \"xxxxxxxxxxxxxx-9x_\"\n    }\n\nThen simply run:\n\n    npm test\n\n## License\n\nCopyright © 2012 by &yet, LLC and Will White. Released under the terms of the MIT License:\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n","readmeFilename":"README.md"}