feat(wxapi): 新增小程序微信物流服务退货组件相关接口

This commit is contained in:
Fu Diwei
2023-10-13 17:13:49 +08:00
parent 2b0cc2c302
commit 618dd25a40
12 changed files with 352 additions and 5 deletions

View File

@@ -0,0 +1,135 @@
using System.Collections.Generic;
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cgi-bin/express/delivery/return/add 接口的请求。</para>
/// </summary>
public class CgibinExpressDeliveryReturnAddRequest : WechatApiRequest, IInferable<CgibinExpressDeliveryReturnAddRequest, CgibinExpressDeliveryReturnAddResponse>
{
public static class Types
{
public class ShopAddress
{
/// <summary>
/// 获取或设置国家。
/// </summary>
[Newtonsoft.Json.JsonProperty("country")]
[System.Text.Json.Serialization.JsonPropertyName("country")]
public string Country { get; set; } = string.Empty;
/// <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("area")]
[System.Text.Json.Serialization.JsonPropertyName("area")]
public string District { get; set; } = string.Empty;
/// <summary>
/// 获取或设置详细地址。
/// </summary>
[Newtonsoft.Json.JsonProperty("address")]
[System.Text.Json.Serialization.JsonPropertyName("address")]
public string Address { 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 UserAddress : ShopAddress
{
}
public class Goods
{
/// <summary>
/// 获取或设置商品名称。
/// </summary>
[Newtonsoft.Json.JsonProperty("name")]
[System.Text.Json.Serialization.JsonPropertyName("name")]
public string Name { get; set; } = string.Empty;
/// <summary>
/// 获取或设置商品图片 URL。
/// </summary>
[Newtonsoft.Json.JsonProperty("url")]
[System.Text.Json.Serialization.JsonPropertyName("url")]
public string ImageUrl { get; set; } = string.Empty;
}
}
/// <summary>
/// 获取或设置商家退货单号。
/// </summary>
[Newtonsoft.Json.JsonProperty("shop_order_id")]
[System.Text.Json.Serialization.JsonPropertyName("shop_order_id")]
public string ShopOrderId { get; set; } = string.Empty;
/// <summary>
/// 获取或设置商家退货地址信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("biz_addr")]
[System.Text.Json.Serialization.JsonPropertyName("biz_addr")]
public Types.ShopAddress ShopAddress { get; set; } = new Types.ShopAddress();
/// <summary>
/// 获取或设置用户收货地址信息。
/// </summary>
[Newtonsoft.Json.JsonProperty("user_addr")]
[System.Text.Json.Serialization.JsonPropertyName("user_addr")]
public Types.UserAddress? UserAddress { get; set; }
/// <summary>
/// 获取或设置退货用户的 OpenId。
/// </summary>
[Newtonsoft.Json.JsonProperty("openid")]
[System.Text.Json.Serialization.JsonPropertyName("openid")]
public string OpenId { get; set; } = string.Empty;
/// <summary>
/// 获取或设置订单中心页面路径。
/// </summary>
[Newtonsoft.Json.JsonProperty("order_path")]
[System.Text.Json.Serialization.JsonPropertyName("order_path")]
public string OrderPagePath { get; set; } = string.Empty;
/// <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("order_price")]
[System.Text.Json.Serialization.JsonPropertyName("order_price")]
public int OrderPrice { get; set; }
}
}

View File

@@ -0,0 +1,16 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cgi-bin/express/delivery/return/add 接口的响应。</para>
/// </summary>
public class CgibinExpressDeliveryReturnAddResponse : WechatApiResponse
{
/// <summary>
/// 获取或设置退货单 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("return_id")]
[System.Text.Json.Serialization.JsonPropertyName("return_id")]
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalStringReadOnlyConverter))]
public string ReturnId { get; set; } = default!;
}
}

View File

@@ -0,0 +1,15 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cgi-bin/express/delivery/return/get 接口的请求。</para>
/// </summary>
public class CgibinExpressDeliveryReturnGetRequest : WechatApiRequest, IInferable<CgibinExpressDeliveryReturnGetRequest, CgibinExpressDeliveryReturnGetResponse>
{
/// <summary>
/// 获取或设置退货单 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("return_id")]
[System.Text.Json.Serialization.JsonPropertyName("return_id")]
public string ReturnId { get; set; } = string.Empty;
}
}

View File

@@ -0,0 +1,43 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cgi-bin/express/delivery/return/get 接口的响应。</para>
/// </summary>
public class CgibinExpressDeliveryReturnGetResponse : WechatApiResponse
{
/// <summary>
/// 获取或设置退货状态。
/// </summary>
[Newtonsoft.Json.JsonProperty("status")]
[System.Text.Json.Serialization.JsonPropertyName("status")]
public int Status { get; set; }
/// <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("order_status")]
[System.Text.Json.Serialization.JsonPropertyName("order_status")]
public int OrderStatus { get; set; }
/// <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!;
}
}

View File

@@ -0,0 +1,15 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /cgi-bin/express/delivery/return/unbind 接口的请求。</para>
/// </summary>
public class CgibinExpressDeliveryReturnUnbindRequest : WechatApiRequest, IInferable<CgibinExpressDeliveryReturnUnbindRequest, CgibinExpressDeliveryReturnUnbindResponse>
{
/// <summary>
/// 获取或设置退货单 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("return_id")]
[System.Text.Json.Serialization.JsonPropertyName("return_id")]
public string ReturnId { get; set; } = string.Empty;
}
}

View File

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