Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

go

  • Loading branch information...
commit 709a6e1b09998f37d7ba90c668ad1b4de7d60259 1 parent e25f9c6
@jamescarr jamescarr authored
Showing with 9 additions and 9 deletions.
  1. +9 −9 docs/chargify.md
View
18 docs/chargify.md
@@ -12,16 +12,16 @@ This is a rough cut... hopefully the full API will be implemented soon! Let me k
var client = chargify.createClient({site:'yoursite', key:'api key', password:'password'})
## Creating a Customer
- client.customers.create(
- {first_name:'Joe', last_name:'Smokes', email:'joe_smokes@example.com'}
- ).on('success', function(resp){
- // succeeded!
- }).on('failure', function(resp){
- // damn, failed. Take a look at resp.errors (an array)
- resp.errors.forEach(function(err){
- console.log("Error: " + err)
+ client.customers.create(
+ {first_name:'Joe', last_name:'Smokes', email:'joe_smokes@example.com'}
+ ).on('success', function(resp){
+ // succeeded!
+ }).on('failure', function(resp){
+ // damn, failed. Take a look at resp.errors (an array)
+ resp.errors.forEach(function(err){
+ console.log("Error: " + err)
+ })
})
- })
## Creating a Subscription
client.subscriptions.create({
Please sign in to comment.
Something went wrong with that request. Please try again.