feat(wxapi): 新增视频号小店分享员专属商品链接相关接口

This commit is contained in:
Fu Diwei
2024-04-29 20:09:35 +08:00
parent 59a44f9d7a
commit 1d494910f1
17 changed files with 225 additions and 2 deletions

View File

@@ -16,6 +16,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
[System.Text.Json.Serialization.JsonPropertyName("openid")]
public string OpenId { get; set; } = default!;
/// <summary>
/// 获取或设置分享员 UnionId。
/// </summary>
[Newtonsoft.Json.JsonProperty("unionid")]
[System.Text.Json.Serialization.JsonPropertyName("unionid")]
public string? UnionId { get; set; }
/// <summary>
/// 获取或设置分享员昵称。
/// </summary>

View File

@@ -0,0 +1,22 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/sharer/get_sharer_product_h5url 接口的请求。</para>
/// </summary>
public class ChannelsECSharerGetSharerProductH5UrlRequest : WechatApiRequest, IInferable<ChannelsECSharerGetSharerProductH5UrlRequest, ChannelsECSharerGetSharerProductH5UrlResponse>
{
/// <summary>
/// 获取或设置分享员 OpenId。
/// </summary>
[Newtonsoft.Json.JsonProperty("openid")]
[System.Text.Json.Serialization.JsonPropertyName("openid")]
public string OpenId { get; set; } = string.Empty;
/// <summary>
/// 获取或设置商品 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("product_id")]
[System.Text.Json.Serialization.JsonPropertyName("product_id")]
public long ProductId { get; set; }
}
}

View File

@@ -0,0 +1,15 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/sharer/get_sharer_product_h5url 接口的响应。</para>
/// </summary>
public class ChannelsECSharerGetSharerProductH5UrlResponse : WechatApiResponse
{
/// <summary>
/// 获取或设置商品 H5 短链。
/// </summary>
[Newtonsoft.Json.JsonProperty("product_h5url")]
[System.Text.Json.Serialization.JsonPropertyName("product_h5url")]
public string ProductH5Url { get; set; } = default!;
}
}

View File

@@ -0,0 +1,22 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/sharer/get_sharer_product_qrcode 接口的请求。</para>
/// </summary>
public class ChannelsECSharerGetSharerProductQrcodeRequest : WechatApiRequest, IInferable<ChannelsECSharerGetSharerProductQrcodeRequest, ChannelsECSharerGetSharerProductQrcodeResponse>
{
/// <summary>
/// 获取或设置分享员 OpenId。
/// </summary>
[Newtonsoft.Json.JsonProperty("openid")]
[System.Text.Json.Serialization.JsonPropertyName("openid")]
public string OpenId { get; set; } = string.Empty;
/// <summary>
/// 获取或设置商品 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("product_id")]
[System.Text.Json.Serialization.JsonPropertyName("product_id")]
public long ProductId { get; set; }
}
}

View File

@@ -0,0 +1,15 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/sharer/get_sharer_product_qrcode 接口的响应。</para>
/// </summary>
public class ChannelsECSharerGetSharerProductQrcodeResponse : WechatApiResponse
{
/// <summary>
/// 获取或设置商品二维码链接。
/// </summary>
[Newtonsoft.Json.JsonProperty("product_qrcode")]
[System.Text.Json.Serialization.JsonPropertyName("product_qrcode")]
public string ProductQrcode { get; set; } = default!;
}
}

View File

@@ -0,0 +1,22 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/sharer/get_sharer_product_taglink 接口的请求。</para>
/// </summary>
public class ChannelsECSharerGetSharerProductTagLinkRequest : WechatApiRequest, IInferable<ChannelsECSharerGetSharerProductTagLinkRequest, ChannelsECSharerGetSharerProductTagLinkResponse>
{
/// <summary>
/// 获取或设置分享员 OpenId。
/// </summary>
[Newtonsoft.Json.JsonProperty("openid")]
[System.Text.Json.Serialization.JsonPropertyName("openid")]
public string OpenId { get; set; } = string.Empty;
/// <summary>
/// 获取或设置商品 ID。
/// </summary>
[Newtonsoft.Json.JsonProperty("product_id")]
[System.Text.Json.Serialization.JsonPropertyName("product_id")]
public long ProductId { get; set; }
}
}

View File

@@ -0,0 +1,15 @@
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
{
/// <summary>
/// <para>表示 [POST] /channels/ec/sharer/get_sharer_product_taglink 接口的响应。</para>
/// </summary>
public class ChannelsECSharerGetSharerProductTagLinkResponse : WechatApiResponse
{
/// <summary>
/// 获取或设置商品微信口令。
/// </summary>
[Newtonsoft.Json.JsonProperty("product_taglink")]
[System.Text.Json.Serialization.JsonPropertyName("product_taglink")]
public string ProductTagLink { get; set; } = default!;
}
}

View File

@@ -12,6 +12,13 @@ namespace SKIT.FlurlHttpClient.Wechat.Api.Models
[System.Text.Json.Serialization.JsonPropertyName("openid")]
public string OpenId { get; set; } = default!;
/// <summary>
/// 获取或设置分享员 UnionId。
/// </summary>
[Newtonsoft.Json.JsonProperty("unionid")]
[System.Text.Json.Serialization.JsonPropertyName("unionid")]
public string? UnionId { get; set; }
/// <summary>
/// 获取或设置分享员昵称。
/// </summary>