Create Payable interface
One-sentence description
Create a Payable interface to be used for all models that use Payments
Why?
To prevent code duplication and improve testing
Current implementation
Shitty, chaotic, anarchy, tears
Suggested implementation
Payable abstract class with @property @abstractmethods:
-
payment_amountas the amount of the payment -
payment_topicas the grouping key for the type of payment (ledger information) -
payment_notesfor the user specific details -
payment_payerfor the user paying
Payments must then have a constructor create_payment that takes as arguments:
- a
Payableobject - a payment
processorthat is the person that processes the payment - the payment
typebeing either thalia pay, card, cash or wire transfer (no None anymore!)