feat(wxapi): 新增微信物流服务散单寄件相关接口

This commit is contained in:
Fu Diwei
2023-03-28 23:13:43 +08:00
parent 3ac1ed9a6f
commit d9b1908cf8
43 changed files with 1945 additions and 12 deletions

View File

@@ -0,0 +1,164 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
{
/// <summary>
/// <para>表示 EVENT.add_single_waybill 事件的数据。</para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/express/delivery/single-delivery.html </para>
/// </summary>
public class AddSingleWaybillEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable
{
public static class Types
{
public class Sender : QuerySingleWaybillFeeEvent.Types.Sender
{
}
public class Receiver : QuerySingleWaybillFeeEvent.Types.Receiver
{
}
public class Cargo : QuerySingleWaybillFeeEvent.Types.Cargo
{
}
public class Insurance : AddWaybillEvent.Types.Insurance
{
}
}
/// <summary>
/// 获取或设置微信订单 Token。
/// </summary>
[Newtonsoft.Json.JsonProperty("Token")]
[System.Text.Json.Serialization.JsonPropertyName("Token")]
[System.Xml.Serialization.XmlElement("Token")]
public string Token { get; set; } = default!;
/// <summary>
/// 获取或设置小程序 AppId。
/// </summary>
[Newtonsoft.Json.JsonProperty("WXAppId")]
[System.Text.Json.Serialization.JsonPropertyName("WXAppId")]
[System.Xml.Serialization.XmlElement("WXAppId")]
public string MiniProgramAppId { get; set; } = default!;
/// <summary>
/// 获取或设置大客户公司 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("CompanyID")]
[System.Text.Json.Serialization.JsonPropertyName("CompanyID")]
[System.Xml.Serialization.XmlElement("CompanyID", IsNullable = true)]
public string? CompanyId { get; set; }
/// <summary>
/// 获取或设置月结帐号。
/// </summary>
[Newtonsoft.Json.JsonProperty("Account")]
[System.Text.Json.Serialization.JsonPropertyName("Account")]
[System.Xml.Serialization.XmlElement("Account", IsNullable = true)]
public string? Account { get; set; }
/// <summary>
/// 获取或设置月结帐号密码。
/// </summary>
[Newtonsoft.Json.JsonProperty("AccountPwd")]
[System.Text.Json.Serialization.JsonPropertyName("AccountPwd")]
[System.Xml.Serialization.XmlElement("AccountPwd", IsNullable = true)]
public string? AccountPassword { get; set; }
/// <summary>
/// 获取或设置商户订单号。
/// </summary>
[Newtonsoft.Json.JsonProperty("OrderID")]
[System.Text.Json.Serialization.JsonPropertyName("OrderID")]
[System.Xml.Serialization.XmlElement("OrderID", IsNullable = true)]
public string? OrderId { get; set; }
/// <summary>
/// 获取或设置发件人信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("Sender")]
[System.Text.Json.Serialization.JsonPropertyName("Sender")]
[System.Xml.Serialization.XmlElement("Sender")]
public Types.Sender Sender { get; set; } = default!;
/// <summary>
/// 获取或设置收件人信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("Receiver")]
[System.Text.Json.Serialization.JsonPropertyName("Receiver")]
[System.Xml.Serialization.XmlElement("Receiver")]
public Types.Receiver Receiver { get; set; } = default!;
/// <summary>
/// 获取或设置包裹信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("GoodDetail")]
[System.Text.Json.Serialization.JsonPropertyName("GoodDetail")]
[System.Xml.Serialization.XmlElement("GoodDetail", Type = typeof(Types.Cargo))]
public Types.Cargo? Cargo { get; set; }
/// <summary>
/// 获取或设置保价信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("Insured")]
[System.Text.Json.Serialization.JsonPropertyName("Insured")]
[System.Xml.Serialization.XmlElement("Insured", IsNullable = true)]
public Types.Insurance? Insurance { get; set; }
/// <summary>
/// 获取或设置快递备注。
/// </summary>
[Newtonsoft.Json.JsonProperty("Remark")]
[System.Text.Json.Serialization.JsonPropertyName("Remark")]
[System.Xml.Serialization.XmlElement("Remark", IsNullable = true)]
public string? Remark { get; set; }
/// <summary>
/// 获取或设置结算方式。
/// </summary>
[Newtonsoft.Json.JsonProperty("Settingment")]
[System.Text.Json.Serialization.JsonPropertyName("Settingment")]
[System.Xml.Serialization.XmlElement("Settingment", IsNullable = true)]
public int? SettlementType { get; set; }
/// <summary>
/// 获取或设置期望上门取件起始时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("ExpectStartTime")]
[System.Text.Json.Serialization.JsonPropertyName("ExpectStartTime")]
[System.Xml.Serialization.XmlElement("ExpectStartTime", IsNullable = true)]
public long? ExpectedStartTimestamp { get; set; }
/// <summary>
/// 获取或设置期望上门取件结束时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("ExpectEndTime")]
[System.Text.Json.Serialization.JsonPropertyName("ExpectEndTime")]
[System.Xml.Serialization.XmlElement("ExpectEndTime", IsNullable = true)]
public long? ExpectedEndTimestamp { get; set; }
/// <summary>
/// 获取或设置上门时间段开始时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("PickUpStartTime")]
[System.Text.Json.Serialization.JsonPropertyName("PickUpStartTime")]
[System.Xml.Serialization.XmlElement("PickUpStartTime", IsNullable = true)]
public long? PickUpStartTimestamp { get; set; }
/// <summary>
/// 获取或设置上门时间段结束时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("PickUpEndTime")]
[System.Text.Json.Serialization.JsonPropertyName("PickUpEndTime")]
[System.Xml.Serialization.XmlElement("PickUpEndTime", IsNullable = true)]
public long? PickUpEndTimestamp { get; set; }
/// <summary>
/// 获取或设置场景值。
/// </summary>
[Newtonsoft.Json.JsonProperty("Scene")]
[System.Text.Json.Serialization.JsonPropertyName("Scene")]
[System.Xml.Serialization.XmlElement("Scene")]
public int? Scene { get; set; }
}
}

View File

@@ -0,0 +1,63 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
{
/// <summary>
/// <para>表示回复 EVENT.add_single_waybill 事件的数据。</para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/express/delivery/single-delivery.html </para>
/// </summary>
public class AddSingleWaybillReply : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable
{
/// <summary>
/// 获取或设置处理结果错误码。
/// </summary>
[Newtonsoft.Json.JsonProperty("ResultCode")]
[System.Text.Json.Serialization.JsonPropertyName("ResultCode")]
[System.Xml.Serialization.XmlElement("ResultCode")]
public int ResultCode { get; set; }
/// <summary>
/// 获取或设置处理结果错误信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("ResultMsg")]
[System.Text.Json.Serialization.JsonPropertyName("ResultMsg")]
[System.Xml.Serialization.XmlElement("ResultMsg", IsNullable = true)]
public string? ResultMessage { get; set; }
/// <summary>
/// 获取或设置运单号。
/// </summary>
[Newtonsoft.Json.JsonProperty("WayBillID")]
[System.Text.Json.Serialization.JsonPropertyName("WayBillID")]
[System.Xml.Serialization.XmlElement("WayBillID", IsNullable = true)]
public string? WaybillId { get; set; }
/// <summary>
/// 获取或设置预计送达时间字符串格式yyyy-MM-dd
/// </summary>
[Newtonsoft.Json.JsonProperty("EstimatedDeliveryTime")]
[System.Text.Json.Serialization.JsonPropertyName("EstimatedDeliveryTime")]
[System.Xml.Serialization.XmlElement("EstimatedDeliveryTime", IsNullable = true)]
public string? EstimatedDeliveryTimeString { get; set; }
/// <summary>
/// 获取或设置下单成功后跳转的 URL。
/// </summary>
[Newtonsoft.Json.JsonProperty("JumpPath")]
[System.Text.Json.Serialization.JsonPropertyName("JumpPath")]
[System.Xml.Serialization.XmlElement("JumpPath", IsNullable = true)]
public string? RedirectUrl { get; set; }
/// <summary>
/// 获取或设置取件码。
/// </summary>
[Newtonsoft.Json.JsonProperty("PickCode")]
[System.Text.Json.Serialization.JsonPropertyName("PickCode")]
[System.Xml.Serialization.XmlElement("PickCode", IsNullable = true)]
public string? PickCode { get; set; }
public AddSingleWaybillReply()
{
MessageType = "event";
Event = "add_single_waybill";
}
}
}

View File

@@ -1,8 +1,8 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
{
/// <summary>
/// <para>表示 EVENT.add_waybill 事件的数据。</para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/express/by-provider/logistics.onAddOrder.html </para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/express/express-by-provider/onAddOrder.html </para>
/// </summary>
public class AddWaybillEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable
{
@@ -177,7 +177,7 @@
[System.Text.Json.Serialization.JsonPropertyName("UseInsured")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalBooleanConverter))]
[System.Xml.Serialization.XmlElement("UseInsured")]
public bool UseInsured { get; set; }
public bool IsUseInsured { get; set; }
/// <summary>
/// 获取或设置保价金额(单位:分)。

View File

@@ -0,0 +1,57 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
{
/// <summary>
/// <para>表示 EVENT.cancel_single_waybill 事件的数据。</para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/express/delivery/single-delivery.html </para>
/// </summary>
public class CancelSingleWaybillEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable
{
/// <summary>
/// 获取或设置微信订单 Token。
/// </summary>
[Newtonsoft.Json.JsonProperty("Token")]
[System.Text.Json.Serialization.JsonPropertyName("Token")]
[System.Xml.Serialization.XmlElement("Token")]
public string Token { get; set; } = default!;
/// <summary>
/// 获取或设置小程序 AppId。
/// </summary>
[Newtonsoft.Json.JsonProperty("WXAppId")]
[System.Text.Json.Serialization.JsonPropertyName("WXAppId")]
[System.Xml.Serialization.XmlElement("WXAppId")]
public string MiniProgramAppId { get; set; } = default!;
/// <summary>
/// 获取或设置商户订单号。
/// </summary>
[Newtonsoft.Json.JsonProperty("OrderID")]
[System.Text.Json.Serialization.JsonPropertyName("OrderID")]
[System.Xml.Serialization.XmlElement("OrderID", IsNullable = true)]
public string? OrderId { get; set; }
/// <summary>
/// 获取或设置运单号。
/// </summary>
[Newtonsoft.Json.JsonProperty("WayBillID")]
[System.Text.Json.Serialization.JsonPropertyName("WayBillID")]
[System.Xml.Serialization.XmlElement("WayBillID", IsNullable = true)]
public string? WaybillId { get; set; }
/// <summary>
/// 获取或设置取消原因 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("CancelID")]
[System.Text.Json.Serialization.JsonPropertyName("CancelID")]
[System.Xml.Serialization.XmlElement("CancelID")]
public string CancelReasonId { get; set; } = default!;
/// <summary>
/// 获取或设置取消原因。
/// </summary>
[Newtonsoft.Json.JsonProperty("CancelReason")]
[System.Text.Json.Serialization.JsonPropertyName("CancelReason")]
[System.Xml.Serialization.XmlElement("CancelReason", IsNullable = true)]
public string? CancelReason { get; set; }
}
}

View File

@@ -0,0 +1,31 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
{
/// <summary>
/// <para>表示回复 EVENT.cancel_single_waybill 事件的数据。</para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/express/delivery/single-delivery.html </para>
/// </summary>
public class CancelSingleWaybillReply : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable
{
/// <summary>
/// 获取或设置处理结果错误码。
/// </summary>
[Newtonsoft.Json.JsonProperty("ResultCode")]
[System.Text.Json.Serialization.JsonPropertyName("ResultCode")]
[System.Xml.Serialization.XmlElement("ResultCode")]
public int ResultCode { get; set; }
/// <summary>
/// 获取或设置处理结果错误信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("ResultMsg")]
[System.Text.Json.Serialization.JsonPropertyName("ResultMsg")]
[System.Xml.Serialization.XmlElement("ResultMsg", IsNullable = true)]
public string? ResultMessage { get; set; }
public CancelSingleWaybillReply()
{
MessageType = "event";
Event = "cancel_single_waybill";
}
}
}

View File

@@ -1,8 +1,8 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
{
/// <summary>
/// <para>表示 EVENT.cancel_waybill 事件的数据。</para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/express/by-provider/logistics.onCancelOrder.html </para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/express/express-by-provider/onCancelOrder.html </para>
/// </summary>
public class CancelWaybillEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable
{

View File

@@ -1,8 +1,8 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
{
/// <summary>
/// <para>表示 EVENT.check_biz 事件的数据。</para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/express/by-provider/logistics.onCheckBusiness.html </para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/express/express-by-provider/onCheckBusiness.html </para>
/// </summary>
public class CheckBusinessEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable
{

View File

@@ -1,8 +1,8 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
{
/// <summary>
/// <para>表示 EVENT.get_quota 事件的数据。</para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/express/by-provider/logistics.onGetQuota.html </para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/OpenApiDoc/express/express-by-provider/onGetQuota.html </para>
/// </summary>
public class GetQuotaEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable
{

View File

@@ -0,0 +1,73 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
{
/// <summary>
/// <para>表示 EVENT.notify_single_waybill_pay 事件的数据。</para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/express/delivery/single-delivery.html </para>
/// </summary>
public class NotifySingleWaybillPayEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable
{
/// <summary>
/// 获取或设置微信订单 Token。
/// </summary>
[Newtonsoft.Json.JsonProperty("Token")]
[System.Text.Json.Serialization.JsonPropertyName("Token")]
[System.Xml.Serialization.XmlElement("Token")]
public string Token { get; set; } = default!;
/// <summary>
/// 获取或设置小程序 AppId。
/// </summary>
[Newtonsoft.Json.JsonProperty("WXAppId")]
[System.Text.Json.Serialization.JsonPropertyName("WXAppId")]
[System.Xml.Serialization.XmlElement("WXAppId")]
public string MiniProgramAppId { get; set; } = default!;
/// <summary>
/// 获取或设置商户订单号。
/// </summary>
[Newtonsoft.Json.JsonProperty("OrderID")]
[System.Text.Json.Serialization.JsonPropertyName("OrderID")]
[System.Xml.Serialization.XmlElement("OrderID", IsNullable = true)]
public string? OrderId { get; set; }
/// <summary>
/// 获取或设置运单号。
/// </summary>
[Newtonsoft.Json.JsonProperty("WayBillID")]
[System.Text.Json.Serialization.JsonPropertyName("WayBillID")]
[System.Xml.Serialization.XmlElement("WayBillID", IsNullable = true)]
public string? WaybillId { get; set; }
/// <summary>
/// 获取或设置支付金额(单位:分)。
/// </summary>
[Newtonsoft.Json.JsonProperty("Fee")]
[System.Text.Json.Serialization.JsonPropertyName("Fee")]
[System.Xml.Serialization.XmlElement("Fee")]
public int Fee { get; set; }
/// <summary>
/// 获取或设置原价(单位:分)。
/// </summary>
[Newtonsoft.Json.JsonProperty("OriginalFee")]
[System.Text.Json.Serialization.JsonPropertyName("OriginalFee")]
[System.Xml.Serialization.XmlElement("OriginalFee", IsNullable = true)]
public int? OriginalFee { get; set; }
/// <summary>
/// 获取或设置支付订单号。
/// </summary>
[Newtonsoft.Json.JsonProperty("PayOrderId")]
[System.Text.Json.Serialization.JsonPropertyName("PayOrderId")]
[System.Xml.Serialization.XmlElement("PayOrderId", IsNullable = true)]
public string? PayOrderId { get; set; }
/// <summary>
/// 获取或设置支付时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("PayFinishTime")]
[System.Text.Json.Serialization.JsonPropertyName("PayFinishTime")]
[System.Xml.Serialization.XmlElement("PayFinishTime", IsNullable = true)]
public long? PayTimestamp { get; set; }
}
}

View File

@@ -0,0 +1,31 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
{
/// <summary>
/// <para>表示回复 EVENT.query_single_waybill_pay 事件的数据。</para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/express/delivery/single-delivery.html </para>
/// </summary>
public class NotifySingleWaybillPayReply : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable
{
/// <summary>
/// 获取或设置处理结果错误码。
/// </summary>
[Newtonsoft.Json.JsonProperty("ResultCode")]
[System.Text.Json.Serialization.JsonPropertyName("ResultCode")]
[System.Xml.Serialization.XmlElement("ResultCode")]
public int ResultCode { get; set; }
/// <summary>
/// 获取或设置处理结果错误信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("ResultMsg")]
[System.Text.Json.Serialization.JsonPropertyName("ResultMsg")]
[System.Xml.Serialization.XmlElement("ResultMsg", IsNullable = true)]
public string? ResultMessage { get; set; }
public NotifySingleWaybillPayReply()
{
MessageType = "event";
Event = "query_single_waybill_pay";
}
}
}

View File

@@ -0,0 +1,41 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
{
/// <summary>
/// <para>表示 EVENT.query_single_waybill 事件的数据。</para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/express/delivery/single-delivery.html </para>
/// </summary>
public class QuerySingleWaybillEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable
{
/// <summary>
/// 获取或设置微信订单 Token。
/// </summary>
[Newtonsoft.Json.JsonProperty("Token")]
[System.Text.Json.Serialization.JsonPropertyName("Token")]
[System.Xml.Serialization.XmlElement("Token")]
public string Token { get; set; } = default!;
/// <summary>
/// 获取或设置小程序 AppId。
/// </summary>
[Newtonsoft.Json.JsonProperty("WXAppId")]
[System.Text.Json.Serialization.JsonPropertyName("WXAppId")]
[System.Xml.Serialization.XmlElement("WXAppId")]
public string MiniProgramAppId { get; set; } = default!;
/// <summary>
/// 获取或设置商户订单号。
/// </summary>
[Newtonsoft.Json.JsonProperty("OrderID")]
[System.Text.Json.Serialization.JsonPropertyName("OrderID")]
[System.Xml.Serialization.XmlElement("OrderID", IsNullable = true)]
public string? OrderId { get; set; }
/// <summary>
/// 获取或设置运单号。
/// </summary>
[Newtonsoft.Json.JsonProperty("WayBillID")]
[System.Text.Json.Serialization.JsonPropertyName("WayBillID")]
[System.Xml.Serialization.XmlElement("WayBillID", IsNullable = true)]
public string? WaybillId { get; set; }
}
}

View File

@@ -0,0 +1,142 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
{
/// <summary>
/// <para>表示 EVENT.query_single_waybill_fee 事件的数据。</para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/express/delivery/single-delivery.html </para>
/// </summary>
public class QuerySingleWaybillFeeEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable
{
public static class Types
{
public class Sender
{
/// <summary>
/// 获取或设置姓名。
/// </summary>
[Newtonsoft.Json.JsonProperty("Name")]
[System.Text.Json.Serialization.JsonPropertyName("Name")]
[System.Xml.Serialization.XmlElement("Name")]
public string Name { get; set; } = default!;
/// <summary>
/// 获取或设置座机号码。
/// </summary>
[Newtonsoft.Json.JsonProperty("Tel")]
[System.Text.Json.Serialization.JsonPropertyName("Tel")]
[System.Xml.Serialization.XmlElement("Tel", IsNullable = true)]
public string? TeleNumber { get; set; }
/// <summary>
/// 获取或设置手机号码。
/// </summary>
[Newtonsoft.Json.JsonProperty("Mobile")]
[System.Text.Json.Serialization.JsonPropertyName("Mobile")]
[System.Xml.Serialization.XmlElement("Mobile", IsNullable = true)]
public string? MobileNumber { get; set; }
/// <summary>
/// 获取或设置省份。
/// </summary>
[Newtonsoft.Json.JsonProperty("Province")]
[System.Text.Json.Serialization.JsonPropertyName("Province")]
[System.Xml.Serialization.XmlElement("Province")]
public string Province { get; set; } = default!;
/// <summary>
/// 获取或设置城市。
/// </summary>
[Newtonsoft.Json.JsonProperty("City")]
[System.Text.Json.Serialization.JsonPropertyName("City")]
[System.Xml.Serialization.XmlElement("City")]
public string City { get; set; } = default!;
/// <summary>
/// 获取或设置区县。
/// </summary>
[Newtonsoft.Json.JsonProperty("Area")]
[System.Text.Json.Serialization.JsonPropertyName("Area")]
[System.Xml.Serialization.XmlElement("Area")]
public string District { get; set; } = default!;
/// <summary>
/// 获取或设置街道。
/// </summary>
[Newtonsoft.Json.JsonProperty("Street")]
[System.Text.Json.Serialization.JsonPropertyName("Street")]
[System.Xml.Serialization.XmlElement("Street")]
public string Street { get; set; } = default!;
/// <summary>
/// 获取或设置详细地址。
/// </summary>
[Newtonsoft.Json.JsonProperty("Address")]
[System.Text.Json.Serialization.JsonPropertyName("Address")]
[System.Xml.Serialization.XmlElement("Address")]
public string Address { get; set; } = default!;
/// <summary>
/// 获取或设置地址 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("Id")]
[System.Text.Json.Serialization.JsonPropertyName("Id")]
[System.Xml.Serialization.XmlElement("Id", IsNullable = true)]
public string? AddressId { get; set; }
}
public class Receiver : Sender
{
}
public class Cargo
{
/// <summary>
/// 获取或设置物品类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("Special")]
[System.Text.Json.Serialization.JsonPropertyName("Special")]
[System.Xml.Serialization.XmlElement("Special", IsNullable = true)]
public int? SpecialType { get; set; }
/// <summary>
/// 获取或设置包裹重量(单位:千克)。
/// </summary>
[Newtonsoft.Json.JsonProperty("Weight")]
[System.Text.Json.Serialization.JsonPropertyName("Weight")]
[System.Xml.Serialization.XmlElement("Weight", IsNullable = true)]
public double? Weight { get; set; }
}
}
/// <summary>
/// 获取或设置发件人信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("Sender")]
[System.Text.Json.Serialization.JsonPropertyName("Sender")]
[System.Xml.Serialization.XmlElement("Sender")]
public Types.Sender Sender { get; set; } = default!;
/// <summary>
/// 获取或设置收件人信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("Receiver")]
[System.Text.Json.Serialization.JsonPropertyName("Receiver")]
[System.Xml.Serialization.XmlElement("Receiver")]
public Types.Receiver Receiver { get; set; } = default!;
/// <summary>
/// 获取或设置包裹信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("GoodDetail")]
[System.Text.Json.Serialization.JsonPropertyName("GoodDetail")]
[System.Xml.Serialization.XmlElement("GoodDetail", Type = typeof(Types.Cargo))]
public Types.Cargo? Cargo { get; set; }
/// <summary>
/// 获取或设置场景值。
/// </summary>
[Newtonsoft.Json.JsonProperty("Scene")]
[System.Text.Json.Serialization.JsonPropertyName("Scene")]
[System.Xml.Serialization.XmlElement("Scene")]
public int Scene { get; set; }
}
}

View File

@@ -0,0 +1,47 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
{
/// <summary>
/// <para>表示回复 EVENT.query_single_waybill_fee 事件的数据。</para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/express/delivery/single-delivery.html </para>
/// </summary>
public class QuerySingleWaybillFeeReply : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable
{
/// <summary>
/// 获取或设置处理结果错误码。
/// </summary>
[Newtonsoft.Json.JsonProperty("ResultCode")]
[System.Text.Json.Serialization.JsonPropertyName("ResultCode")]
[System.Xml.Serialization.XmlElement("ResultCode")]
public int ResultCode { get; set; }
/// <summary>
/// 获取或设置处理结果错误信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("ResultMsg")]
[System.Text.Json.Serialization.JsonPropertyName("ResultMsg")]
[System.Xml.Serialization.XmlElement("ResultMsg", IsNullable = true)]
public string? ResultMessage { get; set; }
/// <summary>
/// 获取或设置预估运费(单位:元)。
/// </summary>
[Newtonsoft.Json.JsonProperty("Fee")]
[System.Text.Json.Serialization.JsonPropertyName("Fee")]
[System.Xml.Serialization.XmlElement("Fee")]
public double Fee { get; set; }
/// <summary>
/// 获取或设置预估原价(单位:元)。
/// </summary>
[Newtonsoft.Json.JsonProperty("OriginalFee")]
[System.Text.Json.Serialization.JsonPropertyName("OriginalFee")]
[System.Xml.Serialization.XmlElement("OriginalFee", IsNullable = true)]
public double? OriginalFee { get; set; }
public QuerySingleWaybillFeeReply()
{
MessageType = "event";
Event = "query_single_waybill_fee";
}
}
}

View File

@@ -0,0 +1,203 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
{
/// <summary>
/// <para>表示回复 EVENT.query_single_waybill 事件的数据。</para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/express/delivery/single-delivery.html </para>
/// </summary>
public class QuerySingleWaybillReply : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable
{
public static class Types
{
public class Sender : AddSingleWaybillEvent.Types.Sender
{
}
public class Receiver : AddSingleWaybillEvent.Types.Receiver
{
}
public class Cargo : AddSingleWaybillEvent.Types.Cargo
{
}
public class Insurance : AddSingleWaybillEvent.Types.Insurance
{
}
public class Path
{
public static class Types
{
public class PathAction
{
/// <summary>
/// 获取或设置轨迹节点时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("action_time")]
[System.Text.Json.Serialization.JsonPropertyName("action_time")]
[System.Xml.Serialization.XmlElement("action_time")]
public long ActionTimestamp { get; set; }
/// <summary>
/// 获取或设置轨迹节点类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("action_type")]
[System.Text.Json.Serialization.JsonPropertyName("action_type")]
[System.Xml.Serialization.XmlElement("action_type")]
public int ActionType { get; set; }
/// <summary>
/// 获取或设置轨迹节点详情。
/// </summary>
[Newtonsoft.Json.JsonProperty("action_msg")]
[System.Text.Json.Serialization.JsonPropertyName("action_msg")]
[System.Xml.Serialization.XmlElement("action_msg")]
public string ActionMessage { get; set; } = default!;
/// <summary>
/// 获取或设置取件员姓名。
/// </summary>
[Newtonsoft.Json.JsonProperty("pickup_courier_name")]
[System.Text.Json.Serialization.JsonPropertyName("pickup_courier_name")]
[System.Xml.Serialization.XmlElement("pickup_courier_name", IsNullable = true)]
public string? PickupCourierName { get; set; }
/// <summary>
/// 获取或设置取件员电话号码。
/// </summary>
[Newtonsoft.Json.JsonProperty("pickup_courier_phone")]
[System.Text.Json.Serialization.JsonPropertyName("pickup_courier_phone")]
[System.Xml.Serialization.XmlElement("pickup_courier_phone", IsNullable = true)]
public string? PickupCourierPhoneNumber { get; set; }
/// <summary>
/// 获取或设置派件员姓名。
/// </summary>
[Newtonsoft.Json.JsonProperty("delivery_courier_name")]
[System.Text.Json.Serialization.JsonPropertyName("delivery_courier_name")]
[System.Xml.Serialization.XmlElement("delivery_courier_name", IsNullable = true)]
public string? DeliveryCourierName { get; set; }
/// <summary>
/// 获取或设置派件员电话号码。
/// </summary>
[Newtonsoft.Json.JsonProperty("delivery_courier_phone")]
[System.Text.Json.Serialization.JsonPropertyName("delivery_courier_phone")]
[System.Xml.Serialization.XmlElement("delivery_courier_phone", IsNullable = true)]
public string? DeliveryCourierPhoneNumber { get; set; }
}
}
/// <summary>
/// 获取或设置轨迹节点列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("path_info")]
[System.Text.Json.Serialization.JsonPropertyName("path_info")]
[System.Xml.Serialization.XmlElement("path_info", Type = typeof(Types.PathAction))]
public Types.PathAction[] PathActionList { get; set; } = default!;
}
}
/// <summary>
/// 获取或设置处理结果错误码。
/// </summary>
[Newtonsoft.Json.JsonProperty("ResultCode")]
[System.Text.Json.Serialization.JsonPropertyName("ResultCode")]
[System.Xml.Serialization.XmlElement("ResultCode")]
public int ResultCode { get; set; }
/// <summary>
/// 获取或设置处理结果错误信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("ResultMsg")]
[System.Text.Json.Serialization.JsonPropertyName("ResultMsg")]
[System.Xml.Serialization.XmlElement("ResultMsg", IsNullable = true)]
public string? ResultMessage { get; set; }
/// <summary>
/// 获取或设置运单号。
/// </summary>
[Newtonsoft.Json.JsonProperty("WayBillID")]
[System.Text.Json.Serialization.JsonPropertyName("WayBillID")]
[System.Xml.Serialization.XmlElement("WayBillID", IsNullable = true)]
public string? WaybillId { get; set; }
/// <summary>
/// 获取或设置发件人信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("Sender")]
[System.Text.Json.Serialization.JsonPropertyName("Sender")]
[System.Xml.Serialization.XmlElement("Sender")]
public Types.Sender Sender { get; set; } = default!;
/// <summary>
/// 获取或设置收件人信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("Receiver")]
[System.Text.Json.Serialization.JsonPropertyName("Receiver")]
[System.Xml.Serialization.XmlElement("Receiver")]
public Types.Receiver Receiver { get; set; } = default!;
/// <summary>
/// 获取或设置包裹信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("GoodDetail")]
[System.Text.Json.Serialization.JsonPropertyName("GoodDetail")]
[System.Xml.Serialization.XmlElement("GoodDetail", Type = typeof(Types.Cargo))]
public Types.Cargo? Cargo { get; set; }
/// <summary>
/// 获取或设置保价信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("Insured")]
[System.Text.Json.Serialization.JsonPropertyName("Insured")]
[System.Xml.Serialization.XmlElement("Insured", IsNullable = true)]
public Types.Insurance? Insurance { get; set; }
/// <summary>
/// 获取或设置轨迹信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("PathInfo")]
[System.Text.Json.Serialization.JsonPropertyName("PathInfo")]
[System.Xml.Serialization.XmlElement("PathInfo")]
public Types.Path? Path { get; set; } = default!;
/// <summary>
/// 获取或设置运费(单位:分)。
/// </summary>
[Newtonsoft.Json.JsonProperty("Fee")]
[System.Text.Json.Serialization.JsonPropertyName("Fee")]
[System.Xml.Serialization.XmlElement("Fee", IsNullable = true)]
public int? Fee { get; set; }
/// <summary>
/// 获取或设置原价(单位:分)。
/// </summary>
[Newtonsoft.Json.JsonProperty("OriginalFee")]
[System.Text.Json.Serialization.JsonPropertyName("OriginalFee")]
[System.Xml.Serialization.XmlElement("OriginalFee", IsNullable = true)]
public int? OriginalFee { get; set; }
/// <summary>
/// 获取或设置在线支付方式。
/// </summary>
[Newtonsoft.Json.JsonProperty("OnlinePay")]
[System.Text.Json.Serialization.JsonPropertyName("OnlinePay")]
[System.Xml.Serialization.XmlElement("OnlinePay", IsNullable = true)]
public int? OnlinePayType { get; set; }
/// <summary>
/// 获取或设置支付结果。
/// </summary>
[Newtonsoft.Json.JsonProperty("PayResult")]
[System.Text.Json.Serialization.JsonPropertyName("PayResult")]
[System.Xml.Serialization.XmlElement("PayResult", IsNullable = true)]
public int? PayResult { get; set; }
public QuerySingleWaybillReply()
{
MessageType = "event";
Event = "query_single_waybill";
}
}
}

View File

@@ -0,0 +1,41 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
{
/// <summary>
/// <para>表示 EVENT.remind_waybill 事件的数据。</para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/express/delivery/single-delivery.html </para>
/// </summary>
public class RemindWaybillEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable
{
/// <summary>
/// 获取或设置微信订单 Token。
/// </summary>
[Newtonsoft.Json.JsonProperty("Token")]
[System.Text.Json.Serialization.JsonPropertyName("Token")]
[System.Xml.Serialization.XmlElement("Token")]
public string Token { get; set; } = default!;
/// <summary>
/// 获取或设置小程序 AppId。
/// </summary>
[Newtonsoft.Json.JsonProperty("WXAppId")]
[System.Text.Json.Serialization.JsonPropertyName("WXAppId")]
[System.Xml.Serialization.XmlElement("WXAppId")]
public string MiniProgramAppId { get; set; } = default!;
/// <summary>
/// 获取或设置商户订单号。
/// </summary>
[Newtonsoft.Json.JsonProperty("OrderID")]
[System.Text.Json.Serialization.JsonPropertyName("OrderID")]
[System.Xml.Serialization.XmlElement("OrderID", IsNullable = true)]
public string? OrderId { get; set; }
/// <summary>
/// 获取或设置运单号。
/// </summary>
[Newtonsoft.Json.JsonProperty("WayBillID")]
[System.Text.Json.Serialization.JsonPropertyName("WayBillID")]
[System.Xml.Serialization.XmlElement("WayBillID", IsNullable = true)]
public string? WaybillId { get; set; }
}
}

View File

@@ -0,0 +1,47 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
{
/// <summary>
/// <para>表示回复 EVENT.remind_waybill 事件的数据。</para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/express/delivery/single-delivery.html </para>
/// </summary>
public class RemindWaybillReply : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable
{
/// <summary>
/// 获取或设置处理结果错误码。
/// </summary>
[Newtonsoft.Json.JsonProperty("ResultCode")]
[System.Text.Json.Serialization.JsonPropertyName("ResultCode")]
[System.Xml.Serialization.XmlElement("ResultCode")]
public int ResultCode { get; set; }
/// <summary>
/// 获取或设置处理结果错误信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("ResultMsg")]
[System.Text.Json.Serialization.JsonPropertyName("ResultMsg")]
[System.Xml.Serialization.XmlElement("ResultMsg", IsNullable = true)]
public string? ResultMessage { get; set; }
/// <summary>
/// 获取或设置运单号。
/// </summary>
[Newtonsoft.Json.JsonProperty("WayBillID")]
[System.Text.Json.Serialization.JsonPropertyName("WayBillID")]
[System.Xml.Serialization.XmlElement("WayBillID", IsNullable = true)]
public string? WaybillId { get; set; }
/// <summary>
/// 获取或设置预计寄送时间字符串格式yyyy-MM-dd
/// </summary>
[Newtonsoft.Json.JsonProperty("EstimatedDeliveryTime")]
[System.Text.Json.Serialization.JsonPropertyName("EstimatedDeliveryTime")]
[System.Xml.Serialization.XmlElement("EstimatedDeliveryTime", IsNullable = true)]
public string? EstimatedDeliveryTimeString { get; set; }
public RemindWaybillReply()
{
MessageType = "event";
Event = "remind_waybill";
}
}
}

View File

@@ -0,0 +1,81 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
{
/// <summary>
/// <para>表示 EVENT.waybill_complaint 事件的数据。</para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/express/delivery/single-delivery.html </para>
/// </summary>
public class WaybillComplaintEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable
{
/// <summary>
/// 获取或设置微信订单 Token。
/// </summary>
[Newtonsoft.Json.JsonProperty("Token")]
[System.Text.Json.Serialization.JsonPropertyName("Token")]
[System.Xml.Serialization.XmlElement("Token")]
public string Token { get; set; } = default!;
/// <summary>
/// 获取或设置小程序 AppId。
/// </summary>
[Newtonsoft.Json.JsonProperty("WXAppId")]
[System.Text.Json.Serialization.JsonPropertyName("WXAppId")]
[System.Xml.Serialization.XmlElement("WXAppId")]
public string MiniProgramAppId { get; set; } = default!;
/// <summary>
/// 获取或设置商户订单号。
/// </summary>
[Newtonsoft.Json.JsonProperty("OrderID")]
[System.Text.Json.Serialization.JsonPropertyName("OrderID")]
[System.Xml.Serialization.XmlElement("OrderID", IsNullable = true)]
public string? OrderId { get; set; }
/// <summary>
/// 获取或设置运单号。
/// </summary>
[Newtonsoft.Json.JsonProperty("WayBillID")]
[System.Text.Json.Serialization.JsonPropertyName("WayBillID")]
[System.Xml.Serialization.XmlElement("WayBillID", IsNullable = true)]
public string? WaybillId { get; set; }
/// <summary>
/// 获取或设置投诉类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("ComplainType")]
[System.Text.Json.Serialization.JsonPropertyName("ComplainType")]
[System.Xml.Serialization.XmlElement("ComplainType")]
public int ComplaintType { get; set; }
/// <summary>
/// 获取或设置投诉内容。
/// </summary>
[Newtonsoft.Json.JsonProperty("Content")]
[System.Text.Json.Serialization.JsonPropertyName("Content")]
[System.Xml.Serialization.XmlElement("Content")]
public string Content { get; set; } = default!;
/// <summary>
/// 获取或设置投诉材料图片 URL。
/// </summary>
[Newtonsoft.Json.JsonProperty("Pic")]
[System.Text.Json.Serialization.JsonPropertyName("Pic")]
[System.Xml.Serialization.XmlElement("Pic", IsNullable = true)]
public string? PictureUrl { get; set; }
/// <summary>
/// 获取或设置联系人姓名。
/// </summary>
[Newtonsoft.Json.JsonProperty("Name")]
[System.Text.Json.Serialization.JsonPropertyName("Name")]
[System.Xml.Serialization.XmlElement("Name", IsNullable = true)]
public string? Name { get; set; }
/// <summary>
/// 获取或设置联系人电话。
/// </summary>
[Newtonsoft.Json.JsonProperty("Phone")]
[System.Text.Json.Serialization.JsonPropertyName("Phone")]
[System.Xml.Serialization.XmlElement("Phone", IsNullable = true)]
public string? PhoneNumber { get; set; }
}
}

View File

@@ -0,0 +1,31 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
{
/// <summary>
/// <para>表示回复 EVENT.waybill_complaint 事件的数据。</para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/express/delivery/single-delivery.html </para>
/// </summary>
public class WaybillComplaintReply : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable
{
/// <summary>
/// 获取或设置处理结果错误码。
/// </summary>
[Newtonsoft.Json.JsonProperty("ResultCode")]
[System.Text.Json.Serialization.JsonPropertyName("ResultCode")]
[System.Xml.Serialization.XmlElement("ResultCode")]
public int ResultCode { get; set; }
/// <summary>
/// 获取或设置处理结果错误信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("ResultMsg")]
[System.Text.Json.Serialization.JsonPropertyName("ResultMsg")]
[System.Xml.Serialization.XmlElement("ResultMsg", IsNullable = true)]
public string? ResultMessage { get; set; }
public WaybillComplaintReply()
{
MessageType = "event";
Event = "waybill_complaint";
}
}
}

View File

@@ -0,0 +1,57 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
{
/// <summary>
/// <para>表示 EVENT.waybill_evaluate_agent 事件的数据。</para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/express/delivery/single-delivery.html </para>
/// </summary>
public class WaybillEvaluateAgentEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable
{
/// <summary>
/// 获取或设置微信订单 Token。
/// </summary>
[Newtonsoft.Json.JsonProperty("Token")]
[System.Text.Json.Serialization.JsonPropertyName("Token")]
[System.Xml.Serialization.XmlElement("Token")]
public string Token { get; set; } = default!;
/// <summary>
/// 获取或设置小程序 AppId。
/// </summary>
[Newtonsoft.Json.JsonProperty("WXAppId")]
[System.Text.Json.Serialization.JsonPropertyName("WXAppId")]
[System.Xml.Serialization.XmlElement("WXAppId")]
public string MiniProgramAppId { get; set; } = default!;
/// <summary>
/// 获取或设置商户订单号。
/// </summary>
[Newtonsoft.Json.JsonProperty("OrderID")]
[System.Text.Json.Serialization.JsonPropertyName("OrderID")]
[System.Xml.Serialization.XmlElement("OrderID", IsNullable = true)]
public string? OrderId { get; set; }
/// <summary>
/// 获取或设置运单号。
/// </summary>
[Newtonsoft.Json.JsonProperty("WayBillID")]
[System.Text.Json.Serialization.JsonPropertyName("WayBillID")]
[System.Xml.Serialization.XmlElement("WayBillID", IsNullable = true)]
public string? WaybillId { get; set; }
/// <summary>
/// 获取或设置小哥类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("CourierType")]
[System.Text.Json.Serialization.JsonPropertyName("CourierType")]
[System.Xml.Serialization.XmlElement("CourierType")]
public int CourierType { get; set; }
/// <summary>
/// 获取或设置评分。
/// </summary>
[Newtonsoft.Json.JsonProperty("Score")]
[System.Text.Json.Serialization.JsonPropertyName("Score")]
[System.Xml.Serialization.XmlElement("Score")]
public int Score { get; set; }
}
}

View File

@@ -0,0 +1,31 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
{
/// <summary>
/// <para>表示回复 EVENT.waybill_evaluate_agent 事件的数据。</para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/express/delivery/single-delivery.html </para>
/// </summary>
public class WaybillEvaluateAgentReply : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable
{
/// <summary>
/// 获取或设置处理结果错误码。
/// </summary>
[Newtonsoft.Json.JsonProperty("ResultCode")]
[System.Text.Json.Serialization.JsonPropertyName("ResultCode")]
[System.Xml.Serialization.XmlElement("ResultCode")]
public int ResultCode { get; set; }
/// <summary>
/// 获取或设置处理结果错误信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("ResultMsg")]
[System.Text.Json.Serialization.JsonPropertyName("ResultMsg")]
[System.Xml.Serialization.XmlElement("ResultMsg", IsNullable = true)]
public string? ResultMessage { get; set; }
public WaybillEvaluateAgentReply()
{
MessageType = "event";
Event = "waybill_evaluate_agent";
}
}
}

View File

@@ -0,0 +1,65 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
{
/// <summary>
/// <para>表示 EVENT.waybill_query_expect_time_range 事件的数据。</para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/express/delivery/single-delivery.html </para>
/// </summary>
public class WaybillQueryExpectTimeRangeEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable
{
/// <summary>
/// 获取或设置小程序 AppId。
/// </summary>
[Newtonsoft.Json.JsonProperty("WXAppId")]
[System.Text.Json.Serialization.JsonPropertyName("WXAppId")]
[System.Xml.Serialization.XmlElement("WXAppId")]
public string MiniProgramAppId { get; set; } = default!;
/// <summary>
/// 获取或设置省份。
/// </summary>
[Newtonsoft.Json.JsonProperty("Province")]
[System.Text.Json.Serialization.JsonPropertyName("Province")]
[System.Xml.Serialization.XmlElement("Province")]
public string Province { get; set; } = default!;
/// <summary>
/// 获取或设置城市。
/// </summary>
[Newtonsoft.Json.JsonProperty("City")]
[System.Text.Json.Serialization.JsonPropertyName("City")]
[System.Xml.Serialization.XmlElement("City")]
public string City { get; set; } = default!;
/// <summary>
/// 获取或设置区县。
/// </summary>
[Newtonsoft.Json.JsonProperty("Area")]
[System.Text.Json.Serialization.JsonPropertyName("Area")]
[System.Xml.Serialization.XmlElement("Area")]
public string District { get; set; } = default!;
/// <summary>
/// 获取或设置街道。
/// </summary>
[Newtonsoft.Json.JsonProperty("Street")]
[System.Text.Json.Serialization.JsonPropertyName("Street")]
[System.Xml.Serialization.XmlElement("Street")]
public string Street { get; set; } = default!;
/// <summary>
/// 获取或设置详细地址。
/// </summary>
[Newtonsoft.Json.JsonProperty("Address")]
[System.Text.Json.Serialization.JsonPropertyName("Address")]
[System.Xml.Serialization.XmlElement("Address")]
public string Address { get; set; } = default!;
/// <summary>
/// 获取或设置地址 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("Id")]
[System.Text.Json.Serialization.JsonPropertyName("Id")]
[System.Xml.Serialization.XmlElement("Id", IsNullable = true)]
public string? AddressId { get; set; }
}
}

View File

@@ -0,0 +1,77 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
{
/// <summary>
/// <para>表示回复 EVENT.waybill_query_expect_time_range 事件的数据。</para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/express/delivery/single-delivery.html </para>
/// </summary>
public class WaybillQueryExpectTimeRangeReply : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable
{
public static class Types
{
public class ValidTimeRange
{
/// <summary>
/// 获取或设置开始时间小时数。
/// </summary>
[Newtonsoft.Json.JsonProperty("StartTime")]
[System.Text.Json.Serialization.JsonPropertyName("StartTime")]
[System.Xml.Serialization.XmlElement("StartTime")]
public int StartTimeHours { get; set; }
/// <summary>
/// 获取或设置结束时间小时数。
/// </summary>
[Newtonsoft.Json.JsonProperty("EndTime")]
[System.Text.Json.Serialization.JsonPropertyName("EndTime")]
[System.Xml.Serialization.XmlElement("EndTime")]
public int EndTimeHours { get; set; }
/// <summary>
/// 获取或设置天数。
/// </summary>
[Newtonsoft.Json.JsonProperty("DayDelta")]
[System.Text.Json.Serialization.JsonPropertyName("DayDelta")]
[System.Xml.Serialization.XmlElement("DayDelta", IsNullable = true)]
public int? DayDelta { get; set; }
/// <summary>
/// 获取或设置状态。
/// </summary>
[Newtonsoft.Json.JsonProperty("Status")]
[System.Text.Json.Serialization.JsonPropertyName("Status")]
[System.Xml.Serialization.XmlElement("Status", IsNullable = true)]
public int? Status { get; set; }
}
}
/// <summary>
/// 获取或设置处理结果错误码。
/// </summary>
[Newtonsoft.Json.JsonProperty("ResultCode")]
[System.Text.Json.Serialization.JsonPropertyName("ResultCode")]
[System.Xml.Serialization.XmlElement("ResultCode")]
public int ResultCode { get; set; }
/// <summary>
/// 获取或设置处理结果错误信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("ResultMsg")]
[System.Text.Json.Serialization.JsonPropertyName("ResultMsg")]
[System.Xml.Serialization.XmlElement("ResultMsg", IsNullable = true)]
public string? ResultMessage { get; set; }
/// <summary>
/// 获取或设置可预约时间段列表。
/// </summary>
[Newtonsoft.Json.JsonProperty("ValidTimeRange")]
[System.Text.Json.Serialization.JsonPropertyName("ValidTimeRange")]
[System.Xml.Serialization.XmlElement("ValidTimeRange", Type = typeof(Types.ValidTimeRange))]
public Types.ValidTimeRange[] ValidTimeRangeList { get; set; } = default!;
public WaybillQueryExpectTimeRangeReply()
{
MessageType = "event";
Event = "waybill_query_expect_time_range";
}
}
}

View File

@@ -0,0 +1,29 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
{
/// <summary>
/// <para>表示回复 EVENT.cancel_auth_account 事件的数据。</para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-provider/immediateDelivery.onPreAuthCodeGet.html </para>
/// </summary>
public class CancelAuthAccountReply : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable
{
/// <summary>
/// 获取或设置错误码。
/// </summary>
[Newtonsoft.Json.JsonProperty("resultcode")]
[System.Text.Json.Serialization.JsonPropertyName("resultcode")]
public int ResultCode { get; set; }
/// <summary>
/// 获取或设置错误描述。
/// </summary>
[Newtonsoft.Json.JsonProperty("resultmsg")]
[System.Text.Json.Serialization.JsonPropertyName("resultmsg")]
public string? ResultMessage { get; set; }
public CancelAuthAccountReply()
{
MessageType = "event";
Event = "cancel_auth_account";
}
}
}

View File

@@ -0,0 +1,50 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
{
/// <summary>
/// <para>表示回复 EVENT.get_auth_info 事件的数据。</para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-provider/immediateDelivery.onPreAuthCodeGet.html </para>
/// </summary>
public class GetAuthInfoReply : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable
{
/// <summary>
/// 获取或设置错误码。
/// </summary>
[Newtonsoft.Json.JsonProperty("resultcode")]
[System.Text.Json.Serialization.JsonPropertyName("resultcode")]
public int ResultCode { get; set; }
/// <summary>
/// 获取或设置错误描述。
/// </summary>
[Newtonsoft.Json.JsonProperty("resultmsg")]
[System.Text.Json.Serialization.JsonPropertyName("resultmsg")]
public string? ResultMessage { get; set; }
/// <summary>
/// 获取或设置配送公司分配的 AppKey。
/// </summary>
[Newtonsoft.Json.JsonProperty("appkey")]
[System.Text.Json.Serialization.JsonPropertyName("appkey")]
public string AppKey { get; set; } = default!;
/// <summary>
/// 获取或设置帐号类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("account_type")]
[System.Text.Json.Serialization.JsonPropertyName("account_type")]
public int AccountType { get; set; }
/// <summary>
/// 获取或设置帐号。
/// </summary>
[Newtonsoft.Json.JsonProperty("account")]
[System.Text.Json.Serialization.JsonPropertyName("account")]
public string Account { get; set; } = default!;
public GetAuthInfoReply()
{
MessageType = "event";
Event = "get_auth_info";
}
}
}

View File

@@ -0,0 +1,36 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
{
/// <summary>
/// <para>表示回复 EVENT.get_pre_auth_code 事件的数据。</para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-provider/immediateDelivery.onPreAuthCodeGet.html </para>
/// </summary>
public class GetPreAuthCodeReply : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable
{
/// <summary>
/// 获取或设置错误码。
/// </summary>
[Newtonsoft.Json.JsonProperty("resultcode")]
[System.Text.Json.Serialization.JsonPropertyName("resultcode")]
public int ResultCode { get; set; }
/// <summary>
/// 获取或设置错误描述。
/// </summary>
[Newtonsoft.Json.JsonProperty("resultmsg")]
[System.Text.Json.Serialization.JsonPropertyName("resultmsg")]
public string? ResultMessage { get; set; }
/// <summary>
/// 获取或设置预授权码。
/// </summary>
[Newtonsoft.Json.JsonProperty("pre_auth_code")]
[System.Text.Json.Serialization.JsonPropertyName("pre_auth_code")]
public string PreAuthCode { get; set; } = default!;
public GetPreAuthCodeReply()
{
MessageType = "event";
Event = "get_pre_auth_code";
}
}
}

View File

@@ -0,0 +1,29 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
{
/// <summary>
/// <para>表示回复 EVENT.transport_add_tips 事件的数据。</para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-provider/immediateDelivery.onPreAuthCodeGet.html </para>
/// </summary>
public class TransportAddTipsReply : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable
{
/// <summary>
/// 获取或设置错误码。
/// </summary>
[Newtonsoft.Json.JsonProperty("resultcode")]
[System.Text.Json.Serialization.JsonPropertyName("resultcode")]
public int ResultCode { get; set; }
/// <summary>
/// 获取或设置错误描述。
/// </summary>
[Newtonsoft.Json.JsonProperty("resultmsg")]
[System.Text.Json.Serialization.JsonPropertyName("resultmsg")]
public string? ResultMessage { get; set; }
public TransportAddTipsReply()
{
MessageType = "event";
Event = "transport_add_tips";
}
}
}

View File

@@ -1,10 +1,10 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
{
/// <summary>
/// <para>表示 EVENT.transport_get_agent_pos 事件的数据。</para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-provider/immediateDelivery.onAgentPosQuery.html </para>
/// </summary>
public class TransportGetAgentPosEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable
public class TransportGetAgentPositionEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable
{
/// <summary>
/// 获取或设置商家 ID。

View File

@@ -0,0 +1,57 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
{
/// <summary>
/// <para>表示回复 EVENT.transport_get_agent_pos 事件的数据。</para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/api-backend/open-api/immediate-delivery/by-provider/immediateDelivery.onPreAuthCodeGet.html </para>
/// </summary>
public class TransportGetAgentPositionReply : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable
{
/// <summary>
/// 获取或设置错误码。
/// </summary>
[Newtonsoft.Json.JsonProperty("resultcode")]
[System.Text.Json.Serialization.JsonPropertyName("resultcode")]
public int ResultCode { get; set; }
/// <summary>
/// 获取或设置错误描述。
/// </summary>
[Newtonsoft.Json.JsonProperty("resultmsg")]
[System.Text.Json.Serialization.JsonPropertyName("resultmsg")]
public string? ResultMessage { get; set; }
/// <summary>
/// 获取或设置经度。
/// </summary>
[Newtonsoft.Json.JsonProperty("lng")]
[System.Text.Json.Serialization.JsonPropertyName("lng")]
public double Longitude { get; set; }
/// <summary>
/// 获取或设置错误码。
/// </summary>
[Newtonsoft.Json.JsonProperty("lat")]
[System.Text.Json.Serialization.JsonPropertyName("lat")]
public double Latitude { get; set; }
/// <summary>
/// 获取或设置和目的地距离(单位:米)。
/// </summary>
[Newtonsoft.Json.JsonProperty("distance")]
[System.Text.Json.Serialization.JsonPropertyName("distance")]
public int? Distance { get; set; }
/// <summary>
/// 获取或设置预计还剩多久送达时间(单位:秒)。
/// </summary>
[Newtonsoft.Json.JsonProperty("reach_time")]
[System.Text.Json.Serialization.JsonPropertyName("reach_time")]
public int? EstimatedReachTime { get; set; }
public TransportGetAgentPositionReply()
{
MessageType = "event";
Event = "transport_get_agent_pos";
}
}
}

View File

@@ -795,6 +795,128 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
return await client.SendRequestWithJsonAsync<Models.CgibinExpressDeliveryOpenMessageOpenQueryPluginResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
#region Delivery/SingleWaybill
/// <summary>
/// <para>异步调用 [POST] /cgi-bin/express/delivery/single_waybill/update 接口。</para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/express/delivery/single-delivery.html </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.CgibinExpressDeliverySingleWaybillUpdateResponse> ExecuteCgibinExpressDeliverySingleWaybillUpdateAsync(this WechatApiClient client, Models.CgibinExpressDeliverySingleWaybillUpdateRequest 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, "cgi-bin", "express", "delivery", "single_waybill", "update")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendRequestWithJsonAsync<Models.CgibinExpressDeliverySingleWaybillUpdateResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
/// <summary>
/// <para>异步调用 [POST] /cgi-bin/express/delivery/single_waybill/fee 接口。</para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/express/delivery/single-delivery.html </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.CgibinExpressDeliverySingleWaybillFeeResponse> ExecuteCgibinExpressDeliverySingleWaybillFeeAsync(this WechatApiClient client, Models.CgibinExpressDeliverySingleWaybillFeeRequest 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, "cgi-bin", "express", "delivery", "single_waybill", "fee")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendRequestWithJsonAsync<Models.CgibinExpressDeliverySingleWaybillFeeResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
/// <summary>
/// <para>异步调用 [POST] /cgi-bin/express/delivery/single_waybill/cancel_order 接口。</para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/express/delivery/single-delivery.html </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.CgibinExpressDeliverySingleWaybillCancelOrderResponse> ExecuteCgibinExpressDeliverySingleWaybillCancelOrderAsync(this WechatApiClient client, Models.CgibinExpressDeliverySingleWaybillCancelOrderRequest 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, "cgi-bin", "express", "delivery", "single_waybill", "cancel_order")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendRequestWithJsonAsync<Models.CgibinExpressDeliverySingleWaybillCancelOrderResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
/// <summary>
/// <para>异步调用 [POST] /cgi-bin/express/delivery/single_waybill/refund_order 接口。</para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/express/delivery/single-delivery.html </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.CgibinExpressDeliverySingleWaybillRefundOrderResponse> ExecuteCgibinExpressDeliverySingleWaybillRefundOrderAsync(this WechatApiClient client, Models.CgibinExpressDeliverySingleWaybillRefundOrderRequest 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, "cgi-bin", "express", "delivery", "single_waybill", "refund_order")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendRequestWithJsonAsync<Models.CgibinExpressDeliverySingleWaybillRefundOrderResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
/// <summary>
/// <para>异步调用 [POST] /cgi-bin/express/delivery/single_waybill/get_bill 接口。</para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/express/delivery/single-delivery.html </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.CgibinExpressDeliverySingleWaybillGetBillResponse> ExecuteCgibinExpressDeliverySingleWaybillGetBillAsync(this WechatApiClient client, Models.CgibinExpressDeliverySingleWaybillGetBillRequest 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, "cgi-bin", "express", "delivery", "single_waybill", "get_bill")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendRequestWithJsonAsync<Models.CgibinExpressDeliverySingleWaybillGetBillResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
/// <summary>
/// <para>异步调用 [POST] /cgi-bin/express/delivery/single_waybill/evaluate_feedback 接口。</para>
/// <para>REF: https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/express/delivery/single-delivery.html </para>
/// </summary>
/// <param name="client"></param>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public static async Task<Models.CgibinExpressDeliverySingleWaybillEvaluateFeedbackResponse> ExecuteCgibinExpressDeliverySingleWaybillEvaluateFeedbackAsync(this WechatApiClient client, Models.CgibinExpressDeliverySingleWaybillEvaluateFeedbackRequest 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, "cgi-bin", "express", "delivery", "single_waybill", "evaluate_feedback")
.SetQueryParam("access_token", request.AccessToken);
return await client.SendRequestWithJsonAsync<Models.CgibinExpressDeliverySingleWaybillEvaluateFeedbackResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
}
#endregion
#endregion
}
}

View File

@@ -225,7 +225,7 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalBooleanConverter))]
[System.Text.Json.Serialization.JsonPropertyName("use_insured")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalBooleanConverter))]
public bool UseInsured { get; set; }
public bool IsUseInsured { get; set; }
/// <summary>
/// 获取或设置保价金额(单位:分)。

View File

@@ -0,0 +1,22 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cgi-bin/express/delivery/single_waybill/cancel_order 接口的请求。</para>
/// </summary>
public class CgibinExpressDeliverySingleWaybillCancelOrderRequest : WechatApiRequest, IInferable<CgibinExpressDeliverySingleWaybillCancelOrderRequest, CgibinExpressDeliverySingleWaybillCancelOrderResponse>
{
/// <summary>
/// 获取或设置微信订单 Token。
/// </summary>
[Newtonsoft.Json.JsonProperty("token")]
[System.Text.Json.Serialization.JsonPropertyName("token")]
public string Token { get; set; } = string.Empty;
/// <summary>
/// 获取或设置取消原因。
/// </summary>
[Newtonsoft.Json.JsonProperty("reason")]
[System.Text.Json.Serialization.JsonPropertyName("reason")]
public string Reason { get; set; } = string.Empty;
}
}

View File

@@ -0,0 +1,9 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cgi-bin/express/delivery/single_waybill/cancel_order 接口的响应。</para>
/// </summary>
public class CgibinExpressDeliverySingleWaybillCancelOrderResponse : WechatApiResponse
{
}
}

View File

@@ -0,0 +1,36 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cgi-bin/express/delivery/single_waybill/evaluate_feedback 接口的请求。</para>
/// </summary>
public class CgibinExpressDeliverySingleWaybillEvaluateFeedbackRequest : WechatApiRequest, IInferable<CgibinExpressDeliverySingleWaybillEvaluateFeedbackRequest, CgibinExpressDeliverySingleWaybillEvaluateFeedbackResponse>
{
/// <summary>
/// 获取或设置微信订单 Token。
/// </summary>
[Newtonsoft.Json.JsonProperty("token")]
[System.Text.Json.Serialization.JsonPropertyName("token")]
public string Token { 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;
/// <summary>
/// 获取或设置处理结果。
/// </summary>
[Newtonsoft.Json.JsonProperty("result")]
[System.Text.Json.Serialization.JsonPropertyName("result")]
public string Result { get; set; } = string.Empty;
/// <summary>
/// 获取或设置处理结果说明。
/// </summary>
[Newtonsoft.Json.JsonProperty("desc")]
[System.Text.Json.Serialization.JsonPropertyName("desc")]
public string? Description { get; set; }
}
}

View File

@@ -0,0 +1,9 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cgi-bin/express/delivery/single_waybill/evaluate_feedback 接口的响应。</para>
/// </summary>
public class CgibinExpressDeliverySingleWaybillEvaluateFeedbackResponse : WechatApiResponse
{
}
}

View File

@@ -0,0 +1,78 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cgi-bin/express/delivery/single_waybill/fee 接口的请求。</para>
/// </summary>
public class CgibinExpressDeliverySingleWaybillFeeRequest : WechatApiRequest, IInferable<CgibinExpressDeliverySingleWaybillFeeRequest, CgibinExpressDeliverySingleWaybillFeeResponse>
{
/// <summary>
/// 获取或设置微信订单 Token。
/// </summary>
[Newtonsoft.Json.JsonProperty("token")]
[System.Text.Json.Serialization.JsonPropertyName("token")]
public string Token { 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;
/// <summary>
/// 获取或设置支付方式。
/// </summary>
[Newtonsoft.Json.JsonProperty("need_pay")]
[System.Text.Json.Serialization.JsonPropertyName("need_pay")]
public int PayType { get; set; }
/// <summary>
/// 获取或设置总金额(单位:分)。
/// </summary>
[Newtonsoft.Json.JsonProperty("fee")]
[System.Text.Json.Serialization.JsonPropertyName("fee")]
public int Fee { get; set; }
/// <summary>
/// 获取或设置原价(单位:分)。
/// </summary>
[Newtonsoft.Json.JsonProperty("original_fee")]
[System.Text.Json.Serialization.JsonPropertyName("original_fee")]
public int OriginalFee { get; set; }
/// <summary>
/// 获取或设置基础运费(单位:分)。
/// </summary>
[Newtonsoft.Json.JsonProperty("base_fee")]
[System.Text.Json.Serialization.JsonPropertyName("base_fee")]
public int BaseFee { get; set; }
/// <summary>
/// 获取或设置保价费用(单位:分)。
/// </summary>
[Newtonsoft.Json.JsonProperty("insured_fee")]
[System.Text.Json.Serialization.JsonPropertyName("insured_fee")]
public int InsuredFee { get; set; }
/// <summary>
/// 获取或设置其他费用(单位:分)。
/// </summary>
[Newtonsoft.Json.JsonProperty("other_fee")]
[System.Text.Json.Serialization.JsonPropertyName("other_fee")]
public int OtherFee { get; set; }
/// <summary>
/// 获取或设置备注。
/// </summary>
[Newtonsoft.Json.JsonProperty("remark")]
[System.Text.Json.Serialization.JsonPropertyName("remark")]
public string? Remark { get; set; }
/// <summary>
/// 获取或设置商品名称。
/// </summary>
[Newtonsoft.Json.JsonProperty("pay_goods_name")]
[System.Text.Json.Serialization.JsonPropertyName("pay_goods_name")]
public string? PayGoodsName { get; set; }
}
}

View File

@@ -0,0 +1,9 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cgi-bin/express/delivery/single_waybill/fee 接口的响应。</para>
/// </summary>
public class CgibinExpressDeliverySingleWaybillFeeResponse : WechatApiResponse
{
}
}

View File

@@ -0,0 +1,23 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cgi-bin/express/delivery/single_waybill/get_bill 接口的请求。</para>
/// </summary>
public class CgibinExpressDeliverySingleWaybillGetBillRequest : WechatApiRequest, IInferable<CgibinExpressDeliverySingleWaybillGetBillRequest, CgibinExpressDeliverySingleWaybillGetBillResponse>
{
/// <summary>
/// 获取或设置日期字符串格式yyyyMMdd
/// </summary>
[Newtonsoft.Json.JsonProperty("date")]
[System.Text.Json.Serialization.JsonPropertyName("date")]
public string DateString { get; set; } = string.Empty;
/// <summary>
/// 获取或设置账单类型。
/// <para>默认值ALL</para>
/// </summary>
[Newtonsoft.Json.JsonProperty("type")]
[System.Text.Json.Serialization.JsonPropertyName("type")]
public string BillType { get; set; } = "ALL";
}
}

View File

@@ -0,0 +1,13 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cgi-bin/express/delivery/single_waybill/get_bill 接口的响应。</para>
/// </summary>
public class CgibinExpressDeliverySingleWaybillGetBillResponse : WechatApiResponse
{
public override bool IsSuccessful()
{
return base.IsSuccessful() && RawBytes?.Length > 0;
}
}
}

View File

@@ -0,0 +1,22 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cgi-bin/express/delivery/single_waybill/refund_order 接口的请求。</para>
/// </summary>
public class CgibinExpressDeliverySingleWaybillRefundOrderRequest : WechatApiRequest, IInferable<CgibinExpressDeliverySingleWaybillRefundOrderRequest, CgibinExpressDeliverySingleWaybillRefundOrderResponse>
{
/// <summary>
/// 获取或设置微信订单 Token。
/// </summary>
[Newtonsoft.Json.JsonProperty("token")]
[System.Text.Json.Serialization.JsonPropertyName("token")]
public string Token { get; set; } = string.Empty;
/// <summary>
/// 获取或设置退款金额(单位:分)。
/// </summary>
[Newtonsoft.Json.JsonProperty("fee")]
[System.Text.Json.Serialization.JsonPropertyName("fee")]
public int RefundFee { get; set; }
}
}

View File

@@ -0,0 +1,9 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cgi-bin/express/delivery/single_waybill/refund_order 接口的响应。</para>
/// </summary>
public class CgibinExpressDeliverySingleWaybillRefundOrderResponse : WechatApiResponse
{
}
}

View File

@@ -0,0 +1,71 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cgi-bin/express/delivery/single_waybill/update 接口的请求。</para>
/// </summary>
public class CgibinExpressDeliverySingleWaybillUpdateRequest : WechatApiRequest, IInferable<CgibinExpressDeliverySingleWaybillUpdateRequest, CgibinExpressDeliverySingleWaybillUpdateResponse>
{
/// <summary>
/// 获取或设置微信订单 Token。
/// </summary>
[Newtonsoft.Json.JsonProperty("token")]
[System.Text.Json.Serialization.JsonPropertyName("token")]
public string Token { 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;
/// <summary>
/// 获取或设置轨迹节点时间戳。
/// </summary>
[Newtonsoft.Json.JsonProperty("action_time")]
[System.Text.Json.Serialization.JsonPropertyName("action_time")]
public long ActionTimestamp { get; set; }
/// <summary>
/// 获取或设置轨迹节点类型。
/// </summary>
[Newtonsoft.Json.JsonProperty("action_type")]
[System.Text.Json.Serialization.JsonPropertyName("action_type")]
public int ActionType { get; set; }
/// <summary>
/// 获取或设置轨迹节点详情。
/// </summary>
[Newtonsoft.Json.JsonProperty("action_msg")]
[System.Text.Json.Serialization.JsonPropertyName("action_msg")]
public string ActionMessage { get; set; } = string.Empty;
/// <summary>
/// 获取或设置取件员姓名。
/// </summary>
[Newtonsoft.Json.JsonProperty("pickup_courier_name")]
[System.Text.Json.Serialization.JsonPropertyName("pickup_courier_name")]
public string? PickupCourierName { get; set; }
/// <summary>
/// 获取或设置取件员电话号码。
/// </summary>
[Newtonsoft.Json.JsonProperty("pickup_courier_phone")]
[System.Text.Json.Serialization.JsonPropertyName("pickup_courier_phone")]
public string? PickupCourierPhoneNumber { get; set; }
/// <summary>
/// 获取或设置派件员姓名。
/// </summary>
[Newtonsoft.Json.JsonProperty("delivery_courier_name")]
[System.Text.Json.Serialization.JsonPropertyName("delivery_courier_name")]
public string? DeliveryCourierName { get; set; }
/// <summary>
/// 获取或设置派件员电话号码。
/// </summary>
[Newtonsoft.Json.JsonProperty("delivery_courier_phone")]
[System.Text.Json.Serialization.JsonPropertyName("delivery_courier_phone")]
public string? DeliveryCourierPhoneNumber { get; set; }
}
}

View File

@@ -0,0 +1,9 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cgi-bin/express/delivery/single_waybill/update 接口的响应。</para>
/// </summary>
public class CgibinExpressDeliverySingleWaybillUpdateResponse : WechatApiResponse
{
}
}

View File

@@ -15,6 +15,24 @@
"image_list": [
"https://qpic.cn/xxx"
]
},
{
"complaint_media_list": [
{
"media_type": "USER_COMPLAINT_IMAGE",
"media_url": [
"https://api.mch.weixin.qq.com/v3/merchant-service/images/xxxxx"
]
}
],
"log_id": "300285320210322170000071077",
"operator": "投诉人",
"operate_time": "2015-05-20T13:29:35.120+08:00",
"operate_type": "USER_CREATE_COMPLAINT",
"operate_details": "已与用户电话沟通解决",
"image_list": [
"https://qpic.cn/xxx"
]
}
],
"limit": 50,