feat(wxapi): 新增视频号小店电子面单模板管理相关接口

This commit is contained in:
Fu Diwei 2024-01-13 16:09:30 +08:00
parent 41908b9684
commit 7539312601
22 changed files with 1002 additions and 0 deletions

View File

@ -1707,6 +1707,130 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
return await client.SendRequestWithJsonAsync<Models.ChannelsECLogisticsVirtualNumberGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
#region ECLogistics/EWaybill
#region ECLogistics/EWaybill/Template
/// <summary>
/// <para>异步调用 [POST] /channels/ec/logistics/ewaybill/biz/template/config 接口。</para>
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/ewaybill/get_template_config.html </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.ChannelsECLogisticsEWaybillTemplateConfigResponse> ExecuteChannelsECLogisticsEWaybillTemplateConfigAsync(this WechatApiClient client, Models.ChannelsECLogisticsEWaybillTemplateConfigRequest 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.Post, "channels", "ec", "logistics", "ewaybill", "biz", "template", "config")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendRequestWithJsonAsync<Models.ChannelsECLogisticsEWaybillTemplateConfigResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
/// <summary>
/// <para>异步调用 [POST] /channels/ec/logistics/ewaybill/biz/template/create 接口。</para>
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/ewaybill/add_template.html </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.ChannelsECLogisticsEWaybillTemplateCreateResponse> ExecuteChannelsECLogisticsEWaybillTemplateCreateAsync(this WechatApiClient client, Models.ChannelsECLogisticsEWaybillTemplateCreateRequest 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.Post, "channels", "ec", "logistics", "ewaybill", "biz", "template", "create")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendRequestWithJsonAsync<Models.ChannelsECLogisticsEWaybillTemplateCreateResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
/// <summary>
/// <para>异步调用 [POST] /channels/ec/logistics/ewaybill/biz/template/update 接口。</para>
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/ewaybill/update_template.html </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.ChannelsECLogisticsEWaybillTemplateUpdateResponse> ExecuteChannelsECLogisticsEWaybillTemplateUpdateAsync(this WechatApiClient client, Models.ChannelsECLogisticsEWaybillTemplateUpdateRequest 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.Post, "channels", "ec", "logistics", "ewaybill", "biz", "template", "update")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendRequestWithJsonAsync<Models.ChannelsECLogisticsEWaybillTemplateUpdateResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
/// <summary>
/// <para>异步调用 [POST] /channels/ec/logistics/ewaybill/biz/template/delete 接口。</para>
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/ewaybill/delete_template.html </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.ChannelsECLogisticsEWaybillTemplateDeleteResponse> ExecuteChannelsECLogisticsEWaybillTemplateDeleteAsync(this WechatApiClient client, Models.ChannelsECLogisticsEWaybillTemplateDeleteRequest 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.Post, "channels", "ec", "logistics", "ewaybill", "biz", "template", "delete")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendRequestWithJsonAsync<Models.ChannelsECLogisticsEWaybillTemplateDeleteResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
/// <summary>
/// <para>异步调用 [POST] /channels/ec/logistics/ewaybill/biz/template/get 接口。</para>
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/ewaybill/get_template.html </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.ChannelsECLogisticsEWaybillTemplateGetResponse> ExecuteChannelsECLogisticsEWaybillTemplateGetAsync(this WechatApiClient client, Models.ChannelsECLogisticsEWaybillTemplateGetRequest 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.Post, "channels", "ec", "logistics", "ewaybill", "biz", "template", "get")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendRequestWithJsonAsync<Models.ChannelsECLogisticsEWaybillTemplateGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
/// <summary>
/// <para>异步调用 [POST] /channels/ec/logistics/ewaybill/biz/template/getbyid 接口。</para>
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/ewaybill/get_templatebyid.html </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.ChannelsECLogisticsEWaybillTemplateGetByIdResponse> ExecuteChannelsECLogisticsEWaybillTemplateGetByIdAsync(this WechatApiClient client, Models.ChannelsECLogisticsEWaybillTemplateGetByIdRequest 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.Post, "channels", "ec", "logistics", "ewaybill", "biz", "template", "getbyid")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendRequestWithJsonAsync<Models.ChannelsECLogisticsEWaybillTemplateGetByIdResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
#endregion
#endregion
#endregion
#region ECSharer

View File

@ -0,0 +1,9 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/logistics/ewaybill/biz/template/config 接口的请求。</para>
/// </summary>
public class ChannelsECLogisticsEWaybillTemplateConfigRequest : WechatApiRequest, IInferable<ChannelsECLogisticsEWaybillTemplateConfigRequest, ChannelsECLogisticsEWaybillTemplateConfigResponse>
{
}
}

View File

@ -0,0 +1,112 @@
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/logistics/ewaybill/biz/template/config 接口的响应。</para>
/// </summary>
public class ChannelsECLogisticsEWaybillTemplateConfigResponse : WechatApiResponse
{
public static class Types
{
public class TemplateConfig
{
public static class Types
{
public class Config
{
public static class Types
{
public class CustomConfig
{
/// <summary>
/// 获取或设置自定义区域宽度(单位:像素)。
/// </summary>
[Newtonsoft.Json.JsonProperty("width")]
[System.Text.Json.Serialization.JsonPropertyName("width")]
public int? Width { get; set; }
/// <summary>
/// 获取或设置自定义区域高度(单位:像素)。
/// </summary>
[Newtonsoft.Json.JsonProperty("height")]
[System.Text.Json.Serialization.JsonPropertyName("height")]
public int? Height { get; set; }
/// <summary>
/// 获取或设置自定义区域到顶部距离(单位:像素)。
/// </summary>
[Newtonsoft.Json.JsonProperty("top")]
[System.Text.Json.Serialization.JsonPropertyName("top")]
public int? Top { get; set; }
/// <summary>
/// 获取或设置自定义区域到左边距离(单位:像素)。
/// </summary>
[Newtonsoft.Json.JsonProperty("left")]
[System.Text.Json.Serialization.JsonPropertyName("left")]
public int? Left { get; set; }
}
}
/// <summary>
/// 获取或设置模板类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("type")]
[System.Text.Json.Serialization.JsonPropertyName("type")]
public string Type { get; set; } = default!;
/// <summary>
/// 获取或设置模板描述。
/// </summary>
[Newtonsoft.Json.JsonProperty("desc")]
[System.Text.Json.Serialization.JsonPropertyName("desc")]
public string Description { get; set; } = default!;
/// <summary>
/// 获取或设置面单宽度(单位:毫米)。
/// </summary>
[Newtonsoft.Json.JsonProperty("width")]
[System.Text.Json.Serialization.JsonPropertyName("width")]
public int Width { get; set; }
/// <summary>
/// 获取或设置面单高度(单位:毫米)。
/// </summary>
[Newtonsoft.Json.JsonProperty("height")]
[System.Text.Json.Serialization.JsonPropertyName("height")]
public int Height { get; set; }
/// <summary>
/// 获取或设置标准模板 URL。
/// </summary>
[Newtonsoft.Json.JsonProperty("url")]
[System.Text.Json.Serialization.JsonPropertyName("url")]
public string Url { get; set; } = default!;
/// <summary>
/// 获取或设置自定义模板配置。
/// </summary>
[Newtonsoft.Json.JsonProperty("custom_config")]
[System.Text.Json.Serialization.JsonPropertyName("custom_config")]
public Types.CustomConfig? CustomConfig { get; set; }
}
}
/// <summary>
/// 获取或设置一联单模板配置信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("single")]
[System.Text.Json.Serialization.JsonPropertyName("single")]
public Types.Config SingleConfig { get; set; } = default!;
}
}
/// <summary>
/// 获取或设置模板配置信息字典。
/// </summary>
[Newtonsoft.Json.JsonProperty("config")]
[System.Text.Json.Serialization.JsonPropertyName("config")]
public IDictionary<string, Types.TemplateConfig> TemplateConfigMap { get; set; } = default!;
}
}

View File

@ -0,0 +1,99 @@
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/logistics/ewaybill/biz/template/create 接口的请求。</para>
/// </summary>
public class ChannelsECLogisticsEWaybillTemplateCreateRequest : WechatApiRequest, IInferable<ChannelsECLogisticsEWaybillTemplateCreateRequest, ChannelsECLogisticsEWaybillTemplateCreateResponse>
{
public static class Types
{
public class Template
{
public static class Types
{
public class Option
{
/// <summary>
/// 获取或设置信息类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("option_id")]
[System.Text.Json.Serialization.JsonPropertyName("option_id")]
public int OptionId { get; set; }
/// <summary>
/// 获取或设置打印字号。
/// </summary>
[Newtonsoft.Json.JsonProperty("font_size")]
[System.Text.Json.Serialization.JsonPropertyName("font_size")]
public int FontSize { get; set; }
/// <summary>
/// 获取或设置字体是否加粗。
/// </summary>
[Newtonsoft.Json.JsonProperty("is_bold")]
[System.Text.Json.Serialization.JsonPropertyName("is_bold")]
public bool? IsBold { get; set; }
/// <summary>
/// 获取或设置是否选用此信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("is_open")]
[System.Text.Json.Serialization.JsonPropertyName("is_open")]
public bool? IsOpen { get; set; }
}
}
/// <summary>
/// 获取或设置模板类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("template_type")]
[System.Text.Json.Serialization.JsonPropertyName("template_type")]
public string Type { get; set; } = string.Empty;
/// <summary>
/// 获取或设置模板名称。
/// </summary>
[Newtonsoft.Json.JsonProperty("template_name")]
[System.Text.Json.Serialization.JsonPropertyName("template_name")]
public string Name { get; set; } = string.Empty;
/// <summary>
/// 获取或设置模板描述。
/// </summary>
[Newtonsoft.Json.JsonProperty("template_desc")]
[System.Text.Json.Serialization.JsonPropertyName("template_desc")]
public string Description { get; set; } = string.Empty;
/// <summary>
/// 获取或设置模板信息选项。
/// </summary>
[Newtonsoft.Json.JsonProperty("options")]
[System.Text.Json.Serialization.JsonPropertyName("options")]
public IList<Types.Option> Options { get; set; } = new List<Types.Option>();
/// <summary>
/// 获取或设置是否为该快递公司默认模板。
/// </summary>
[Newtonsoft.Json.JsonProperty("is_default")]
[System.Text.Json.Serialization.JsonPropertyName("is_default")]
public bool IsDefault { get; set; }
}
}
/// <summary>
/// 获取或设置快递公司 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("delivery_id")]
[System.Text.Json.Serialization.JsonPropertyName("delivery_id")]
public string DeliveryId { get; set; } = string.Empty;
/// <summary>
/// 获取或设置模板信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("info")]
[System.Text.Json.Serialization.JsonPropertyName("info")]
public Types.Template Template { get; set; } = new Types.Template();
}
}

View File

@ -0,0 +1,22 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/logistics/ewaybill/biz/template/create 接口的响应。</para>
/// </summary>
public class ChannelsECLogisticsEWaybillTemplateCreateResponse : WechatApiResponse
{
/// <summary>
/// 获取或设置快递公司 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("delivery_id")]
[System.Text.Json.Serialization.JsonPropertyName("delivery_id")]
public string DeliveryId { get; set; } = default!;
/// <summary>
/// 获取或设置模板 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("template_id")]
[System.Text.Json.Serialization.JsonPropertyName("template_id")]
public string TemplateId { get; set; } = default!;
}
}

View File

@ -0,0 +1,22 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/logistics/ewaybill/biz/template/delete 接口的请求。</para>
/// </summary>
public class ChannelsECLogisticsEWaybillTemplateDeleteRequest : WechatApiRequest, IInferable<ChannelsECLogisticsEWaybillTemplateDeleteRequest, ChannelsECLogisticsEWaybillTemplateDeleteResponse>
{
/// <summary>
/// 获取或设置快递公司 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("delivery_id")]
[System.Text.Json.Serialization.JsonPropertyName("delivery_id")]
public string DeliveryId { get; set; } = string.Empty;
/// <summary>
/// 获取或设置模板 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("template_id")]
[System.Text.Json.Serialization.JsonPropertyName("template_id")]
public string TemplateId { get; set; } = string.Empty;
}
}

View File

@ -0,0 +1,9 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/logistics/ewaybill/biz/template/delete 接口的响应。</para>
/// </summary>
public class ChannelsECLogisticsEWaybillTemplateDeleteResponse : WechatApiResponse
{
}
}

View File

@ -0,0 +1,22 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/logistics/ewaybill/biz/template/getbyid 接口的请求。</para>
/// </summary>
public class ChannelsECLogisticsEWaybillTemplateGetByIdRequest : WechatApiRequest, IInferable<ChannelsECLogisticsEWaybillTemplateGetByIdRequest, ChannelsECLogisticsEWaybillTemplateGetByIdResponse>
{
/// <summary>
/// 获取或设置快递公司 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("delivery_id")]
[System.Text.Json.Serialization.JsonPropertyName("delivery_id")]
public string DeliveryId { get; set; } = string.Empty;
/// <summary>
/// 获取或设置模板 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("template_id")]
[System.Text.Json.Serialization.JsonPropertyName("template_id")]
public string TemplateId { get; set; } = string.Empty;
}
}

View File

@ -0,0 +1,22 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/logistics/ewaybill/biz/template/getbyid 接口的响应。</para>
/// </summary>
public class ChannelsECLogisticsEWaybillTemplateGetByIdResponse : WechatApiResponse
{
public static class Types
{
public class Template : ChannelsECLogisticsEWaybillTemplateGetResponse.Types.Template
{
}
}
/// <summary>
/// 获取或设置模板信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("template_info")]
[System.Text.Json.Serialization.JsonPropertyName("template_info")]
public Types.Template Template { get; set; } = default!;
}
}

View File

@ -0,0 +1,15 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/logistics/ewaybill/biz/template/get 接口的请求。</para>
/// </summary>
public class ChannelsECLogisticsEWaybillTemplateGetRequest : WechatApiRequest, IInferable<ChannelsECLogisticsEWaybillTemplateGetRequest, ChannelsECLogisticsEWaybillTemplateGetResponse>
{
/// <summary>
/// 获取或设置快递公司 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("delivery_id")]
[System.Text.Json.Serialization.JsonPropertyName("delivery_id")]
public string? DeliveryId { get; set; }
}
}

View File

@ -0,0 +1,135 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/logistics/ewaybill/biz/template/get 接口的响应。</para>
/// </summary>
public class ChannelsECLogisticsEWaybillTemplateGetResponse : WechatApiResponse
{
public static class Types
{
public class TemplateList
{
/// <summary>
/// 获取或设置快递公司 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("delivery_id")]
[System.Text.Json.Serialization.JsonPropertyName("delivery_id")]
public string DeliveryId { get; set; } = default!;
/// <summary>
/// 获取或设置默认模板 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("default_template_id")]
[System.Text.Json.Serialization.JsonPropertyName("default_template_id")]
public string? DefaultTemplateId { get; set; }
/// <summary>
/// 获取或设置模板列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("template_list")]
[System.Text.Json.Serialization.JsonPropertyName("template_list")]
public Types.Template[] Items { get; set; } = default!;
}
public class Template
{
public static class Types
{
public class Option
{
/// <summary>
/// 获取或设置信息类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("option_id")]
[System.Text.Json.Serialization.JsonPropertyName("option_id")]
public int OptionId { get; set; }
/// <summary>
/// 获取或设置打印字号。
/// </summary>
[Newtonsoft.Json.JsonProperty("font_size")]
[System.Text.Json.Serialization.JsonPropertyName("font_size")]
public int FontSize { get; set; }
/// <summary>
/// 获取或设置字体是否加粗。
/// </summary>
[Newtonsoft.Json.JsonProperty("is_bold")]
[System.Text.Json.Serialization.JsonPropertyName("is_bold")]
public bool IsBold { get; set; }
/// <summary>
/// 获取或设置是否选用此信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("is_open")]
[System.Text.Json.Serialization.JsonPropertyName("is_open")]
public bool IsOpen { get; set; }
}
}
/// <summary>
/// 获取或设置模板 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("template_id")]
[System.Text.Json.Serialization.JsonPropertyName("template_id")]
public string TemplateId { get; set; } = default!;
/// <summary>
/// 获取或设置模板类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("template_type")]
[System.Text.Json.Serialization.JsonPropertyName("template_type")]
public string Type { get; set; } = default!;
/// <summary>
/// 获取或设置模板名称。
/// </summary>
[Newtonsoft.Json.JsonProperty("template_name")]
[System.Text.Json.Serialization.JsonPropertyName("template_name")]
public string Name { get; set; } = default!;
/// <summary>
/// 获取或设置模板描述。
/// </summary>
[Newtonsoft.Json.JsonProperty("template_desc")]
[System.Text.Json.Serialization.JsonPropertyName("template_desc")]
public string Description { get; set; } = default!;
/// <summary>
/// 获取或设置模板信息选项列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("options")]
[System.Text.Json.Serialization.JsonPropertyName("options")]
public Types.Option[] Options { get; set; } = default!;
/// <summary>
/// 获取或设置是否为该快递公司默认模板。
/// </summary>
[Newtonsoft.Json.JsonProperty("is_default")]
[System.Text.Json.Serialization.JsonPropertyName("is_default")]
public bool IsDefault { get; set; }
/// <summary>
/// 获取或设置创建时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("create_time")]
[System.Text.Json.Serialization.JsonPropertyName("create_time")]
public long CreateTimestamp { get; set; }
/// <summary>
/// 获取或设置更新时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("update_time")]
[System.Text.Json.Serialization.JsonPropertyName("update_time")]
public long UpdateTimestamp { get; set; }
}
}
/// <summary>
/// 获取或设置模板列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("total_template")]
[System.Text.Json.Serialization.JsonPropertyName("total_template")]
public Types.TemplateList[] TemplateList { get; set; } = default!;
}
}

View File

@ -0,0 +1,51 @@
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/logistics/ewaybill/biz/template/update 接口的请求。</para>
/// </summary>
public class ChannelsECLogisticsEWaybillTemplateUpdateRequest : WechatApiRequest, IInferable<ChannelsECLogisticsEWaybillTemplateUpdateRequest, ChannelsECLogisticsEWaybillTemplateUpdateResponse>
{
public static class Types
{
public class Template : ChannelsECLogisticsEWaybillTemplateCreateRequest.Types.Template
{
public static new class Types
{
public class Option : ChannelsECLogisticsEWaybillTemplateCreateRequest.Types.Template.Types.Option
{
}
}
/// <summary>
/// 获取或设置模板 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("template_id")]
[System.Text.Json.Serialization.JsonPropertyName("template_id")]
public string TemplateId { get; set; } = string.Empty;
/// <summary>
/// 获取或设置模板信息选项。
/// </summary>
[Newtonsoft.Json.JsonProperty("options")]
[System.Text.Json.Serialization.JsonPropertyName("options")]
public new IList<Types.Option> Options { get; set; } = new List<Types.Option>();
}
}
/// <summary>
/// 获取或设置快递公司 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("delivery_id")]
[System.Text.Json.Serialization.JsonPropertyName("delivery_id")]
public string DeliveryId { get; set; } = string.Empty;
/// <summary>
/// 获取或设置模板信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("info")]
[System.Text.Json.Serialization.JsonPropertyName("info")]
public Types.Template Template { get; set; } = new Types.Template();
}
}

View File

@ -0,0 +1,9 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/logistics/ewaybill/biz/template/update 接口的响应。</para>
/// </summary>
public class ChannelsECLogisticsEWaybillTemplateUpdateResponse : WechatApiResponse
{
}
}

View File

@ -0,0 +1,81 @@
{
"errcode": 0,
"errmsg": "ok",
"config": {
"YTO": {
"single": {
"type": "single",
"desc": "一联单标准模板",
"width": 76,
"height": 130,
"url": "https://res.wx.qq.com/shop/public/2023-10-23/f81ed53c-8c35-4ea7-b4ec-9ac8d283c9a5.html",
"custom_config": {
"width": 656,
"height": 300,
"top": 900,
"left": 60
}
}
},
"ZTO": {
"single": {
"type": "single",
"desc": "一联单标准模板",
"width": 76,
"height": 130,
"url": "https://res.wx.qq.com/shop/public/2023-10-23/e500a351-d668-4851-97ff-79137f76cae0.html",
"custom_config": {
"width": 656,
"height": 300,
"left": 60,
"top": 930
}
}
},
"YUNDA": {
"single": {
"type": "single",
"desc": "一联单标准模板",
"width": 76,
"height": 130,
"url": "https://res.wx.qq.com/shop/public/2023-10-23/29c184fa-5708-45e3-8332-426d9cd59d89.html",
"custom_config": {
"width": 656,
"height": 340,
"left": 60,
"top": 884
}
}
},
"JTSD": {
"single": {
"type": "single",
"desc": "一联单标准模板",
"width": 76,
"height": 130,
"url": "https://res.wx.qq.com/shop/public/2023-10-23/53dbf069-f44d-44f3-9113-6cae2bd9d536.html",
"custom_config": {
"width": 656,
"height": 300,
"top": 865,
"left": 60
}
}
},
"STO": {
"single": {
"type": "single",
"desc": "一联单标准模板",
"width": 76,
"height": 130,
"url": "https://res.wx.qq.com/shop/public/2023-10-23/baefa5e0-eeef-41e4-b513-12eee76f9975.html",
"custom_config": {
"width": 712,
"height": 300,
"left": 24,
"top": 754
}
}
}
}
}

View File

@ -0,0 +1,59 @@
{
"delivery_id": "xxxx",
"info": {
"template_name": "name_xxxx",
"template_desc": "快递一联单",
"template_type": "single",
"options": [
{
"option_id": 0,
"font_size": 0,
"is_bold": false,
"is_open": false
},
{
"option_id": 1,
"font_size": 0,
"is_bold": false,
"is_open": true
},
{
"option_id": 2,
"font_size": 0,
"is_bold": false,
"is_open": false
},
{
"option_id": 3,
"font_size": 0,
"is_bold": false,
"is_open": false
},
{
"option_id": 4,
"font_size": 0,
"is_bold": false,
"is_open": true
},
{
"option_id": 5,
"font_size": 0,
"is_bold": false,
"is_open": true
},
{
"option_id": 6,
"font_size": 0,
"is_bold": false,
"is_open": true
},
{
"option_id": 7,
"font_size": 0,
"is_bold": false,
"is_open": true
}
],
"is_default": true
}
}

View File

@ -0,0 +1,6 @@
{
"errcode": 0,
"errmsg": "ok",
"delivery_id": "XXX",
"template_id": "xxxxxxxxxx"
}

View File

@ -0,0 +1,63 @@
{
"errcode": 0,
"errmsg": "ok",
"template_info": {
"template_id": "66xxxxxxxxxx6",
"template_name": "naxxxxxxxx2",
"template_desc": "一联单标准模板",
"template_type": "single",
"create_time": 1693291995,
"update_time": 1693291995,
"is_default": true,
"options": [
{
"option_id": 0,
"font_size": 0,
"is_bold": false,
"is_open": false
},
{
"option_id": 1,
"font_size": 0,
"is_bold": false,
"is_open": true
},
{
"option_id": 2,
"font_size": 0,
"is_bold": false,
"is_open": false
},
{
"option_id": 3,
"font_size": 0,
"is_bold": false,
"is_open": false
},
{
"option_id": 4,
"font_size": 0,
"is_bold": false,
"is_open": true
},
{
"option_id": 5,
"font_size": 0,
"is_bold": false,
"is_open": true
},
{
"option_id": 7,
"font_size": 0,
"is_bold": false,
"is_open": true
},
{
"option_id": 6,
"font_size": 0,
"is_bold": false,
"is_open": true
}
]
}
}

View File

@ -0,0 +1,71 @@
{
"errcode": 0,
"errmsg": "ok",
"total_template": [
{
"default_template_id": "66xxxxxxxxx",
"delivery_id": "YTO",
"template_list": [
{
"is_default": true,
"template_desc": "一联单标准模板",
"template_id": "66xxxxxxxx",
"template_name": "一联单zzz",
"template_type": "single",
"update_time": "1690426204",
"create_time": "1690426204",
"options": [
{
"option_id": 0,
"font_size": 0,
"is_bold": false,
"is_open": false
},
{
"option_id": 1,
"font_size": 0,
"is_bold": false,
"is_open": true
},
{
"option_id": 2,
"font_size": 0,
"is_bold": false,
"is_open": false
},
{
"option_id": 3,
"font_size": 0,
"is_bold": false,
"is_open": false
},
{
"option_id": 4,
"font_size": 0,
"is_bold": false,
"is_open": true
},
{
"option_id": 5,
"font_size": 0,
"is_bold": false,
"is_open": true
},
{
"option_id": 6,
"font_size": 0,
"is_bold": false,
"is_open": true
},
{
"option_id": 7,
"font_size": 0,
"is_bold": false,
"is_open": true
}
]
}
]
}
]
}

View File

@ -0,0 +1,60 @@
{
"delivery_id": "xxxx",
"info": {
"template_id": "6xxxxxxxxx1",
"template_name": "name_xxxx",
"template_desc": "快递一联单",
"template_type": "single",
"options": [
{
"option_id": 0,
"font_size": 0,
"is_bold": false,
"is_open": false
},
{
"option_id": 1,
"font_size": 0,
"is_bold": false,
"is_open": true
},
{
"option_id": 2,
"font_size": 0,
"is_bold": false,
"is_open": false
},
{
"option_id": 3,
"font_size": 0,
"is_bold": false,
"is_open": false
},
{
"option_id": 4,
"font_size": 0,
"is_bold": false,
"is_open": true
},
{
"option_id": 5,
"font_size": 0,
"is_bold": false,
"is_open": true
},
{
"option_id": 6,
"font_size": 0,
"is_bold": false,
"is_open": true
},
{
"option_id": 7,
"font_size": 0,
"is_bold": false,
"is_open": true
}
],
"is_default": true
}
}