wave
wave copied to clipboard
Add billing dates to subscriptions
Currently the next and last billing dates aren't added to the subscriptions. There should be a next_bill_date
attribute, but that isn't in the migration and is not set when a new subscription is added. This PR resolves this issue by adding two new attributes to the subscriptions, namely the last_payment_at
and next_payment_at
fields.
With those, we can track when the last payment was made and when to expect the next one. Also included a fix for cancelled_at
which was never set when a subscription was canceled.