Terminology
- Merchant - someone who owns a website
- SettlementReport - financial document which represents the total amount that a merchant should receive
- Invoice - financial document which represents the total fees/taxes we are charging the merchant
- Payment - the transfer of money or goods and services in exchange for a product or service
- Refunds - a sum of money which is returned to the Customer
- Fee - a tax that Nuvei is charging for using our services
Instructions
- Install SQL Express: https://www.microsoft.com/en-us/download/details.aspx?id=55994 and restore the backupDB from the GitHub repository [master\DB\Invoicing_Kata.bak]
- Change the export path in Settings.xml to your local folder where you want to export the files
Assessment
Please refactor the code to be maintainable, scalable and testable, so that:
- The code should be easy to explain - we can easily integrate a new developer into the team
- We can easily extend the application if we need:
- a new type of Invoice (SettlementInvoice),
- a new type of transaction (Refund),
- a new type of fee (refund fee),
- a new type of format(e.g PDF) - now is only excel (XLS)
- Unit tests are a plus
Keywords: SOLID and Design patterns
We are NOT interested in:
- redesigning existing tables or procedures from Database
- changing the existing code that creates excel sheets (GenerateInvoiceSheet method from InvoiceGenerator.cs)