New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bill Users for Paid Accounts #61
Conversation
4b7d9cb
to
37ed306
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I started to review it and then started to think that it seems weird to include all our billing logic in this repo. There is nothing to hide and idk where else you would put it but seems like something that isnt needed in the repo. Thoughts?
Edit:
After discussion today it seems we will indeed split this work away from holepunch at a later date. It is not needed immediately but could make our life easier down the road
ef06667
to
679653d
Compare
679653d
to
1401093
Compare
3fe48c8
to
7866ea0
Compare
3c86f7f
to
00ecd5c
Compare
00ecd5c
to
5031062
Compare
5031062
to
e479182
Compare
e479182
to
a5b8a6d
Compare
a5b8a6d
to
c33b2bc
Compare
What changes does this PR introduce?
This enables us to bill users through Stripe for Paid Accounts
Any background context you want to provide?
There are a few major parts to this PR:
As an outgrowth of 3/4/5 I discovered that our use of SQLAlchemy made the models both hard to test in isolation and likely to result in a lot of specious calls to stripe. We needed better controls of the change management than SQLAlchemy's (coarse) callbacks offered, so we need to track changes ourselves. About half of our interaction methods need to either flush or commit to the DB, but it's it's confusing to have a lot of database state management mixed in with business logic.
To avoid that, I created an
Interactor
mixin that let's us manage that kind of housekeeping a little more decoratively.Where should the reviewer start?
I tried to order these commits in a logical order so it made sense when you read them instead of a single 5,000 line diff - so you should be able to start at the top.
Has this been manually tested? How?
Tests pass! This one is definitely going to need pushbutton.
What value does this provide to our end users?
Let's them pay us for our awesome service, keeping us all employed and our service running!
What GIF best describes this PR or how it makes you feel?