Comparing version 0.0.1 to 0.1.0
@@ -0,1 +1,6 @@ | ||
#### 0.1.0 / July 16th, 2013 | ||
* Added support for the [cards](https://stripe.com/docs/api#cards) API. | ||
#### 0.0.1 / June 26th, 2013 | ||
@@ -2,0 +7,0 @@ |
44
index.js
@@ -127,2 +127,46 @@ /*! | ||
// ------------------------------------------- | ||
// Cards API | ||
// | ||
cards: { | ||
create: function(customer_id, data, cb) { | ||
_request('post', '/customers/' + customer_id + '/cards', data, cb); | ||
}, | ||
retrieve: function(customer_id, card_id, cb) { | ||
_request('get', '/customers/' + customer_id + '/cards/' + card_id, cb); | ||
}, | ||
update: function(customer_id, card_id, data, cb) { | ||
_request('post', '/customers/' + customer_id + '/cards/' + card_id, data, cb); | ||
}, | ||
del: function(customer_id, card_id, cb) { | ||
_request('delete', '/customers/' + customer_id + '/cards/' + card_id, cb); | ||
}, | ||
list: function(customer_id, data, cb) { | ||
if ( arguments.length === 3 ) { | ||
var query = querystring.stringify(data); | ||
_request('get', '/customers/' + customer_id + '/cards?' + query, cb); | ||
} else { | ||
var cb = data; | ||
_request('get', '/customers/' + customer_id + '/cards', cb); | ||
} | ||
} | ||
}, | ||
// | ||
// ------------------------------------------- | ||
// Charges API | ||
@@ -129,0 +173,0 @@ // |
{ | ||
"name": "stripe-api", | ||
"version": "0.0.1", | ||
"description": "Stripe.com API wrapper.", | ||
"version": "0.1.0", | ||
"description": "The Stripe.com API", | ||
"main": "index.js", | ||
@@ -6,0 +6,0 @@ "scripts": { |
@@ -14,32 +14,14 @@ ## node-stripe-api | ||
```javascript | ||
var stripe = require('stripe-api')(<your_stripe_api_key); | ||
var stripe = require('stripe-api')(<your_stripe_api_key>); | ||
stripe.<api_group>.<api_group_command>([arguments,] callback); | ||
``` | ||
###### example | ||
### examples | ||
```javascript | ||
stripe.charges.create( | ||
{ | ||
amount: 100, | ||
currency: 'usd', | ||
card: | ||
{ | ||
number: 4242424242424242, | ||
exp_month: 12, | ||
exp_year: 15 | ||
}, | ||
description: 'Quick stripe-api example.' | ||
}, | ||
[http://emiliote.github.io/node-stripe-api/](http://emiliote.github.io/node-stripe-api/) | ||
function(error, response) { | ||
console.log(response); | ||
} | ||
); | ||
``` | ||
### api | ||
The `data` argument is a javascript object that has key/value pairs that match what's expected by the [Stripe API](https://stripe.com/docs/api). | ||
The `data` argument is a javascript object with key/value pairs that match what's expected by the [Stripe API](https://stripe.com/docs/api). | ||
@@ -65,2 +47,11 @@ | ||
##### [cards](https://stripe.com/docs/api#cards) | ||
* `create(customer_id, data, cb)` | ||
* `retrieve(customer_id, card_id, cb)` | ||
* `update(customer_id, card_id, data, cb)` | ||
* `del(customer_id, card_id, cb)` | ||
* `list(customer_id, [data,] cb)` | ||
##### [subscriptions](https://stripe.com/docs/api#subscriptions) | ||
@@ -67,0 +58,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
46003
21
1006
153