Skip to content

Conversation

@RandomProgramm3r
Copy link
Owner

This commit introduces a new endpoint for retrieving activation statistics for a specific promo code.

  • GET /api/business/promo/{id}/stat: Allows a company to view detailed statistics for their promo code, including the total number of activations and a breakdown of activations by country.

Key changes include:

  • A CompanyPromoStatAPIView that handles the logic for retrieving and serializing the statistics.
  • New CountryStatSerializer and PromoStatSerializer to structure the response data.
  • A new URL pattern in business/urls.py to route to the new view.
  • A fix in BaseUserTestCase to clear OutstandingToken after tests.

This commit introduces a new endpoint for retrieving activation statistics for a specific promo code.

- `GET /api/business/promo/{id}/stat`: Allows a company to view detailed statistics for their promo code, including the total number of activations and a breakdown of activations by country.

Key changes include:
- A `CompanyPromoStatAPIView` that handles the logic for retrieving and serializing the statistics.
- New `CountryStatSerializer` and `PromoStatSerializer` to structure the response data.
- A new URL pattern in `business/urls.py` to route to the new view.
- A fix in `BaseUserTestCase` to clear `OutstandingToken` after tests.
@RandomProgramm3r RandomProgramm3r merged commit 49760a3 into main Jul 5, 2025
2 checks passed
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.

1 participant