From f652b108f400f62266c659e816a2649e85a60c16 Mon Sep 17 00:00:00 2001 From: C <0xicl33n@gmail.com> Date: Sun, 4 Jan 2026 14:08:10 -0800 Subject: [PATCH] whoops --- src/asquare.py | 3 ++- src/list_categories.py | 11 +++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/asquare.py b/src/asquare.py index 84541a5..356a6c9 100644 --- a/src/asquare.py +++ b/src/asquare.py @@ -298,7 +298,8 @@ async def update_itm(item_id: str, lego_set: dict, item_data: dict = None): "amount": price_in_cents, "currency": "USD", }, - "sku": set_upc if set_upc else None, + "sku": set_number, # LEGO set number (e.g., "10338") + "upc": set_upc if set_upc else None, # Barcode/GTIN }, } diff --git a/src/list_categories.py b/src/list_categories.py index 51ab61a..22e25e1 100644 --- a/src/list_categories.py +++ b/src/list_categories.py @@ -4,7 +4,8 @@ List all Square categories with their IDs to help identify the correct LEGO cate import asyncio import json -from asquare import client +from . import asquare +from . import get_sq_env async def list_categories(): @@ -30,7 +31,7 @@ async def list_categories(): if cursor: search_params["cursor"] = cursor - result = await client.catalog.search(**search_params) + result = await asquare.client.catalog.search(**search_params) result_json = json.loads(result.model_dump_json()) if not result_json.get("objects"): @@ -47,7 +48,7 @@ async def list_categories(): print(f" ID: {category_id}") # Count items in this category - items_result = await client.catalog.search( + items_result = await asquare.client.catalog.search( object_types=["ITEM"], query={ "exact_query": { @@ -72,9 +73,7 @@ async def list_categories(): print("=" * 60 + "\n") # Show current configured category - from get_sq_env import LEGO_CAT_ID - - print(f"Currently configured LEGO_CAT_ID: {LEGO_CAT_ID}") + print(f"Currently configured LEGO_CAT_ID: {get_sq_env.LEGO_CAT_ID}") print("\nUpdate .env file with the correct category ID if needed:") print('SQUARE_LEGO_CAT_ID = "YOUR_CATEGORY_ID_HERE"') print()