// tslint:disable:no-console import * as mongoose from 'mongoose'; import { chevre } from '../../../../lib/index'; import { findCreditCard } from '../../../../lib/chevre/service/transaction/orderProgramMembership/findCreditCard'; const project = { id: String(process.env.PROJECT_ID) }; async function main() { await mongoose.connect(process.env.MONGOLAB_URI, { autoIndex: false }); const projectRepo = new chevre.repository.Project(mongoose.connection); const productRepo = new chevre.repository.Product(mongoose.connection); const personRepo = new chevre.repository.Person({ userPoolId: chevre.settings.userPoolIdNew }); const result = await findCreditCard({ project: { id: project.id }, customer: { id: 'a7909268-a584-425e-8212-d7d10f344093' }, // iss: '', paymentMethodType: 'CreditCard' })({ product: productRepo, person: personRepo, project: projectRepo }); console.log(result); } main() .then(console.log) .catch(console.error);