Create Payable interface

Job Doesburg
2020-03-04T19:09:01+01:00

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_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!)