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

Validate annual limits on message send #2375

Merged
merged 15 commits into from
Dec 9, 2024

Conversation

whabanks
Copy link
Contributor

@whabanks whabanks commented Dec 3, 2024

Summary | Résumé

This PR implements validation of a service's annual limits when they perform a send.

Related Issues | Cartes liées

Test instructions | Instructions pour tester la modification

Create a service or use one without any sends and set the service's sending limits:
SMS Daily : 5
Email Daily: 5
SMS Annual: 6
Email Annual: 6

Testing API validation

  1. Create 2 bulk sends with a size of 7 - 1 sms & 1 email
  • Note the response with a message about going over the annual limit
  1. Perform the same bulk sends again but with a size of 6
  • Note the response with a message about going over the daily limit
  1. Perform the same bulk sends again but with a size of 5
  • Note that they were successful

Increase your daily limits to 6 for both email and sms

  1. Perform 2 Email and 2 SMS one-off sends
  • Note the response with a message about going over the annual limit after the second one offs

Update your annual limits to:
SMS Daily : 7
Email Daily: 7
SMS Annual: 8
Email Annual: 8

  1. Perform 2 Email and 2 SMS one-off sends again
  • [ ] Note the response with a message about going over the daily limit

Release Instructions | Instructions pour le déploiement

None.

Reviewer checklist | Liste de vérification du réviseur

  • This PR does not break existing functionality.
  • This PR does not violate GCNotify's privacy policies.
  • This PR does not raise new security concerns. Refer to our GC Notify Risk Register document on our Google drive.
  • This PR does not significantly alter performance.
  • Additional required documentation resulting of these changes is covered (such as the README, setup instructions, a related ADR or the technical documentation).

⚠ If boxes cannot be checked off before merging the PR, they should be moved to the "Release Instructions" section with appropriate steps required to verify before release. For example, changes to celery code may require tests on staging to verify that performance has not been affected.

@whabanks whabanks merged commit c566564 into main Dec 9, 2024
5 checks passed
@whabanks whabanks deleted the task/annual-limit-validation-impl branch December 9, 2024 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants