removed timeout from send_request and added promo options to product metadata

This commit is contained in:
TPV committed 2026-07-26 14:09:05 -07:00
1 parent 4b63a2d39c
commit b876c3d7b3
3 files changed
+71 -3

No files matched your search

+14
View File
@@ -97,6 +97,16 @@ class ProductMetadata:
overstock_text: Overstock label text when present.
percentage: Computed discount percentage.
affiliate_url: Affiliate link when available.
promo_code: Event-level checkout code (e.g. "BIRTHDAY26") when the
product's event advertises one, else None.
promo_percentage: Advertised percent off from a percentage code
("extra 22% off" -> 22); None for dollar codes or no code. This is
the claimed discount, not the actual price delta.
promo_dollar_off: Advertised dollar amount off from a spend-threshold
code ("get an extra $22 off" -> 22); None for percentage codes or
no code. Pairs with promo_min_spend.
promo_min_spend: Spend threshold a dollar code requires ("Spend $100"
-> 100); None unless promo_dollar_off is set.
"""
image_url: str | None = None
@@ -106,6 +116,10 @@ class ProductMetadata:
overstock_text: str | None = None
percentage: int | None = None
affiliate_url: str | None = None
promo_code: str | None = None
promo_percentage: int | None = None
promo_dollar_off: int | None = None
promo_min_spend: int | None = None
@dataclass