Skip to content

Commit

Permalink
Merge pull request #17 from LeKer29/feat/TP-6775
Browse files Browse the repository at this point in the history
[FEAT] add field number to algoan accounts
  • Loading branch information
meriamBenSassi authored Sep 21, 2021
2 parents f88291c + d1b5ea6 commit c7d5436
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/algoan/dto/analysis.inputs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ export interface Account {
details?: AccountDetails;
aggregator?: AccountAggregator;
transactions?: AccountTransaction[];
// eslint-disable-next-line
number?: string;
}

/**
Expand Down
8 changes: 8 additions & 0 deletions src/hooks/mappers/analysis.mapper.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ describe('AnalysisMapper', () => {
},
transactions: tinkTransactionsMock.map(mapToAlgoanTransaction),
...mapToIbanAndBic(tinkAccountObjectMock.identifiers),
// eslint-disable-next-line
number: '1234-123456789',
});

// Same number of transaction
Expand Down Expand Up @@ -256,6 +258,8 @@ describe('AnalysisMapper', () => {
},
transactions: tinkTransactionsMock.map(mapToAlgoanTransaction),
...mapToIbanAndBic(tinkAccountObjectMock.identifiers),
// eslint-disable-next-line
number: '1234-123456789',
});
});

Expand Down Expand Up @@ -384,6 +388,8 @@ describe('AnalysisMapper', () => {
],
type: 'CHECKING',
usage: 'PERSONAL',
// eslint-disable-next-line
number: '1234-123456789',
},
{
aggregator: {
Expand Down Expand Up @@ -426,6 +432,8 @@ describe('AnalysisMapper', () => {
],
type: 'CHECKING',
usage: 'PERSONAL',
// eslint-disable-next-line
number: '1234-123456789',
},
],
});
Expand Down
2 changes: 2 additions & 0 deletions src/hooks/mappers/analysis.mapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ export function mapToAlgoanAccount(
},
transactions: tinkTransactions.map(mapToAlgoanTransaction),
...mapToIbanAndBic(tinkAccount.identifiers),
// eslint-disable-next-line
number: tinkAccount.accountNumber,
};
}

Expand Down
1 change: 1 addition & 0 deletions src/tink/dto/account.objects.mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export const tinkAccountObjectMock: TinkAccountObject = {
holderName: 'Thomas Alan Waits',
name: 'My account',
type: TinkAccountType.CHECKING,
accountNumber: '1234-123456789',
};

/**
Expand Down
1 change: 1 addition & 0 deletions src/tink/dto/account.objects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export interface TinkAccountObject<NullOrUndefined = undefined> {
name: string;
type: TinkAccountType;
iban?: string; // Don't know yet if it is returned each time, not in the documentation.
accountNumber?: string;
}

/**
Expand Down

0 comments on commit c7d5436

Please sign in to comment.