-
Notifications
You must be signed in to change notification settings - Fork 415
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: Use get-metadata-subscription to get max_api_calls #2279
Merged
matthewelwell
merged 34 commits into
main
from
fix/use-get-metadata-subscription-for-max-api-calls
Aug 22, 2023
Merged
Changes from 33 commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
09567a6
Use get-metadata-subscription to get max_api_calls
novakzaballa 659e637
Merge branch 'main' into fix/use-get-metadata-subscription-for-max-ap…
novakzaballa 3c5c924
Use CB webhook, Update the get-subscription-metadata endpoint and upd…
novakzaballa 88f1cf1
Update tests
novakzaballa fd12f20
clean logs
novakzaballa b4b856b
Solve observations
novakzaballa 1eddc26
Solve CB web hook errors
novakzaballa 0d635d4
Add constants
novakzaballa 52d9c65
Update get_subscription_metadata from chargebee and solve obs
novakzaballa 28043b6
Update tests
novakzaballa e424640
Update test
novakzaballa 28a500d
Merge branch 'main' into fix/use-get-metadata-subscription-for-max-ap…
novakzaballa 5c74b28
test correction and move dict_to_class function to utils
novakzaballa 85983c4
Solve observations
novakzaballa c6cb078
Adjust type hints
novakzaballa c99dc86
create _convert_chargebee_subscription_to_dictionary function
novakzaballa 5fef7cc
Update get_metadata_subscription
novakzaballa d35157a
Update get_metadata_subscription
novakzaballa a51c973
Merge branch 'main' into fix/use-get-metadata-subscription-for-max-ap…
novakzaballa 528835e
Recreate migration 0043
novakzaballa e74a1ca
Recreate migration 0043
novakzaballa 74e4744
Tests
novakzaballa 0058673
Update sales_dashboard page, organisationsubscriptioninformationcache
novakzaballa 2b367a5
Update tests
novakzaballa 358d47f
Update tests
novakzaballa 94cd1ff
Update tests
novakzaballa f5e00dc
Update tests, and migrations
novakzaballa 937cd76
Merge branch 'main' into fix/use-get-metadata-subscription-for-max-ap…
novakzaballa af05c5a
recreate migrations
novakzaballa 6f340c3
Update test
novakzaballa f88c5b6
Updated test to use parameterization
novakzaballa 01db4d0
fixes in test_when_plan_is_changed_max_seats_and_max_api_calls_are_up…
novakzaballa e2c8fd6
test swapped
novakzaballa 457d411
Merge branch 'main' into fix/use-get-metadata-subscription-for-max-ap…
novakzaballa File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
from .chargebee import ( # noqa | ||
add_single_seat, | ||
extract_subscription_metadata, | ||
get_customer_id_from_subscription_id, | ||
get_hosted_page_url_for_subscription_upgrade, | ||
get_max_api_calls_for_plan, | ||
get_max_seats_for_plan, | ||
get_plan_meta_data, | ||
get_portal_url, | ||
get_subscription_data_from_hosted_page, | ||
get_subscription_metadata, | ||
get_subscription_metadata_from_id, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
...rganisations/migrations/0044_organisationsubscriptioninformationcache_allowed_projects.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 3.2.20 on 2023-07-14 16:59 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('organisations', '0043_add_created_at_and_updated_at_to_organisationwebhook'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='organisationsubscriptioninformationcache', | ||
name='allowed_projects', | ||
field=models.IntegerField(default=1), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Generated by Django 3.2.20 on 2023-08-02 19:56 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('organisations', '0044_organisationsubscriptioninformationcache_allowed_projects'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='organisationsubscriptioninformationcache', | ||
name='chargebee_updated_at', | ||
field=models.DateTimeField(null=True), | ||
), | ||
migrations.AddField( | ||
model_name='organisationsubscriptioninformationcache', | ||
name='influx_updated_at', | ||
field=models.DateTimeField(null=True), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really an issue, but I'm not sure why these changes have snuck into this PR.