This commit is contained in:
zman 2025-02-16 22:49:18 -05:00
parent 92d1356c0e
commit 721b26ce97
2 changed files with 12 additions and 11 deletions

View File

@ -126,15 +126,16 @@ class PricingService:
# Apply pricing rules # Apply pricing rules
if tcg_market_price < 1 and tcg_market_price > 0.25: if tcg_market_price < 1 and tcg_market_price > 0.25:
new_price = tcg_market_price new_price = tcg_market_price * 1.05
elif tcg_market_price < 0.25: elif tcg_market_price < 0.25:
new_price = 0.25 new_price = 0.25
elif tcg_low < 5 or tcg_low_shipping < 5: elif tcg_low < 5 or tcg_low_shipping < 5:
new_price = round(tcg_low+((abs(tcg_market_price-tcg_low))/2), 2) new_price = round(tcg_low+((abs(tcg_market_price-tcg_low))*.75), 2)
elif tcg_low_shipping > 20: elif tcg_low_shipping > 20:
new_price = round(tcg_low_shipping * 1.0125, 2) new_price = round(tcg_low_shipping * 1.0125, 2)
else: else:
new_price = round(tcg_low_shipping * 1.08, 2) # new_price = round(tcg_low_shipping * 1.08, 2)
new_price = round(tcg_market_price * 1.03)
# if new price is less than half of market price, set to 90% market # if new price is less than half of market price, set to 90% market
if new_price < (tcg_market_price / 2): if new_price < (tcg_market_price / 2):
new_price = round(tcg_market_price * 0.85, 2) new_price = round(tcg_market_price * 0.85, 2)

View File

@ -2,16 +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": ["6ffe2071-a4b4-41c3-a4af-7ec3c9ec7e2e"]}' \ -d '{"open_box_ids": ["fb629d9d-13d2-405e-9a69-6c44294d55de"]}' \
--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=draft" \ -F "type=draft" \
-F "set_code=MH3" \ -F "set_code=CLB" \
-F "sku=195166254661" \ -F "sku=195166181127" \
-F "num_cards_expected=100" -F "num_cards_expected=480"
curl -X POST "http://192.168.1.41:8000/api/boxes/e4793e02-fe42-474f-ad9a-cce0269b0cd7/open" \ curl -X POST "http://192.168.1.41:8000/api/boxes/0d31b9c3-3093-438a-9e8c-b6b70a2d437e/open" \
-F "product_id=e4793e02-fe42-474f-ad9a-cce0269b0cd7" \ -F "product_id=0d31b9c3-3093-438a-9e8c-b6b70a2d437e" \
-F "file_ids=0a009077-ae32-4ada-9414-4c16de4db3f5" \ -F "file_ids=bb4a022c-5427-49b5-b57c-0147b5e9c4a9" \
-F "date_opened=2025-02-14" -F "date_opened=2025-02-15"