Skip to content

Commit 0ea44e3

Browse files
committed
feat(FN-3400): add docstrings to new functions
1 parent 9a0c65b commit 0ea44e3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

utils/sql-db-seeder/src/payment-matching-tolerance/payment-matching-tolerance.seed.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
import { DataSource } from 'typeorm';
22
import { Currency, CURRENCY, PaymentMatchingToleranceEntity } from '@ukef/dtfs2-common';
33

4+
/**
5+
* Creates an active tolerance entity
6+
* @param currency - The currency for the tolerance
7+
* @returns the created entity
8+
*/
49
const getActiveTolerance = (currency: Currency) => {
510
const tolerance = new PaymentMatchingToleranceEntity();
611
tolerance.currency = currency;
@@ -11,6 +16,10 @@ const getActiveTolerance = (currency: Currency) => {
1116
return tolerance;
1217
};
1318

19+
/**
20+
* Inserts active tolerances for each currency
21+
* @param dataSource - the sql db data source
22+
*/
1423
export const seedPaymentMatchingTolerances = async (dataSource: DataSource): Promise<void> => {
1524
const tolerances = [getActiveTolerance(CURRENCY.GBP), getActiveTolerance(CURRENCY.EUR), getActiveTolerance(CURRENCY.USD), getActiveTolerance(CURRENCY.JPY)];
1625

0 commit comments

Comments
 (0)