mirror of
https://gitee.com/fudiwei/DotNetCore.SKIT.FlurlHttpClient.Wechat.git
synced 2025-04-05 17:37:54 +08:00
feat(wxapi): 新增视频号小店会员功能相关接口
This commit is contained in:
parent
9022b3252d
commit
41908b9684
@ -0,0 +1,31 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 EVENT.channels_ec_vip_close 事件的数据。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/vip/callback/member/user_join_vip.html </para>
|
||||
/// </summary>
|
||||
public class ChannelsECVipCloseEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class User
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置注销时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("close_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("close_time")]
|
||||
[System.Xml.Serialization.XmlElement("close_time")]
|
||||
public long CloseTimestamp { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("user_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("user_info")]
|
||||
[System.Xml.Serialization.XmlElement("user_info")]
|
||||
public Types.User User { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 EVENT.channels_ec_vip_grade_info_update 事件的数据。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/vip/callback/member/usergrade_update.html </para>
|
||||
/// </summary>
|
||||
public class ChannelsECVipGradeInfoUpgradeEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class User
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置会员等级。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("grade")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("grade")]
|
||||
[System.Xml.Serialization.XmlElement("grade")]
|
||||
public int Grade { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置经验值。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("experience_value")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("experience_value")]
|
||||
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
|
||||
[System.Xml.Serialization.XmlElement("experience_value")]
|
||||
public int ExperienceValue { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("user_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("user_info")]
|
||||
[System.Xml.Serialization.XmlElement("user_info")]
|
||||
public Types.User User { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,39 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 EVENT.channels_ec_vip_join 事件的数据。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/vip/callback/member/user_join_vip.html </para>
|
||||
/// </summary>
|
||||
public class ChannelsECVipJoinEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class User
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置手机号码。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("phone_number")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("phone_number")]
|
||||
[System.Xml.Serialization.XmlElement("phone_number")]
|
||||
public string PhoneNumber { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置加入时间戳。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("join_time")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("join_time")]
|
||||
[System.Xml.Serialization.XmlElement("join_time")]
|
||||
public long JoinTimestamp { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("user_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("user_info")]
|
||||
[System.Xml.Serialization.XmlElement("user_info")]
|
||||
public Types.User User { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,83 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 EVENT.channels_ec_vip_score_exchange 事件的数据。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/vip/callback/score/user_score_exchange.html </para>
|
||||
/// </summary>
|
||||
public class ChannelsECVipScoreExchangeEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Exchange
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Coupon
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置优惠券 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("related_coupon_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("related_coupon_id")]
|
||||
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
|
||||
[System.Xml.Serialization.XmlElement("related_coupon_id")]
|
||||
public long CouponId { get; set; }
|
||||
}
|
||||
|
||||
public class Product
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置商品 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("related_product_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("related_product_id")]
|
||||
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
|
||||
[System.Xml.Serialization.XmlElement("related_product_id")]
|
||||
public long CouponId { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置兑换类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("score_item_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("score_item_type")]
|
||||
[System.Xml.Serialization.XmlElement("score_item_type")]
|
||||
public int ScoreItemType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置兑换积分。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("pay_score")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("pay_score")]
|
||||
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
|
||||
[System.Xml.Serialization.XmlElement("pay_score")]
|
||||
public int PayScore { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置兑换的优惠券信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("coupon_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("coupon_info")]
|
||||
[System.Xml.Serialization.XmlElement("coupon_info", IsNullable = true)]
|
||||
public Types.Coupon? Coupon { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置兑换的商品信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("product_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("product_info")]
|
||||
[System.Xml.Serialization.XmlElement("product_info", IsNullable = true)]
|
||||
public Types.Product? Product { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置兑换信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("exchange_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("exchange_info")]
|
||||
[System.Xml.Serialization.XmlElement("exchange_info")]
|
||||
public Types.Exchange Exchange { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,57 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 EVENT.channels_ec_vip_score_update 事件的数据。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/vip/callback/score/user_score_update.html </para>
|
||||
/// </summary>
|
||||
public class ChannelsECVipScoreUpdateEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class User
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置会员等级。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("grade")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("grade")]
|
||||
[System.Xml.Serialization.XmlElement("grade")]
|
||||
public int Grade { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置当前积分。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("score")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("score")]
|
||||
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
|
||||
[System.Xml.Serialization.XmlElement("score")]
|
||||
public int Score { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置本次改动积分。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("delta_score")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("delta_score")]
|
||||
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
|
||||
[System.Xml.Serialization.XmlElement("delta_score")]
|
||||
public int DeltaScore { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置流水类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("flow_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("flow_type")]
|
||||
[System.Xml.Serialization.XmlElement("flow_type")]
|
||||
public int FlowType { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("user_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("user_info")]
|
||||
[System.Xml.Serialization.XmlElement("user_info")]
|
||||
public Types.User User { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,79 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Events
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 EVENT.channels_ec_vip_task_award 事件的数据。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/vip/callback/member/user_finish_task.html </para>
|
||||
/// </summary>
|
||||
public class ChannelsECVipTaskAwardEvent : WechatApiEvent, WechatApiEvent.Serialization.IJsonSerializable, WechatApiEvent.Serialization.IXmlSerializable
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Task
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class AwardInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置奖励类型。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("award_type")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("award_type")]
|
||||
[System.Xml.Serialization.XmlElement("award_type")]
|
||||
public int AwardType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置奖励的优惠券 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("coupon_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("coupon_id")]
|
||||
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
|
||||
[System.Xml.Serialization.XmlElement("coupon_id", IsNullable = true)]
|
||||
public long? CouponId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置奖励的积分。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("gain_score")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("gain_score")]
|
||||
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
|
||||
[System.Xml.Serialization.XmlElement("gain_score", IsNullable = true)]
|
||||
public int? GainScore { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置任务 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("task_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("task_id")]
|
||||
[System.Xml.Serialization.XmlElement("task_id")]
|
||||
public long TaskId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置任务名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("task_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("task_name")]
|
||||
[System.Xml.Serialization.XmlElement("task_name")]
|
||||
public string TaskName { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置奖励信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("award_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("award_info")]
|
||||
[System.Xml.Serialization.XmlElement("award_info")]
|
||||
public Types.AwardInfo AwardInfo { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置任务信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("task_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("task_info")]
|
||||
[System.Xml.Serialization.XmlElement("task_info")]
|
||||
public Types.Task Task { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -1811,6 +1811,296 @@ namespace SKIT.FlurlHttpClient.Wechat.Api
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ECVip
|
||||
#region ECVip/ExperienceValue
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /channels/ec/vip/experiencevalue/set 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/vip/experiencevalue/set.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ChannelsECVipExperienceValueSetResponse> ExecuteChannelsECVipExperienceValueSetAsync(this WechatApiClient client, Models.ChannelsECVipExperienceValueSetRequest 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", "vip", "experiencevalue", "set")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ChannelsECVipExperienceValueSetResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ECVip/Grade
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /channels/ec/vip/grade/card/add 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/vip/grade/add.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ChannelsECVipGradeCardAddResponse> ExecuteChannelsECVipGradeCardAddAsync(this WechatApiClient client, Models.ChannelsECVipGradeCardAddRequest 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", "vip", "grade", "card", "add")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ChannelsECVipGradeCardAddResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /channels/ec/vip/grade/card/get 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/vip/grade/get.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ChannelsECVipGradeCardGetResponse> ExecuteChannelsECVipGradeCardGetAsync(this WechatApiClient client, Models.ChannelsECVipGradeCardGetRequest 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.Get, "channels", "ec", "vip", "grade", "card", "get")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ChannelsECVipGradeCardGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /channels/ec/vip/grade/card/update 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/vip/grade/add.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ChannelsECVipGradeCardUpdateResponse> ExecuteChannelsECVipGradeCardUpdateAsync(this WechatApiClient client, Models.ChannelsECVipGradeCardUpdateRequest 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", "vip", "grade", "card", "update")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ChannelsECVipGradeCardUpdateResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ECVip/Score
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /channels/ec/vip/score/set 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/vip/score/set_conf.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ChannelsECVipScoreSetResponse> ExecuteChannelsECVipScoreSetAsync(this WechatApiClient client, Models.ChannelsECVipScoreSetRequest 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", "vip", "score", "set")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ChannelsECVipScoreSetResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [GET] /channels/ec/vip/score/get 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/vip/score/get_conf.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ChannelsECVipScoreGetResponse> ExecuteChannelsECVipScoreGetAsync(this WechatApiClient client, Models.ChannelsECVipScoreGetRequest 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.Get, "channels", "ec", "vip", "score", "get")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ChannelsECVipScoreGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region ECVip/User
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /channels/ec/vip/user/info/get 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/vip/member/get.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ChannelsECVipUserInfoGetResponse> ExecuteChannelsECVipUserInfoGetAsync(this WechatApiClient client, Models.ChannelsECVipUserInfoGetRequest 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", "vip", "user", "info", "get")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ChannelsECVipUserInfoGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /channels/ec/vip/user/list/get 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/vip/member/get_list.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ChannelsECVipUserListGetResponse> ExecuteChannelsECVipUserListGetAsync(this WechatApiClient client, Models.ChannelsECVipUserListGetRequest 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", "vip", "user", "list", "get")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ChannelsECVipUserListGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /channels/ec/vip/user/experiencevalue/update 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/vip/experiencevalue/update_user.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ChannelsECVipUserExperienceValueUpdateResponse> ExecuteChannelsECVipUserExperienceValueUpdateAsync(this WechatApiClient client, Models.ChannelsECVipUserExperienceValueUpdateRequest 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", "vip", "user", "experiencevalue", "update")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ChannelsECVipUserExperienceValueUpdateResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /channels/ec/vip/user/grade/update 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/vip/grade/update_user.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ChannelsECVipUserGradeUpdateResponse> ExecuteChannelsECVipUserGradeUpdateAsync(this WechatApiClient client, Models.ChannelsECVipUserGradeUpdateRequest 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", "vip", "user", "grade", "update")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ChannelsECVipUserGradeUpdateResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /channels/ec/vip/user/score/get 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/vip/score/get_user_score.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ChannelsECVipUserScoreGetResponse> ExecuteChannelsECVipUserScoreGetAsync(this WechatApiClient client, Models.ChannelsECVipUserScoreGetRequest 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", "vip", "user", "score", "get")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ChannelsECVipUserScoreGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /channels/ec/vip/user/score/flowrecord/get 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/vip/score/get_user_flow_record.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ChannelsECVipUserScoreFlowRecordGetResponse> ExecuteChannelsECVipUserScoreFlowRecordGetAsync(this WechatApiClient client, Models.ChannelsECVipUserScoreFlowRecordGetRequest 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", "vip", "user", "score", "flowrecord", "get")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ChannelsECVipUserScoreFlowRecordGetResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /channels/ec/vip/user/score/increase 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/vip/score/incr_user_score.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ChannelsECVipUserScoreIncreaseResponse> ExecuteChannelsECVipUserScoreIncreaseAsync(this WechatApiClient client, Models.ChannelsECVipUserScoreIncreaseRequest 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", "vip", "user", "score", "increase")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ChannelsECVipUserScoreIncreaseResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /channels/ec/vip/user/score/decrease 接口。</para>
|
||||
/// <para>REF: https://developers.weixin.qq.com/doc/channels/API/vip/score/incr_user_score.html </para>
|
||||
/// </summary>
|
||||
/// <param name="client"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancellationToken"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<Models.ChannelsECVipUserScoreDecreaseResponse> ExecuteChannelsECVipUserScoreDecreaseAsync(this WechatApiClient client, Models.ChannelsECVipUserScoreDecreaseRequest 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", "vip", "user", "score", "decrease")
|
||||
.SetQueryParam("access_token", request.AccessToken);
|
||||
|
||||
return await client.SendRequestWithJsonAsync<Models.ChannelsECVipUserScoreDecreaseResponse>(flurlReq, data: request, cancellationToken: cancellationToken);
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region ECFunds
|
||||
/// <summary>
|
||||
/// <para>异步调用 [POST] /channels/ec/funds/getbalance 接口。</para>
|
||||
|
@ -0,0 +1,80 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/vip/experiencevalue/set 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECVipExperienceValueSetRequest : WechatApiRequest, IInferable<ChannelsECVipExperienceValueSetRequest, ChannelsECVipExperienceValueSetResponse>
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Config
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class PayAmountRule
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置消费金额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("pay_value")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.TextualNullableIntegerConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("pay_value")]
|
||||
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString | System.Text.Json.Serialization.JsonNumberHandling.WriteAsString)]
|
||||
public int? PayAmount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置消费门槛金额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("pay_amount_floor")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.TextualNullableIntegerConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("pay_amount_floor")]
|
||||
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString | System.Text.Json.Serialization.JsonNumberHandling.WriteAsString)]
|
||||
public int? PayAmountFloor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置获得的经验值。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("gain_value")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.TextualNullableIntegerConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("gain_value")]
|
||||
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString | System.Text.Json.Serialization.JsonNumberHandling.WriteAsString)]
|
||||
public int? GainExperienceValue { get; set; }
|
||||
}
|
||||
|
||||
public class PayTimesRule
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置获得的经验值。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("gain_value")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.TextualNullableIntegerConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("gain_value")]
|
||||
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString | System.Text.Json.Serialization.JsonNumberHandling.WriteAsString)]
|
||||
public int? GainExperienceValue { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置消费金额规则信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("pay_amount_rule")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("pay_amount_rule")]
|
||||
public Types.PayAmountRule? PayAmountRule { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置消费次数规则信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("pay_time_rule")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("pay_time_rule")]
|
||||
public Types.PayTimesRule? PayTimesRule { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置配置信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("conf")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("conf")]
|
||||
public Types.Config Config { get; set; } = new Types.Config();
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/vip/experiencevalue/set 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECVipExperienceValueSetResponse : WechatApiResponse
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/vip/grade/card/add 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECVipGradeCardAddRequest : WechatApiRequest, IInferable<ChannelsECVipGradeCardAddRequest, ChannelsECVipGradeCardAddResponse>
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置会员等级。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("grade")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("grade")]
|
||||
public int Grade { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置会员等级名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("name")]
|
||||
public string? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置经验值门槛。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("experience_value_threshold")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.TextualIntegerConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("experience_value_threshold")]
|
||||
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString | System.Text.Json.Serialization.JsonNumberHandling.WriteAsString)]
|
||||
public int ExperienceValueThreshold { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置经验值倍数(×10)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("experience_value_multiple")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.TextualIntegerConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("experience_value_multiple")]
|
||||
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString | System.Text.Json.Serialization.JsonNumberHandling.WriteAsString)]
|
||||
public int ExperienceValueMultiple { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/vip/grade/card/add 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECVipGradeCardAddResponse : WechatApiResponse
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /channels/ec/vip/grade/card/get 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECVipGradeCardGetRequest : WechatApiRequest, IInferable<ChannelsECVipGradeCardGetRequest, ChannelsECVipGradeCardGetResponse>
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,169 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /channels/ec/vip/grade/card/get 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECVipGradeCardGetResponse : WechatApiResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Data
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class ExperienceValueConfig
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class PayAmountRule
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置消费金额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("pay_value")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("pay_value")]
|
||||
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
|
||||
public int? PayAmount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置消费门槛金额(单位:分)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("pay_amount_floor")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("pay_amount_floor")]
|
||||
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
|
||||
public int? PayAmountFloor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置获得的经验值。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("gain_value")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("gain_value")]
|
||||
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
|
||||
public int? GainExperienceValue { get; set; }
|
||||
}
|
||||
|
||||
public class PayTimesRule
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置获得的经验值。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("gain_value")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("gain_value")]
|
||||
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
|
||||
public int? GainExperienceValue { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置消费金额规则信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("pay_amount_rule")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("pay_amount_rule")]
|
||||
public Types.PayAmountRule? PayAmountRule { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置消费次数规则信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("pay_time_rule")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("pay_time_rule")]
|
||||
public Types.PayTimesRule? PayTimesRule { get; set; }
|
||||
}
|
||||
|
||||
public class GradeCardConfig
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class GradeCard
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class AuditInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置审核状态。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("status")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("status")]
|
||||
public int Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置最新会员等级名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("latest_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("latest_name")]
|
||||
public string? LatestName { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置会员等级。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("grade")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("grade")]
|
||||
public int Grade { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置会员等级名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("valid_name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("valid_name")]
|
||||
public string Name { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置经验值门槛。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("experience_value_threshold")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("experience_value_threshold")]
|
||||
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
|
||||
public int ExperienceValueThreshold { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置经验值倍数(×10)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("experience_value_multiple")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("experience_value_multiple")]
|
||||
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
|
||||
public int ExperienceValueMultiple { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置审核信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("audit_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("audit_info")]
|
||||
public Types.AuditInfo? AuditInfo { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置会员等级列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("grade_card_list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("grade_card_list")]
|
||||
public Types.GradeCard[] GradeCardList { get; set; } = default!;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置经验值配置信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("experience_value_conf")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("experience_value_conf")]
|
||||
public Types.ExperienceValueConfig? ExperienceValueConfig { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置会员等级配置信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("card_conf")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("card_conf")]
|
||||
public Types.GradeCardConfig? GradeCardConfig { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置返回数据。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("info")]
|
||||
public Types.Data Data { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/vip/grade/card/update 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECVipGradeCardUpdateRequest : WechatApiRequest, IInferable<ChannelsECVipGradeCardUpdateRequest, ChannelsECVipGradeCardUpdateResponse>
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置会员等级。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("grade")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("grade")]
|
||||
public int Grade { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置会员等级名称。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("name")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("name")]
|
||||
public string? Name { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/vip/grade/card/update 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECVipGradeCardUpdateResponse : WechatApiResponse
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /channels/ec/vip/score/get 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECVipScoreGetRequest : WechatApiRequest, IInferable<ChannelsECVipScoreGetRequest, ChannelsECVipScoreGetResponse>
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,108 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [GET] /channels/ec/vip/score/get 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECVipScoreGetResponse : WechatApiResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Config
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class GainRule
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class PayAmountRule
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置消费积分。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("pay_value")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("pay_value")]
|
||||
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
|
||||
public int? PayValue { get; set; }
|
||||
}
|
||||
|
||||
public class PayTimesRule
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置获得积分。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("gain_value")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("gain_value")]
|
||||
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
|
||||
public int? GainValue { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置消费金额规则信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("pay_amount_rule")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("pay_amount_rule")]
|
||||
public Types.PayAmountRule? PayAmountRule { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置消费次数规则信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("pay_time_rule")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("pay_time_rule")]
|
||||
public Types.PayTimesRule? PayTimesRule { get; set; }
|
||||
}
|
||||
|
||||
public class DeductRule
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置是否开启。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("open_mgr")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalBooleanConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("open_mgr")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalBooleanConverter))]
|
||||
public bool IsOpen { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置抵扣比例(单位:百分数)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("ratio")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("ratio")]
|
||||
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
|
||||
public int? Ratio { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置抵扣上限。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("limit")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("limit")]
|
||||
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
|
||||
public int? Limit { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置获取规则信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("gain_rule")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("gain_rule")]
|
||||
public Types.GainRule? GainRule { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置抵扣规则信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("deduct_rule")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("deduct_rule")]
|
||||
public Types.DeductRule? DeductRule { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置配置信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("conf")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("conf")]
|
||||
public Types.Config Config { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,112 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/vip/score/set 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECVipScoreSetRequest : WechatApiRequest, IInferable<ChannelsECVipScoreSetRequest, ChannelsECVipScoreSetResponse>
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class Config
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class GainRule
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class PayAmountRule
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置消费积分。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("pay_value")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.TextualNullableIntegerConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("pay_value")]
|
||||
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString | System.Text.Json.Serialization.JsonNumberHandling.WriteAsString)]
|
||||
public int? PayValue { get; set; }
|
||||
}
|
||||
|
||||
public class PayTimesRule
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置获得积分。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("gain_value")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.TextualNullableIntegerConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("gain_value")]
|
||||
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString | System.Text.Json.Serialization.JsonNumberHandling.WriteAsString)]
|
||||
public int? GainValue { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置消费金额规则信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("pay_amount_rule")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("pay_amount_rule")]
|
||||
public Types.PayAmountRule? PayAmountRule { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置消费次数规则信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("pay_time_rule")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("pay_time_rule")]
|
||||
public Types.PayTimesRule? PayTimesRule { get; set; }
|
||||
}
|
||||
|
||||
public class DeductRule
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置是否开启。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("open_mgr")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.NumericalBooleanConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("open_mgr")]
|
||||
[System.Text.Json.Serialization.JsonConverter(typeof(System.Text.Json.Converters.NumericalBooleanConverter))]
|
||||
public bool IsOpen { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置抵扣比例(单位:百分数)。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("ratio")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.TextualNullableIntegerConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("ratio")]
|
||||
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString | System.Text.Json.Serialization.JsonNumberHandling.WriteAsString)]
|
||||
public int? Ratio { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置抵扣上限。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("limit")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.TextualNullableIntegerConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("limit")]
|
||||
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString | System.Text.Json.Serialization.JsonNumberHandling.WriteAsString)]
|
||||
public int? Limit { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置获取规则信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("gain_rule")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("gain_rule")]
|
||||
public Types.GainRule? GainRule { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置抵扣规则信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("deduct_rule")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("deduct_rule")]
|
||||
public Types.DeductRule? DeductRule { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置配置信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("conf")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("conf")]
|
||||
public Types.Config Config { get; set; } = new Types.Config();
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/vip/score/set 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECVipScoreSetResponse : WechatApiResponse
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,24 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/vip/user/experiencevalue/update 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECVipUserExperienceValueUpdateRequest : WechatApiRequest, IInferable<ChannelsECVipUserExperienceValueUpdateRequest, ChannelsECVipUserExperienceValueUpdateResponse>
|
||||
{
|
||||
/// <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("experience_value")]
|
||||
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.TextualIntegerConverter))]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("experience_value")]
|
||||
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString | System.Text.Json.Serialization.JsonNumberHandling.WriteAsString)]
|
||||
public int ExperienceValue { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/vip/user/experiencevalue/update 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECVipUserExperienceValueUpdateResponse : WechatApiResponse
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/vip/user/grade/update 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECVipUserGradeUpdateRequest : WechatApiRequest, IInferable<ChannelsECVipUserGradeUpdateRequest, ChannelsECVipUserGradeUpdateResponse>
|
||||
{
|
||||
/// <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("grade")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("grade")]
|
||||
public int Grade { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/vip/user/grade/update 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECVipUserGradeUpdateResponse : WechatApiResponse
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/vip/user/info/get 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECVipUserInfoGetRequest : WechatApiRequest, IInferable<ChannelsECVipUserInfoGetRequest, ChannelsECVipUserInfoGetResponse>
|
||||
{
|
||||
/// <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("need_phone_number")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("need_phone_number")]
|
||||
public bool? RequirePhoneNumber { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,22 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/vip/user/info/get 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECVipUserInfoGetResponse : WechatApiResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class VipInfo : ChannelsECVipUserListGetResponse.Types.VipInfo
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置会员信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("info")]
|
||||
public Types.VipInfo VipInfo { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/vip/user/list/get 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECVipUserListGetRequest : WechatApiRequest, IInferable<ChannelsECVipUserListGetRequest, ChannelsECVipUserListGetResponse>
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置是否需要获取手机号码。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("need_phone_number")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("need_phone_number")]
|
||||
public bool? RequirePhoneNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页页数。
|
||||
/// <para>默认值:1</para>
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("page_num")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("page_num")]
|
||||
public int Page { get; set; } = 1;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
/// <para>默认值:10</para>
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("page_size")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("page_size")]
|
||||
public int Limit { get; set; } = 10;
|
||||
}
|
||||
}
|
@ -0,0 +1,87 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/vip/user/list/get 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECVipUserListGetResponse : WechatApiResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class VipInfo
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class UserInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置手机号码。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("phone_number")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("phone_number")]
|
||||
public string PhoneNumber { get; set; } = default!;
|
||||
}
|
||||
|
||||
public class UserGradeInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置会员等级。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("grade")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("grade")]
|
||||
public int Grade { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置经验值。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("experience_value")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("experience_value")]
|
||||
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
|
||||
public int ExperienceValue { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户的 OpenId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("openid")]
|
||||
[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>
|
||||
[Newtonsoft.Json.JsonProperty("user_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("user_info")]
|
||||
public Types.UserInfo? UserInfo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户等级信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("user_grade_info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("user_grade_info")]
|
||||
public Types.UserGradeInfo? UserGradeInfo { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置会员列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("list")]
|
||||
public Types.VipInfo[] VipList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置总数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("total_num")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("total_num")]
|
||||
public int TotalCount { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/vip/user/score/decrease 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECVipUserScoreDecreaseRequest : ChannelsECVipUserScoreIncreaseRequest, IInferable<ChannelsECVipUserScoreDecreaseRequest, ChannelsECVipUserScoreDecreaseResponse>
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/vip/user/score/decrease 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECVipUserScoreDecreaseResponse : WechatApiResponse
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/vip/user/score/flowrecord/get 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECVipUserScoreFlowRecordGetRequest : WechatApiRequest, IInferable<ChannelsECVipUserScoreFlowRecordGetRequest, ChannelsECVipUserScoreFlowRecordGetResponse>
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置用户的 OpenId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("openid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("openid")]
|
||||
public string OpenId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页页数。
|
||||
/// <para>默认值:1</para>
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("page_num")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("page_num")]
|
||||
public int Page { get; set; } = 1;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置分页每页数量。
|
||||
/// <para>默认值:10</para>
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("page_size")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("page_size")]
|
||||
public int Limit { get; set; } = 10;
|
||||
}
|
||||
}
|
@ -0,0 +1,50 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/vip/user/score/flowrecord/get 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECVipUserScoreFlowRecordGetResponse : WechatApiResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class FlowRecord
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置用户积分。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("score")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("score")]
|
||||
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
|
||||
public int Score { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置来源。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("source")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("source")]
|
||||
public int Source { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置备注。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("remark")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("remark")]
|
||||
public string? Remark { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置积分流水列表。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("list")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("list")]
|
||||
public Types.FlowRecord[] FlowRecordList { get; set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置总数量。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("total_num")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("total_num")]
|
||||
public int TotalCount { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/vip/user/score/get 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECVipUserScoreGetRequest : WechatApiRequest, IInferable<ChannelsECVipUserScoreGetRequest, ChannelsECVipUserScoreGetResponse>
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置用户的 OpenId。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("openid")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("openid")]
|
||||
public string OpenId { get; set; } = string.Empty;
|
||||
}
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/vip/user/score/get 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECVipUserScoreGetResponse : WechatApiResponse
|
||||
{
|
||||
public static class Types
|
||||
{
|
||||
public class UserInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取或设置用户积分。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("score")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("score")]
|
||||
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString)]
|
||||
public int Score { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置用户信息。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("info")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("info")]
|
||||
public Types.UserInfo UserInfo { get; set; } = default!;
|
||||
}
|
||||
}
|
@ -0,0 +1,37 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/vip/user/score/increase 接口的请求。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECVipUserScoreIncreaseRequest : WechatApiRequest, IInferable<ChannelsECVipUserScoreIncreaseRequest, ChannelsECVipUserScoreIncreaseResponse>
|
||||
{
|
||||
/// <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("score")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("score")]
|
||||
[System.Text.Json.Serialization.JsonNumberHandling(System.Text.Json.Serialization.JsonNumberHandling.AllowReadingFromString | System.Text.Json.Serialization.JsonNumberHandling.WriteAsString)]
|
||||
public int Score { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置请求唯一 ID。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("request_id")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("request_id")]
|
||||
public string RequestId { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 获取或设置备注。
|
||||
/// </summary>
|
||||
[Newtonsoft.Json.JsonProperty("remark")]
|
||||
[System.Text.Json.Serialization.JsonPropertyName("remark")]
|
||||
public string? Remark { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
namespace SKIT.FlurlHttpClient.Wechat.Api.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>表示 [POST] /channels/ec/vip/user/score/increase 接口的响应。</para>
|
||||
/// </summary>
|
||||
public class ChannelsECVipUserScoreIncreaseResponse : WechatApiResponse
|
||||
{
|
||||
}
|
||||
}
|
@ -0,0 +1,10 @@
|
||||
{
|
||||
"ToUserName": "gh_*",
|
||||
"FromUserName": "OPENID",
|
||||
"CreateTime": 1662480000,
|
||||
"MsgType": "event",
|
||||
"Event": "channels_ec_vip_close",
|
||||
"user_info": {
|
||||
"close_time": 1662480000
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
{
|
||||
"ToUserName": "gh_*",
|
||||
"FromUserName": "OPENID",
|
||||
"CreateTime": 1662480000,
|
||||
"MsgType": "event",
|
||||
"Event": "channels_ec_vip_grade_info_update",
|
||||
"user_info": {
|
||||
"grade": 2,
|
||||
"experience_value": 100
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
{
|
||||
"ToUserName": "gh_*",
|
||||
"FromUserName": "OPENID",
|
||||
"CreateTime": 1662480000,
|
||||
"MsgType": "event",
|
||||
"Event": "channels_ec_vip_join",
|
||||
"user_info": {
|
||||
"join_time": 1662480000,
|
||||
"phone_number": "123456789"
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
{
|
||||
"ToUserName": "gh_*",
|
||||
"FromUserName": "OPENID",
|
||||
"CreateTime": 1662480000,
|
||||
"MsgType": "event",
|
||||
"Event": "channels_ec_vip_score_exchange",
|
||||
"exchange_info": {
|
||||
"pay_score": 100,
|
||||
"score_item_type": 1,
|
||||
"coupon_info": {
|
||||
"related_coupon_id": 1234
|
||||
},
|
||||
"product_info": {
|
||||
"related_product_id": 1234
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
{
|
||||
"ToUserName": "gh_*",
|
||||
"FromUserName": "OPENID",
|
||||
"CreateTime": 1662480000,
|
||||
"MsgType": "event",
|
||||
"Event": "channels_ec_vip_score_update",
|
||||
"user_info": {
|
||||
"score": 100,
|
||||
"delta_score": -10,
|
||||
"flow_type": 3
|
||||
}
|
||||
}
|
@ -0,0 +1,16 @@
|
||||
{
|
||||
"ToUserName": "gh_*",
|
||||
"FromUserName": "OPENID",
|
||||
"CreateTime": 1662480000,
|
||||
"MsgType": "event",
|
||||
"Event": "channels_ec_vip_task_award",
|
||||
"task_info": {
|
||||
"task_id": 123,
|
||||
"task_name": "任务名称",
|
||||
"award_info": {
|
||||
"award_type": 1,
|
||||
"coupon_id": 1234,
|
||||
"gain_score": 100
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
{
|
||||
"conf": {
|
||||
"pay_amount_rule": {
|
||||
"pay_value": "100",
|
||||
"gain_value": "1",
|
||||
"pay_amount_floor": "100"
|
||||
},
|
||||
"pay_time_rule": {
|
||||
"gain_value": "1"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"grade": 1,
|
||||
"name": "VIP1",
|
||||
"experience_value_threshold": "100",
|
||||
"experience_value_multiple": 10
|
||||
}
|
@ -0,0 +1,40 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"info": {
|
||||
"experience_value_conf": {
|
||||
"pay_amount_rule": {
|
||||
"pay_value": "100",
|
||||
"gain_value": "1",
|
||||
"pay_amount_floor": "100"
|
||||
},
|
||||
"pay_time_rule": {
|
||||
"gain_value": "1"
|
||||
}
|
||||
},
|
||||
"card_conf": {
|
||||
"grade_card_list": [
|
||||
{
|
||||
"grade": 1,
|
||||
"valid_name": "VIP1",
|
||||
"experience_value_threshold": "100",
|
||||
"experience_value_multiple": 10,
|
||||
"audit_info": {
|
||||
"latest_name": "VIP1",
|
||||
"status": 1
|
||||
}
|
||||
},
|
||||
{
|
||||
"grade": 2,
|
||||
"valid_name": "VIP2",
|
||||
"experience_value_threshold": "200",
|
||||
"experience_value_multiple": 12,
|
||||
"audit_info": {
|
||||
"latest_name": "高级会员",
|
||||
"status": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"grade": 1,
|
||||
"name": "VIP1"
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"conf": {
|
||||
"gain_rule": {
|
||||
"pay_amount_rule": {
|
||||
"pay_value": "100"
|
||||
},
|
||||
"pay_time_rule": {
|
||||
"gain_value": "1"
|
||||
}
|
||||
},
|
||||
"deduct_rule": {
|
||||
"open_mgr": 1,
|
||||
"ratio": "100",
|
||||
"limit": "100"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
{
|
||||
"conf": {
|
||||
"gain_rule": {
|
||||
"pay_amount_rule": {
|
||||
"pay_value": "100"
|
||||
},
|
||||
"pay_time_rule": {
|
||||
"gain_value": "1"
|
||||
}
|
||||
},
|
||||
"deduct_rule": {
|
||||
"open_mgr": 1,
|
||||
"ratio": "100",
|
||||
"limit": "100"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"openid": "OPENID",
|
||||
"experience_value": "100"
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"openid": "OPENID",
|
||||
"grade": 1
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"openid": "OPENID",
|
||||
"need_phone_number": true
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"info": {
|
||||
"openid": "OPENID",
|
||||
"unionid": "UNIONID",
|
||||
"user_info": {
|
||||
"phone_number": "123456789"
|
||||
},
|
||||
"user_grade_info": {
|
||||
"grade": 1,
|
||||
"experience_value": "100"
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
"need_phone_number": true,
|
||||
"page_num": 1,
|
||||
"page_size": 1
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"list": [
|
||||
{
|
||||
"openid": "OPENID",
|
||||
"unionid": "UNIONID",
|
||||
"user_info": {
|
||||
"phone_number": "123456789"
|
||||
},
|
||||
"user_grade_info": {
|
||||
"grade": 1,
|
||||
"experience_value": "100"
|
||||
}
|
||||
}
|
||||
],
|
||||
"total_num": 100
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"openid": "OPENID",
|
||||
"score": "100",
|
||||
"remark": "备注",
|
||||
"request_id": "REQUEST_ID"
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
{
|
||||
"openid": "OPENID",
|
||||
"page_num": 1,
|
||||
"page_size": 200
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"list": [
|
||||
{
|
||||
"score": "100",
|
||||
"source": 1,
|
||||
"remark": "备注"
|
||||
}
|
||||
],
|
||||
"total_num": 100
|
||||
}
|
@ -0,0 +1,3 @@
|
||||
{
|
||||
"openid": "OPENID"
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
{
|
||||
"errcode": 0,
|
||||
"errmsg": "ok",
|
||||
"info": {
|
||||
"score": "100"
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
{
|
||||
"openid": "OPENID",
|
||||
"score": "100",
|
||||
"remark": "备注",
|
||||
"request_id": "REQUEST_ID"
|
||||
}
|
Loading…
Reference in New Issue
Block a user