glossier / solidus_retail

Solidus Extension to Support Retail Operations
BSD 3-Clause "New" or "Revised" License
8 stars 4 forks source link

Should the GenerateRefundOrder service object be refactored? #56

Open DanielWright opened 7 years ago

DanielWright commented 7 years ago

The GeneratePosOrder service object is a dense and complex object. It relies on a lot of things going right to work correctly, and doesn't recover from failures very gracefully. It's also very tightly coupled to how refunds are processed, and thus can be painful to integrate into host apps. Finally, it's murderous to test, and has a high cognitive load. A dedicated refactoring effort would be useful to reducing these pain points.