Link users and Dwolla customers
Link users and Dwolla customers
// forest/users.js
const { collection } = require('forest-express-sequelize');
const DwollaService = require('../services/dwolla-service');
let dwollaService = new DwollaService(
process.env.DWOLLA_APP_KEY,
process.env.DWOLLA_APP_SECRET,
process.env.DWOLLA_ENVIRONMENT
);
collection('users', {
actions: [],
fields: [
{
field: 'dwollaCustomer',
type: 'String',
reference: 'dwollaCustomers.id',
get: function (user) {
return dwollaService.getCustomerSmartRelationship(user);
},
},
],
segments: [],
});Last updated
Was this helpful?