public static WeixinResult set_agent(string authCorpid, string permanentCode, WeThirdPartyAgentSet agent) { TkDebug.AssertArgumentNullOrEmpty(authCorpid, "authCorpid", null); TkDebug.AssertArgumentNullOrEmpty(permanentCode, "permanentCode", null); TkDebug.AssertArgumentNull(agent, "agent", null); string url = WeCorpUtil.GetCorpUrl(WeThirdPartyConst.SET_AGENT, WeixinSettings.Current.CorpUserManagerSecret); WeThirdPartySetAgentRequest request = new WeThirdPartySetAgentRequest(authCorpid, permanentCode, agent); var result = WeUtil.PostToUri(url, request.WriteJson(), new WeixinResult()); return(result); }
public static WeixinResult set_agent(string authCorpid, string permanentCode, WeThirdPartyAgentSet agent) { TkDebug.AssertArgumentNullOrEmpty(authCorpid, "authCorpid", null); TkDebug.AssertArgumentNullOrEmpty(permanentCode, "permanentCode", null); TkDebug.AssertArgumentNull(agent, "agent", null); string url = WeCorpUtil.GetCorpUrl(WeThirdPartyConst.SET_AGENT, WeixinSettings.Current.CorpUserManagerSecret); WeThirdPartySetAgentRequest request = new WeThirdPartySetAgentRequest(authCorpid, permanentCode, agent); var result = WeUtil.PostToUri(url, request.WriteJson(), new WeixinResult()); return result; }