umairkhancis / MoneyTransfer

RESTful API for money transfer between two accounts using Kotlin.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

RESTful API for money transfer between two accounts using Kotlin.

Run the app:

./gradlew run

Libraries used:

APIs:

POST /transaction/transfer --> Transfer money between two accounts e.g -

{
    "srcAccountId": 3,
    "destAccountId": 1,
    "purpose": "Salary",
    "amount": 25000
}

returns

{
    "data": {
        "id": 1,
        "purpose": "Salary",
        "srcAccountId": 3,
        "destAccountId": 1,
        "amount": 25000,
        "dateUpdated": 1569038234809
    },
    "code": 201,
    "msg": "Transaction successfully completed!"
}

Other Routes:

GET /account/ --> get all accounts from the database.

GET /account/{id} --> get specific account with the given id from the database.

GET /transaction --> get all transactions from the database.

GET /transaction/{id} --> get specific transaction with the given id from the database.

Testing

100% test coverage by Unit Tests for service layer and repository layer and Integration Tests for all apis.

About

RESTful API for money transfer between two accounts using Kotlin.


Languages

Language:Kotlin 100.0%