-
Notifications
You must be signed in to change notification settings - Fork 122
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
I can choose a storage subscription price #1869
Comments
|
This was referenced Sep 9, 2022
12 tasks
6 tasks
gobengo
added a commit
that referenced
this issue
Sep 20, 2022
Motivation: * #1869 * kinda like https://trunkbaseddevelopment.com/ but not in 'main', use this branch instead. commit early and often and we can figure out together how to keep the ci checks passing Parts * [x] implement api contract stubbed in `userPaymentPut` [added test here](8bfd82e#diff-0313c9c004c693d94c846d722a7ea9695c4c40867f3666b2f3706850d47f40eaR138) ``` const desiredPaymentSettings = { method: { id: `pm_${randomString()}` }, subscription: { storage: { price: `price_test_${randomString()}` } } } ``` * [x] @cmunns ensure /account/payment page can write the pricing tier to the PUT /account/payment api * [x] @gobengo add quick hack where GET /account/payment?mockSubscription=true will include a mock subscription with storage price - this should unblock frontend fetching/rendering it for dev/testing [added here](e121a6b#diff-0313c9c004c693d94c846d722a7ea9695c4c40867f3666b2f3706850d47f40eaR76) Opt-in to getting a realistic paymentSettings.subscription: * Request `GET /user/payment?mockSubscription=true` * Response ``` { subscription: { storage: { price: 'price_mock_userPaymentGet_mockSubscription' } } } ``` * [x] create use case object `saveStorageSubscription` and use from `userPaymentPut` * [x] can `saveStorageSubscription` with services backed by stripe.com APIs * [x] @cmunns ensure /account/payment page can read the pricing tier from the GET /account/payment?mockSubscription=true api * [x] can `getStorageSubscription(customer)` * [x] `getStorageSubscription(customer) called from api userPaymentGet` * [x] test for a new user choosing a paid tier for first time * [x] test for upgrading from one paid tier to another * [x] test for downgrading from one paid tier to another * [x] test for downgrading from one paid tier to a free tier Co-authored-by: Adam Munns <adam@whetinteractive.com> Co-authored-by: Yusef Napora <yusef@napora.org>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Motivation:
The text was updated successfully, but these errors were encountered: