Skip to content

Wex API for technical test to Software Development Engineer position

Notifications You must be signed in to change notification settings

leandrosenazuza/wex-purchase-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WEX PURCHASE API

Technical Test - Leandro Sena Zuza

#About

This API it's a technical test to Software Development Engineer position at Wex Company.

#Objective

My application, called wex-purchase-api must be able to accept and store (i.e., persist) a purchase transaction with a description, transaction date, and a purchase amount in United States dollars. When the transaction is stored, it will be assigned a unique identifier.

#Technologies

  1. Back-end: Java 17
  2. Database: H2

#Author

  • Name: Leandro Sena Zuza
  • Job: software developer full stack

#How to acess the WEX PURCHASE API and API's Database?

  • If want to acess the Swagger, please, run application and acess: http://localhost:8080/wex-purchase-api/swagger-ui/index.html

#How to acess API's Database?

  • To access the database, please, run application and acess: http://localhost:8080/wex-purchase-api/h2
  • The credentials to conect to H2 Database are in the Application Properties.

#How to use the request?

  • /save request persit one purchase in the database.
  • /listAllPurchase list all transactions persisted in the database
  • /getOnePurchase/{id} get id's transaction
  • /getPurchaseWithCurrency/{id} get id's transaction converted to respective exchange date, if it exist.

#Scripts?

There is some scripts if you want to test with some data.

INSERT INTO TAB_TRANSACTION ( DATE_TRANSACTION, PURCHASE_AMOUNT, DESCRIPTION) VALUES ('2022-12-31', 100321.0, 'New York Cap');

INSERT INTO TAB_TRANSACTION ( DATE_TRANSACTION, PURCHASE_AMOUNT, DESCRIPTION) VALUES ('2023-09-06', 150.0, 'Milk Happy Cow 1L');

INSERT INTO TAB_TRANSACTION ( DATE_TRANSACTION, PURCHASE_AMOUNT, DESCRIPTION) VALUES ('2023-09-07', 75.0, 'Lego Set');

INSERT INTO TAB_TRANSACTION ( DATE_TRANSACTION, PURCHASE_AMOUNT, DESCRIPTION) VALUES ('2023-06-01', 70.456, 'Bread');

INSERT INTO TAB_TRANSACTION ( DATE_TRANSACTION, PURCHASE_AMOUNT, DESCRIPTION) VALUES ('2023-06-30', 63.456, 'Flip flop');

INSERT INTO TAB_TRANSACTION ( DATE_TRANSACTION, PURCHASE_AMOUNT, DESCRIPTION) VALUES ('2022-12-31', 63.456, 'Whopper');

About

Wex API for technical test to Software Development Engineer position

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages