nutcas3
|
8b86e55226
|
feat: Refactor charging engine modules with dead_code annotations and error handling improvements
- Add AsyncCommands import and dead_code attributes to get_balance/add_credit/start/stop/uptime/rating plan methods
- Remove validate_imsi/validate_session_id calls from get_subscriber_account/record_usage_event
- Update logging in get_subscriber_account and simplify record_usage_event log message
- Remove usage event expiration logic from record_usage_event
- Reorder engine methods and add dead_code attributes
|
2026-04-25 02:10:24 +03:00 |
|
nutcas3
|
181ddf2969
|
feat: Add public re-exports for ChargingError and helper functions to errors module
- Add ChargingError re-export from types
- Add log_error/validate_amount/validate_bytes/validate_imsi/validate_ip/validate_session_id/ChargingResult/ErrorContext re-exports from helpers
|
2026-04-25 00:48:41 +03:00 |
|
nutcas3
|
c63c92245f
|
refactor: Reorganize charging and errors modules into proper directory structure
- Move charging module files into charging/ directory (types.rs, engine.rs, credit_management.rs, rating_billing.rs)
- Move error module files into errors/ directory (types.rs, helpers.rs)
- Create mod.rs files for charging and errors modules with simplified exports
- Update import paths to use super:: for intra-module references
- Remove charging_new/errors_new aliases and use charging/errors directly
- Simplify module
|
2026-04-14 16:29:27 +03:00 |
|
nutcas3
|
577f625bbd
|
refactor: Split error handling into separate modules for better code organization
- Move ChargingError enum and IntoResponse implementation to error_types.rs
- Move ChargingResult, ErrorContext trait, validation functions, error conversions, and logging to error_helpers.rs
- Keep module declarations and re-exports in errors.rs
- Add validate_imsi, validate_session_id, and validate_amount validation helpers
- Add log_error helper for structured error logging with tracing
- Update error variants:
|
2026-04-14 16:22:56 +03:00 |
|
nutcas3
|
f10d180bf4
|
feat: Add charging engine with Redis-based credit management and usage tracking
- Add ChargingEngine struct with Redis client, rating plans, and sync interval
- Add SubscriberAccount model with balance, data/voice/SMS limits and usage tracking
- Add UsageEvent model for billing events with cost calculation
- Add RatingPlan model with data/voice/SMS rates and limits
- Add AccountStatus enum (Active, Suspended, Terminated, Blocked)
- Add UsageType enum (Data, Voice, SMS)
- Add sync_usage_data for
|
2026-04-14 15:53:14 +03:00 |
|