mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-09-24 13:03:43 +08:00
feat(wxapi): 新增小程序硬件设备组相关接口
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
@@ -34,12 +34,19 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
[System.Text.Json.Serialization.JsonPropertyName("template_id")]
|
||||
public string TemplateId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备型号 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("modelId")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("modelId")]
|
||||
public string? ModelId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备序列号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sn")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sn")]
|
||||
public string SerialNumber { get; set; } = string.Empty;
|
||||
public string? SerialNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置小程序页面路径。
|
||||
|
@@ -0,0 +1,51 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /wxa/business/group/adddevice 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class WxaBusinessGroupAddDeviceRequest : WechatApiRequest, IInferable<WxaBusinessGroupAddDeviceRequest, WxaBusinessGroupAddDeviceResponse>
|
||||
{
|
||||
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; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备序列号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sn")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sn")]
|
||||
public string SerialNumber { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备组 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("group_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("group_id")]
|
||||
public string GroupId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_list")]
|
||||
public IList<Types.Device> DeviceList { get; set; } = new List<Types.Device>();
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置是否强制添加。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("force_add")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("force_add")]
|
||||
public bool? IsForceAdd { get; set; }
|
||||
}
|
||||
}
|
@@ -0,0 +1,42 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /wxa/business/group/adddevice 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class WxaBusinessGroupAddDeviceResponse : WechatApiResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Result
|
||||
{
|
||||
/// <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("sn")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sn")]
|
||||
public string SerialNumber { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置错误码。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("errcode")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("errcode")]
|
||||
public int ErrorCode { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置结果列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_list")]
|
||||
public Types.Result[] ResultList { get; set; } = default!;
|
||||
}
|
||||
}
|
@@ -0,0 +1,22 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /wxa/business/group/createid 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class WxaBusinessGroupCreateIdRequest : WechatApiRequest, IInferable<WxaBusinessGroupCreateIdRequest, WxaBusinessGroupCreateIdResponse>
|
||||
{
|
||||
/// <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("group_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("group_name")]
|
||||
public string GroupName { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@@ -0,0 +1,15 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /wxa/business/group/createid 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class WxaBusinessGroupCreateIdResponse : WechatApiResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置设备组 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("group_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("group_id")]
|
||||
public string GroupId { get; set; } = default!;
|
||||
}
|
||||
}
|
@@ -0,0 +1,15 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /wxa/business/group/getinfo 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class WxaBusinessGroupGetInfoRequest : WechatApiRequest, IInferable<WxaBusinessGroupGetInfoRequest, WxaBusinessGroupGetInfoResponse>
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置设备组 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("group_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("group_id")]
|
||||
public string GroupId { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@@ -0,0 +1,63 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /wxa/business/group/getinfo 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class WxaBusinessGroupGetInfoResponse : WechatApiResponse
|
||||
{
|
||||
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("sn")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sn")]
|
||||
public string SerialNumber { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置错误码。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("errcode")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("errcode")]
|
||||
public int ErrorCode { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <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("model_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("model_type")]
|
||||
public string ModelType { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备组名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("group_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("group_name")]
|
||||
public string GroupName { 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,31 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /wxa/business/group/removedevice 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class WxaBusinessGroupRemoveDeviceRequest : WechatApiRequest, IInferable<WxaBusinessGroupRemoveDeviceRequest, WxaBusinessGroupRemoveDeviceResponse>
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Device : WxaBusinessGroupAddDeviceRequest.Types.Device
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备组 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("group_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("group_id")]
|
||||
public string GroupId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_list")]
|
||||
public IList<Types.Device> DeviceList { get; set; } = new List<Types.Device>();
|
||||
}
|
||||
}
|
@@ -0,0 +1,22 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /wxa/business/group/removedevice 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class WxaBusinessGroupRemoveDeviceResponse : WechatApiResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Result : WxaBusinessGroupAddDeviceResponse.Types.Result
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置结果列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_list")]
|
||||
public Types.Result[] ResultList { get; set; } = default!;
|
||||
}
|
||||
}
|
@@ -1,9 +1,9 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /wxa/business/getuserphonenumber 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class WxaBusinessGetUserPhoneNumberRequest : WechatApiRequest
|
||||
public class WxaBusinessGetUserPhoneNumberRequest : WechatApiRequest, IInferable<WxaBusinessGetUserPhoneNumberRequest, WxaBusinessGetUserPhoneNumberResponse>
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置手机号获取凭证。
|
||||
|
Reference in New Issue
Block a user