mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2026-02-11 02:07:49 +08:00
feat(wxapi): 新增小程序品牌申请相关接口
This commit is contained in:
@@ -127,6 +127,54 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region FamousBrand
|
||||||
|
/// <summary>
|
||||||
|
/// <para>异步调用 [POST] /wxa/sec/famousbrand/apply 接口。</para>
|
||||||
|
/// <para>
|
||||||
|
/// REF: <br/>
|
||||||
|
/// <![CDATA[ https://developers.weixin.qq.com/miniprogram/dev/server/API/order_shipping/api_famousbrandapply.html ]]>
|
||||||
|
/// </para>
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="client"></param>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <param name="cancellationToken"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static async Task<Models.WxaSecFamousBrandApplyResponse> ExecuteWxaSecFamousBrandApplyAsync(this WechatApiClient client, Models.WxaSecFamousBrandApplyRequest 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.Post, "wxa", "sec", "famousbrand", "apply")
|
||||||
|
.SetQueryParam("access_token", request.AccessToken);
|
||||||
|
|
||||||
|
return await client.SendFlurlRequestAsJsonAsync<Models.WxaSecFamousBrandApplyResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// <para>异步调用 [POST] /wxa/sec/famousbrand/get_status 接口。</para>
|
||||||
|
/// <para>
|
||||||
|
/// REF: <br/>
|
||||||
|
/// <![CDATA[ https://developers.weixin.qq.com/miniprogram/dev/server/API/order_shipping/api_getfamousbrandapplystatus.html ]]>
|
||||||
|
/// </para>
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="client"></param>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <param name="cancellationToken"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static async Task<Models.WxaSecFamousBrandGetStatusResponse> ExecuteWxaSecFamousBrandGetStatusAsync(this WechatApiClient client, Models.WxaSecFamousBrandGetStatusRequest 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.Post, "wxa", "sec", "famousbrand", "get_status")
|
||||||
|
.SetQueryParam("access_token", request.AccessToken);
|
||||||
|
|
||||||
|
return await client.SendFlurlRequestAsJsonAsync<Models.WxaSecFamousBrandGetStatusResponse>(flurlReq, data: request, cancellationToken: cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
#region Order
|
#region Order
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// <para>异步调用 [POST] /wxa/sec/order/upload_shipping_info 接口。</para>
|
/// <para>异步调用 [POST] /wxa/sec/order/upload_shipping_info 接口。</para>
|
||||||
|
|||||||
@@ -0,0 +1,85 @@
|
|||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /wxa/sec/famousbrand/apply 接口的请求。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class WxaSecFamousBrandApplyRequest : WechatApiRequest, IInferable<WxaSecFamousBrandApplyRequest, WxaSecFamousBrandApplyResponse>
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class Application
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class AuditInfo
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置品牌名称。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("brand_name")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("brand_name")]
|
||||||
|
public string BrandName { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置品牌类型。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("brand_type")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("brand_type")]
|
||||||
|
public int BrandType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置电商平台旗舰店。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("flagship_in_which_ec_platform")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("flagship_in_which_ec_platform")]
|
||||||
|
public string? FlagshipInWhichECPlatform { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置电商平台旗舰店佐证材料 MediaId 列表。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("ec_platform_proof_list")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("ec_platform_proof_list")]
|
||||||
|
public IList<string>? ECPlatformProofMediaIdList { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置其他补充说明材料 MediaId 列表。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("other_material_list")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("other_material_list")]
|
||||||
|
public IList<string>? OtherMaterialMediaIdList { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置有关部门认定的驰名商标佐证材料 MediaId 列表。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("authority_certified_proof_list")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("authority_certified_proof_list")]
|
||||||
|
public IList<string>? AuthorityCertifiedProofMediaIdList { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置品牌申请类型。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("apply_for")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("apply_for")]
|
||||||
|
public int ApplyForType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置品牌信息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("audit_info")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("audit_info")]
|
||||||
|
public Types.AuditInfo? AuditInfo { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置申请信息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("Application")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("Application")]
|
||||||
|
public Types.Application Application { get; set; } = new Types.Application();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /wxa/sec/famousbrand/apply 接口的响应。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class WxaSecFamousBrandApplyResponse : WechatApiResponse
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /wxa/sec/famousbrand/get_status 接口的请求。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class WxaSecFamousBrandGetStatusRequest : WechatApiRequest, IInferable<WxaSecFamousBrandGetStatusRequest, WxaSecFamousBrandGetStatusResponse>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// <para>表示 [POST] /wxa/sec/famousbrand/get_status 接口的响应。</para>
|
||||||
|
/// </summary>
|
||||||
|
public class WxaSecFamousBrandGetStatusResponse : WechatApiResponse
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class Progress
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置申请状态。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("status")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("status")]
|
||||||
|
public int Status { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class Application
|
||||||
|
{
|
||||||
|
public static class Types
|
||||||
|
{
|
||||||
|
public class AuditInfo
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置审核原因。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("audit_reason")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("audit_reason")]
|
||||||
|
public string? AuditReason { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置品牌申请类型。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("apply_for")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("apply_for")]
|
||||||
|
public int ApplyForType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置审核信息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("audit_info")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("audit_info")]
|
||||||
|
public Types.AuditInfo? AuditInfo { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置申请状态。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("status")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("status")]
|
||||||
|
public int Status { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置申请信息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("progress")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("progress")]
|
||||||
|
public Types.Progress Progress { get; set; } = default!;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取或设置申请信息。
|
||||||
|
/// </summary>
|
||||||
|
[Newtonsoft.Json.JsonProperty("application")]
|
||||||
|
[System.Text.Json.Serialization.JsonPropertyName("application")]
|
||||||
|
public Types.Application Application { get; set; } = default!;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"Application": {
|
||||||
|
"apply_for": 2,
|
||||||
|
"audit_info": {
|
||||||
|
"brand_name": "我的小店",
|
||||||
|
"brand_type": 4,
|
||||||
|
"flagship_in_which_ec_platform": "淘宝",
|
||||||
|
"ec_platform_proof_list": [
|
||||||
|
"R7oH3VuVWboktgKh3QABx2UqbeNoUDJzLdDjLVvi4kLEOtkCTAGmX9g8-xxxxxx"
|
||||||
|
],
|
||||||
|
"other_material_list": [
|
||||||
|
"R7oH3VuVWboktgKh3QABx2UqbeNoUDJzLdDjLVvi4kLEOtkCTAGmX9g8-xxxxxx"
|
||||||
|
],
|
||||||
|
"authority_certified_proof_list": [
|
||||||
|
"R7oH3VuVWboktgKh3QABx2UqbeNoUDJzLdDjLVvi4kLEOtkCTAGmX9g8-xxxxxx"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
"errcode": 0,
|
||||||
|
"errmsg": "ok",
|
||||||
|
"progress": {
|
||||||
|
"status": 0
|
||||||
|
},
|
||||||
|
"application": {
|
||||||
|
"apply_for": 1,
|
||||||
|
"audit_info": {
|
||||||
|
"audit_reason": ""
|
||||||
|
},
|
||||||
|
"status": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user