mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2026-02-11 10:16:20 +08:00
feat(tenpayv3): 新增刷脸支付智能设备列表接口
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using System.Net.Http;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Flurl.Http;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3
|
||||
{
|
||||
public static class WechatTenpayClientExecuteIoTManageExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /iotmanage/devices 接口。</para>
|
||||
/// <para>REF: https://pay.weixin.qq.com/wiki/doc/wxfacepay/develop/point/iotmanage-devices.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.QueryIoTManageDevicesResponse> ExecuteQueryIoTManageDevicesAsync(this WechatTenpayClient client, Models.QueryIoTManageDevicesRequest 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.Get, "iotmanage", "devices");
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.QueryIoTManageDevicesResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /iotmanage/devices 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class QueryIoTManageDevicesRequest : WechatTenpayRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置分页大小。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int Limit { get; set; } = 10;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页开始位置。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
public int Offset { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,158 @@
|
||||
using System;
|
||||
|
||||
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /iotmanage/devices 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class QueryIoTManageDevicesResponse : WechatTenpayResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Device
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置设备序列号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_sn")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_sn")]
|
||||
public string? DeviceSerialNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置摄像头序列号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("camera_sn")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("camera_sn")]
|
||||
public string? CameraSerialNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备品类代码。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_category_code")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_category_code")]
|
||||
public string? DeviceCategoryCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备品类。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_category")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_category")]
|
||||
public string? DeviceCategory { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备类型代码。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_class_code")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_class_code")]
|
||||
public string? DeviceClassCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_class")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_class")]
|
||||
public string? DeviceClass { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备型号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("device_model")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("device_model")]
|
||||
public string? DeviceModel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置刷脸应用软件模式代码。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("app_scene_code")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("app_scene_code")]
|
||||
public string? AppSceneCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置刷脸应用软件模式。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("app_scene")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("app_scene")]
|
||||
public string? AppScene { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置刷脸应用操作系统。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("operating_system")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("operating_system")]
|
||||
public string? OperatingSystem { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置激活状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("activation_status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("activation_status")]
|
||||
public string? ActivationStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置激活时间。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("activation_time")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.RFC3339NullableDateTimeOffsetConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("activation_time")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.RFC3339NullableDateTimeOffsetConverter))]
|
||||
public DateTimeOffset? ActivationTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商户号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("mchid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("mchid")]
|
||||
public string? MerchantId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置商户简称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("merchant_shortname")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("merchant_shortname")]
|
||||
public string? MerchantShortName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置子商户号。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sub_mchid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sub_mchid")]
|
||||
public string? SubMerchantId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置子商户简称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("sub_merchant_shortname")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("sub_merchant_shortname")]
|
||||
public string? SubMerchantShortName { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置设备列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("data")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("data")]
|
||||
public Types.Device[] DeviceList { get; set; } = default!;
|
||||
|
||||
/// <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; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置总数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("total_count")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("total_count")]
|
||||
public int TotalCount { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -27,7 +27,7 @@
|
||||
public int? Offset { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
/// 获取或设置分页大小。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
public int Offset { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
/// 获取或设置分页大小。
|
||||
/// <para>默认值:10</para>
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||
public int Offset { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
/// 获取或设置分页大小。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("limit")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("limit")]
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
public int? Offset { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
/// 获取或设置分页大小。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
public int? Offset { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
/// 获取或设置分页大小。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonIgnore]
|
||||
[System.Text.Json.Serialization.JsonIgnore]
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
public int Offset { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
/// 获取或设置分页大小。
|
||||
/// <para>默认值:10</para>
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("limit")]
|
||||
|
||||
Reference in New Issue
Block a user