public WeixinResult Update() { string url = WeUtil.GetUrl(WeShopConst.UPDATE_SHELF_URL); var reuslt = WeUtil.PostToUri(url, this.WriteJson(), new WeixinResult()); return(reuslt); }
public WeThirdPartyGetAgentResponse get_agent() { string url = WeCorpUtil.GetCorpUrl(WeThirdPartyConst.GET_AGENT, WeixinSettings.Current.CorpUserManagerSecret); var result = WeUtil.PostToUri(url, this.WriteJson(), new WeThirdPartyGetAgentResponse()); return(result); }
public WeixinResult Update() { string url = WeCorpUtil.GetCorpUrl(WeCorpConst.UPDATE_DEPARTMENT, WeixinSettings.Current.CorpUserManagerSecret); return(WeUtil.PostToUri(url, this.WriteJson(WeConst.WRITE_SETTINGS), new WeixinResult())); }
public long Send() { string url = WeUtil.GetUrl(WeConst.GROUP_MASS_MESSAGE_URL); var msg = WeUtil.PostToUri(url, this.WriteJson(), new MassMessageResult()); return(msg.ResultId); }
public static WeServer <T> Query <T>(string query, string category, float latitude, float longitude) { WeSemanticRequest request = new WeSemanticRequest(query, category, latitude, longitude); WeServer <T> result = WeUtil.PostToUri(url, request.WriteJson(), new WeServer <T>()); return(result); }
public WeixinResult UpdateProducts(IEnumerable <string> insertProducts, IEnumerable <string> deleteProducts) { WeGroupProductActionList request = new WeGroupProductActionList { GroupId = GroupId }; if (insertProducts != null) { var added = from item in insertProducts select new WeGroupProductAction(item, GroupAction.Add); request.Product.AddRange(added); } if (deleteProducts != null) { var deleted = from item in deleteProducts select new WeGroupProductAction(item, GroupAction.Remove); request.Product.AddRange(deleted); } string url = WeUtil.GetUrl(WeShopConst.UPDATE_GROUP_PRODUCT_URL); var result = WeUtil.PostToUri(url, request.WriteJson(), new WeixinResult()); FetchDetail(); return(result); }
public WeixinResult Reduce() { string url = WeUtil.GetUrl(WeShopConst.REDUCE_STOCK_URL); var result = WeUtil.PostToUri(url, this.WriteJson(), new WeixinResult()); return(result); }
public WeixinResult Update() { string url = WeUtil.GetUrl(WeConst.REMARK_URL); return(WeUtil.PostToUri(url, this.WriteJson(WeConst.WRITE_SETTINGS), new WeixinResult())); }
public static WeixinResult Delete(long msgId) { MassMessageResult msg = new MassMessageResult(msgId); string url = WeUtil.GetUrl(WeConst.DELETE_MASS_MESSAGE_URL); return(WeUtil.PostToUri(url, msg.WriteJson(), new WeixinResult())); }
private WeixinResult InternalCreateMenu(string url) { string json = ToJson(); WeixinResult result = new WeixinResult(); return(WeUtil.PostToUri(url, json, result)); }
public MediaId UploadMessage() { string url = WeUtil.GetUrl(WeConst.NEWS_MASS_URL); var mediaId = WeUtil.PostToUri(url, this.WriteJson(), new MediaId()); return(mediaId); }
public static WeShelf Query(int shelfId) { string url = WeUtil.GetUrl(WeShopConst.SHELF_ID_URL); WeShelfId request = new WeShelfId(shelfId); var result = WeUtil.PostToUri(url, request.WriteJson(), new WeShelfInfo()); return((WeShelf)result); }
public static IEnumerable <WeProduct> Query(ProductStatus status) { string url = WeUtil.GetUrl(WeShopConst.PRODUCT_STATUS_URL); WeProductStatus request = new WeProductStatus(status); var result = WeUtil.PostToUri(url, request.WriteJson(), new WeProductList()); return(result.ProductsInfo); }
public WeShelf Insert() { string url = WeUtil.GetUrl(WeShopConst.ADD_SHELF_URL); var result = WeUtil.PostToUri(url, this.WriteJson(), new WeShelfId()); ShelfId = result.ShelfId; return(this); }
public static WeCardBatch CardBatchGet(int offset, int count) { string url = WeUtil.GetUrl(WeCardConst.CARD_BATCH_GET); WeLocationBatchGet request = new WeLocationBatchGet(offset, count); var result = WeUtil.PostToUri(url, request.WriteJson(), new WeCardBatch()); return(result); }
public static WeixinResult Delete(int groupId) { string url = WeUtil.GetUrl(WeShopConst.DELETE_GROUP_URL); WeGroupId id = new WeGroupId(groupId); var result = WeUtil.PostToUri(url, id.WriteJson(), new WeixinResult()); return(result); }
public static WeMerchantGroup Query(int groupId) { string url = WeUtil.GetUrl(WeShopConst.GROUP_ID_URL); WeGroupId request = new WeGroupId(groupId); var result = WeUtil.PostToUri(url, request.WriteJson(), new WeMerchantGroupFetchData()); return(result.GroupDetail); }
public WeProduct Insert() { string url = WeUtil.GetUrl(WeShopConst.ADD_PRODUCT_URL); var result = WeUtil.PostToUri(url, this.WriteJson(), new WeProductId()); ProductId = result.ProductId; return(this); }
public string CardCreate() { string url = WeUtil.GetUrl(WeCardConst.CARD_CREATE); WeCard request = new WeCard(this); var result = WeUtil.PostToUri(url, request.WriteJson(), new WeCardId()); return(result.CardId); }
public static WeixinResult Delete(int shelfId) { string url = WeUtil.GetUrl(WeShopConst.DELETE_SHELF_URL); WeShelfId request = new WeShelfId(shelfId); var result = WeUtil.PostToUri(url, request.WriteJson(), new WeixinResult()); return(result); }
public WeixinResult Update() { string url = WeUtil.GetUrl(WeConst.UPDATE_GROUP); WeGroupData data = new WeGroupData(this); WeixinResult result = new WeixinResult(); return(WeUtil.PostToUri(url, data.WriteJson(WeConst.WRITE_SETTINGS), result)); }
public static WeDeliveryTemplate Query(long templateId) { WeTemplateId request = new WeTemplateId(templateId); string url = WeUtil.GetUrl(WeShopConst.TEMPLATE_ID_URL); var response = WeUtil.PostToUri(url, request.WriteJson(), new WeTemplateInfo()); return(response.TemplateInfo); }
public static WeixinResult Delete(long templateId) { string url = WeUtil.GetUrl(WeShopConst.DELETE_TEMPLATE_URL); WeTemplateId request = new WeTemplateId(templateId); var result = WeUtil.PostToUri(url, request.WriteJson(), new WeixinResult()); return(result); }
public static WeProduct Query(string productId) { TkDebug.AssertArgumentNullOrEmpty(productId, "productId", null); string url = WeUtil.GetUrl(WeShopConst.QUERY_PRODUCT_URL); WeProductId request = new WeProductId(productId); var result = WeUtil.PostToUri(url, request.WriteJson(), new WeProduct()); return(result); }
public static WeixinResult UpdateStatus(string productId, ProductStatus status) { TkDebug.AssertArgumentNullOrEmpty(productId, "productId", null); string url = WeUtil.GetUrl(WeShopConst.PRODUCT_SHELF_URL); WeProductModStatus request = new WeProductModStatus(status, productId); var result = WeUtil.PostToUri(url, request.WriteJson(), new WeixinResult()); return(result); }
public WeixinResult Update() { string url = WeCorpUtil.GetCorpUrl(WeCorpConst.AGENT_SET, WeixinSettings.Current.CorpUserManagerSecret); CorpAppUpdateInfo updateInfo = new CorpAppUpdateInfo(this); WeixinResult result = WeUtil.PostToUri(url, updateInfo.WriteJson(), new WeixinResult()); return(result); }
public WeixinResult Send() { string url = WeUtil.GetUrl(WeConst.SERVICE_URL); WeixinResult result = new WeixinResult(); result = WeUtil.PostToUri(url, ToJson(), result); return(result); }
public static WeSubCategoryList QueryAllSubCategories(string cateId) { TkDebug.AssertArgumentNullOrEmpty(cateId, "cateId", null); string url = WeUtil.GetUrl(WeShopConst.ALL_SUB_CATE_URL); WeCategoryId request = new WeCategoryId(cateId); var result = WeUtil.PostToUri(url, request.WriteJson(), new WeSubCategoryList()); return(result); }
public static WeCardInfo CardQuery(string cardId) { TkDebug.AssertArgumentNullOrEmpty(cardId, "cardId", null); string url = WeUtil.GetUrl(WeCardConst.GET_CARD); WeCardId request = new WeCardId(cardId); var result = WeUtil.PostToUri(url, request.WriteJson(), new WeCard()); return(result.Card); }
public static WeServer <T> Query <T>(string query, string category, string city, string region) { WeSemanticRequest request = new WeSemanticRequest(query, category, city) { Region = region }; WeServer <T> result = WeUtil.PostToUri(url, request.WriteJson(), new WeServer <T>()); return(result); }