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 @abstractmethod
s:
-
payment_amount
as the amount of the payment -
payment_topic
as the grouping key for the type of payment (ledger information) -
payment_notes
for the user specific details -
payment_payer
for the user paying
Payments must then have a constructor create_payment
that takes as arguments:
- a
Payable
object - a payment
processor
that is the person that processes the payment - the payment
type
being either thalia pay, card, cash or wire transfer (no None anymore!)