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

This commit is contained in:
Fu Diwei 2024-01-15 12:38:45 +08:00
parent 7539312601
commit e288b02fb2
28 changed files with 1686 additions and 1 deletions

View File

@ -0,0 +1,64 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
{
/// <summary>
/// <para>表示 EVENT.ewaybill_push_path 事件的数据。</para>
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/ewaybill/push_path.html </para>
/// </summary>
public class EWaybillPushPathEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable
{
public static class Types
{
public class Waybill
{
/// <summary>
/// 获取或设置电子面单 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("ewaybill_order_id")]
[System.Text.Json.Serialization.JsonPropertyName("ewaybill_order_id")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalStringReadOnlyConverter))]
[System.Xml.Serialization.XmlElement("ewaybill_order_id")]
public string EWaybillOrderId { get; set; } = default!;
/// <summary>
/// 获取或设置快递单号。
/// </summary>
[Newtonsoft.Json.JsonProperty("waybill_id")]
[System.Text.Json.Serialization.JsonPropertyName("waybill_id")]
[System.Xml.Serialization.XmlElement("waybill_id")]
public string WaybillId { get; set; } = default!;
/// <summary>
/// 获取或设置轨迹状态。
/// </summary>
[Newtonsoft.Json.JsonProperty("status")]
[System.Text.Json.Serialization.JsonPropertyName("status")]
[System.Xml.Serialization.XmlElement("status")]
public int Status { get; set; }
/// <summary>
/// 获取或设置轨迹描述。
/// </summary>
[Newtonsoft.Json.JsonProperty("desc")]
[System.Text.Json.Serialization.JsonPropertyName("desc")]
[System.Xml.Serialization.XmlElement("desc")]
public string Description { get; set; } = default!;
/// <summary>
/// 获取或设置更新时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("update_time")]
[System.Text.Json.Serialization.JsonPropertyName("update_time")]
[System.Xml.Serialization.XmlElement("update_time")]
public long UpdateTimestamp { get; set; }
}
}
/// <summary>
/// 获取或设置快递信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("waybill_info")]
[System.Text.Json.Serialization.JsonPropertyName("waybill_info")]
[System.Xml.Serialization.XmlElement("waybill_info")]
public Types.Waybill Waybill { get; set; } = default!;
}
}

View File

@ -1709,6 +1709,132 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
}
#region ECLogistics/EWaybill
#region ECLogistics/EWaybill/Account
/// <summary>
/// <para>异步调用 [POST] /channels/ec/logistics/ewaybill/biz/account/get 接口。</para>
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/ewaybill/get_account.html </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.ChannelsECLogisticsEWaybillAccountGetResponse> ExecuteChannelsECLogisticsEWaybillAccountGetAsync(this WechatApiClient client, Models.ChannelsECLogisticsEWaybillAccountGetRequest 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", "account", "get")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendRequestWithJsonAsync<Models.ChannelsECLogisticsEWaybillAccountGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
#endregion
#region ECLogistics/EWaybill/Delivery
/// <summary>
/// <para>异步调用 [POST] /channels/ec/logistics/ewaybill/biz/delivery/get 接口。</para>
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/ewaybill/get_acctdeliverylist.html </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.ChannelsECLogisticsEWaybillDeliveryGetResponse> ExecuteChannelsECLogisticsEWaybillDeliveryGetAsync(this WechatApiClient client, Models.ChannelsECLogisticsEWaybillDeliveryGetRequest 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", "delivery", "get")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendRequestWithJsonAsync<Models.ChannelsECLogisticsEWaybillDeliveryGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
#endregion
#region ECLogistics/EWaybill/Order
/// <summary>
/// <para>异步调用 [POST] /channels/ec/logistics/ewaybill/biz/order/precreate 接口。</para>
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/ewaybill/precreate_order.html </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.ChannelsECLogisticsEWaybillOrderPrecreateResponse> ExecuteChannelsECLogisticsEWaybillOrderPrecreateAsync(this WechatApiClient client, Models.ChannelsECLogisticsEWaybillOrderPrecreateRequest 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", "order", "precreate")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendRequestWithJsonAsync<Models.ChannelsECLogisticsEWaybillOrderPrecreateResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
/// <summary>
/// <para>异步调用 [POST] /channels/ec/logistics/ewaybill/biz/order/create 接口。</para>
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/ewaybill/create_order.html </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.ChannelsECLogisticsEWaybillOrderCreateResponse> ExecuteChannelsECLogisticsEWaybillOrderCreateAsync(this WechatApiClient client, Models.ChannelsECLogisticsEWaybillOrderCreateRequest 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", "order", "create")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendRequestWithJsonAsync<Models.ChannelsECLogisticsEWaybillOrderCreateResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
/// <summary>
/// <para>异步调用 [POST] /channels/ec/logistics/ewaybill/biz/order/cancel 接口。</para>
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/ewaybill/cancel_order.html </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.ChannelsECLogisticsEWaybillOrderCancelResponse> ExecuteChannelsECLogisticsEWaybillOrderCancelAsync(this WechatApiClient client, Models.ChannelsECLogisticsEWaybillOrderCancelRequest 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", "order", "cancel")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendRequestWithJsonAsync<Models.ChannelsECLogisticsEWaybillOrderCancelResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
/// <summary>
/// <para>异步调用 [POST] /channels/ec/logistics/ewaybill/biz/order/get 接口。</para>
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/ewaybill/get_order.html </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.ChannelsECLogisticsEWaybillOrderGetResponse> ExecuteChannelsECLogisticsEWaybillOrderGetAsync(this WechatApiClient client, Models.ChannelsECLogisticsEWaybillOrderGetRequest 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", "order", "get")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendRequestWithJsonAsync<Models.ChannelsECLogisticsEWaybillOrderGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
#endregion
#region ECLogistics/EWaybill/Template
/// <summary>
/// <para>异步调用 [POST] /channels/ec/logistics/ewaybill/biz/template/config 接口。</para>

View File

@ -0,0 +1,51 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/logistics/ewaybill/biz/account/get 接口的请求。</para>
/// </summary>
public class ChannelsECLogisticsEWaybillAccountGetRequest : WechatApiRequest, IInferable<ChannelsECLogisticsEWaybillAccountGetRequest, ChannelsECLogisticsEWaybillAccountGetResponse>
{
/// <summary>
/// 获取或设置快递公司 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("delivery_id")]
[System.Text.Json.Serialization.JsonPropertyName("delivery_id")]
public string? DeliveryId { get; set; }
/// <summary>
/// 获取或设置电子面单账号 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("acct_id")]
[System.Text.Json.Serialization.JsonPropertyName("acct_id")]
public string? AccountId { get; set; }
/// <summary>
/// 获取或设置状态。
/// </summary>
[Newtonsoft.Json.JsonProperty("status")]
[System.Text.Json.Serialization.JsonPropertyName("status")]
public int? Status { get; set; }
/// <summary>
/// 获取或设置是否需要查询库存。
/// </summary>
[Newtonsoft.Json.JsonProperty("need_balance")]
[System.Text.Json.Serialization.JsonPropertyName("need_balance")]
public bool RequireBalance { get; set; }
/// <summary>
/// 获取或设置分页起始位置。
/// </summary>
[Newtonsoft.Json.JsonProperty("offset")]
[System.Text.Json.Serialization.JsonPropertyName("offset")]
public int? Offset { get; set; }
/// <summary>
/// 获取或设置分页每页数量。
/// <para>默认值10</para>
/// </summary>
[Newtonsoft.Json.JsonProperty("limit")]
[System.Text.Json.Serialization.JsonPropertyName("limit")]
public int Limit { get; set; } = 10;
}
}

View File

@ -0,0 +1,378 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/logistics/ewaybill/biz/account/get 接口的响应。</para>
/// </summary>
public class ChannelsECLogisticsEWaybillAccountGetResponse : WechatApiResponse
{
public static class Types
{
public class Account
{
public static class Types
{
public class SiteInfo
{
public static class Types
{
public class Address
{
/// <summary>
/// 获取或设置国家编码。
/// </summary>
[Newtonsoft.Json.JsonProperty("country_code")]
[System.Text.Json.Serialization.JsonPropertyName("country_code")]
public string CountryCode { get; set; } = default!;
/// <summary>
/// 获取或设置省份编码。
/// </summary>
[Newtonsoft.Json.JsonProperty("province_code")]
[System.Text.Json.Serialization.JsonPropertyName("province_code")]
public string ProvinceCode { get; set; } = default!;
/// <summary>
/// 获取或设置省份名称。
/// </summary>
[Newtonsoft.Json.JsonProperty("province_name")]
[System.Text.Json.Serialization.JsonPropertyName("province_name")]
public string ProvinceName { get; set; } = default!;
/// <summary>
/// 获取或设置城市编码。
/// </summary>
[Newtonsoft.Json.JsonProperty("city_code")]
[System.Text.Json.Serialization.JsonPropertyName("city_code")]
public string CityCode { get; set; } = default!;
/// <summary>
/// 获取或设置城市名称。
/// </summary>
[Newtonsoft.Json.JsonProperty("city_name")]
[System.Text.Json.Serialization.JsonPropertyName("city_name")]
public string CityName { get; set; } = default!;
/// <summary>
/// 获取或设置区县编码。
/// </summary>
[Newtonsoft.Json.JsonProperty("district_code")]
[System.Text.Json.Serialization.JsonPropertyName("district_code")]
public string DistrictCode { get; set; } = default!;
/// <summary>
/// 获取或设置区县名称。
/// </summary>
[Newtonsoft.Json.JsonProperty("district_name")]
[System.Text.Json.Serialization.JsonPropertyName("district_name")]
public string DistrictName { get; set; } = default!;
/// <summary>
/// 获取或设置街道编码。
/// </summary>
[Newtonsoft.Json.JsonProperty("street_code")]
[System.Text.Json.Serialization.JsonPropertyName("street_code")]
public string StreetCode { get; set; } = default!;
/// <summary>
/// 获取或设置街道名称。
/// </summary>
[Newtonsoft.Json.JsonProperty("street_name")]
[System.Text.Json.Serialization.JsonPropertyName("street_name")]
public string StreetName { get; set; } = default!;
/// <summary>
/// 获取或设置详细地址。
/// </summary>
[Newtonsoft.Json.JsonProperty("detail_address")]
[System.Text.Json.Serialization.JsonPropertyName("detail_address")]
public string DetailAddress { get; set; } = default!;
}
public class Contact
{
/// <summary>
/// 获取或设置联系人。
/// </summary>
[Newtonsoft.Json.JsonProperty("name")]
[System.Text.Json.Serialization.JsonPropertyName("name")]
public string Name { get; set; } = default!;
/// <summary>
/// 获取或设置手机号码。
/// </summary>
[Newtonsoft.Json.JsonProperty("mobile")]
[System.Text.Json.Serialization.JsonPropertyName("mobile")]
public string MobileNumber { get; set; } = default!;
/// <summary>
/// 获取或设置电话号码。
/// </summary>
[Newtonsoft.Json.JsonProperty("phone")]
[System.Text.Json.Serialization.JsonPropertyName("phone")]
public string PhoneNumber { get; set; } = default!;
}
}
/// <summary>
/// 获取或设置快递公司 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("delivery_id")]
[System.Text.Json.Serialization.JsonPropertyName("delivery_id")]
public string DeliveryId { get; set; } = default!;
/// <summary>
/// 获取或设置网点运营状态。
/// </summary>
[Newtonsoft.Json.JsonProperty("site_status")]
[System.Text.Json.Serialization.JsonPropertyName("site_status")]
public int SiteStatus { get; set; }
/// <summary>
/// 获取或设置网点编码。
/// </summary>
[Newtonsoft.Json.JsonProperty("site_code")]
[System.Text.Json.Serialization.JsonPropertyName("site_code")]
public string SiteCode { get; set; } = default!;
/// <summary>
/// 获取或设置网点名称。
/// </summary>
[Newtonsoft.Json.JsonProperty("site_name")]
[System.Text.Json.Serialization.JsonPropertyName("site_name")]
public string SiteName { get; set; } = default!;
/// <summary>
/// 获取或设置网点全名。
/// </summary>
[Newtonsoft.Json.JsonProperty("site_fullname")]
[System.Text.Json.Serialization.JsonPropertyName("site_fullname")]
public string SiteFullName { get; set; } = default!;
/// <summary>
/// 获取或设置地址信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("address")]
[System.Text.Json.Serialization.JsonPropertyName("address")]
public Types.Address Address { get; set; } = default!;
/// <summary>
/// 获取或设置联系方式信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("contact")]
[System.Text.Json.Serialization.JsonPropertyName("contact")]
public Types.Contact Contact { get; set; } = default!;
}
public class ShareInfo
{
/// <summary>
/// 获取或设置快递公司 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("delivery_id")]
[System.Text.Json.Serialization.JsonPropertyName("delivery_id")]
public string DeliveryId { get; set; } = default!;
/// <summary>
/// 获取或设置网点编码。
/// </summary>
[Newtonsoft.Json.JsonProperty("site_code")]
[System.Text.Json.Serialization.JsonPropertyName("site_code")]
public string SiteCode { get; set; } = default!;
/// <summary>
/// 获取或设置网点名称。
/// </summary>
[Newtonsoft.Json.JsonProperty("site_name")]
[System.Text.Json.Serialization.JsonPropertyName("site_name")]
public string SiteName { get; set; } = default!;
/// <summary>
/// 获取或设置共享 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("share_id")]
[System.Text.Json.Serialization.JsonPropertyName("share_id")]
public string ShareId { get; set; } = default!;
/// <summary>
/// 获取或设置店铺 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("shop_id")]
[System.Text.Json.Serialization.JsonPropertyName("shop_id")]
public string ShopId { get; set; } = default!;
/// <summary>
/// 获取或设置电子面单账号 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("acct_id")]
[System.Text.Json.Serialization.JsonPropertyName("acct_id")]
public string AccountId { get; set; } = default!;
/// <summary>
/// 获取或设置发起共享方店铺名。
/// </summary>
[Newtonsoft.Json.JsonProperty("nickname")]
[System.Text.Json.Serialization.JsonPropertyName("nickname")]
public string Nickname { get; set; } = default!;
/// <summary>
/// 获取或设置月结账号。
/// </summary>
[Newtonsoft.Json.JsonProperty("monthly_card")]
[System.Text.Json.Serialization.JsonPropertyName("monthly_card")]
public string? MonthlyCard { get; set; }
/// <summary>
/// 获取或设置更新时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("update_time")]
[System.Text.Json.Serialization.JsonPropertyName("update_time")]
public long UpdateTimestamp { get; set; }
}
public class SenderAddress
{
/// <summary>
/// 获取或设置省份。
/// </summary>
[Newtonsoft.Json.JsonProperty("province")]
[System.Text.Json.Serialization.JsonPropertyName("province")]
public string Province { get; set; } = default!;
/// <summary>
/// 获取或设置城市。
/// </summary>
[Newtonsoft.Json.JsonProperty("city")]
[System.Text.Json.Serialization.JsonPropertyName("city")]
public string City { get; set; } = default!;
/// <summary>
/// 获取或设置区县。
/// </summary>
[Newtonsoft.Json.JsonProperty("county")]
[System.Text.Json.Serialization.JsonPropertyName("county")]
public string District { get; set; } = default!;
/// <summary>
/// 获取或设置街道。
/// </summary>
[Newtonsoft.Json.JsonProperty("street")]
[System.Text.Json.Serialization.JsonPropertyName("street")]
public string Street { get; set; } = default!;
/// <summary>
/// 获取或设置详细地址。
/// </summary>
[Newtonsoft.Json.JsonProperty("address")]
[System.Text.Json.Serialization.JsonPropertyName("address")]
public string DetailAddress { get; set; } = default!;
}
}
/// <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("shop_id")]
[System.Text.Json.Serialization.JsonPropertyName("shop_id")]
public string ShopId { get; set; } = default!;
/// <summary>
/// 获取或设置电子面单账号 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("acct_id")]
[System.Text.Json.Serialization.JsonPropertyName("acct_id")]
public string AccountId { get; set; } = default!;
/// <summary>
/// 获取或设置电子面单账号类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("acct_type")]
[System.Text.Json.Serialization.JsonPropertyName("acct_type")]
public int AccountType { get; set; } = default!;
/// <summary>
/// 获取或设置状态。
/// </summary>
[Newtonsoft.Json.JsonProperty("status")]
[System.Text.Json.Serialization.JsonPropertyName("status")]
public int Status { get; set; }
/// <summary>
/// 获取或设置面单余额(单位:分)。
/// </summary>
[Newtonsoft.Json.JsonProperty("available")]
[System.Text.Json.Serialization.JsonPropertyName("available")]
public int AvailableBalance { get; set; }
/// <summary>
/// 获取或设置累积已取单。
/// </summary>
[Newtonsoft.Json.JsonProperty("allocated")]
[System.Text.Json.Serialization.JsonPropertyName("allocated")]
public int AllocatedCount { get; set; }
/// <summary>
/// 获取或设置累积已回收。
/// </summary>
[Newtonsoft.Json.JsonProperty("recycled")]
[System.Text.Json.Serialization.JsonPropertyName("recycled")]
public int RecycledCount { get; set; }
/// <summary>
/// 获取或设置累计已取消。
/// </summary>
[Newtonsoft.Json.JsonProperty("cancel")]
[System.Text.Json.Serialization.JsonPropertyName("cancel")]
public int CancelCount { get; set; }
/// <summary>
/// 获取或设置月结账号。
/// </summary>
[Newtonsoft.Json.JsonProperty("monthly_card")]
[System.Text.Json.Serialization.JsonPropertyName("monthly_card")]
public string? MonthlyCard { get; set; }
/// <summary>
/// 获取或设置网点信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("site_info")]
[System.Text.Json.Serialization.JsonPropertyName("site_info")]
public Types.SiteInfo? SiteInfo { get; set; }
/// <summary>
/// 获取或设置共享账号信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("share")]
[System.Text.Json.Serialization.JsonPropertyName("share")]
public Types.ShareInfo? ShareInfo { get; set; }
/// <summary>
/// 获取或设置发货地址信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("sender_address")]
[System.Text.Json.Serialization.JsonPropertyName("sender_address")]
public Types.SenderAddress? SenderAddress { get; set; }
}
}
/// <summary>
/// 获取或设置账号列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("account_list")]
[System.Text.Json.Serialization.JsonPropertyName("account_list")]
public Types.Account[] AccountList { get; set; } = default!;
/// <summary>
/// 获取或设置总数量。
/// </summary>
[Newtonsoft.Json.JsonProperty("total_num")]
[System.Text.Json.Serialization.JsonPropertyName("total_num")]
public int TotalCount { get; set; }
}
}

View File

@ -0,0 +1,15 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/logistics/ewaybill/biz/delivery/get 接口的请求。</para>
/// </summary>
public class ChannelsECLogisticsEWaybillDeliveryGetRequest : WechatApiRequest, IInferable<ChannelsECLogisticsEWaybillDeliveryGetRequest, ChannelsECLogisticsEWaybillDeliveryGetResponse>
{
/// <summary>
/// 获取或设置状态。
/// </summary>
[Newtonsoft.Json.JsonProperty("status")]
[System.Text.Json.Serialization.JsonPropertyName("status")]
public int? Status { get; set; }
}
}

View File

@ -0,0 +1,42 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/logistics/ewaybill/biz/delivery/get 接口的响应。</para>
/// </summary>
public class ChannelsECLogisticsEWaybillDeliveryGetResponse : WechatApiResponse
{
public static class Types
{
public class Delivery
{
/// <summary>
/// 获取或设置快递公司 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("delivery_id")]
[System.Text.Json.Serialization.JsonPropertyName("delivery_id")]
public string DeliveryId { get; set; } = default!;
/// <summary>
/// 获取或设置快递公司名称。
/// </summary>
[Newtonsoft.Json.JsonProperty("delivery_name")]
[System.Text.Json.Serialization.JsonPropertyName("delivery_name")]
public string DeliveryName { get; set; } = default!;
}
}
/// <summary>
/// 获取或设置快递公司列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("list")]
[System.Text.Json.Serialization.JsonPropertyName("list")]
public Types.Delivery[] DeliveryList { get; set; } = default!;
/// <summary>
/// 获取或设置店铺 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("shop_id")]
[System.Text.Json.Serialization.JsonPropertyName("shop_id")]
public string ShopId { get; set; } = default!;
}
}

View File

@ -0,0 +1,31 @@
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/logistics/ewaybill/biz/order/cancel 接口的请求。</para>
/// </summary>
public class ChannelsECLogisticsEWaybillOrderCancelRequest : WechatApiRequest, IInferable<ChannelsECLogisticsEWaybillOrderCancelRequest, ChannelsECLogisticsEWaybillOrderCancelResponse>
{
/// <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("ewaybill_order_id")]
[System.Text.Json.Serialization.JsonPropertyName("ewaybill_order_id")]
public string EWaybillOrderId { get; set; } = string.Empty;
/// <summary>
/// 获取或设置快递单号。
/// </summary>
[Newtonsoft.Json.JsonProperty("waybill_id")]
[System.Text.Json.Serialization.JsonPropertyName("waybill_id")]
public string WaybillId { get; set; } = string.Empty;
}
}

View File

@ -0,0 +1,15 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/logistics/ewaybill/biz/order/cancel 接口的响应。</para>
/// </summary>
public class ChannelsECLogisticsEWaybillOrderCancelResponse : WechatApiResponse
{
/// <summary>
/// 获取或设置快递公司错误信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("delivery_error_msg")]
[System.Text.Json.Serialization.JsonPropertyName("delivery_error_msg")]
public string? DeliveryErrorMessage { get; set; }
}
}

View File

@ -0,0 +1,186 @@
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/logistics/ewaybill/biz/order/create 接口的请求。</para>
/// </summary>
public class ChannelsECLogisticsEWaybillOrderCreateRequest : WechatApiRequest, IInferable<ChannelsECLogisticsEWaybillOrderCreateRequest, ChannelsECLogisticsEWaybillOrderCreateResponse>
{
public static class Types
{
public class Address : ChannelsECLogisticsEWaybillOrderPrecreateRequest.Types.Address
{
}
public class Order : ChannelsECLogisticsEWaybillOrderPrecreateRequest.Types.Order
{
public static new class Types
{
public class Goods : ChannelsECLogisticsEWaybillOrderPrecreateRequest.Types.Order.Types.Goods
{
/// <summary>
/// 获取或设置商家自定义商品 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("out_product_id")]
[System.Text.Json.Serialization.JsonPropertyName("out_product_id")]
public string? OutProductId { get; set; }
/// <summary>
/// 获取或设置商家自定义 SKU ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("out_sku_id")]
[System.Text.Json.Serialization.JsonPropertyName("out_sku_id")]
public string? OutSKUId { get; set; }
/// <summary>
/// 获取或设置商家自定义商品详情。
/// </summary>
[Newtonsoft.Json.JsonProperty("out_goods_info")]
[System.Text.Json.Serialization.JsonPropertyName("out_goods_info")]
public string? OutGoodsInfo { get; set; }
}
}
}
public class OrderVas
{
/// <summary>
/// 获取或设置增值服务类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("vas_type")]
[System.Text.Json.Serialization.JsonPropertyName("vas_type")]
public string VasType { get; set; } = string.Empty;
/// <summary>
/// 获取或设置增值服务描述。
/// </summary>
[Newtonsoft.Json.JsonProperty("vas_detail")]
[System.Text.Json.Serialization.JsonPropertyName("vas_detail")]
public string? VasDetail { get; set; }
/// <summary>
/// 获取或设置增值服务值。
/// </summary>
[Newtonsoft.Json.JsonProperty("vas_value")]
[System.Text.Json.Serialization.JsonPropertyName("vas_value")]
public string? VasValue { get; set; }
}
public class EWaybillExtra
{
/// <summary>
/// 获取或设置温层信息类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("temperature_range")]
[System.Text.Json.Serialization.JsonPropertyName("temperature_range")]
public int? TemperatureRangeType { get; set; }
/// <summary>
/// 获取或设置扩展字段。
/// </summary>
[Newtonsoft.Json.JsonExtensionData]
[System.Text.Json.Serialization.JsonExtensionData]
public IDictionary<string, object>? ExtensionData { 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>
/// 获取或设置电子面单 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("ewaybill_order_id")]
[System.Text.Json.Serialization.JsonPropertyName("ewaybill_order_id")]
public string EWaybillOrderId { get; set; } = string.Empty;
/// <summary>
/// 获取或设置网点编码。
/// </summary>
[Newtonsoft.Json.JsonProperty("site_code")]
[System.Text.Json.Serialization.JsonPropertyName("site_code")]
public string? SiteCode { get; set; }
/// <summary>
/// 获取或设置店铺 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("shop_id")]
[System.Text.Json.Serialization.JsonPropertyName("shop_id")]
public string ShopId { get; set; } = string.Empty;
/// <summary>
/// 获取或设置电子面单账号 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("ewaybill_acct_id")]
[System.Text.Json.Serialization.JsonPropertyName("ewaybill_acct_id")]
public string AccountId { get; set; } = string.Empty;
/// <summary>
/// 获取或设置面单模板 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("template_id")]
[System.Text.Json.Serialization.JsonPropertyName("template_id")]
public string? TemplateId { get; set; }
/// <summary>
/// 获取或设置寄件人信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("sender")]
[System.Text.Json.Serialization.JsonPropertyName("sender")]
public Types.Address Sender { get; set; } = new Types.Address();
/// <summary>
/// 获取或设置收件人信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("receiver")]
[System.Text.Json.Serialization.JsonPropertyName("receiver")]
public Types.Address Receiver { get; set; } = new Types.Address();
/// <summary>
/// 获取或设置退货地址信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("return_address")]
[System.Text.Json.Serialization.JsonPropertyName("return_address")]
public Types.Address? ReturnAddress { get; set; }
/// <summary>
/// 获取或设置订单列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("ec_order_list")]
[System.Text.Json.Serialization.JsonPropertyName("ec_order_list")]
public IList<Types.Order> OrderList { get; set; } = new List<Types.Order>();
/// <summary>
/// 获取或设置备注。
/// </summary>
[Newtonsoft.Json.JsonProperty("remark")]
[System.Text.Json.Serialization.JsonPropertyName("remark")]
public string? Remark { get; set; }
/// <summary>
/// 获取或设置订单类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("order_type")]
[System.Text.Json.Serialization.JsonPropertyName("order_type")]
public int? OrderType { get; set; }
/// <summary>
/// 获取或设置增值服务列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("order_vas_list")]
[System.Text.Json.Serialization.JsonPropertyName("order_vas_list")]
public IList<Types.OrderVas>? OrderVasList { get; set; }
/// <summary>
/// 获取或设置面单补充信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("ext_info")]
[System.Text.Json.Serialization.JsonPropertyName("ext_info")]
public Types.EWaybillExtra? EWaybillExtra { get; set; }
}
}

View File

@ -0,0 +1,36 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/logistics/ewaybill/biz/order/create 接口的响应。</para>
/// </summary>
public class ChannelsECLogisticsEWaybillOrderCreateResponse : WechatApiResponse
{
/// <summary>
/// 获取或设置电子面单 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("ewaybill_order_id")]
[System.Text.Json.Serialization.JsonPropertyName("ewaybill_order_id")]
public string EWaybillOrderId { get; set; } = default!;
/// <summary>
/// 获取或设置快递单号。
/// </summary>
[Newtonsoft.Json.JsonProperty("waybill_id")]
[System.Text.Json.Serialization.JsonPropertyName("waybill_id")]
public string? WaybillId { get; set; }
/// <summary>
/// 获取或设置快递公司错误信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("delivery_error_msg")]
[System.Text.Json.Serialization.JsonPropertyName("delivery_error_msg")]
public string? DeliveryErrorMessage { get; set; }
/// <summary>
/// 获取或设置打印报文信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("print_info")]
[System.Text.Json.Serialization.JsonPropertyName("print_info")]
public string? PrintInfo { get; set; }
}
}

View File

@ -0,0 +1,15 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/logistics/ewaybill/biz/order/get 接口的请求。</para>
/// </summary>
public class ChannelsECLogisticsEWaybillOrderGetRequest : WechatApiRequest, IInferable<ChannelsECLogisticsEWaybillOrderGetRequest, ChannelsECLogisticsEWaybillOrderGetResponse>
{
/// <summary>
/// 获取或设置电子面单 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("ewaybill_order_id")]
[System.Text.Json.Serialization.JsonPropertyName("ewaybill_order_id")]
public string EWaybillOrderId { get; set; } = string.Empty;
}
}

View File

@ -0,0 +1,250 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/logistics/ewaybill/biz/order/get 接口的响应。</para>
/// </summary>
public class ChannelsECLogisticsEWaybillOrderGetResponse : WechatApiResponse
{
public static class Types
{
public class EWaybillOrder
{
public static class Types
{
public class Address
{
/// <summary>
/// 获取或设置省份。
/// </summary>
[Newtonsoft.Json.JsonProperty("province")]
[System.Text.Json.Serialization.JsonPropertyName("province")]
public string Province { get; set; } = default!;
/// <summary>
/// 获取或设置城市。
/// </summary>
[Newtonsoft.Json.JsonProperty("city")]
[System.Text.Json.Serialization.JsonPropertyName("city")]
public string City { get; set; } = default!;
/// <summary>
/// 获取或设置区县。
/// </summary>
[Newtonsoft.Json.JsonProperty("county")]
[System.Text.Json.Serialization.JsonPropertyName("county")]
public string District { get; set; } = default!;
/// <summary>
/// 获取或设置街道。
/// </summary>
[Newtonsoft.Json.JsonProperty("street")]
[System.Text.Json.Serialization.JsonPropertyName("street")]
public string? Street { get; set; }
/// <summary>
/// 获取或设置详细地址。
/// </summary>
[Newtonsoft.Json.JsonProperty("address")]
[System.Text.Json.Serialization.JsonPropertyName("address")]
public string DetailAddress { 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("mobile")]
[System.Text.Json.Serialization.JsonPropertyName("mobile")]
public string MobileNumber { get; set; } = default!;
}
public class Order
{
public static class Types
{
public class Goods
{
/// <summary>
/// 获取或设置商品 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("product_id")]
[System.Text.Json.Serialization.JsonPropertyName("product_id")]
public long? ProductId { get; set; }
/// <summary>
/// 获取或设置 SKU ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("sku_id")]
[System.Text.Json.Serialization.JsonPropertyName("sku_id")]
public long? SKUId { get; set; }
/// <summary>
/// 获取或设置商品名。
/// </summary>
[Newtonsoft.Json.JsonProperty("good_name")]
[System.Text.Json.Serialization.JsonPropertyName("good_name")]
public string GoodsName { get; set; } = default!;
/// <summary>
/// 获取或设置商品个数。
/// </summary>
[Newtonsoft.Json.JsonProperty("good_count")]
[System.Text.Json.Serialization.JsonPropertyName("good_count")]
public int GoodsCount { get; set; }
}
}
/// <summary>
/// 获取或设置订单 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("ec_order_id")]
[System.Text.Json.Serialization.JsonPropertyName("ec_order_id")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalStringReadOnlyConverter))]
public string? OrderId { get; set; }
/// <summary>
/// 获取或设置商品列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("goods_list")]
[System.Text.Json.Serialization.JsonPropertyName("goods_list")]
public Types.Goods[] GoodsList { get; set; } = default!;
/// <summary>
/// 获取或设置代发的订单密文。
/// </summary>
[Newtonsoft.Json.JsonProperty("ewaybill_order_code")]
[System.Text.Json.Serialization.JsonPropertyName("ewaybill_order_code")]
public string? EWaybillOrderCode { get; set; }
/// <summary>
/// 获取或设置代发的订单所属店铺 AppId。
/// </summary>
[Newtonsoft.Json.JsonProperty("ewaybill_order_appid")]
[System.Text.Json.Serialization.JsonPropertyName("ewaybill_order_appid")]
public string? EWaybillOrderAppId { get; set; }
}
public class Path
{
/// <summary>
/// 获取或设置轨迹状态。
/// </summary>
[Newtonsoft.Json.JsonProperty("status")]
[System.Text.Json.Serialization.JsonPropertyName("status")]
public int Status { get; set; }
/// <summary>
/// 获取或设置轨迹描述。
/// </summary>
[Newtonsoft.Json.JsonProperty("desc")]
[System.Text.Json.Serialization.JsonPropertyName("desc")]
public string Description { get; set; } = default!;
/// <summary>
/// 获取或设置更新时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("update_time")]
[System.Text.Json.Serialization.JsonPropertyName("update_time")]
public long UpdateTimestamp { get; set; }
}
}
/// <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("ewaybill_order_id")]
[System.Text.Json.Serialization.JsonPropertyName("ewaybill_order_id")]
public string EWaybillOrderId { get; set; } = default!;
/// <summary>
/// 获取或设置快递单号。
/// </summary>
[Newtonsoft.Json.JsonProperty("waybill_id")]
[System.Text.Json.Serialization.JsonPropertyName("waybill_id")]
public string WaybillId { get; set; } = default!;
/// <summary>
/// 获取或设置网点编码。
/// </summary>
[Newtonsoft.Json.JsonProperty("site_code")]
[System.Text.Json.Serialization.JsonPropertyName("site_code")]
public string? SiteCode { get; set; }
/// <summary>
/// 获取或设置店铺 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("shop_id")]
[System.Text.Json.Serialization.JsonPropertyName("shop_id")]
public string ShopId { get; set; } = default!;
/// <summary>
/// 获取或设置电子面单账号 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("ewaybill_acct_id")]
[System.Text.Json.Serialization.JsonPropertyName("ewaybill_acct_id")]
public string AccountId { get; set; } = default!;
/// <summary>
/// 获取或设置寄件人信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("sender")]
[System.Text.Json.Serialization.JsonPropertyName("sender")]
public Types.Address Sender { get; set; } = default!;
/// <summary>
/// 获取或设置收件人信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("receiver")]
[System.Text.Json.Serialization.JsonPropertyName("receiver")]
public Types.Address Receiver { get; set; } = default!;
/// <summary>
/// 获取或设置订单列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("ec_order_list")]
[System.Text.Json.Serialization.JsonPropertyName("ec_order_list")]
public Types.Order[] OrderList { get; set; } = default!;
/// <summary>
/// 获取或设置备注。
/// </summary>
[Newtonsoft.Json.JsonProperty("remark")]
[System.Text.Json.Serialization.JsonPropertyName("remark")]
public string? Remark { get; set; }
/// <summary>
/// 获取或设置网点编码。
/// </summary>
[Newtonsoft.Json.JsonProperty("status")]
[System.Text.Json.Serialization.JsonPropertyName("status")]
public int Status { get; set; }
/// <summary>
/// 获取或设置轨迹列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("path_info")]
[System.Text.Json.Serialization.JsonPropertyName("path_info")]
public Types.Path[] PathList { get; set; } = default!;
}
}
/// <summary>
/// 获取或设置电子面单信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("order_info")]
[System.Text.Json.Serialization.JsonPropertyName("order_info")]
public Types.EWaybillOrder EWaybillOrder { get; set; } = default!;
}
}

View File

@ -0,0 +1,188 @@
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/logistics/ewaybill/biz/order/precreate 接口的请求。</para>
/// </summary>
public class ChannelsECLogisticsEWaybillOrderPrecreateRequest : WechatApiRequest, IInferable<ChannelsECLogisticsEWaybillOrderPrecreateRequest, ChannelsECLogisticsEWaybillOrderPrecreateResponse>
{
public static class Types
{
public class Address
{
/// <summary>
/// 获取或设置省份。
/// </summary>
[Newtonsoft.Json.JsonProperty("province")]
[System.Text.Json.Serialization.JsonPropertyName("province")]
public string Province { get; set; } = string.Empty;
/// <summary>
/// 获取或设置城市。
/// </summary>
[Newtonsoft.Json.JsonProperty("city")]
[System.Text.Json.Serialization.JsonPropertyName("city")]
public string City { get; set; } = string.Empty;
/// <summary>
/// 获取或设置区县。
/// </summary>
[Newtonsoft.Json.JsonProperty("county")]
[System.Text.Json.Serialization.JsonPropertyName("county")]
public string District { get; set; } = string.Empty;
/// <summary>
/// 获取或设置街道。
/// </summary>
[Newtonsoft.Json.JsonProperty("street")]
[System.Text.Json.Serialization.JsonPropertyName("street")]
public string? Street { get; set; }
/// <summary>
/// 获取或设置详细地址。
/// </summary>
[Newtonsoft.Json.JsonProperty("address")]
[System.Text.Json.Serialization.JsonPropertyName("address")]
public string DetailAddress { get; set; } = string.Empty;
/// <summary>
/// 获取或设置联系人。
/// </summary>
[Newtonsoft.Json.JsonProperty("name")]
[System.Text.Json.Serialization.JsonPropertyName("name")]
public string Name { get; set; } = string.Empty;
/// <summary>
/// 获取或设置联系电话。
/// </summary>
[Newtonsoft.Json.JsonProperty("mobile")]
[System.Text.Json.Serialization.JsonPropertyName("mobile")]
public string MobileNumber { get; set; } = string.Empty;
}
public class Order
{
public static class Types
{
public class Goods
{
/// <summary>
/// 获取或设置商品 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("product_id")]
[System.Text.Json.Serialization.JsonPropertyName("product_id")]
public long? ProductId { get; set; }
/// <summary>
/// 获取或设置 SKU ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("sku_id")]
[System.Text.Json.Serialization.JsonPropertyName("sku_id")]
public long? SKUId { get; set; }
/// <summary>
/// 获取或设置商品名。
/// </summary>
[Newtonsoft.Json.JsonProperty("good_name")]
[System.Text.Json.Serialization.JsonPropertyName("good_name")]
public string GoodsName { get; set; } = string.Empty;
/// <summary>
/// 获取或设置商品个数。
/// </summary>
[Newtonsoft.Json.JsonProperty("good_count")]
[System.Text.Json.Serialization.JsonPropertyName("good_count")]
public int GoodsCount { get; set; }
}
}
/// <summary>
/// 获取或设置订单 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("ec_order_id")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalStringConverter))]
[System.Text.Json.Serialization.JsonPropertyName("ec_order_id")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalStringConverter))]
public string? OrderId { get; set; }
/// <summary>
/// 获取或设置商品列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("goods_list")]
[System.Text.Json.Serialization.JsonPropertyName("goods_list")]
public IList<Types.Goods> GoodsList { get; set; } = new List<Types.Goods>();
/// <summary>
/// 获取或设置代发的订单密文。
/// </summary>
[Newtonsoft.Json.JsonProperty("ewaybill_order_code")]
[System.Text.Json.Serialization.JsonPropertyName("ewaybill_order_code")]
public string? EWaybillOrderCode { get; set; }
/// <summary>
/// 获取或设置代发的订单所属店铺 AppId。
/// </summary>
[Newtonsoft.Json.JsonProperty("ewaybill_order_appid")]
[System.Text.Json.Serialization.JsonPropertyName("ewaybill_order_appid")]
public string? EWaybillOrderAppId { 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("site_code")]
[System.Text.Json.Serialization.JsonPropertyName("site_code")]
public string? SiteCode { get; set; }
/// <summary>
/// 获取或设置店铺 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("shop_id")]
[System.Text.Json.Serialization.JsonPropertyName("shop_id")]
public string ShopId { get; set; } = string.Empty;
/// <summary>
/// 获取或设置电子面单账号 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("ewaybill_acct_id")]
[System.Text.Json.Serialization.JsonPropertyName("ewaybill_acct_id")]
public string AccountId { get; set; } = string.Empty;
/// <summary>
/// 获取或设置寄件人信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("sender")]
[System.Text.Json.Serialization.JsonPropertyName("sender")]
public Types.Address Sender { get; set; } = new Types.Address();
/// <summary>
/// 获取或设置收件人信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("receiver")]
[System.Text.Json.Serialization.JsonPropertyName("receiver")]
public Types.Address Receiver { get; set; } = new Types.Address();
/// <summary>
/// 获取或设置订单列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("ec_order_list")]
[System.Text.Json.Serialization.JsonPropertyName("ec_order_list")]
public IList<Types.Order> OrderList { get; set; } = new List<Types.Order>();
/// <summary>
/// 获取或设置备注。
/// </summary>
[Newtonsoft.Json.JsonProperty("remark")]
[System.Text.Json.Serialization.JsonPropertyName("remark")]
public string? Remark { get; set; }
}
}

View File

@ -0,0 +1,15 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/logistics/ewaybill/biz/order/precreate 接口的响应。</para>
/// </summary>
public class ChannelsECLogisticsEWaybillOrderPrecreateResponse : WechatApiResponse
{
/// <summary>
/// 获取或设置电子面单 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("ewaybill_order_id")]
[System.Text.Json.Serialization.JsonPropertyName("ewaybill_order_id")]
public string EWaybillOrderId { get; set; } = default!;
}
}

View File

@ -1,4 +1,4 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/order/get 接口的响应。</para>

View File

@ -0,0 +1,14 @@
{
"ToUserName": "gh_*",
"FromUserName": "OpenID",
"CreateTime": 1662480000,
"MsgType": "event",
"Event": "ewaybill_push_path",
"waybill_info": {
"ewaybill_order_id": 123123123123123,
"waybill_id": "xxxx",
"update_time": 1231231,
"status": 1,
"desc": "您的快件已签收"
}
}

View File

@ -0,0 +1,40 @@
{
"errcode": 0,
"errmsg": "ok",
"total_num": 1,
"account_list": [
{
"delivery_id": "JTSD",
"shop_id": "5xxxxxxxxx8",
"acct_id": "6xxxxxxxxx6",
"status": 3,
"available": 0,
"allocated": 0,
"recycled": 0,
"cancel": 0,
"site_info": {
"delivery_id": "JTSD",
"site_status": 1,
"site_code": "2100002",
"site_name": "测试网点02",
"address": {
"city_code": "310100000",
"city_name": "上海市",
"detail_address": "上海上海市青浦区华新镇华隆路1777号",
"district_code": "310118000",
"district_name": "青浦区",
"province_code": "310000000",
"province_name": "上海",
"street_code": "",
"street_name": ""
},
"contact": {
"mobile": "15xxxxxxxxx",
"name": "测试团队",
"phone": "15xxxxxxxxx"
},
"site_fullname": "测试网点02"
}
}
]
}

View File

@ -0,0 +1,48 @@
{
"errcode": 0,
"errmsg": "ok",
"shop_id": "50xxxxxxxx18",
"list": [
{
"delivery_id": "JTSD",
"delivery_name": "极兔速递"
},
{
"delivery_id": "STO",
"delivery_name": "申通快递"
},
{
"delivery_id": "YTO",
"delivery_name": "圆通速递"
},
{
"delivery_id": "YUNDA",
"delivery_name": "韵达速递"
},
{
"delivery_id": "ZTO",
"delivery_name": "中通快递"
},
{
"delivery_id": "SF",
"delivery_name": "顺丰速运"
},
{
"delivery_id": "JD",
"delivery_name": "京东"
},
{
"delivery_id": "EMS",
"delivery_name": "中国邮政"
},
{
"delivery_id": "CNSD",
"delivery_name": "菜鸟速递(丹鸟)"
},
{
"delivery_id": "DBKD",
"delivery_name": "德邦快递"
}
]
}

View File

@ -0,0 +1,5 @@
{
"ewaybill_order_id": "1212",
"delivery_id": "xxx",
"waybill_id": "xxxx"
}

View File

@ -0,0 +1,5 @@
{
"errcode": 0,
"errmsg": "ok",
"delivery_error_msg": "xxxx"
}

View File

@ -0,0 +1,49 @@
{
"ewaybill_order_id": "1111",
"delivery_id": "xxxx",
"site_code": "1111",
"ewaybill_acct_id": "1111",
"template_id": "xxx",
"sender": {
"name": "test",
"mobile": "1111",
"province": "静安区",
"city": "上海市",
"county": "静安区",
"street": "xxxxx",
"address": "xxxxxx"
},
"receiver": {
"name": "test",
"mobile": "11111",
"province": "上海市",
"city": "上海市",
"county": "青浦区",
"street": "xxxx",
"address": "xxxxxxx"
},
"ec_order_list": [
{
"ec_order_id": 1111,
"goods_list": [
{
"good_name": "电子资料书,",
"good_count": 1,
"product_id": 111,
"sku_id": 11
}
]
}
],
"remark": "test",
"shop_id": "xxxx",
"return_address": {
"name": "test",
"mobile": "13212778355",
"province": "上海市",
"city": "上海市",
"county": "青浦区",
"street": "xxxx",
"address": "xxxxx"
}
}

View File

@ -0,0 +1,7 @@
{
"errcode": 0,
"errmsg": "ok",
"ewaybill_order_id": "111",
"waybill_id": "1212xzcxz",
"delivery_error_msg": "xxxx"
}

View File

@ -0,0 +1,52 @@
{
"errcode": 0,
"errmsg": "ok",
"order_info": {
"ewaybill_order_id": "1111",
"delivery_id": "xxxx",
"site_code": "1111",
"ewaybill_acct_id": "1111",
"sender": {
"name": "test",
"mobile": "1111",
"province": "静安区",
"city": "上海市",
"county": "静安区",
"street": "xxxxx",
"address": "xxxxxx"
},
"receiver": {
"name": "test",
"mobile": "11111",
"province": "上海市",
"city": "上海市",
"county": "青浦区",
"street": "xxxx",
"address": "xxxxxxx"
},
"ec_order_list": [
{
"ec_order_id": 1111,
"goods_list": [
{
"good_name": "电子资料书,",
"good_count": 1,
"product_id": 111,
"sku_id": 11
}
]
}
],
"remark": "test",
"shop_id": "xxxx",
"waybill_id": "xxxx",
"status": 2,
"path_info": [
{
"update_time": 11,
"status": 1,
"desc": "xxxx"
}
]
}
}

View File

@ -0,0 +1,38 @@
{
"delivery_id": "xxxx",
"site_code": "1111",
"ewaybill_acct_id": "1111",
"sender": {
"name": "test",
"mobile": "1111",
"province": "静安区",
"city": "上海市",
"county": "静安区",
"street": "xxxxx",
"address": "xxxxxx"
},
"receiver": {
"name": "test",
"mobile": "11111",
"province": "上海市",
"city": "上海市",
"county": "青浦区",
"street": "xxxx",
"address": "xxxxxxx"
},
"ec_order_list": [
{
"ec_order_id": 1111,
"goods_list": [
{
"good_name": "电子资料书,",
"good_count": 1,
"product_id": 111,
"sku_id": 11
}
]
}
],
"remark": "test",
"shop_id": "xxxx"
}

View File

@ -0,0 +1,5 @@
{
"errcode": 0,
"errmsg": "ok",
"ewaybill_order_id": "111"
}