- Create service that talks to ScoringService and MatchingService
Verb : POST
Endpoint : /loans
Request Body :
{
"name" : "jan",
"lastName" : "kowalski",
"country" : "Poland",
"income" : 100000,
"mortgage" : false,
"amount" : 1000
}-
If
ScoringServicereturnsEligblity: falsethen return404 with message That loan cant be quoted for given information -
If
ScoringServicereturnsEligblity: truethen return object with quote result
{
"amountRequested" : 1000,
"totalAmounttoRepay" : 1008,
"apr" : 7.9%,
"montlyRepayments" : 68.95
}