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

Ensure that the data about max API calls and actual API calls is on-sync and up to date #2268

Closed
novakzaballa opened this issue Jun 6, 2023 · 2 comments · Fixed by #2279
Closed
Assignees
Labels
api Issue related to the REST API

Comments

@novakzaballa
Copy link
Contributor

Is your feature request related to a problem? Please describe.

There are discrepancies in the max API calls number between the sales dashboard and the Django admin views for some subscriptions. Also, we need to ensure that the number of API calls is kept up to date for every organisation.

Steps to reproduce the behavior:

  1. Go to the sales dashboard and pick an organisation with a start-up plan. See that the max number of API calls is 1M.
  2. Go to the Django admin page and search for the same organisation. See that the max number of API calls is 50K.

Describe the solution you'd like
The organisation subscription information must be kept on-sync. The same number of max API calls should be shown in the sales dashboard and the Django admin pages.

@khvn26
Copy link
Member

khvn26 commented Jun 6, 2023

#2246 Related? @matthewelwell

@matthewelwell
Copy link
Contributor

#2246 Related? @matthewelwell

No, I don't think so. I think the issue here is that there are 2 places that this data is located. One is in Chargebee (which is the correct data), the other is in the DB for the API itself. This provides default values for those organisations that don't have data in Chargebee.

The data from Chargebee can be retrieved from the organisations/:id/get-subscription-metadata endpoint.

To resolve this issue, we should either:

  1. Remove the data from the organisation on retrieval
  2. Retrieve the data from CB when we retrieve the organisation (since this data is cached, maybe that's ok)

@novakzaballa novakzaballa linked a pull request Jun 9, 2023 that will close this issue
3 tasks
@dabeeeenster dabeeeenster added the api Issue related to the REST API label Jul 6, 2023
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 a pull request may close this issue.

4 participants