ai-lls-lib 1.3.0__py3-none-any.whl → 1.3.2__py3-none-any.whl

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.
ai_lls_lib/__init__.py CHANGED
@@ -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",
@@ -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,4 +1,4 @@
1
- ai_lls_lib/__init__.py,sha256=qeDhkuaSaxKB6Moq7QFQcEkVg-preOmw_-zvG41ORc4,584
1
+ ai_lls_lib/__init__.py,sha256=x0cav2ZOwvsvJ4kkxxNUxpQwIywlTtlXwRvV7P45SDY,584
2
2
  ai_lls_lib/auth/__init__.py,sha256=c6zomHSB6y9Seakf84ciGsD3XgWarIty9xty6P8fxVw,194
3
3
  ai_lls_lib/auth/context_parser.py,sha256=8I0vGbtykNLWqm8ldedxXjE-E3nqsCy113JgeyuiJoM,2222
4
4
  ai_lls_lib/cli/__init__.py,sha256=m9qjZTW1jpENwXAUeuRrlP0b66BWRcqSO28MSjvOyCs,74
@@ -17,9 +17,9 @@ ai_lls_lib/core/models.py,sha256=ABRYaeMCWahQh4WdbkCxt3AO0-EvPWZwlL-JITQSnEM,238
17
17
  ai_lls_lib/core/processor.py,sha256=6752IPDQ-Mz5i_CU7aBM0UjvV7IjyZFl35LKVPkHMpc,9974
18
18
  ai_lls_lib/core/verifier.py,sha256=6uB_jawWoIqsNYAadTKr0lSolIWygg2gK6ykf8lrul0,2716
19
19
  ai_lls_lib/payment/__init__.py,sha256=xhUWgfLnk3syXXQItswmDXdfXUyJTXTQAA0zIUuCVII,295
20
- ai_lls_lib/payment/credit_manager.py,sha256=TDrdW7BYjhtlg8MX_EJEnMNct1SU_6Tdb_k19_e8kpo,6343
20
+ ai_lls_lib/payment/credit_manager.py,sha256=ynjweRkbdHI-A6fROUoqlazNDmXOugXsIaMco7k62S0,7147
21
21
  ai_lls_lib/payment/models.py,sha256=JjSmWKwpuFF85Jzmabj6y7UyolJlJlsh5CmOWRg21B8,3339
22
- ai_lls_lib/payment/stripe_manager.py,sha256=Yc-2gAlGIf1EtBPpVUAQYH7oyis2Fk8k_9qAwoWtlYE,17969
22
+ ai_lls_lib/payment/stripe_manager.py,sha256=R_M4Bii9BGianL_STqvz4UU8ww8mlCByGo66V-e2C6Y,18027
23
23
  ai_lls_lib/payment/webhook_processor.py,sha256=cIZqCS98Q305SCI3-4AJ1h-IJ-l-7fMby1FFy1ckP6k,8765
24
24
  ai_lls_lib/providers/__init__.py,sha256=AEv3ARenWDwDo5PLCoszP2fQ70RgSHkrSLSUz7xHJDk,179
25
25
  ai_lls_lib/providers/base.py,sha256=344XYOg7bxDQMWJ6Lle8U7NOHpabnCp0XYbZpeWpPAk,681
@@ -27,7 +27,7 @@ ai_lls_lib/providers/external.py,sha256=-Hhnlm8lQWRcWr5vG0dmD3sca2rohURrx0usOR2y
27
27
  ai_lls_lib/providers/stub.py,sha256=847Tmw522B3HQ2j38BH1sdcZQy--RdtDcXsrIrFKNBQ,1150
28
28
  ai_lls_lib/testing/__init__.py,sha256=RUxRYBzzPCPS15Umb6bUrE6rL5BQXBQf4SJM2E3ffrg,39
29
29
  ai_lls_lib/testing/fixtures.py,sha256=_n6bbr95LnQf9Dvu1qKs2HsvHEA7AAbe59B75qxE10w,3310
30
- ai_lls_lib-1.3.0.dist-info/METADATA,sha256=3rY5rpASz-JFelJRnWL9yM9o9vrFfRuu4AuGn0IcyXE,7248
31
- ai_lls_lib-1.3.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
32
- ai_lls_lib-1.3.0.dist-info/entry_points.txt,sha256=Pi0V_HBViEKGFbNQKatl5lhhnHHBXlxaom-5gH9gXZ0,55
33
- ai_lls_lib-1.3.0.dist-info/RECORD,,
30
+ ai_lls_lib-1.3.2.dist-info/METADATA,sha256=xXK28otz6yXx_MTWyyAxmbR1kn02dXlQY0J9I7NA36g,7248
31
+ ai_lls_lib-1.3.2.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
32
+ ai_lls_lib-1.3.2.dist-info/entry_points.txt,sha256=Pi0V_HBViEKGFbNQKatl5lhhnHHBXlxaom-5gH9gXZ0,55
33
+ ai_lls_lib-1.3.2.dist-info/RECORD,,