Search…
Finance

Finance Client

About

This library implements a client to use Finance APIs

Import into other NestJS modules

Add the service to your module imports:
1
import { FinanceClientModule } from '@island.is/clients/finance'
2
3
@Module({
4
imports: [
5
FinanceClientModule
6
],
7
})
Copied!
Then you'll have access to Finance APIs:
1
import { FinanceClientService } from '@island.is/clients/finance'
2
3
@Injectable()
4
export class SomeService {
5
constructor(private readonly financeService: FinanceClientService) {}
6
7
async getStatus(): Promise<FinanceStatus> {
8
const financeStatus = await this.financeService.getFinanceStatus(
9
user.nationalId,
10
user,
11
)
12
13
if (financeStatus) {
14
return financeStatus
15
}
16
17
// ....
18
}
19
}
Copied!

Code owners and maintainers

Extra

See response examples in mock data.

Running unit tests

Run nx test clients-finance to execute the unit tests via Jest.