ai-lls-lib 1.3.0__tar.gz → 1.3.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. {ai_lls_lib-1.3.0 → ai_lls_lib-1.3.2}/PKG-INFO +1 -1
  2. {ai_lls_lib-1.3.0 → ai_lls_lib-1.3.2}/pyproject.toml +1 -1
  3. {ai_lls_lib-1.3.0 → ai_lls_lib-1.3.2}/src/ai_lls_lib/__init__.py +1 -1
  4. {ai_lls_lib-1.3.0 → ai_lls_lib-1.3.2}/src/ai_lls_lib/payment/credit_manager.py +19 -0
  5. {ai_lls_lib-1.3.0 → ai_lls_lib-1.3.2}/src/ai_lls_lib/payment/stripe_manager.py +6 -5
  6. {ai_lls_lib-1.3.0 → ai_lls_lib-1.3.2}/README.md +0 -0
  7. {ai_lls_lib-1.3.0 → ai_lls_lib-1.3.2}/src/ai_lls_lib/auth/__init__.py +0 -0
  8. {ai_lls_lib-1.3.0 → ai_lls_lib-1.3.2}/src/ai_lls_lib/auth/context_parser.py +0 -0
  9. {ai_lls_lib-1.3.0 → ai_lls_lib-1.3.2}/src/ai_lls_lib/cli/__init__.py +0 -0
  10. {ai_lls_lib-1.3.0 → ai_lls_lib-1.3.2}/src/ai_lls_lib/cli/__main__.py +0 -0
  11. {ai_lls_lib-1.3.0 → ai_lls_lib-1.3.2}/src/ai_lls_lib/cli/aws_client.py +0 -0
  12. {ai_lls_lib-1.3.0 → ai_lls_lib-1.3.2}/src/ai_lls_lib/cli/commands/__init__.py +0 -0
  13. {ai_lls_lib-1.3.0 → ai_lls_lib-1.3.2}/src/ai_lls_lib/cli/commands/admin.py +0 -0
  14. {ai_lls_lib-1.3.0 → ai_lls_lib-1.3.2}/src/ai_lls_lib/cli/commands/cache.py +0 -0
  15. {ai_lls_lib-1.3.0 → ai_lls_lib-1.3.2}/src/ai_lls_lib/cli/commands/stripe.py +0 -0
  16. {ai_lls_lib-1.3.0 → ai_lls_lib-1.3.2}/src/ai_lls_lib/cli/commands/test_stack.py +0 -0
  17. {ai_lls_lib-1.3.0 → ai_lls_lib-1.3.2}/src/ai_lls_lib/cli/commands/verify.py +0 -0
  18. {ai_lls_lib-1.3.0 → ai_lls_lib-1.3.2}/src/ai_lls_lib/cli/env_loader.py +0 -0
  19. {ai_lls_lib-1.3.0 → ai_lls_lib-1.3.2}/src/ai_lls_lib/core/__init__.py +0 -0
  20. {ai_lls_lib-1.3.0 → ai_lls_lib-1.3.2}/src/ai_lls_lib/core/cache.py +0 -0
  21. {ai_lls_lib-1.3.0 → ai_lls_lib-1.3.2}/src/ai_lls_lib/core/models.py +0 -0
  22. {ai_lls_lib-1.3.0 → ai_lls_lib-1.3.2}/src/ai_lls_lib/core/processor.py +0 -0
  23. {ai_lls_lib-1.3.0 → ai_lls_lib-1.3.2}/src/ai_lls_lib/core/verifier.py +0 -0
  24. {ai_lls_lib-1.3.0 → ai_lls_lib-1.3.2}/src/ai_lls_lib/payment/__init__.py +0 -0
  25. {ai_lls_lib-1.3.0 → ai_lls_lib-1.3.2}/src/ai_lls_lib/payment/models.py +0 -0
  26. {ai_lls_lib-1.3.0 → ai_lls_lib-1.3.2}/src/ai_lls_lib/payment/webhook_processor.py +0 -0
  27. {ai_lls_lib-1.3.0 → ai_lls_lib-1.3.2}/src/ai_lls_lib/providers/__init__.py +0 -0
  28. {ai_lls_lib-1.3.0 → ai_lls_lib-1.3.2}/src/ai_lls_lib/providers/base.py +0 -0
  29. {ai_lls_lib-1.3.0 → ai_lls_lib-1.3.2}/src/ai_lls_lib/providers/external.py +0 -0
  30. {ai_lls_lib-1.3.0 → ai_lls_lib-1.3.2}/src/ai_lls_lib/providers/stub.py +0 -0
  31. {ai_lls_lib-1.3.0 → ai_lls_lib-1.3.2}/src/ai_lls_lib/testing/__init__.py +0 -0
  32. {ai_lls_lib-1.3.0 → ai_lls_lib-1.3.2}/src/ai_lls_lib/testing/fixtures.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: ai-lls-lib
3
- Version: 1.3.0
3
+ Version: 1.3.2
4
4
  Summary: Landline Scrubber core library - phone verification and DNC checking
5
5
  Author: LandlineScrubber Team
6
6
  Requires-Python: >=3.12,<4.0
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "ai-lls-lib"
3
- version = "1.3.0"
3
+ version = "1.3.2"
4
4
  description = "Landline Scrubber core library - phone verification and DNC checking"
5
5
  authors = ["LandlineScrubber Team"]
6
6
  readme = "README.md"
@@ -13,7 +13,7 @@ from ai_lls_lib.core.verifier import PhoneVerifier
13
13
  from ai_lls_lib.core.processor import BulkProcessor
14
14
  from ai_lls_lib.core.cache import DynamoDBCache
15
15
 
16
- __version__ = "1.3.0"
16
+ __version__ = "1.3.2"
17
17
  __all__ = [
18
18
  "PhoneVerification",
19
19
  "BulkJob",
@@ -172,3 +172,22 @@ class CreditManager:
172
172
  """Check if user has unlimited access via active subscription."""
173
173
  info = self.get_user_payment_info(user_id)
174
174
  return info.get("subscription_status") == "active"
175
+
176
+ def set_stripe_customer_id(self, user_id: str, stripe_customer_id: str) -> None:
177
+ """Store Stripe customer ID for a user."""
178
+ if not self.table:
179
+ return # Mock for testing
180
+
181
+ try:
182
+ self.table.update_item(
183
+ Key={"user_id": user_id},
184
+ UpdateExpression="SET stripe_customer_id = :customer_id, updated_at = :now",
185
+ ExpressionAttributeValues={
186
+ ":customer_id": stripe_customer_id,
187
+ ":now": datetime.utcnow().isoformat()
188
+ }
189
+ )
190
+ logger.info(f"Stored Stripe customer ID {stripe_customer_id} for user {user_id}")
191
+ except ClientError as e:
192
+ logger.error(f"Error storing Stripe customer ID for {user_id}: {e}")
193
+ raise
@@ -97,7 +97,8 @@ class StripeManager:
97
97
 
98
98
  return {
99
99
  "client_secret": setup_intent.client_secret,
100
- "setup_intent_id": setup_intent.id
100
+ "setup_intent_id": setup_intent.id,
101
+ "customer_id": customer.id
101
102
  }
102
103
 
103
104
  except stripe.error.StripeError as e:
@@ -444,7 +445,7 @@ class StripeManager:
444
445
  """Return mock plans for development/testing."""
445
446
  return [
446
447
  Plan(
447
- plan_reference="79541679412215",
448
+ plan_reference="price_standard_mock",
448
449
  plan_type="prepaid",
449
450
  plan_name="STANDARD",
450
451
  plan_subtitle="One-time purchase",
@@ -454,7 +455,7 @@ class StripeManager:
454
455
  percent_off=""
455
456
  ),
456
457
  Plan(
457
- plan_reference="79541679412216",
458
+ plan_reference="price_power_mock",
458
459
  plan_type="prepaid",
459
460
  plan_name="POWER",
460
461
  plan_subtitle="Best value",
@@ -464,7 +465,7 @@ class StripeManager:
464
465
  percent_off="12.5% OFF"
465
466
  ),
466
467
  Plan(
467
- plan_reference="79541679412217",
468
+ plan_reference="price_elite_mock",
468
469
  plan_type="prepaid",
469
470
  plan_name="ELITE",
470
471
  plan_subtitle="Maximum savings",
@@ -474,7 +475,7 @@ class StripeManager:
474
475
  percent_off="25% OFF"
475
476
  ),
476
477
  Plan(
477
- plan_reference="price_unlimited",
478
+ plan_reference="price_unlimited_mock",
478
479
  plan_type="postpaid",
479
480
  plan_name="UNLIMITED",
480
481
  plan_subtitle="Monthly subscription",
File without changes