mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-12-29 01:44:42 +08:00
feat(tenpayv3): 新增刷脸支付获取设备出厂检查结果接口
This commit is contained in:
@@ -29,5 +29,27 @@ namespace SKIT.FlurlHttpClient.Wechat.TenpayV3
|
|||||||
|
|
||||||
return await client.SendFlurlRequestAsJsonAsync<Models.QueryIoTManageDevicesResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
return await client.SendFlurlRequestAsJsonAsync<Models.QueryIoTManageDevicesResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <para>异步调用 [GET] /iotmanage/device-inspections/{device_sn} 接口。</para>
|
||||||
|
/// <para>
|
||||||
|
/// REF: <br/>
|
||||||
|
/// <![CDATA[ https://pay.weixin.qq.com/wiki/doc/wxfacepay/tool/factory-check-data-api.html ]]>
|
||||||
|
/// </para>
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="client"></param>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <param name="cancellationToken"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static async Task<Models.GetIoTManageDeviceInspectionByDeviceSerialNumberResponse> ExecuteGetIoTManageDeviceInspectionByDeviceSerialNumberAsync(this WechatTenpayClient client, Models.GetIoTManageDeviceInspectionByDeviceSerialNumberRequest 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
|
||||||
|
.CreateFlurlRequest(request, HttpMethod.Get, "iotmanage", "device-inspections", request.DeviceSerialNumber);
|
||||||
|
|
||||||
|
return await client.SendFlurlRequestAsJsonAsync<Models.GetIoTManageDeviceInspectionByDeviceSerialNumberResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,15 @@
|
|||||||
|
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [GET] /iotmanage/device-inspections/{device_sn} 接口的请求。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class GetIoTManageDeviceInspectionByDeviceSerialNumberRequest : WechatTenpayRequest
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置设备序列号。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonIgnore]
|
||||||
|
[System.Text.Json.Serialization.JsonIgnore]
|
||||||
|
public string DeviceSerialNumber { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace SKIT.FlurlHttpClient.Wechat.TenpayV3.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [GET] /iotmanage/device-inspections/{device_sn} 接口的响应。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class GetIoTManageDeviceInspectionByDeviceSerialNumberResponse : WechatTenpayResponse
|
||||||
|
{
|
||||||
|
/// <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("camera_sn")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("camera_sn")]
|
||||||
|
public string CameraSerialNumber { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置有线网卡 MAC 地址。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("wired_mac")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("wired_mac")]
|
||||||
|
public string WiredMAC { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置无线网卡 MAC 地址。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("wireless_mac")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("wireless_mac")]
|
||||||
|
public string WirelessMAC { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置蓝牙 MAC 地址。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("bluetooth_mac")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("bluetooth_mac")]
|
||||||
|
public string BluetoothMAC { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置应用版本号。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("app_version")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("app_version")]
|
||||||
|
public string AppVersion { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置国际移动设备识别码。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("imei")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("imei")]
|
||||||
|
public string IMEI { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置国际移动设备识别码。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("result")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("result")]
|
||||||
|
public string Result { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置检测时间。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("inspect_time")]
|
||||||
|
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.Common.Rfc3339DateTimeOffsetConverter))]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("inspect_time")]
|
||||||
|
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Serialization.Common.Rfc3339DateTimeOffsetConverter))]
|
||||||
|
public DateTimeOffset InspectTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置错误信息列表。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("errors")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("errors")]
|
||||||
|
public string[]? ErrorList { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置警告信息列表。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("warnings")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("warnings")]
|
||||||
|
public string[]? WarningList { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"device_sn": "AAAAA123456789012345678",
|
||||||
|
"wired_mac": "00:00:00:00:00:00",
|
||||||
|
"wireless_mac": "00:00:00:00:00:00",
|
||||||
|
"bluetooth_mac": "00:00:00:00:00:00",
|
||||||
|
"app_version": "1.26.100",
|
||||||
|
"camera_sn": "XXXX-1234567890",
|
||||||
|
"imei": "123456789012345",
|
||||||
|
"result": "SUCCESS",
|
||||||
|
"errors": [
|
||||||
|
"摄像头序列号为空"
|
||||||
|
],
|
||||||
|
"warnings": [
|
||||||
|
"该设备已经进行过出厂检查"
|
||||||
|
],
|
||||||
|
"inspect_time": "2015-05-20T13:29:35.120+08:00"
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user