Skip to content

rnby-mike/money-transfer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to run

./gradlew run

By default app starts on port 8080. You can specify MONEY_TRANSFER_SERVER_PORT env variable to run on different port.

MONEY_TRANSFER_SERVER_PORT=8081 ./gradlew run

Endpoints

  • POST /accounts - creates account in the system.
    Request body:
{
	"initialBalance": "float"
}
  • GET /accounts/{id} - retrieves account information
  • DELETE /accounts/{id} - deletes account
  • POST /accounts/{id}/deposit?amount={amount} - deposits some amount of money to the account
  • POST /accounts/{id}/withdrawal?amount={amount} - withdraws some amount of money from the account
  • POST /transfers - transfers money from one account to another
    Request body:
{
	"senderAccountId": "integer",
	"receiverAccountId": "integer",
	"amount": "float"
}

You can see it in action in test

About

Simple money transfer REST API service

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published