Skip to content

feat: ENT-11468-PR : C Updated Interfaces: Stripe helpers#176

Open
shravani-sonata-gottapu wants to merge 2 commits into
mainfrom
ENT-11468/PR-C
Open

feat: ENT-11468-PR : C Updated Interfaces: Stripe helpers#176
shravani-sonata-gottapu wants to merge 2 commits into
mainfrom
ENT-11468/PR-C

Conversation

@shravani-sonata-gottapu

@shravani-sonata-gottapu shravani-sonata-gottapu commented May 22, 2026

Copy link
Copy Markdown
Contributor

Description:

Interfaces: Stripe helpers

Files changed:
enterprise_access/apps/customer_billing/pricing_api.py
enterprise_access/apps/customer_billing/stripe_api.py
enterprise_access/apps/customer_billing/tests/test_stripe_api.py
enterprise_access/apps/customer_billing/tests/test_stripe_api.py

@shravani-sonata-gottapu shravani-sonata-gottapu requested a review from a team as a code owner May 22, 2026 10:51
Copilot AI review requested due to automatic review settings May 22, 2026 10:51
@shravani-sonata-gottapu shravani-sonata-gottapu requested review from a team as code owners May 22, 2026 10:51

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Stripe helper interfaces by enriching subscription checkout metadata from Stripe Product metadata, and by adding “academy” product/price helper functions plus cached “active prices” retrieval paths in the pricing API.

Changes:

  • Enrich create_subscription_checkout_session subscription metadata using Stripe Product metadata when checkout_intent.stripe_product_id is present.
  • Add academy Stripe helper functions (get_academy_stripe_products, get_academy_stripe_product_by_key, get_academy_stripe_prices) and corresponding tests.
  • Refactor pricing helpers to introduce cached get_all_active_stripe_prices / get_all_active_academy_stripe_prices and update get_all_stripe_prices to consume the cached list.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
enterprise_access/apps/customer_billing/stripe_api.py Adds subscription metadata enrichment and academy product/price helper functions.
enterprise_access/apps/customer_billing/pricing_api.py Introduces cached “active prices” list helpers and refactors lookup-key mapping to use them.
enterprise_access/apps/customer_billing/tests/test_stripe_api.py Adds coverage for the new subscription metadata enrichment and academy helper functions; adds tests for trialing subscription lookup.
enterprise_access/apps/customer_billing/tests/test_pricing_api.py Adds coverage for the new cached “active prices” helper functions and additional caching/error-path behaviors.

Comment thread enterprise_access/apps/customer_billing/stripe_api.py Outdated
Comment thread enterprise_access/apps/customer_billing/pricing_api.py
Comment thread enterprise_access/apps/customer_billing/stripe_api.py Outdated
Comment thread enterprise_access/apps/customer_billing/tests/test_stripe_api.py
@codecov

codecov Bot commented May 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.39%. Comparing base (4a4f726) to head (941b82a).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #176      +/-   ##
==========================================
+ Coverage   86.08%   86.39%   +0.30%     
==========================================
  Files         149      149              
  Lines       12500    12587      +87     
  Branches     1194     1207      +13     
==========================================
+ Hits        10761    10874     +113     
+ Misses       1424     1405      -19     
+ Partials      315      308       -7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@vshaikismail-sonata vshaikismail-sonata left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM....!!!

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.

3 participants