{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "# python3 -m pip install python-dotenv\n",
    "# python3 -m pip install requests\n",
    "### THEN restart the Jupyter kernel\n",
    "\n",
    "from api import BigApi\n",
    "BigApi.init(\".admin.env\")\n",
    "BigApi.adminLogin()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "1. Get the two order names from shopify and insert them below:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "beyondShopifyOrderName = \"#\"\n",
    "lensOnlyShopifyOrderName = \"#\"\n",
    "\n",
    "data = BigApi.adminPost(\"/admin/shop/shopify_orders/pair\", {\n",
    "    \"beyondShopifyOrderName\": beyondShopifyOrderName, \n",
    "    \"lensOnlyShopifyOrderName\": lensOnlyShopifyOrderName\n",
    "})"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "2. Refresh the big order"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "bigOrderId = \"21yNbtDk2ja09Jzz\"\n",
    "\n",
    "data = BigApi.adminGet(f\"/admin/shop/order/{bigOrderId}/refresh\");\n",
    "data"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "bigOrderIdToDelete=\"21yNbtDk2ja09Jzz\"\n",
    "data = BigApi.adminDelete(f\"/admin/shop/order/{bigOrderIdToDelete}\");\n",
    "data"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.11"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
