Last active
May 18, 2016 09:33
-
-
Save tapanpandita/ad21cbcd3d931e58227486c41f2b2647 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var hypertrack = require('hypertrack')('<SECRET_KEY>'); | |
// Create a new customer and then a new destination for that customer: | |
hypertrack.customers.create({ | |
name: 'Tapan Pandita', | |
email: 'support@hypertrack.io' | |
}).then(function(customer) { | |
return hypertrack.destination.create({ | |
customer_id: customer.id, | |
address: '270 Linden Street', | |
city: 'San Francisco', | |
country: 'US' | |
}); | |
}).then(function(destination) { | |
console.log(destination); | |
}).catch(function(err) { | |
// Deal with an error | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment