Overview
Calculating Borrowing Capacity
- User requests a borrowing capacity calculation through the client application.
- The request hits the primary adaptor:
api-gw-calculate-borrowing-power. - The primary adaptor passes the request to the
calculate-borrowing-capacityuse case in the domain layer. - The
calculate-borrowing-capacityuse case interacts with theddb-get-borrower-profilesecondary adapter to retrieve borrower profile from DynamoDB. - The
calculate-borrowing-capacityuse case calculates the borrowing capacity and uses a secondary adaptorddb-put-borrowing-capacity-calculationto persist the borrowing capacity calculation to DynamoDB. - The estimated borrowing capacity is returned to the user through the primary adaptor.
How Is Borrowing Capacity Calculated?
Borrowing capacity is calculated in three steps:
- Calculate the borrower's Base Borrowing Capacity (BBC)
- Adjust BBC according to Employment Status
- Adjust the Employment Adjusted Borrowing Capacity based on borrower's age
- Return the final Borrowing Capacity
calculate-borrowing-capacity Use Case
Scenarios
Borrowing Capacity Calculated (200)
Borrowing Capacity Calculation Could Not Be Created (500)
There are various potential causes for this:
- DynamoDB Service Outage
- Lambda Service Outage
- Insufficient Permissions (Calculate Borrowing Capacity Use Case)
Borrower Profile Could Not Be Retrieved (500)
There are various potential causes for this:
- DynamoDB Service Outage
- Lambda Service Outage
- Insufficient Permissions (Calculate Borrowing Capacity Use Case)