Created
July 5, 2018 21:42
-
-
Save tristansokol/9642e0d6ac8e0477957337e9fcdd7eb9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 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