Files
orion/app/modules/billing/services/__init__.py
Samir Boulahtit a76128e016 refactor: standardize modular architecture patterns
- Rename module definition variables to follow naming convention:
  - catalog/definition.py: module → catalog_module
  - checkout/definition.py: module → checkout_module
  - cart/definition.py: module → cart_module

- Add router attachment functions for lazy loading:
  - get_catalog_module_with_routers()
  - get_checkout_module_with_routers()
  - get_cart_module_with_routers()

- Move billing exceptions to exceptions.py:
  - Add backwards-compatible aliases (BillingServiceError, etc.)
  - Update billing_service.py to import from exceptions.py

- Standardize VendorEmailSettingsService DI pattern:
  - Change from db in __init__ to db as method parameter
  - Create singleton vendor_email_settings_service instance
  - Update routes and tests to use new pattern

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 18:40:03 +01:00

73 lines
1.9 KiB
Python

# app/modules/billing/services/__init__.py
"""
Billing module services.
Provides subscription management, Stripe integration, and admin operations.
"""
from app.modules.billing.services.subscription_service import (
SubscriptionService,
subscription_service,
)
from app.modules.billing.services.stripe_service import (
StripeService,
stripe_service,
)
from app.modules.billing.services.admin_subscription_service import (
AdminSubscriptionService,
admin_subscription_service,
)
from app.modules.billing.services.billing_service import (
BillingService,
billing_service,
)
from app.modules.billing.exceptions import (
BillingServiceError,
PaymentSystemNotConfiguredError,
TierNotFoundError,
StripePriceNotConfiguredError,
NoActiveSubscriptionError,
SubscriptionNotCancelledError,
)
from app.modules.billing.services.feature_service import (
FeatureService,
feature_service,
FeatureInfo,
FeatureUpgradeInfo,
FeatureCode,
)
from app.modules.billing.services.capacity_forecast_service import (
CapacityForecastService,
capacity_forecast_service,
)
from app.modules.billing.services.platform_pricing_service import (
PlatformPricingService,
platform_pricing_service,
)
__all__ = [
"SubscriptionService",
"subscription_service",
"StripeService",
"stripe_service",
"AdminSubscriptionService",
"admin_subscription_service",
"BillingService",
"billing_service",
"BillingServiceError",
"PaymentSystemNotConfiguredError",
"TierNotFoundError",
"StripePriceNotConfiguredError",
"NoActiveSubscriptionError",
"SubscriptionNotCancelledError",
"FeatureService",
"feature_service",
"FeatureInfo",
"FeatureUpgradeInfo",
"FeatureCode",
"CapacityForecastService",
"capacity_forecast_service",
"PlatformPricingService",
"platform_pricing_service",
]