feat(wxapi): 封装公众平台、开放平台接口

This commit is contained in:
Fu Diwei
2021-05-28 19:23:28 +08:00
parent 7baae99cd8
commit dc78ea6577
1059 changed files with 56397 additions and 19 deletions

View File

@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cv/img/aicrop 接口的请求。</para>
/// </summary>
public class CVImageAICropRequest : CVImageQrcodeRequest
{
/// <summary>
/// 获取或设置裁剪宽高比列表。
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public IList<double>? RatioList { get; set; }
}
}

View File

@@ -0,0 +1,63 @@
using System;
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cv/img/aicrop 接口的响应。</para>
/// </summary>
public class CVImageAICropResponse : WechatApiResponse
{
public static class Types
{
public class ImageResult
{
/// <summary>
/// 获取或设置智能裁剪左边距(单位:像素)。
/// </summary>
[Newtonsoft.Json.JsonProperty("crop_left")]
[System.Text.Json.Serialization.JsonPropertyName("crop_left")]
public int CropLeft { get; set; }
/// <summary>
/// 获取或设置智能裁剪上边距(单位:像素)。
/// </summary>
[Newtonsoft.Json.JsonProperty("crop_top")]
[System.Text.Json.Serialization.JsonPropertyName("crop_top")]
public int CropTop { get; set; }
/// <summary>
/// 获取或设置智能裁剪右边距(单位:像素)。
/// </summary>
[Newtonsoft.Json.JsonProperty("crop_right")]
[System.Text.Json.Serialization.JsonPropertyName("crop_right")]
public int CropRight { get; set; }
/// <summary>
/// 获取或设置智能裁剪左边距(单位:像素)。
/// </summary>
[Newtonsoft.Json.JsonProperty("crop_bottom")]
[System.Text.Json.Serialization.JsonPropertyName("crop_bottom")]
public int CropBottom { get; set; }
}
public class ImageSize : CVImageQrcodeResponse.Types.ImageSize
{
}
}
/// <summary>
/// 获取或设置裁剪结果列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("results")]
[System.Text.Json.Serialization.JsonPropertyName("results")]
public Types.ImageResult[] ResultList { get; set; } = default!;
/// <summary>
/// 获取或设置图片大小信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("img_size")]
[System.Text.Json.Serialization.JsonPropertyName("img_size")]
public Types.ImageSize ImageSize { get; set; } = default!;
}
}

View File

@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cv/img/qrcode 接口的请求。</para>
/// </summary>
public class CVImageQrcodeRequest : WechatApiRequest
{
/// <summary>
/// 获取或设置要识别的图片 URL。与字段 <see cref="ImageFileBytes"/> 二选一。
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public string? ImageUrl { get; set; }
/// <summary>
/// 获取或设置要识别的图片文件字节数组。与字段 <see cref="ImageUrl"/> 二选一。
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public byte[]? ImageFileBytes { get; set; }
}
}

View File

@@ -0,0 +1,123 @@
using System;
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cv/img/qrcode 接口的响应。</para>
/// </summary>
public class CVImageQrcodeResponse : WechatApiResponse
{
public static class Types
{
public class CodeResult
{
public static class Types
{
public class Position
{
public static class Types
{
public class Point
{
/// <summary>
/// 获取或设置 X 轴坐标(单位:像素)。
/// </summary>
[Newtonsoft.Json.JsonProperty("x")]
[System.Text.Json.Serialization.JsonPropertyName("x")]
public int X { get; set; }
/// <summary>
/// 获取或设置 Y 轴桌标(单位:像素)。
/// </summary>
[Newtonsoft.Json.JsonProperty("y")]
[System.Text.Json.Serialization.JsonPropertyName("y")]
public int Y { get; set; }
}
}
/// <summary>
/// 获取或设置左上角坐标信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("left_top")]
[System.Text.Json.Serialization.JsonPropertyName("left_top")]
public Types.Point LeftTop { get; set; } = default!;
/// <summary>
/// 获取或设置右上角坐标信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("right_top")]
[System.Text.Json.Serialization.JsonPropertyName("right_top")]
public Types.Point RightTop { get; set; } = default!;
/// <summary>
/// 获取或设置右下角坐标信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("right_bottom")]
[System.Text.Json.Serialization.JsonPropertyName("right_bottom")]
public Types.Point RightBottom { get; set; } = default!;
/// <summary>
/// 获取或设置左下角坐标信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("left_bottom")]
[System.Text.Json.Serialization.JsonPropertyName("left_bottom")]
public Types.Point LeftBottom { get; set; } = default!;
}
}
/// <summary>
/// 获取或设置识别类型名称。
/// </summary>
[Newtonsoft.Json.JsonProperty("type_name")]
[System.Text.Json.Serialization.JsonPropertyName("type_name")]
public string TypeName { get; set; } = default!;
/// <summary>
/// 获取或设置识别内容。
/// </summary>
[Newtonsoft.Json.JsonProperty("data")]
[System.Text.Json.Serialization.JsonPropertyName("data")]
public string? Data { get; set; }
/// <summary>
/// 获取或设置识别坐标信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("pos")]
[System.Text.Json.Serialization.JsonPropertyName("pos")]
public Types.Position? Position { get; set; }
}
public class ImageSize
{
/// <summary>
/// 获取或设置智能裁剪宽度(单位:像素)。
/// </summary>
[Newtonsoft.Json.JsonProperty("w")]
[System.Text.Json.Serialization.JsonPropertyName("w")]
public int Width { get; set; }
/// <summary>
/// 获取或设置智能裁剪高度(单位:像素)。
/// </summary>
[Newtonsoft.Json.JsonProperty("h")]
[System.Text.Json.Serialization.JsonPropertyName("h")]
public int Height { get; set; }
}
}
/// <summary>
/// 获取或设置识别结果列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("code_results")]
[System.Text.Json.Serialization.JsonPropertyName("code_results")]
public Types.CodeResult[] ResultList { get; set; } = default!;
/// <summary>
/// 获取或设置图片大小信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("img_size")]
[System.Text.Json.Serialization.JsonPropertyName("img_size")]
public Types.ImageSize ImageSize { get; set; } = default!;
}
}

View File

@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cv/img/superresolution 接口的请求。</para>
/// </summary>
public class CVImageSuperResolutionRequest : CVImageQrcodeRequest
{
}
}

View File

@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cv/img/superresolution 接口的响应。</para>
/// </summary>
public class CVImageSuperResolutionResponse : WechatApiResponse
{
/// <summary>
/// 获取或设置超清化图片媒体文件标识。
/// </summary>
[Newtonsoft.Json.JsonProperty("media_id")]
[System.Text.Json.Serialization.JsonPropertyName("media_id")]
public string MediaId { get; set; } = default!;
}
}

View File

@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cv/ocr/bankcard 接口的请求。</para>
/// </summary>
public class CVOCRBankCardRequest : CVOCRIdCardRequest
{
}
}

View File

@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cv/ocr/bankcard 接口的响应。</para>
/// </summary>
public class CVOCRBankCardResponse : WechatApiResponse
{
/// <summary>
/// 获取或设置银行卡号。
/// </summary>
[Newtonsoft.Json.JsonProperty("number")]
[System.Text.Json.Serialization.JsonPropertyName("number")]
public string BankNumber { get; set; } = default!;
}
}

View File

@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cv/ocr/bizlicense 接口的请求。</para>
/// </summary>
public class CVOCRBusinessLicenseRequest : CVOCRIdCardRequest
{
}
}

View File

@@ -0,0 +1,133 @@
using System;
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cv/ocr/bizlicense 接口的响应。</para>
/// </summary>
public class CVOCRBusinessLicenseResponse : WechatApiResponse
{
public static class Types
{
public class CertificationPosition
{
public static class Types
{
public class Position : CVImageQrcodeResponse.Types.CodeResult.Types.Position
{
}
}
/// <summary>
/// 获取或设置识别坐标信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("pos")]
[System.Text.Json.Serialization.JsonPropertyName("pos")]
public Types.Position Position { get; set; } = default!;
}
public class ImageSize : CVImageQrcodeResponse.Types.ImageSize
{
}
}
/// <summary>
/// 获取或设置注册号。
/// </summary>
[Newtonsoft.Json.JsonProperty("reg_num")]
[System.Text.Json.Serialization.JsonPropertyName("reg_num")]
public string RegistrationNumber { get; set; } = default!;
/// <summary>
/// 获取或设置编号。
/// </summary>
[Newtonsoft.Json.JsonProperty("serial")]
[System.Text.Json.Serialization.JsonPropertyName("serial")]
public string SerialNumber { get; set; } = default!;
/// <summary>
/// 获取或设置法定代表人姓名。
/// </summary>
[Newtonsoft.Json.JsonProperty("legal_representative")]
[System.Text.Json.Serialization.JsonPropertyName("legal_representative")]
public string LegalRepresentative { get; set; } = default!;
/// <summary>
/// 获取或设置组成形式。
/// </summary>
[Newtonsoft.Json.JsonProperty("type_of_organization")]
[System.Text.Json.Serialization.JsonPropertyName("type_of_organization")]
public string OrganizationType { get; set; } = default!;
/// <summary>
/// 获取或设置企业名称。
/// </summary>
[Newtonsoft.Json.JsonProperty("enterprise_name")]
[System.Text.Json.Serialization.JsonPropertyName("enterprise_name")]
public string EnterpriseName { get; set; } = default!;
/// <summary>
/// 获取或设置公司类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("type_of_enterprise")]
[System.Text.Json.Serialization.JsonPropertyName("type_of_enterprise")]
public string EnterpriseType { get; set; } = default!;
/// <summary>
/// 获取或设置经营场所或企业住所。
/// </summary>
[Newtonsoft.Json.JsonProperty("address")]
[System.Text.Json.Serialization.JsonPropertyName("address")]
public string Address { get; set; } = default!;
/// <summary>
/// 获取或设置经营范围。
/// </summary>
[Newtonsoft.Json.JsonProperty("business_scope")]
[System.Text.Json.Serialization.JsonPropertyName("business_scope")]
public string BusinessScope { get; set; } = default!;
/// <summary>
/// 获取或设置注册资本。
/// </summary>
[Newtonsoft.Json.JsonProperty("registered_capital")]
[System.Text.Json.Serialization.JsonPropertyName("registered_capital")]
public string RegisteredCapital { get; set; } = default!;
/// <summary>
/// 获取或设置实收资本。
/// </summary>
[Newtonsoft.Json.JsonProperty("paid_in_capital")]
[System.Text.Json.Serialization.JsonPropertyName("paid_in_capital")]
public string? PaidInCapital { get; set; }
/// <summary>
/// 获取或设置营业期限。
/// </summary>
[Newtonsoft.Json.JsonProperty("valid_period")]
[System.Text.Json.Serialization.JsonPropertyName("valid_period")]
public string ValidDate { get; set; } = default!;
/// <summary>
/// 获取或设置注册日期。
/// </summary>
[Newtonsoft.Json.JsonProperty("registered_date")]
[System.Text.Json.Serialization.JsonPropertyName("registered_date")]
public string RegisteredDate { get; set; } = default!;
/// <summary>
/// 获取或设置营业执照位置信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("cert_position")]
[System.Text.Json.Serialization.JsonPropertyName("cert_position")]
public Types.CertificationPosition? CertificationPosition { get; set; }
/// <summary>
/// 获取或设置图片大小信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("img_size")]
[System.Text.Json.Serialization.JsonPropertyName("img_size")]
public Types.ImageSize ImageSize { get; set; } = default!;
}
}

View File

@@ -0,0 +1,25 @@
using System;
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cv/ocr/comm 接口的请求。</para>
/// </summary>
public class CVOCRCommonRequest : WechatApiRequest
{
/// <summary>
/// 获取或设置要识别的图片 URL。与字段 <see cref="ImageFileBytes"/> 二选一。
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public string? ImageUrl { get; set; }
/// <summary>
/// 获取或设置要识别的图片文件字节数组。与字段 <see cref="ImageUrl"/> 二选一。
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public byte[]? ImageFileBytes { get; set; }
}
}

View File

@@ -0,0 +1,56 @@
using System;
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cv/ocr/bankcard 接口的响应。</para>
/// </summary>
public class CVOCRCommonResponse : WechatApiResponse
{
public static class Types
{
public class Result
{
public static class Types
{
public class Position : CVImageQrcodeResponse.Types.CodeResult.Types.Position
{
}
}
/// <summary>
/// 获取或设置识别文本信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("text")]
[System.Text.Json.Serialization.JsonPropertyName("text")]
public string Text { get; set; } = default!;
/// <summary>
/// 获取或设置识别坐标信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("pos")]
[System.Text.Json.Serialization.JsonPropertyName("pos")]
public Types.Position Position { get; set; } = default!;
}
public class ImageSize : CVImageQrcodeResponse.Types.ImageSize
{
}
}
/// <summary>
/// 获取或设置识别结果列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("items")]
[System.Text.Json.Serialization.JsonPropertyName("items")]
public Types.Result[] ResultList { get; set; } = default!;
/// <summary>
/// 获取或设置图片大小信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("img_size")]
[System.Text.Json.Serialization.JsonPropertyName("img_size")]
public Types.ImageSize ImageSize { get; set; } = default!;
}
}

View File

@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cv/ocr/drivinglicense 接口的请求。</para>
/// </summary>
public class CVOCRDrivingLicenseRequest : CVOCRIdCardRequest
{
}
}

View File

@@ -0,0 +1,88 @@
using System;
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cv/ocr/drivinglicense 接口的响应。</para>
/// </summary>
public class CVOCRDrivingLicenseResponse : WechatApiResponse
{
/// <summary>
/// 获取或设置证件号。
/// </summary>
[Newtonsoft.Json.JsonProperty("id_num")]
[System.Text.Json.Serialization.JsonPropertyName("id_num")]
public string IdNumber { get; set; } = default!;
/// <summary>
/// 获取或设置姓名。
/// </summary>
[Newtonsoft.Json.JsonProperty("name")]
[System.Text.Json.Serialization.JsonPropertyName("name")]
public string Name { get; set; } = default!;
/// <summary>
/// 获取或设置性别。
/// </summary>
[Newtonsoft.Json.JsonProperty("sex")]
[System.Text.Json.Serialization.JsonPropertyName("sex")]
public string Sex { get; set; } = default!;
/// <summary>
/// 获取或设置国籍。
/// </summary>
[Newtonsoft.Json.JsonProperty("nationality")]
[System.Text.Json.Serialization.JsonPropertyName("nationality")]
public string Nationality { get; set; } = default!;
/// <summary>
/// 获取或设置地址。
/// </summary>
[Newtonsoft.Json.JsonProperty("address")]
[System.Text.Json.Serialization.JsonPropertyName("address")]
public string Address { get; set; } = default!;
/// <summary>
/// 获取或设置出生日期。
/// </summary>
[Newtonsoft.Json.JsonProperty("birth_date")]
[System.Text.Json.Serialization.JsonPropertyName("birth_date")]
public string BirthDate { get; set; } = default!;
/// <summary>
/// 获取或设置初次领证日期。
/// </summary>
[Newtonsoft.Json.JsonProperty("issue_date")]
[System.Text.Json.Serialization.JsonPropertyName("issue_date")]
public string IssueDate { get; set; } = default!;
/// <summary>
/// 获取或设置准驾车型。
/// </summary>
[Newtonsoft.Json.JsonProperty("car_class")]
[System.Text.Json.Serialization.JsonPropertyName("car_class")]
public string CarClass { get; set; } = default!;
/// <summary>
/// 获取或设置有效期限起始日。
/// </summary>
[Newtonsoft.Json.JsonProperty("valid_from")]
[System.Text.Json.Serialization.JsonPropertyName("valid_from")]
public string ValidDateFrom { get; set; } = default!;
/// <summary>
/// 获取或设置有效期限终止日。
/// </summary>
[Newtonsoft.Json.JsonProperty("valid_to")]
[System.Text.Json.Serialization.JsonPropertyName("valid_to")]
public string ValidDateTo { get; set; } = default!;
/// <summary>
/// 获取或设置印章文构。
/// </summary>
[Newtonsoft.Json.JsonProperty("official_seal")]
[System.Text.Json.Serialization.JsonPropertyName("official_seal")]
public string OfficialSeal { get; set; } = default!;
}
}

View File

@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cv/ocr/driving 接口的请求。</para>
/// </summary>
public class CVOCRDrivingRequest : CVOCRIdCardRequest
{
}
}

View File

@@ -0,0 +1,168 @@
using System;
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cv/ocr/driving 接口的响应。</para>
/// </summary>
public class CVOCRDrivingResponse : WechatApiResponse
{
public static class Types
{
public class CardPosition
{
public static class Types
{
public class Position : CVImageQrcodeResponse.Types.CodeResult.Types.Position
{
}
}
/// <summary>
/// 获取或设置识别坐标信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("pos")]
[System.Text.Json.Serialization.JsonPropertyName("pos")]
public Types.Position Position { get; set; } = default!;
}
public class ImageSize : CVImageQrcodeResponse.Types.ImageSize
{
}
}
/// <summary>
/// 获取或设置车牌号码。
/// </summary>
[Newtonsoft.Json.JsonProperty("plate_num")]
[System.Text.Json.Serialization.JsonPropertyName("plate_num")]
public string PlateNumber { get; set; } = default!;
/// <summary>
/// 获取或设置车辆类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("vehicle_type")]
[System.Text.Json.Serialization.JsonPropertyName("vehicle_type")]
public string VehicleType { get; set; } = default!;
/// <summary>
/// 获取或设置所有人。
/// </summary>
[Newtonsoft.Json.JsonProperty("owner")]
[System.Text.Json.Serialization.JsonPropertyName("owner")]
public string Owner { get; set; } = default!;
/// <summary>
/// 获取或设置住址。
/// </summary>
[Newtonsoft.Json.JsonProperty("addr")]
[System.Text.Json.Serialization.JsonPropertyName("addr")]
public string Address { get; set; } = default!;
/// <summary>
/// 获取或设置使用性质。
/// </summary>
[Newtonsoft.Json.JsonProperty("use_character")]
[System.Text.Json.Serialization.JsonPropertyName("use_character")]
public string UseCharacter { get; set; } = default!;
/// <summary>
/// 获取或设置品牌型号。
/// </summary>
[Newtonsoft.Json.JsonProperty("model")]
[System.Text.Json.Serialization.JsonPropertyName("model")]
public string VehicleModel { get; set; } = default!;
/// <summary>
/// 获取或设置车辆识别代号。
/// </summary>
[Newtonsoft.Json.JsonProperty("vin")]
[System.Text.Json.Serialization.JsonPropertyName("vin")]
public string VIN { get; set; } = default!;
/// <summary>
/// 获取或设置发动机号码。
/// </summary>
[Newtonsoft.Json.JsonProperty("engine_num")]
[System.Text.Json.Serialization.JsonPropertyName("engine_num")]
public string EngineNumber { get; set; } = default!;
/// <summary>
/// 获取或设置注册日期。
/// </summary>
[Newtonsoft.Json.JsonProperty("register_date")]
[System.Text.Json.Serialization.JsonPropertyName("register_date")]
public string RegisterDate { get; set; } = default!;
/// <summary>
/// 获取或设置发证日期。
/// </summary>
[Newtonsoft.Json.JsonProperty("issue_date")]
[System.Text.Json.Serialization.JsonPropertyName("issue_date")]
public string IssueDate { get; set; } = default!;
/// <summary>
/// 获取或设置车牌号码。
/// </summary>
[Newtonsoft.Json.JsonProperty("plate_num_b")]
[System.Text.Json.Serialization.JsonPropertyName("plate_num_b")]
public string PlateNumberB { get; set; } = default!;
/// <summary>
/// 获取或设置号牌。
/// </summary>
[Newtonsoft.Json.JsonProperty("record")]
[System.Text.Json.Serialization.JsonPropertyName("record")]
public string Record { get; set; } = default!;
/// <summary>
/// 获取或设置核定载人数。
/// </summary>
[Newtonsoft.Json.JsonProperty("passengers_num")]
[System.Text.Json.Serialization.JsonPropertyName("passengers_num")]
public string Passengers { get; set; } = default!;
/// <summary>
/// 获取或设置总质量。
/// </summary>
[Newtonsoft.Json.JsonProperty("total_quality")]
[System.Text.Json.Serialization.JsonPropertyName("total_quality")]
public string TotalQuality { get; set; } = default!;
/// <summary>
/// 获取或设置整备质量。
/// </summary>
[Newtonsoft.Json.JsonProperty("prepare_quality")]
[System.Text.Json.Serialization.JsonPropertyName("prepare_quality")]
public string PrepareQuality { get; set; } = default!;
/// <summary>
/// 获取或设置外廓尺寸。
/// </summary>
[Newtonsoft.Json.JsonProperty("overall_size")]
[System.Text.Json.Serialization.JsonPropertyName("overall_size")]
public string OverallSize { get; set; } = default!;
/// <summary>
/// 获取或设置卡片正面位置信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("card_position_front")]
[System.Text.Json.Serialization.JsonPropertyName("card_position_front")]
public Types.CardPosition? CardFrontPosition { get; set; }
/// <summary>
/// 获取或设置卡片反面位置信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("card_position_back")]
[System.Text.Json.Serialization.JsonPropertyName("card_position_back")]
public Types.CardPosition? CardBackPosition { get; set; }
/// <summary>
/// 获取或设置图片大小信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("img_size")]
[System.Text.Json.Serialization.JsonPropertyName("img_size")]
public Types.ImageSize ImageSize { get; set; } = default!;
}
}

View File

@@ -0,0 +1,19 @@
using System;
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cv/ocr/idcard 接口的请求。</para>
/// </summary>
public class CVOCRIdCardRequest : CVOCRCommonRequest
{
/// <summary>
/// <para>获取或设置图片识别模式。</para>
/// <para>默认值photo</para>
/// </summary>
[Newtonsoft.Json.JsonIgnore]
[System.Text.Json.Serialization.JsonIgnore]
public string ImageMode { get; set; } = "photo";
}
}

View File

@@ -0,0 +1,84 @@
using System;
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cv/ocr/idcard 接口的响应。</para>
/// </summary>
public class CVOCRIdCardResponse : WechatApiResponse
{
public static class Types
{
public class CertificationPosition
{
public static class Types
{
public class Position : CVImageQrcodeResponse.Types.CodeResult.Types.Position
{
}
}
/// <summary>
/// 获取或设置识别坐标信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("pos")]
[System.Text.Json.Serialization.JsonPropertyName("pos")]
public Types.Position Position { get; set; } = default!;
}
public class ImageSize : CVImageQrcodeResponse.Types.ImageSize
{
}
}
/// <summary>
/// 获取或设置正反面类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("type")]
[System.Text.Json.Serialization.JsonPropertyName("type")]
public string Type { get; set; } = default!;
/// <summary>
/// 获取或设置身份证号。
/// </summary>
[Newtonsoft.Json.JsonProperty("id")]
[System.Text.Json.Serialization.JsonPropertyName("id")]
public string? IdNumber { get; set; }
/// <summary>
/// 获取或设置姓名。
/// </summary>
[Newtonsoft.Json.JsonProperty("name")]
[System.Text.Json.Serialization.JsonPropertyName("name")]
public string? Name { get; set; }
/// <summary>
/// 获取或设置住址。
/// </summary>
[Newtonsoft.Json.JsonProperty("addr")]
[System.Text.Json.Serialization.JsonPropertyName("addr")]
public string? Address { get; set; }
/// <summary>
/// 获取或设置性别。
/// </summary>
[Newtonsoft.Json.JsonProperty("gender")]
[System.Text.Json.Serialization.JsonPropertyName("gender")]
public string? Gender { get; set; }
/// <summary>
/// 获取或设置民族。
/// </summary>
[Newtonsoft.Json.JsonProperty("nationality")]
[System.Text.Json.Serialization.JsonPropertyName("nationality")]
public string? Nationality { get; set; }
/// <summary>
/// 获取或设置有效期至。
/// </summary>
[Newtonsoft.Json.JsonProperty("valid_date")]
[System.Text.Json.Serialization.JsonPropertyName("valid_date")]
public string? ValidDate { get; set; }
}
}

View File

@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cv/ocr/platenum 接口的请求。</para>
/// </summary>
public class CVOCRPlateNumberRequest : CVOCRCommonRequest
{
}
}

View File

@@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cv/ocr/platenum 接口的响应。</para>
/// </summary>
public class CVOCRPlateNumberResponse : WechatApiResponse
{
/// <summary>
/// 获取或设置车牌号。
/// </summary>
[Newtonsoft.Json.JsonProperty("number")]
[System.Text.Json.Serialization.JsonPropertyName("number")]
public string PlateNumber { get; set; } = default!;
}
}