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: 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 3: 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 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
GET /accounts/{accountId}/transactions?fromDate=2021-01-31
[
{
"transactionId": "1",
"date": "2022-02-03",
"amount": 50.00,
"merchantName": "Amazon",
"summary": "XP Explained (Book)",
"accountId": "123"
}
]