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

Unable to access owner_customer when trying to get a marketplace's bank account. #54

Open
jrthib opened this issue Feb 25, 2015 · 3 comments

Comments

@jrthib
Copy link

jrthib commented Feb 25, 2015

The example provided at the following links:
https://github.com/balanced/balanced-node/blob/master/snippets/order-credit-marketplace.js
https://docs.balancedpayments.com/1.1/guides/orders/credit-marketplace/

These examples show how to retrieve a marketplace's bank account, however in my trials, balanced.marketplace.owner_customer returns as undefined from balanced.marketplace.

After further investigation, I realized the promise for balanced.marketplace had to be resolved first and came to this example:

balanced.marketplace.then(function(marketplace) {
    marketplace.owner_customer.bank_accounts.get(0).then(function(bankAccount) {
        console.log(bankAccount);
    });
});

The code above, works for me. Is this how it is actually supposed to work, which means the examples are off, or am I not using the module correctly?

@fangpenlin
Copy link

@jrthib there was an bug about bank account was deployed, for now I just deployed a new version, I think the problem should be addressed, can you try it again?

@jrthib
Copy link
Author

jrthib commented Feb 25, 2015

Sure. I will try it and let you know.

@jrthib
Copy link
Author

jrthib commented Feb 25, 2015

Was it an update to the node module or something else? What am I testing?

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