1
0
Commit Graph

18 Commits

Author SHA1 Message Date
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
c43263a49b Rename shipping options factory file 2021-03-07 19:23:20 +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
26b3be7359 Add simplecov
Makes it easier to figure out what is covered by specs
2021-03-07 11:31:14 +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
e169921c14 Add version number spec for gem 2021-03-05 21:03:32 +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