Skip to content

RESTful API for money transfer between two accounts using Kotlin.

Notifications You must be signed in to change notification settings

umairkhancis/MoneyTransfer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Releases

No releases published

Packages

No packages published

Languages