Expectation
I would expect that to create a bank account (or create a card), I would provide the createBankAccount method (or createCard method) with a customerId and the bank account information (or card information) that I would like to store, and in return, would receive the bankAccountId (or cardId) at which the details can later be retrieved from intuit using the bankAccount method (or card method (missing here)).
Documentation / Possible Issue
Instead, createBankAccount method appears to take a string as a parameter for the bank account (and similarly createCard methods appear to take a string as a parameter for the card). In this case, bank account information (or card information) is never passed to the method, and therefore would seemingly not be possible to be stored on intuit and return an Id to be later used.
Question
Is there an error in the documentation such that bank account (or card) should be an object parameter for the createBankAccount method (or createCard method)?
My approach
Nonetheless, I have attempted to implement the method both ways and with little success. This is what I believe to be my closest attempt
var customerId = myCustomerId
var consumerKey = myConsumerKey
var consumerSecret =myConsumerSecret
var oauth_token = "someToken_asflasdlkjsdfadflkj"
var oauth_token_secret = "someSecret_adfksdalfkjpsdfpsdpop23"
var realmId = "someId_123456789"
qbo = new QuickBooks(consumerKey,
consumerSecret,
oauth_token,
oauth_token_secret,
realmId,
false, // use the sandbox?
true); // enable debugging?
var bankAccount = {
name: myName,
routingNumber: myRoutingNumber,
accountNumber: myAccountNumber,
accountType: 'PERSONAL_CHECKING',
phone: myPhoneNumber
};
qbo.createBankAccount(customerId, bankAccount, function(response, error) {
res.send(200, response)
});
Thank you in help 👍
Expectation
I would expect that to create a bank account (or create a card), I would provide the
createBankAccountmethod (orcreateCardmethod) with acustomerIdand the bank account information (or card information) that I would like to store, and in return, would receive thebankAccountId(orcardId) at which the details can later be retrieved from intuit using thebankAccountmethod (orcardmethod (missing here)).Documentation / Possible Issue
Instead,
createBankAccountmethod appears to take astringas a parameter for the bank account (and similarlycreateCardmethods appear to take astringas a parameter for the card). In this case, bank account information (or card information) is never passed to the method, and therefore would seemingly not be possible to be stored on intuit and return an Id to be later used.Question
Is there an error in the documentation such that
bank account(orcard) should be anobjectparameter for thecreateBankAccountmethod (orcreateCardmethod)?My approach
Nonetheless, I have attempted to implement the method both ways and with little success. This is what I believe to be my closest attempt
Thank you in help 👍