PAS-444 | Populate metered billing from periodic credential reports.
Ticket
- Closes PAS-444
Description
This is the first step to populate metered billing from periodic credential reports in the api. Stripe recommends we keep the usage records ourselves, so for this the periodic credential reports will serve their purpose.
In step 2 of the refactoring, we will stop updating the CurrentUserCount in the Applications table periodically, but instead do it upon login of an admin to significantly reduce network traffic.
Shape
Screenshots
For testing I populated PeriodicCredentialReports first. Then forced the background job to run:
Checklist
I did the following to ensure that my changes were tested thoroughly:
- Tested locally.
I did the following to ensure that my changes do not introduce security vulnerabilities:
- __
Codecov Report
Attention: Patch coverage is 0% with 61 lines in your changes are missing coverage. Please review.
Project coverage is 32.56%. Comparing base (
9657e87) to head (ba09d4a).
Additional details and impacted files
@@ Coverage Diff @@
## main #576 +/- ##
==========================================
- Coverage 32.58% 32.56% -0.02%
==========================================
Files 525 525
Lines 26561 26576 +15
Branches 860 865 +5
==========================================
Hits 8655 8655
- Misses 17785 17800 +15
Partials 121 121
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.