示例#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));
        }
示例#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));
        }
示例#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));
        }
示例#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));
        }
示例#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));
        }
示例#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));
        }
示例#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));
        }
示例#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));
        }
示例#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));
        }
示例#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));
        }
示例#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);
        }
示例#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));
        }
示例#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));
        }