mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-07-19 07:44:46 +08:00
feat(work): 新增移除下游企业接口
This commit is contained in:
parent
d95a6f3b05
commit
38faeff7a3
@ -174,6 +174,26 @@ namespace SKIT.FlurlHttpClient.Wechat.Work
|
|||||||
|
|
||||||
return await client.SendRequestWithJsonAsync<Models.CgibinCorpGroupCorpGetChainCorpInfoListResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
return await client.SendRequestWithJsonAsync<Models.CgibinCorpGroupCorpGetChainCorpInfoListResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <para>异步调用 [POST] /cgi-bin/corpgroup/corp/remove_corp 接口。</para>
|
||||||
|
/// <para>REF: https://developer.work.weixin.qq.com/document/path/95822 </para>
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="client"></param>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <param name="cancellationToken"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static async Task<Models.CgibinCorpGroupCorpRemoveCorpResponse> ExecuteCgibinCorpGroupCorpRemoveCorpAsync(this WechatWorkClient client, Models.CgibinCorpGroupCorpRemoveCorpRequest request, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
if (client is null) throw new ArgumentNullException(nameof(client));
|
||||||
|
if (request is null) throw new ArgumentNullException(nameof(request));
|
||||||
|
|
||||||
|
IFlurlRequest flurlReq = client
|
||||||
|
.CreateRequest(request, HttpMethod.Post, "cgi-bin", "corpgroup", "corp", "remove_corp")
|
||||||
|
.SetQueryParam("access_token", request.AccessToken);
|
||||||
|
|
||||||
|
return await client.SendRequestWithJsonAsync<Models.CgibinCorpGroupCorpRemoveCorpResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||||
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Rule
|
#region Rule
|
||||||
|
@ -0,0 +1,22 @@
|
|||||||
|
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /cgi-bin/corpgroup/corp/remove_corp 接口的请求。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class CgibinCorpGroupCorpRemoveCorpRequest : WechatWorkRequest
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置上下游 ID。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("chain_id")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("chain_id")]
|
||||||
|
public string ChainId { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置下级企业 CorpId。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("corpid")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("corpid")]
|
||||||
|
public string CorpId { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /cgi-bin/corpgroup/corp/remove_corp 接口的响应。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class CgibinCorpGroupCorpRemoveCorpResponse : WechatWorkResponse
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,4 @@
|
|||||||
|
{
|
||||||
|
"chain_id": "xxxx",
|
||||||
|
"corpid": "xxxxx"
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user