price
This commit is contained in:
parent
af0e789ec9
commit
511d4dbcee
@ -117,6 +117,7 @@ class PricingService:
|
|||||||
"""Default pricing algorithm with complex pricing rules"""
|
"""Default pricing algorithm with complex pricing rules"""
|
||||||
tcg_low = row.get('tcg_low_price')
|
tcg_low = row.get('tcg_low_price')
|
||||||
tcg_low_shipping = row.get('tcg_low_price_with_shipping')
|
tcg_low_shipping = row.get('tcg_low_price_with_shipping')
|
||||||
|
tcg_market_price = row.get('tcg_market_price')
|
||||||
|
|
||||||
if pd.isna(tcg_low) or pd.isna(tcg_low_shipping):
|
if pd.isna(tcg_low) or pd.isna(tcg_low_shipping):
|
||||||
logger.warning(f"Missing pricing data for row: {row}")
|
logger.warning(f"Missing pricing data for row: {row}")
|
||||||
@ -124,14 +125,17 @@ class PricingService:
|
|||||||
return row
|
return row
|
||||||
|
|
||||||
# Apply pricing rules
|
# Apply pricing rules
|
||||||
if tcg_low < 0.35:
|
if tcg_low < 0.35 and tcg_market_price < 1:
|
||||||
new_price = 0.35
|
new_price = 0.35
|
||||||
elif tcg_low < 5 or tcg_low_shipping < 5:
|
elif tcg_low < 5 or tcg_low_shipping < 5:
|
||||||
new_price = round(tcg_low * 1.25, 2)
|
new_price = round(tcg_low_shipping * .85, 2)
|
||||||
elif tcg_low_shipping > 25:
|
elif tcg_low_shipping > 20:
|
||||||
new_price = round(tcg_low_shipping * 1.025, 2)
|
new_price = round(tcg_low_shipping * 1.0125, 2)
|
||||||
else:
|
else:
|
||||||
new_price = round(tcg_low_shipping * 1.10, 2)
|
new_price = round(tcg_low_shipping * 1.10, 2)
|
||||||
|
# if new price is less than half of market price, set to 90% market
|
||||||
|
if new_price < (tcg_market_price / 2):
|
||||||
|
new_price = round(tcg_market_price * 0.85, 2)
|
||||||
|
|
||||||
row['new_price'] = new_price
|
row['new_price'] = new_price
|
||||||
return row
|
return row
|
||||||
|
6
dns.txt
Normal file
6
dns.txt
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
@ IN MX 1 aspmx.l.google.com.
|
||||||
|
@ IN MX 5 alt1.aspmx.l.google.com.
|
||||||
|
@ IN MX 5 alt2.aspmx.l.google.com.
|
||||||
|
@ IN MX 10 alt3.aspmx.l.google.com.
|
||||||
|
@ IN MX 10 alt4.aspmx.l.google.com.
|
||||||
|
@ IN TXT "v=spf1 include:_spf.google.com ~all"
|
23
requests.md
23
requests.md
@ -2,21 +2,16 @@ curl -J http://192.168.1.41:8000/api/tcgplayer/inventory/update --remote-name
|
|||||||
|
|
||||||
curl -J -X POST http://192.168.1.41:8000/api/tcgplayer/inventory/add \
|
curl -J -X POST http://192.168.1.41:8000/api/tcgplayer/inventory/add \
|
||||||
-H "Content-Type: application/json" \
|
-H "Content-Type: application/json" \
|
||||||
-d '{"open_box_ids": ["620fdeec-072d-4dd3-aef0-8a8a66de0c5f"]}' \
|
-d '{"open_box_ids": ["4ccd2005-edd2-4764-9599-0d863be72034"]}' \
|
||||||
--remote-name
|
--remote-name
|
||||||
|
|
||||||
curl -X POST http://192.168.1.41:8000/api/boxes \
|
curl -X POST http://192.168.1.41:8000/api/boxes \
|
||||||
-F "type=play" \
|
-F "type=draft" \
|
||||||
-F "set_code=FDN" \
|
-F "set_code=LCI" \
|
||||||
-F "sku=195166261782" \
|
-F "sku=195166229669" \
|
||||||
-F "num_cards_expected=540"
|
-F "num_cards_expected=541"
|
||||||
|
|
||||||
curl -X POST "http://192.168.1.41:8000/api/boxes/588dddad-0661-4541-a16c-beba1c564b4f/open" \
|
curl -X POST "http://192.168.1.41:8000/api/boxes/35ec0beb-1f59-448d-a6ea-1189b804607b/open" \
|
||||||
-F "product_id=588dddad-0661-4541-a16c-beba1c564b4f" \
|
-F "product_id=35ec0beb-1f59-448d-a6ea-1189b804607b" \
|
||||||
-F "file_ids=b06c8808-d024-4bb4-8b77-89d4f8b92938" \
|
-F "file_ids=2b71ce17-3c8d-4483-a4d9-e59dc76f3a23" \
|
||||||
-F "file_ids=8349456c-d588-4c50-bfd4-f5895d3b4a43" \
|
-F "date_opened=2025-02-12"
|
||||||
-F "file_ids=33fee9cf-790a-4f50-91b9-dfdf1adc75c7" \
|
|
||||||
-F "file_ids=12f848c7-80b9-4ce2-8be8-1f36e714bd6f" \
|
|
||||||
-F "file_ids=f5b6513c-97e3-423c-9f4d-73f058529e4f" \
|
|
||||||
-F "file_ids=995249ac-97df-40be-a779-3acca32eb186" \
|
|
||||||
-F "date_opened=2025-02-10"
|
|
Loading…
x
Reference in New Issue
Block a user