Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/resources/Entity/Connect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import Resource, { IResourceListOpts } from '../../resource';
import Configuration, { IResponse } from '../../configuration';
import type { IEntityConnect } from './types';


export const AccountExpandableFields = {
sensitive: 'sensitive',
balance: 'balance',
Expand All @@ -14,10 +15,12 @@ export const AccountExpandableFields = {
latest_verification_session: 'latest_verification_session',
} as const;

type AccountExpandableField = typeof AccountExpandableFields[keyof typeof AccountExpandableFields];
type AccountFieldKey = typeof AccountExpandableFields[keyof typeof AccountExpandableFields];

export type ExpandField = 'accounts' | `accounts.${AccountFieldKey}`;

export interface IExpandableOpts {
expand?: AccountExpandableField[];
expand?: ExpandField[];
}

export interface IConnectListOpts extends IResourceListOpts, IExpandableOpts {}
Expand Down
3 changes: 2 additions & 1 deletion test/resources/Account.tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ describe('Accounts - core methods tests', () => {
};

balances_create_response.should.be.eql(expect_results);
await new Promise(r => setTimeout(r, 5000))
});

it('should successfully retrieve the balance of an account.', async () => {
Expand Down Expand Up @@ -311,7 +312,7 @@ describe('Accounts - core methods tests', () => {
};

card_create_response.should.be.eql(expect_results);
await new Promise(r => setTimeout(r, 2000))
await new Promise(r => setTimeout(r, 5000))
});

it('should successfully retrieve a card for an account.', async () => {
Expand Down
Loading