Ejemplo n.º 1
0
    public static IEnumerable Shop_GetOrders(string StoreName, string APIKey, string Password, string OrderStatus = null, string FulfillmentStatus = null, string FinancialStatus = null, int Page = 1)
    {
        ShopifyClient sp = new ShopifyClient(StoreName, APIKey, Password);
        eOrderStatus _os = eOrderStatus.any;
        eFulfillmentStatus _fus = eFulfillmentStatus.any;
        eOrderFinancialStatus _fis = eOrderFinancialStatus.any;

        if (OrderStatus != null)
        {
            if (Enum.TryParse(OrderStatus, out _os))
                _os = (eOrderStatus)Enum.Parse(typeof(eOrderStatus), OrderStatus);
        }

        if (FulfillmentStatus != null)
        {
            if (Enum.TryParse(FulfillmentStatus, out _fus))
                _fus = (eFulfillmentStatus)Enum.Parse(typeof(eFulfillmentStatus), FulfillmentStatus);
        }

        if (FinancialStatus != null)
        {
            if (Enum.TryParse(FinancialStatus, out _fis))
                _fis = (eOrderFinancialStatus)Enum.Parse(typeof(eOrderFinancialStatus), FinancialStatus);
        }

        return sp.GetOrders(_os, _fus, _fis, Page);
    }
Ejemplo n.º 2
0
        private void GetSPOrders()
        {
            sp = new ShopifyClient(_storename, _apikey, _password);
            List<SIOrder> prods = sp.GetOrders(eOrderStatus.cancelled, eFulfillmentStatus.any, eOrderFinancialStatus.any, 1);

            txtRawData_Copy.Clear();
            foreach (SIOrder sip in prods)
            {
                txtRawData_Copy.Text += String.Format("orderID: {0}| number: {1}| checkoutid: {2}\n", sip.id, sip.order_number, sip.checkout_id);
            }
        }