finloan

module
v0.0.0-...-2918f48 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 22, 2020 License: MIT

README

Finloan

Test Status

Table of Contents

Introduction

This service is simulating loan processing that supports the following operations through the RESTful APIs:

  1. Initiate loan: with arguments for initial amount, annual interest rate, and start date.
  2. Add payment: with arguments for amount and date.
  3. Get balance: takes a date as an argument and returns the total balance as of that date.

API documentation

API documentation

How to

Start the project

Make sure you have Docker and Docker Compose installed!

After cloning the project and entering the root directory, you can run the project by the following command:

make run

You can start interacting with the APIs when you see app is running at localhost:8080 in the console.

To stop the project use Ctrl+C.

Run tests

Make sure you have Docker and Docker Compose installed!

make test

Notes

  1. The balance returned is based on all payments and the interest added up to the requested date.
  2. The interest is not compounding, i.e. the interest calculation is based on the principal balance and exclude already added interest balance.
  3. The interest added for a day is defined as: annual interest rate / 100 / 365 * principal balance.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL