Ejemplo n.º 1
0
        public async Task <DownloadList> GetCustomerDownloads(int id, Dictionary <string, string> parms = null)
        {
            string json = await API.GetRestful("customers/" + id.ToString() + "/downloads", parms);

            json = json.Substring(json.IndexOf(':') + 1, json.Length - json.IndexOf(':') - 2);
            return(RestAPI.DeserializeJSon <DownloadList>(json));
        }
Ejemplo n.º 2
0
        public async Task <OrderList> GetOrders(Dictionary <string, string> parms = null)
        {
            string json = await API.SendHttpClientRequest("orders", RequestMethod.GET, string.Empty, parms);

            json = json.Substring(json.IndexOf(':') + 1, json.Length - json.IndexOf(':') - 2);
            return(RestAPI.DeserializeJSon <OrderList>(json));
        }
Ejemplo n.º 3
0
        public async Task <WebhookDelivery> GetWebhookDelivery(int webhookid, int deliveryid, Dictionary <string, string> parms = null)
        {
            string json = await API.GetRestful("webhooks/" + webhookid.ToString() + "/deliveries/" + deliveryid.ToString(), parms);

            json = json.Substring(json.IndexOf(':') + 1, json.Length - json.IndexOf(':') - 2);
            return(RestAPI.DeserializeJSon <WebhookDelivery>(json));
        }
Ejemplo n.º 4
0
        public async Task <Customer> GetCustomerByEmail(string email, Dictionary <string, string> parms = null)
        {
            string json = await API.SendHttpClientRequest("customers/email/" + email, RequestMethod.GET, string.Empty, parms);

            json = json.Substring(json.IndexOf(':') + 1, json.Length - json.IndexOf(':') - 2);
            return(RestAPI.DeserializeJSon <Customer>(json));
        }
Ejemplo n.º 5
0
        public async Task <List <string> > GetTopSellerReport(Dictionary <string, string> parms = null)
        {
            string json = await API.SendHttpClientRequest("reports/sales/top_sellers", RequestMethod.GET, string.Empty, parms);

            json = json.Substring(json.IndexOf(':') + 1, json.Length - json.IndexOf(':') - 2);
            return(RestAPI.DeserializeJSon <List <string> >(json));
        }
Ejemplo n.º 6
0
        public async Task <WebhookDeliveryList> GetWebhookDeliveries(int webhookid, Dictionary <string, string> parms = null)
        {
            string json = await API.SendHttpClientRequest("webhooks/" + webhookid.ToString() + "/deliveries", RequestMethod.GET, string.Empty, parms);

            json = json.Substring(json.IndexOf(':') + 1, json.Length - json.IndexOf(':') - 2);
            return(RestAPI.DeserializeJSon <WebhookDeliveryList>(json));
        }
Ejemplo n.º 7
0
        public async Task <Product_Category> GetProductCategory(int categoryid, Dictionary <string, string> parms = null)
        {
            string json = await API.SendHttpClientRequest("products/categories/" + categoryid.ToString(), RequestMethod.GET, string.Empty, parms);

            json = json.Substring(json.IndexOf(':') + 1, json.Length - json.IndexOf(':') - 2);
            return(RestAPI.DeserializeJSon <Product_Category>(json));
        }
Ejemplo n.º 8
0
        public async Task <Coupon> GetCoupon(string code, Dictionary <string, string> parms = null)
        {
            string json = await API.SendHttpClientRequest("coupons/code/" + code, RequestMethod.GET, string.Empty, parms);

            json = json.Substring(json.IndexOf(':') + 1, json.Length - json.IndexOf(':') - 2);
            return(RestAPI.DeserializeJSon <Coupon>(json));
        }
Ejemplo n.º 9
0
        public async Task <ProductReviewList> GetProductReviews(int productid, Dictionary <string, string> parms = null)
        {
            string json = await API.SendHttpClientRequest("products/" + productid.ToString() + "/reviews", RequestMethod.GET, string.Empty, parms);

            json = json.Substring(json.IndexOf(':') + 1, json.Length - json.IndexOf(':') - 2);
            return(RestAPI.DeserializeJSon <ProductReviewList>(json));
        }
Ejemplo n.º 10
0
        public async Task <Order_Refund> GetOrderRefund(int orderid, int refundid, Dictionary <string, string> parms = null)
        {
            string json = await API.SendHttpClientRequest("orders/" + orderid.ToString() + "/refunds/" + refundid.ToString(), RequestMethod.GET, string.Empty, parms);

            json = json.Substring(json.IndexOf(':') + 1, json.Length - json.IndexOf(':') - 2);
            return(RestAPI.DeserializeJSon <Order_Refund>(json));
        }
Ejemplo n.º 11
0
        public async Task <Store> GetStoreInfo()
        {
            string json = await API.SendHttpClientRequest(string.Empty, RequestMethod.GET, string.Empty);

            json = json.Substring(json.IndexOf(':') + 1, json.Length - json.IndexOf(':') - 2);
            Store store = RestAPI.DeserializeJSon <Store>(json);

            store.WCRoutes = store.GetRoutes(json);
            return(store);
        }
Ejemplo n.º 12
0
        public async Task <List <T1> > GetCoupons(Dictionary <string, string> parms = null)
        {
            string json = await API.SendHttpClientRequest("coupons", RequestMethod.GET, string.Empty, parms);

            return(API.DeserializeJSon <List <T1> >(json));
        }
Ejemplo n.º 13
0
        public async Task <CustomerList> GetCustomers(Dictionary <string, string> parms = null)
        {
            string json = await API.SendHttpClientRequest("customers", RequestMethod.GET, string.Empty, parms);

            return(API.DeserializeJSon <CustomerList>(json));
        }