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

Closed
opened 2026-04-11 03:53:31 -05:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/bitwarden/android/pull/6674

State: closed
Merged: Yes


🎟️ 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
**Original Pull Request:** https://github.com/bitwarden/android/pull/6674 **State:** closed **Merged:** Yes --- ## 🎟️ 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
GiteaMirror added the pull-request label 2026-04-11 03:53:31 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#12917