Skip to content

Instantly share code, notes, and snippets.

@tristansokol
Created July 5, 2018 21:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tristansokol/9642e0d6ac8e0477957337e9fcdd7eb9 to your computer and use it in GitHub Desktop.
Save tristansokol/9642e0d6ac8e0477957337e9fcdd7eb9 to your computer and use it in GitHub Desktop.
var apiInstance = new SquareConnect.CustomersApi();
db.each("SELECT * FROM Customers WHERE ...", function (err, row) {
apiInstance.createCustomer({
given_name:row.given_name,
family_name:row.family_name,
email_address:row.email_address
}).then(function (data) {
console.log('API called successfully. Returned data: ' + data);
}, function (error) {
console.error(error);
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment