mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-07-18 04:33:16 +08:00
feat(work): 新增智慧硬件开发设备管理相关 API 封装
This commit is contained in:
parent
f4216dbd1c
commit
e61a41f885
@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 INFO.add_device 事件的数据。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90002/90151/90751 </para>
|
||||
/// </summary>
|
||||
public class AddDeviceEvent : WechatWorkEvent, WechatWorkEvent.Types.IXmlSerializable
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置服务商 CorpId。
|
||||
/// </summary>
|
||||
[System.Xml.Serialization.XmlElement("ServiceCorpId")]
|
||||
public string ServiceCorpId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备型号 ID。
|
||||
/// </summary>
|
||||
[System.Xml.Serialization.XmlElement("ModelId")]
|
||||
public string ModelId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备备注名称。
|
||||
/// </summary>
|
||||
[System.Xml.Serialization.XmlElement("RemarkName")]
|
||||
public string? RemarkName { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 INFO.connect_info 事件的数据。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90002/90151/90751 </para>
|
||||
/// </summary>
|
||||
public class ConnectInfoEvent : WechatWorkEvent, WechatWorkEvent.Types.IXmlSerializable
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置服务商 CorpId。
|
||||
/// </summary>
|
||||
[System.Xml.Serialization.XmlElement("ServiceCorpId")]
|
||||
public string ServiceCorpId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备成功连接企业微信后台时的时间戳。
|
||||
/// </summary>
|
||||
[System.Xml.Serialization.XmlElement("ConnectTime")]
|
||||
public long ConnectTimestamp { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 INFO.del_device 事件的数据。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90002/90151/90751 </para>
|
||||
/// </summary>
|
||||
public class DeleteDeviceEvent : WechatWorkEvent, WechatWorkEvent.Types.IXmlSerializable
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置服务商 CorpId。
|
||||
/// </summary>
|
||||
[System.Xml.Serialization.XmlElement("ServiceCorpId")]
|
||||
public string ServiceCorpId { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 INFO.device_feature_change 事件的数据。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90002/90151/90751 </para>
|
||||
/// </summary>
|
||||
public class DeviceFeatureChangeEvent : WechatWorkEvent, WechatWorkEvent.Types.IXmlSerializable
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置服务商 CorpId。
|
||||
/// </summary>
|
||||
[System.Xml.Serialization.XmlElement("ServiceCorpId")]
|
||||
public string ServiceCorpId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备序列号。
|
||||
/// </summary>
|
||||
[System.Xml.Serialization.XmlElement("DeviceSn")]
|
||||
public string DeviceSerialNumber { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 INFO.disconnect_info 事件的数据。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90002/90151/90751 </para>
|
||||
/// </summary>
|
||||
public class DisconnectInfoEvent : WechatWorkEvent, WechatWorkEvent.Types.IXmlSerializable
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置服务商 CorpId。
|
||||
/// </summary>
|
||||
[System.Xml.Serialization.XmlElement("ServiceCorpId")]
|
||||
public string ServiceCorpId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备与企业微信后台网络连接断开时的时间戳。
|
||||
/// </summary>
|
||||
[System.Xml.Serialization.XmlElement("DisconnectTime")]
|
||||
public long DiconnectTimestamp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备连接断开原因。
|
||||
/// </summary>
|
||||
[System.Xml.Serialization.XmlElement("Reason")]
|
||||
public string DisconnectReason { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 INFO.error_report 事件的数据。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90002/90151/90751 </para>
|
||||
/// </summary>
|
||||
public class ErrorReportEvent : WechatWorkEvent, WechatWorkEvent.Types.IXmlSerializable
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置设备上报的错误码。
|
||||
/// </summary>
|
||||
[System.Xml.Serialization.XmlElement("ErrCode")]
|
||||
public int ErrorCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备上报的错误信息。
|
||||
/// </summary>
|
||||
[System.Xml.Serialization.XmlElement("ErrMsg")]
|
||||
public string? ErrorMessage { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 INFO.fetch_log_finish 事件的数据。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90002/90151/90751 </para>
|
||||
/// </summary>
|
||||
public class FetchLogFinishEvent : WechatWorkEvent, WechatWorkEvent.Types.IXmlSerializable
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置服务商 CorpId。
|
||||
/// </summary>
|
||||
[System.Xml.Serialization.XmlElement("ServiceCorpId")]
|
||||
public string ServiceCorpId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置日志文件的 MediaId。
|
||||
/// </summary>
|
||||
[System.Xml.Serialization.XmlElement("MediaId")]
|
||||
public string MediaId { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 INFO.remark_device_name 事件的数据。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90002/90151/90751 </para>
|
||||
/// </summary>
|
||||
public class RemarkDeviceNameEvent : WechatWorkEvent, WechatWorkEvent.Types.IXmlSerializable
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置服务商 CorpId。
|
||||
/// </summary>
|
||||
[System.Xml.Serialization.XmlElement("ServiceCorpId")]
|
||||
public string ServiceCorpId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备备注名称。
|
||||
/// </summary>
|
||||
[System.Xml.Serialization.XmlElement("RemarkName")]
|
||||
public string RemarkName { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -193,73 +193,6 @@ namespace SKIT.FlurlHttpClient.Wechat.Work
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinServiceGetAdminListResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /cgi-bin/service/getuserinfo3rd 接口。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90001/90143/91121 </para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90002/90151/91155 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinServiceUserInfo3rdResponse> ExecuteCgibinServiceUserInfo3rdAsync(this WechatWorkClient client, Models.CgibinServiceUserInfo3rdRequest 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(HttpMethod.Get, "cgi-bin", "service", "getuserinfo3rd")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("suite_access_token", request.AccessToken)
|
||||
.SetQueryParam("code", request.Code);
|
||||
|
||||
return await client.SendRequestAsync<Models.CgibinServiceUserInfo3rdResponse>(flurlReq, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/service/getuserdetail3rd 接口。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90001/90143/91122 </para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90002/90151/91156 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinServiceUserDetail3rdResponse> ExecuteCgibinServiceUserDetail3rdAsync(this WechatWorkClient client, Models.CgibinServiceUserDetail3rdRequest 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(HttpMethod.Post, "cgi-bin", "service", "getuserdetail3rd")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("suite_access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinServiceUserDetail3rdResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/service/get_login_info 接口。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90001/90143/91125 </para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90002/90151/91158 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinServiceGetLoginInfoResponse> ExecuteCgibinServiceGetLoginInfoAsync(this WechatWorkClient client, Models.CgibinServiceGetLoginInfoRequest 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(HttpMethod.Post, "cgi-bin", "service", "get_login_info")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinServiceGetLoginInfoResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
#region Register
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/service/get_register_code 接口。</para>
|
||||
@ -370,6 +303,75 @@ namespace SKIT.FlurlHttpClient.Wechat.Work
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region OAuth
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /cgi-bin/service/getuserinfo3rd 接口。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90001/90143/91121 </para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90002/90151/91155 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinServiceUserInfo3rdResponse> ExecuteCgibinServiceUserInfo3rdAsync(this WechatWorkClient client, Models.CgibinServiceUserInfo3rdRequest 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(HttpMethod.Get, "cgi-bin", "service", "getuserinfo3rd")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("suite_access_token", request.AccessToken)
|
||||
.SetQueryParam("code", request.Code);
|
||||
|
||||
return await client.SendRequestAsync<Models.CgibinServiceUserInfo3rdResponse>(flurlReq, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/service/getuserdetail3rd 接口。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90001/90143/91122 </para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90002/90151/91156 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinServiceUserDetail3rdResponse> ExecuteCgibinServiceUserDetail3rdAsync(this WechatWorkClient client, Models.CgibinServiceUserDetail3rdRequest 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(HttpMethod.Post, "cgi-bin", "service", "getuserdetail3rd")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("suite_access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinServiceUserDetail3rdResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/service/get_login_info 接口。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90001/90143/91125 </para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90002/90151/91158 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinServiceGetLoginInfoResponse> ExecuteCgibinServiceGetLoginInfoAsync(this WechatWorkClient client, Models.CgibinServiceGetLoginInfoRequest 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(HttpMethod.Post, "cgi-bin", "service", "get_login_info")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinServiceGetLoginInfoResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Contact
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/service/contact/id_translate 接口。</para>
|
||||
@ -437,5 +439,175 @@ namespace SKIT.FlurlHttpClient.Wechat.Work
|
||||
return await client.SendRequestAsync<Models.CgibinServiceBatchGetResultResponse>(flurlReq, cancellationToken: cancellationToken);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Device
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/service/add_device 接口。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90002/90151/90626 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinServiceAddDeviceResponse> ExecuteCgibinServiceAddDeviceAsync(this WechatWorkClient client, Models.CgibinServiceAddDeviceRequest 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(HttpMethod.Post, "cgi-bin", "service", "add_device")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("provider_access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinServiceAddDeviceResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/service/get_device_auth_info 接口。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90002/90151/90753 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinServiceGetDeviceAuthInfoResponse> ExecuteCgibinServiceGetDeviceAuthInfoAsync(this WechatWorkClient client, Models.CgibinServiceGetDeviceAuthInfoRequest 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(HttpMethod.Post, "cgi-bin", "service", "get_device_auth_info")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("provider_access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinServiceGetDeviceAuthInfoResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/service/reset_secret_no 接口。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90002/90151/90753 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinServiceResetSecretNumberResponse> ExecuteCgibinServiceResetSecretNumberAsync(this WechatWorkClient client, Models.CgibinServiceResetSecretNumberRequest 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(HttpMethod.Post, "cgi-bin", "service", "reset_secret_no")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("provider_access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinServiceResetSecretNumberResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/service/list_device 接口。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90002/90151/91346 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinServiceListDeviceResponse> ExecuteCgibinServiceListDeviceAsync(this WechatWorkClient client, Models.CgibinServiceListDeviceRequest 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(HttpMethod.Post, "cgi-bin", "service", "list_device")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("provider_access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinServiceListDeviceResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/service/fetch_device_log 接口。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90002/90151/91475 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinServiceFetchDeviceLogResponse> ExecuteCgibinServiceFetchDeviceLogAsync(this WechatWorkClient client, Models.CgibinServiceFetchDeviceLogRequest 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(HttpMethod.Post, "cgi-bin", "service", "fetch_device_log")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("provider_access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinServiceFetchDeviceLogResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/hardware/get_device_feature 接口。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90002/90151/92739 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinHardwareGetDeviceFeatureResponse> ExecuteCgibinHardwareGetDeviceFeatureAsync(this WechatWorkClient client, Models.CgibinHardwareGetDeviceFeatureRequest 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(HttpMethod.Post, "cgi-bin", "hardware", "get_device_feature")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("provider_access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinHardwareGetDeviceFeatureResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/service/del_device 接口。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90002/90151/92770 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinServiceDeleteDeviceResponse> ExecuteCgibinServiceDeleteDeviceAsync(this WechatWorkClient client, Models.CgibinServiceDeleteDeviceRequest 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(HttpMethod.Post, "cgi-bin", "service", "del_device")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("provider_access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinServiceDeleteDeviceResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /cgi-bin/service/set_printer_support_state 接口。</para>
|
||||
/// <para>REF: https://open.work.weixin.qq.com/api/doc/90002/90151/92782 </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.CgibinServiceSetPrinterSupportStateResponse> ExecuteCgibinServiceSetPrinterSupportStateAsync(this WechatWorkClient client, Models.CgibinServiceSetPrinterSupportStateRequest 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(HttpMethod.Post, "cgi-bin", "service", "set_printer_support_state")
|
||||
.SetOptions(request)
|
||||
.SetQueryParam("provider_access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.CgibinServiceSetPrinterSupportStateResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/hardware/get_device_feature 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinHardwareGetDeviceFeatureRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置服务商 AccessToken。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public override string? AccessToken { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备序列号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_sn")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_sn")]
|
||||
public string DeviceSerialNumber { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/hardware/get_device_feature 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinHardwareGetDeviceFeatureResponse : WechatWorkResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置设备反馈的自定义标识串。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_feature")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_feature")]
|
||||
public string DeviceFeature { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/service/add_device 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinServiceAddDeviceRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置服务商 AccessToken。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public override string? AccessToken { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备型号 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("model_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("model_id")]
|
||||
public string ModelId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备序列号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_sn")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_sn")]
|
||||
public string DeviceSerialNumber { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置备注名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("remark_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("remark_name")]
|
||||
public string? RemarkName { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,66 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/service/add_device 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinServiceAddDeviceResponse : WechatWorkResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Device
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置设备型号 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("model_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("model_id")]
|
||||
public string ModelId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_id")]
|
||||
public long DeviceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备序列号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_sn")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_sn")]
|
||||
public string DeviceSerialNumber { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备密钥。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("secret_no")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("secret_no")]
|
||||
public string? SecretNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备二维码数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("qr_code")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("qr_code")]
|
||||
public string? QrcodeData { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置创建时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("create_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("create_time")]
|
||||
public long CreateTimestamp { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_info")]
|
||||
public Types.Device Device { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/service/del_device 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinServiceDeleteDeviceRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置服务商 AccessToken。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public override string? AccessToken { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备序列号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_sn")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_sn")]
|
||||
public string DeviceSerialNumber { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/service/del_device 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinServiceDeleteDeviceResponse : WechatWorkResponse
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/service/fetch_device_log 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinServiceFetchDeviceLogRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置服务商 AccessToken。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public override string? AccessToken { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备序列号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_sn")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_sn")]
|
||||
public string DeviceSerialNumber { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置提示参数。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("hint")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("hint")]
|
||||
public string? Hint { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/service/fetch_device_log 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinServiceFetchDeviceLogResponse : WechatWorkResponse
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/service/get_device_auth_info 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinServiceGetDeviceAuthInfoRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置服务商 AccessToken。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public override string? AccessToken { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备序列号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_sn")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_sn")]
|
||||
public string DeviceSerialNumber { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/service/get_device_auth_info 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinServiceGetDeviceAuthInfoResponse : WechatWorkResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class AuthorizerCorp : CgibinServiceGetAuthInfoResponse.Types.DealerCorp
|
||||
{
|
||||
}
|
||||
|
||||
public class Device
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置设备型号 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("model_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("model_id")]
|
||||
public string ModelId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置备注名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("remark_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("remark_name")]
|
||||
public string? RemarkName { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置授权方企业信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("auth_corp_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("auth_corp_info")]
|
||||
public Types.AuthorizerCorp AuthorizerCorp { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_info")]
|
||||
public Types.Device Device { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/service/list_device 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinServiceListDeviceRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置服务商 AccessToken。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public override string? AccessToken { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页起始位置。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("offset")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("offset")]
|
||||
public int? Offset { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("limit")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("limit")]
|
||||
public int? Limit { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/service/list_device 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinServiceListDeviceResponse : WechatWorkResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Device
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置设备型号 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("model_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("model_id")]
|
||||
public string ModelId { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备序列号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_sn")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_sn")]
|
||||
public string DeviceSerialNumber { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_list")]
|
||||
public Types.Device[] DeviceList { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/service/reset_secret_no 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinServiceResetSecretNumberRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置服务商 AccessToken。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public override string? AccessToken { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备序列号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_sn")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_sn")]
|
||||
public string DeviceSerialNumber { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/service/reset_secret_no 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinServiceResetSecretNumberResponse : WechatWorkResponse
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/service/set_printer_support_state 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class CgibinServiceSetPrinterSupportStateRequest : WechatWorkRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置服务商 AccessToken。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public override string? AccessToken { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备序列号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_sn")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_sn")]
|
||||
public string DeviceSerialNumber { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否不支持打印机。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("not_supported_printer")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("not_supported_printer")]
|
||||
public bool IsUnsupportedPrinter { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Work.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /cgi-bin/service/set_printer_support_state 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class CgibinServiceSetPrinterSupportStateResponse : WechatWorkResponse
|
||||
{
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user