1
0
Commit Graph

21 Commits

Author SHA1 Message Date
Tim Kächele
7b6606e32b Optimize faster l shipment count lookup 2021-11-20 19:02:28 +01:00
574f186f0f Fix rubocop style offenses 2021-03-08 11:45:15 +01:00
5719237879 Final wiring of the individual components 2021-03-08 11:09:29 +01:00
859619de72 Reorganize file structure 2021-03-08 11:08:06 +01:00
f43e4b700d Implement shipment formatter 2021-03-07 22:13:28 +01:00
6c4c9c75fe Implement LP L discount rule 2021-03-07 22:11:59 +01:00
2f34945418 Implement S Shipments Discount rule 2021-03-07 21:00:05 +01:00
5c3bb4d41a Add rule_applied_in_month and l_shipment count to shipment repo
- Add method to check whehter a rule was applied to a shipment in a given month
- Add a method to count the l shipments for a specific provider in a given month
2021-03-07 19:25:22 +01:00
1e0b8db8b3 Implement a rule base class
Implement a potential base class for future rules
2021-03-07 19:02:34 +01:00
337419fe28 Implement discount PORO 2021-03-07 18:58:41 +01:00
86dffbc8fe Add inspection methods to shipping option 2021-03-07 18:55:34 +01:00
a0ab3cc6da Make repositories enumerable 2021-03-07 18:10:38 +01:00
47a013eb66 Add delegate methods to shipment class 2021-03-07 18:09:27 +01:00
e0d300c441 Introduce monkey patch for date
Allows to retrieve the begin of month for a given date
2021-03-07 18:07:50 +01:00
2e3a68e285 Rename discount budget methods and expose maximum possible discount
- Rename #apply_discount to #register_applied_discount to make it
  more clear that it only registers discounts and does not apply them
- Expose maximum possible discount to make it possible to get get the possible
  discount without registering it in the budget
2021-03-07 11:32:05 +01:00
65dd309569 Implement remaining_budget? method in discount budget 2021-03-06 20:28:48 +01:00
c4528b1c92 Implement discount budget for month repository
- Provide a repository to retrieve a discount budget
  for a given month
2021-03-06 19:07:47 +01:00
815615a03c Implement a discount budget
A discount budget to represent the available budget for
discounts
2021-03-06 17:42:50 +01:00
b6f2d46d91 Extract default repository behavior into base class 2021-03-06 17:33:26 +01:00
66886e6ae6 Implement shipment reader
- Add shipment object
- Add object to represent invalid shipments
- Implement reader for the csv input format
2021-03-05 21:43:44 +01:00
5f3974331c First commit
Includes

- Spec setup with FactoryBot
- A basic shipping option data structure
- A shipping option repository to have one central place with shipping options
- Github actions pipeline
2021-03-05 21:02:21 +01:00