Skip to content

shrutimantri/revolut

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

This project uses RESTful APIs for money transfers between accounts.

  • Servlet-container : Jetty
  • REST framework : Jersey
  • In-memory database : Debry
  • Build System: Maven

Follow the below steps to test the project:

  • mvn clean install
  • mvn package
  • java -jar target/revolut-1.0-SNAPSHOT.jar

Testing the code: The test code has been written. However, one can use REST clients like Postman to test the code manually. Here are a sample test run for this application:

Response received:

	{
    	"BankAccount": 
    		{
              "id": 1,
              "number": 123,
              "balance": "1000"
      	}
   }

Response received:

	{
    	"BankAccount": 
    		{
             "id": 2,
             "number": 125,
             "balance": "1000"
         }
   }

POST method URL: http://localhost:8080/payments

{
	"Payment":
		{
   			"withdrawalBankAccountNumber": 123,
			"depositBankAccountNumber": 125,
   			"funds": "500"
		}
}

Response received:

{
	 "Payment": 
		{
			"id": 1,
			"withdrawalBankAccountNumber": 123,
			"depositBankAccountNumber": 125,
			"funds": 500,
			"date": "2019-08-11T20:52:38.468+05:30"
		}	
}
  • Test out if the withdrawal and deposit has actually taken place correctly

GET http://localhost:8080/bankAccounts/1

	{
		"BankAccount":
			{
				"id":1,
				"number":123,
				"balance":"500.0000"
			}
	}

GET http://localhost:8080/bankAccounts/2

{
	"BankAccount":
		{	
			"id":2,
			"number":125,
			"balance":"1500.0000"
		}
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages