Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible error in documentation for createBankAccount and createCard #5

Open
rbar2 opened this issue Aug 31, 2017 · 2 comments
Open

Comments

@rbar2
Copy link

rbar2 commented Aug 31, 2017

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 👍

@rbar2 rbar2 changed the title Possibly incorrect documentation for createBankAccount and createCard Possible error documentation for createBankAccount and createCard Sep 1, 2017
@rbar2 rbar2 changed the title Possible error documentation for createBankAccount and createCard Possible error in documentation for createBankAccount and createCard Sep 1, 2017
@devgeektech
Copy link

How 2 get this var oauth_token = "someToken_asflasdlkjsdfadflkj", I am not getting any documentation regarding this do I have to authorize for every API calls

@rbar2
Copy link
Author

rbar2 commented Mar 22, 2018

@devgeektech you do need to authorize every call

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants