Skip to content
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

feat: introduce dunning billing status #2976

Merged
merged 11 commits into from
Nov 20, 2023

Conversation

zachaysan
Copy link
Contributor

Thanks for submitting a PR! Please check the boxes below:

  • I have run pre-commit to check linting
  • I have filled in the "Changes" section below?
  • I have filled in the "How did you test this code" section below?
  • I have used a Conventional Commit title for this Pull Request

Changes

Introduce billing_status on the Subscription model, which will be used to show users a dunning butterbar if a subscription has a payment failed event with dunning enabled. This is done by listening for two separate webhooks from chargebee, one for payment failures and the other for payment successes and updating the billing status accordingly.

How did you test this code?

I used the webhook test feature built by chargebee to get the data format and added three new tests to cover the usecases. One test is a simple organisations list endpoint to ensure that the data is readable by a future JavaScript client.

Copy link

vercel bot commented Nov 15, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 17, 2023 3:59pm
flagsmith-frontend-preview ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 17, 2023 3:59pm
flagsmith-frontend-staging ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 17, 2023 3:59pm

@github-actions github-actions bot added the api Issue related to the REST API label Nov 15, 2023
@zachaysan zachaysan changed the title Feat/introduce dunning billing status feat: introduce dunning billing status Nov 15, 2023
Copy link
Contributor

github-actions bot commented Nov 15, 2023

Uffizzi Preview deployment-40829 was deleted.

@codecov-commenter
Copy link

codecov-commenter commented Nov 15, 2023

Codecov Report

Attention: 12 lines in your changes are missing coverage. Please review.

Comparison is base (00c6444) 95.58% compared to head (4c7986a) 95.56%.
Report is 1 commits behind head on main.

Files Patch % Lines
api/organisations/chargebee/webhook_handlers.py 74.46% 12 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2976      +/-   ##
==========================================
- Coverage   95.58%   95.56%   -0.02%     
==========================================
  Files        1016     1019       +3     
  Lines       29526    29668     +142     
==========================================
+ Hits        28222    28352     +130     
- Misses       1304     1316      +12     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

api/organisations/views.py Outdated Show resolved Hide resolved
api/organisations/models.py Outdated Show resolved Hide resolved
api/organisations/views.py Outdated Show resolved Hide resolved
api/organisations/views.py Outdated Show resolved Hide resolved
api/organisations/views.py Outdated Show resolved Hide resolved
@zachaysan zachaysan added this pull request to the merge queue Nov 20, 2023
Merged via the queue into main with commit 975c7b0 Nov 20, 2023
@zachaysan zachaysan deleted the feat/introduce_dunning_billing_status branch November 20, 2023 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Issue related to the REST API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants