Skip to content

[PM-33509] feat: Add BillingRepository and Hilt billing modules#6674

Merged
SaintPatrck merged 3 commits intomainfrom
premium-upgrade/PM-33509-billing-repository
Mar 18, 2026
Merged

[PM-33509] feat: Add BillingRepository and Hilt billing modules#6674
SaintPatrck merged 3 commits intomainfrom
premium-upgrade/PM-33509-billing-repository

Conversation

@SaintPatrck
Copy link
Contributor

@SaintPatrck SaintPatrck commented Mar 16, 2026

🎟️ Tracking

https://bitwarden.atlassian.net/browse/PM-33509

📔 Objective

Create BillingRepository and BillingRepositoryImpl to abstract billing service operations into a repository layer, plus Hilt DI modules (BillingModule, BillingNetworkModule) for dependency injection wiring.

  • BillingRepository interface exposes getCheckoutSessionUrl() and getPortalUrl() returning domain-specific sealed class result types (CheckoutSessionResult, CustomerPortalResult)
  • BillingRepositoryImpl delegates to BillingService and maps response models using .fold() into the appropriate result types
  • BillingNetworkModule provides BillingService via BitwardenServiceClient
  • BillingModule provides BillingRepository as a singleton
  • Unit tests cover success and failure paths for both repository methods

@github-actions github-actions bot added app:password-manager Bitwarden Password Manager app context t:feature Change Type - Feature Development labels Mar 16, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Mar 16, 2026

Logo
Checkmarx One – Scan Summary & Details4c6ad90d-cd02-4290-9876-2bcafc1c3f0f

Great job! No new security vulnerabilities introduced in this pull request

@codecov
Copy link

codecov bot commented Mar 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.67%. Comparing base (6d04c04) to head (d692519).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6674      +/-   ##
==========================================
- Coverage   85.80%   85.67%   -0.14%     
==========================================
  Files         807      851      +44     
  Lines       57331    58988    +1657     
  Branches     8362     8403      +41     
==========================================
+ Hits        49193    50536    +1343     
- Misses       5220     5520     +300     
- Partials     2918     2932      +14     
Flag Coverage Δ
app-data 17.34% <100.00%> (-0.33%) ⬇️
app-ui-auth-tools 20.79% <0.00%> (-0.02%) ⬇️
app-ui-platform 15.67% <0.00%> (+0.60%) ⬆️
app-ui-vault 26.48% <0.00%> (+0.65%) ⬆️
authenticator 6.59% <0.00%> (-0.01%) ⬇️
lib-core-network-bridge 4.29% <0.00%> (+<0.01%) ⬆️
lib-data-ui 0.95% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

@SaintPatrck SaintPatrck force-pushed the premium-upgrade/PM-33509-billing-repository branch from ae483aa to 2354259 Compare March 16, 2026 16:07
Base automatically changed from premium-upgrade/PM-33508-billing-api-service to main March 18, 2026 16:36
@SaintPatrck SaintPatrck force-pushed the premium-upgrade/PM-33509-billing-repository branch 2 times, most recently from a1bf609 to b8796c3 Compare March 18, 2026 17:24
Create BillingRepository and BillingRepositoryImpl to abstract billing
service operations, plus Hilt modules (BillingModule, BillingNetworkModule)
for dependency injection wiring.
@SaintPatrck SaintPatrck force-pushed the premium-upgrade/PM-33509-billing-repository branch from b8796c3 to 2aaac13 Compare March 18, 2026 17:25
@SaintPatrck SaintPatrck marked this pull request as ready for review March 18, 2026 17:25
@SaintPatrck SaintPatrck requested review from a team and david-livefront as code owners March 18, 2026 17:25
@SaintPatrck SaintPatrck added ai-review Request a Claude code review labels Mar 18, 2026
@claude
Copy link
Contributor

claude bot commented Mar 18, 2026

Claude finished @SaintPatrck's task in 1m 57s —— View job


Code Review: PR #6674

  • Gather context and read all changed files
  • Perform code review
  • Post review findings

Overall Assessment: APPROVE ✅

This PR introduces a new BillingRepository with Hilt DI wiring and custom result types (CheckoutSessionResult, CustomerPortalResult) for Stripe billing operations. The billing code follows established repository and result-type patterns, uses userFriendlyMessage for error display, and includes tests covering both success and failure paths. All prior review feedback has been addressed in subsequent commits.

Code Review Details

No findings.

@SaintPatrck SaintPatrck force-pushed the premium-upgrade/PM-33509-billing-repository branch from dd9fd33 to d692519 Compare March 18, 2026 19:17
@SaintPatrck SaintPatrck enabled auto-merge March 18, 2026 19:19
@SaintPatrck
Copy link
Contributor Author

Thanks @david-livefront

@SaintPatrck SaintPatrck added this pull request to the merge queue Mar 18, 2026
Merged via the queue into main with commit 2b9e142 Mar 18, 2026
26 checks passed
@SaintPatrck SaintPatrck deleted the premium-upgrade/PM-33509-billing-repository branch March 18, 2026 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-review Request a Claude code review app:password-manager Bitwarden Password Manager app context t:feature Change Type - Feature Development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants