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?