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

@@ -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
{
}
}