SDiamante13 / transactions-api

A microservice developed with Outside-In TDD using Spring Boot.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

transactions-api

AS a developer on the Cardmember Behavior Analytics team
I WANT to retrieve card member transactions
SO THAT I can analyze and model card member behavior to better present the card member with relevant promotional material

Scenario 1: Retrieve transactions for account with no transactions

GIVEN a card member account with no transactions
WHEN I request a list of transactions for that account
THEN I will receive a success response
AND I will see an empty list of transactions

Scenario 2: Account does not exist in database

GIVEN a card member account id that does not exist
WHEN I request a list of transactions for that account
THEN I will receive a not found response
AND I will see a detailed not found error message

Scenario 3: Retrieve transactions for an account with one or more transactions

GIVEN a card member account with transactions
WHEN I request a list of transactions for that account
THEN I will receive a success response
AND I will a list of all their transactions

Scenario 4: Retrieve transactions for an account after a given a date

GIVEN a card member account with transactions
WHEN I request a list of transactions after the given date
THEN I will receive a success response
AND I will see a list of transactions that occurred on and after the given date

Notes:

GET /accounts/{accountId}/transactions?fromDate=2021-01-31

Sample Response:

[
  {
    "transactionId": "1",
    "date": "2022-02-03",
    "amount": 50.00,
    "merchantName": "Amazon",
    "summary": "XP Explained (Book)",
    "accountId": "123"
  }
]

About

A microservice developed with Outside-In TDD using Spring Boot.


Languages

Language:Java 100.0%