Skip to content

andrekreativ/capital-one-code-exercise

Repository files navigation

capital-one-code-exercise

Andres Martinez

Notes

Implemented as a REST API:
GET: http://servername/api/summaries

With the following options as query parameters:

crystalBall=true
Includes projected transactions for the current month and future months in the same time range as the original list of all transactions.

ignoreCcPayments=true
Used to ignore transactions from credit card payments in the calculations. When this option is used the output includes a list with all the pairs of transactions identifid as credit card payments. Credit card payment transactions are identified as having opposite amounts and created within 24 hours of each other.

ignoreDonuts=true
Used to ignore merchants that sell donuts (where the merchant is "Krispy Kreme Donuts" or "DUNKIN #336784"). Per design in the given instructions this list of ignored transactions is not displayed to the user. But a future improvement could easily show it, because the list is available just not displayed.

Output:
[
{
"ignoreDonuts": true|false,
"crystalBall": true|false,
"ignoreCcPayments": true|false,
"averageMonth": {},
"months": [],
"excludedCreditCardPayments": []
}
]

Compile and run:

Use .NET Core 1.1 and Visual Studio 2017.

https://www.microsoft.com/net/core#windowsvs2017

Tests:

  • Unit tests for each component, plug-in and algorithm.
  • TODO: Add unit tests for the controller itself.
  • TODO: Add Integration, performance and stress tests.

Architecture:


Architecture Diagram

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages